You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Publish sql-pipe to the npm registry so that Node.js/JavaScript developers can install it using the standard npm toolchain, without needing to compile from source or use a platform-specific binary release.
Motivation
npm is the most widely-used package manager in the JavaScript ecosystem. Many developers already have it installed and prefer to use it for CLI tools. Supporting npm install -g @vmvarela/sql-pipe would significantly lower the barrier to adoption.
Design Decisions
Package name: @vmvarela/sql-pipe (scoped under the existing npmjs.com account)
Distribution strategy: Single bundled package — all platform binaries are included in the package itself. No optionalDependencies sub-packages, no postinstall download. A small JS launcher (bin/sql-pipe.js) detects the current platform/arch at runtime and executes the correct binary.
Authentication: Trusted Publishing (OIDC) — no long-lived NPM_TOKEN secret in the repo. The CI job uses permissions: id-token: write and publishes with --provenance.
First publish: The package name must be claimed manually once (npm publish --access public from a local machine with npm login) before Trusted Publishing can be configured on npmjs.com. Subsequent releases are fully automated via CI.
Version sync: The package.json in the repo uses "0.0.0" as a placeholder. The CI injects the real version from the git tag at publish time: npm version $VERSION --no-git-tag-version.
Acceptance Criteria
packaging/npm/package.json created with correct metadata (@vmvarela/sql-pipe, description, bin entry, license, repository, engines)
packaging/npm/bin/sql-pipe.js launcher detects platform/arch and executes the bundled binary; exits with a clear error on unsupported platforms
Pre-built binaries for all supported platforms are staged and bundled by CI at publish time:
Linux: x64, arm64, arm (armv7)
macOS: x64, arm64
Windows: x64
npm install -g @vmvarela/sql-pipe installs a working sql-pipe CLI on all supported platforms
CI publish-npm job added to release.yml, runs after release, uses Trusted Publishing (OIDC), no NPM_TOKEN secret required
Job is a no-op if Trusted Publishing is not configured (graceful skip, consistent with other optional publish jobs)
npm package version matches the git tag version (e.g. tag v0.3.1 → package 0.3.1)
Installation instructions via npm added to README.md
Implementation Notes
New files
packaging/npm/package.json — placeholder version 0.0.0, overridden by CI
Description
Publish sql-pipe to the npm registry so that Node.js/JavaScript developers can install it using the standard npm toolchain, without needing to compile from source or use a platform-specific binary release.
Motivation
npm is the most widely-used package manager in the JavaScript ecosystem. Many developers already have it installed and prefer to use it for CLI tools. Supporting
npm install -g @vmvarela/sql-pipewould significantly lower the barrier to adoption.Design Decisions
@vmvarela/sql-pipe(scoped under the existing npmjs.com account)optionalDependenciessub-packages, nopostinstalldownload. A small JS launcher (bin/sql-pipe.js) detects the current platform/arch at runtime and executes the correct binary.NPM_TOKENsecret in the repo. The CI job usespermissions: id-token: writeand publishes with--provenance.npm publish --access publicfrom a local machine withnpm login) before Trusted Publishing can be configured on npmjs.com. Subsequent releases are fully automated via CI.package.jsonin the repo uses"0.0.0"as a placeholder. The CI injects the real version from the git tag at publish time:npm version $VERSION --no-git-tag-version.Acceptance Criteria
packaging/npm/package.jsoncreated with correct metadata (@vmvarela/sql-pipe, description, bin entry, license, repository, engines)packaging/npm/bin/sql-pipe.jslauncher detects platform/arch and executes the bundled binary; exits with a clear error on unsupported platformsnpm install -g @vmvarela/sql-pipeinstalls a workingsql-pipeCLI on all supported platformspublish-npmjob added torelease.yml, runs afterrelease, uses Trusted Publishing (OIDC), noNPM_TOKENsecret requiredv0.3.1→ package0.3.1)README.mdImplementation Notes
New files
packaging/npm/package.json— placeholder version0.0.0, overridden by CIpackaging/npm/bin/sql-pipe.js— platform-detecting JS launcher (committed)packaging/npm/.npmignore— ensures only intended files are publishedModified files
.github/workflows/release.yml— newpublish-npmjob withpermissions: id-token: writeREADME.md— npm install sectionBinary staging in CI
sql-pipe-x86_64-linuxbin/sql-pipe-linux-x64sql-pipe-aarch64-linuxbin/sql-pipe-linux-arm64sql-pipe-armv7-linuxbin/sql-pipe-linux-armsql-pipe-x86_64-macosbin/sql-pipe-darwin-x64sql-pipe-aarch64-macosbin/sql-pipe-darwin-arm64sql-pipe-x86_64-windows.exebin/sql-pipe-win32-x64.exeFirst-publish bootstrap procedure
npm loginlocally with thevmvarelanpm accountnpm publish packaging/npm --access publicto claim the package name (version0.0.0)vmvarela/sql-pipe, workflowrelease.yml