npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@smapiot/piral-cli-integration-tests

v1.0.0

Published

Acceptance tests for the `piral-cli` package and bundler plugins.

Downloads

3

Readme

Piral Logo

Piral CLI Acceptance Tests

Integration tests for the piral-cli tool and its default bundler. Can be used as a test bench when implementing a new bundler, too.

Status

Overall

| OS | Node | Status | | ------------ | ------ | ------------ | | Linux | 16.x | Build Status | | Linux | 20.x | Build Status | | Linux | 21.x | Build Status | | Windows | 16.x | Build Status | | Windows | 20.x | Build Status | | MacOS | 16.x | Build Status | | MacOS | 20.x | Build Status |

Important Links

  • 📢 We are hiring! - work with us on Piral, its ecosystem and our users
  • 🌍 Website - learn more about Piral
  • 📖 Documentation - everything to get started and master micro frontends
  • 🉐 Help translating Piral! - making PRs in the documentation branch
  • 🐞 Issue Tracker - report bugs or suggest new features
  • 🗨 Forums - use the community support on StackOverflow
  • 👪 Community Chat - ask questions and provide answers in our Gitter room

Running the Tests

After you cloned the repository run:

npm i

or an alternative command using your favorite package manager.

Now you can try running all tests:

npm start

You can also run the tests from a specific file only:

npm start -- src/pilet-build.test.ts

If you are only interested in a single test (e.g., 'can build a standard templated v2 pilet from sample-piral') then run it via:

npm start -- src/pilet-build.test.ts -t 'can build a standard templated v2 pilet from sample-piral'

Caution: Tests that leverage the integrated browser (using the page variable) can only be run if the whole test suite (i.e., no -t is specified) is run.

For Ubuntu 18.04 and higher the system dependencies can get installed automatically. Many other systems may just work without any special dependencies:

npx playwright install-deps chromium

To ensure everything is working with the test browser we recommend also installing the browsers from Playwright via the command line:

npx playwright install chromium

Testing Package

npm version

The tests are also available as a drop-in package to test bundler plugins. You can install it with:

npm i @smapiot/piral-cli-integration-tests

Then run the tests using

npx piral-cli-tests <your-bundler-name>

If you don't specify the bundler name then the current working directory's package.json will be used to infer it.

Tests

Piral

  • ✅ Scaffold Piral instance
  • ✅ Run/debug Piral instance
  • ✅ Build Piral instance release
  • ✅ Build Piral instance emulator
  • ✅ Build Piral instance emulator sources
  • ✅ Generate Piral instance declaration
  • ✅ Validate Piral instance
  • ✅ Use Piral instance emulator for scaffolding locally
  • ✅ Change Piral instance while debugging (HMR)
  • ✅ Upgrade Piral instance from older (0.12.0 -> ENV) to recent version
  • ✅ Check Piral instance with debugging API (e.g., for piral-inspector)

Pilet

  • ✅ Scaffold pilet (using sample-piral)
  • ✅ Run/debug new pilet
  • ✅ Build mf pilet
  • ✅ Build v3 pilet
  • ✅ Build v2 pilet
  • ✅ Build v1 pilet
  • ✅ Build v0 pilet
  • ✅ Build standalone pilet
  • ✅ Build pilet manifest file
  • ✅ Publish pilet (to temp. feed)
  • ✅ Validate pilet
  • ✅ Change pilet while debugging (reinject pilet)
  • ⏸️ Upgrade pilet from older sample-piral to current
  • ✅ Check pilet with debugging API (e.g., for piral-inspector)

The publish pilet command uses:

pilet publish --api-key {key} --url https://feed.piral.cloud/api/v1/pilet/temp --fresh

It also can perform against a feed hosted by the sample-pilet-service.

Enviroment variables

| ENV | Description | Default | | ------------------ | ---------------------------------- | ---------- | | CLI_VERSION | Version of the piral-cli package | latest | | BUNDLER_PLUGIN | The name of the bundler to use | | | BUNDLER_FEATURES | The features of the bundler plugin | all |

Available features:

  • codegen, can handle *.codegen files
  • splitting, can handle import() calls with a new JS side-bundle
  • pilet.v0, supports the v0 schema
  • pilet.v1, supports the v1 schema
  • pilet.v2, supports the v2 schema
  • pilet.v3, supports the v3 schema
  • pilet.mf, supports the mf schema
  • importmap.ref, supports usage of an importmap
  • importmap.local, supports local creation of importmap side-bundles
  • build.pilet, supports building a pilet
  • build.piral, supports building a Piral instance
  • debug.pilet, supports debugging a pilet
  • debug.piral, supports debugging a Piral instance
  • hmr, supports hot module reloading (for Piral instances)

License

Piral is released using the MIT license. For more information see the license file.