This package is splitted in multiple packages that can be used independently.
| Package Name | Description | Version | Links |
|---|---|---|---|
| generator-folklore | Yeoman generator for Folklore projects | Documentation | |
| @folklore/config | Config helpers | Documentation | |
| @folklore/size | Sizing utilities | Documentation | |
| @folklore/pan | Panning and MouseWheeling utilities | Documentation | |
| @folklore/laravel | Laravel javascript helpers | Documentation | |
| @folklore/services | External services helpers | Documentation | |
| @folklore/pixi | Pixi.js utilities | Documentation | |
| @folklore/user-media | getUserMedia utilities | Documentation |
Packages are versioned independently with Changesets and published to npm by GitHub Actions, with trusted publishing: no npm token, and each version gets a provenance attestation.
- In the pull request that changes a published package, run
npx changeset: pick the packages, the bump (patch, minor or major) and write the line for theirCHANGELOG.md. Commit the file it creates in.changeset/. Changes outsidepackages/don't need one; a package change that doesn't need a release takesnpx changeset --empty. The Changeset check fails a pull request that changes a package without one. - On every push to
main, the Release workflow opens or updates the "Version packages" pull request, which bumps the versions and writes the changelogs. - Before merging it, configure trusted publishing for the packages it releases for the first time (see below).
- Merging it runs the workflow again: it builds the packages, publishes the new versions, pushes the
<package>@<version>tags and creates the GitHub releases.
Don't publish from a local machine (lerna publish, npm publish).
npm only accepts a publish from the Release workflow for packages that trust it. Configure a package once, with npm 11.15+, write access to the package and 2FA:
scripts/trust-packages.shRun on the "Version packages" branch with no argument, it configures the packages whose new version isn't on npm yet; it also takes package names. A new configuration expires if no publish succeeds with it within 2 days, so don't configure packages ahead of their release. A package that isn't configured fails to publish with ENEEDAUTH while the others go through: configure it and re-run the workflow.
Once a package has been published by the workflow, its npm settings can be set to "Require two-factor authentication and disallow tokens", which doesn't affect trusted publishing. The workflow file name (release.yml) is part of the trust: renaming it breaks publishing.