Check instructions before publishing
Command
You can also manually trigger the Release Preflight workflow through GitHub Actions; the same set of access control will also be automatically executed when the v* tag is pushed.
What will it do
- Check whether
package-lock.jsonis consistent with the currentpackage.jsonversion and does not containfile:/workspace:/ sibling local path residue. - Check whether the changelog file corresponding to the current
package.jsonversion exists. - Check whether the necessary documents for project management exist:
docs/support-matrix.mddocs/file-dependency-governance.mddocs/verification-entrypoints.md
- Run
npm run verify:fast - Run
npm test - Run
npm pack --dry-run - The original
npm publishwill still trigger the same set ofrelease:preflightthroughprepublishOnlyto prevent bypassing the access control - The warehouse publishing workflow and
npm run release:publishwill first explicitly executerelease:preflight, and then usenpm publish --ignore-scriptsto publish to avoid repeated execution of complete access control within the publishing action. - Will not run
npm run verify:release(the latter relies on a private real environment and is a supplementary review of the operator's explicit opt-in)
Why not publish directly?
The goal of this script is to close the version information, public verification chain, dependency release boundary, and package consumability first, and then enter the release/tag/publish stage of manual confirmation.
Recommended order
If you take the warehouse automation path, you can manually run
Release Preflightof GitHub Actions first, and then push thev*tag or manually run thePublish to npmworkflow after confirming that it is passed. The real publish step has skipped duplicate lifecycle scripts because the same job predecessor step has already completedrelease:preflight.