Publish an integration
Publish your package to npm under the right release tag, and check it before and after.Check before you publish
Publish only a package that passes every check, then preview the upload with npm publish --dry-run. The dry run lists the files and the tag without uploading.
bashnpx astryx doctor integration validate && npx astryx doctor integration components && npx astryx doctor integration templates && npx astryx doctor integration docs && npx astryx integration verifynpm publish --dry-run --access public
textnpm notice Publishing to https://registry.npmjs.org/ with tag latest and public access (dry-run)+ @acme/astryx-widgets@1.0.0
Set a new version for each release; astryx docs cli/integrations/ship/versioning covers what counts as breaking. What each check proves is in astryx docs cli/integrations/ship/checks.
Keep private files out
With no files list, npm packs every file your ignore files do not exclude, including an old .tgz file or an .env file. List what ships instead.
bashnpm pkg set 'files[]=components' 'files[]=templates' 'files[]=themes' 'files[]=docs' 'files[]=codemods' 'files[]=astryx.integration.mjs'npm pack --dry-run
Listonly the roots you ship, and alwaysastryx.integration.mjs. npm adds package.json, and a README and LICENSE when you have them.- Each later
integration addappends its root to the list. integration verifyfails when a root is missing from the list:Declared templates root "templates" has 0 of 2 expected files in the pack list. Add "templates" to "files" in package.json.
Publish to npm
A scoped package is private by default, so publish it with --access public. Without --tag, npm tags the release latest, which is what npm install @acme/astryx-widgets installs.
bash# Publish a releasenpm publish --access public# Or set the access once in package.jsonnpm pkg set publishConfig.access=public
To let apps try a release first, publish it under next, then point latest at it when it is ready.
bash# Only apps that ask for next get it: npm install @acme/astryx-widgets@nextnpm publish --tag next# Make that version the defaultnpm dist-tag add @acme/astryx-widgets@1.1.0 latestnpm dist-tag ls @acme/astryx-widgets
Check the published package
Install the version you published in a clean app, and run the same commands you ran against the .tgz file.
bashmkdir check-release && cd check-releasenpm init -ynpm install @astryxdesign/core @astryxdesign/cli @acme/astryx-widgets@1.0.0npx astryx component AcmeCarouselnpx astryx doctor integration validate @acme/astryx-widgets
The full list of commands to run in an app is in astryx docs cli/integrations/ship/test-in-an-app. To help apps move to the new version, see astryx docs cli/integrations/ship/upgrading.