Skip to content

Publishing and packaging

Publishing and packaging

FlowDelta is published to npm as @syntax-syllogism/flow-delta.

The npm version lifecycle synchronizes the GitHub Actions example’s caret pin with the package major and minor version. The release tool stages the updated example with the manifest and lockfile.

Build

npm run build runs scripts/build.mjs, which bundles the six CLI and reporter entrypoints:

  • dist/cli.js
  • dist/gitlab-report.js
  • dist/github-report.js
  • dist/flexipage-cli.js
  • dist/flexipage-gitlab-report.js
  • dist/flexipage-github-report.js

Each file gets a Node shebang and is marked executable. Runtime dependencies stay external, so the published package loads xml2js and elkjs from npm instead of bundling them.

What’s in the package

The manifest publishes:

  • dist/
  • NOTICE
  • LICENSE
  • LICENSE-APACHE
  • README.md

The binaries map like this:

BinaryTarget
flow-deltadist/cli.js
flow-delta-gitlabdist/gitlab-report.js
flow-delta-githubdist/github-report.js
flexipage-deltadist/flexipage-cli.js
flexipage-delta-gitlabdist/flexipage-gitlab-report.js
flexipage-delta-githubdist/flexipage-github-report.js

Before you release

Run these in order:

Terminal window
npm run typecheck
npm run build
npm test
npm pack --json

npm run typecheck also runs in repository CI and in prepublishOnly, ahead of the build and tests. The packed tarball should contain the six dist entrypoints and the license files above.

The release CLI updates the pinned source links in these docs to the new release tag as part of the release commit.

The vendored parser is Apache-2.0, so NOTICE and LICENSE-APACHE must ship with the package. See Vendoring policy for provenance and the do-not-edit rule.