Skip to content

Prepare @bindist/client for publishing to npm - #2

Merged
partouf merged 1 commit into
mainfrom
chore/npm-publish
Nov 16, 2026
Merged

partouf merged 1 commit into
mainfrom
chore/npm-publish

Conversation

@partouf

@partouf partouf commented Nov 16, 2026

Copy link
Copy Markdown
Member

@bindist/client has never been published to npm. We already own the @bindist org (which holds @bindist/dynamo-to-pg), so the name is ours. This PR gets the package ready to publish and adds a release workflow.

Changes

  • publishConfig.access: public: npm publishes scoped packages as private by default, so without this the first publish would fail on a free org or end up private on a paid one.
  • Metadata: fills in author, homepage (docs.bindist.eu/sdks/javascript), repository and bugs, and replaces the outdated description.
  • exports types: ESM consumers were pointed at the CJS index.d.ts. Each format now has its own types file (index.d.mts for import, index.d.ts for require).
  • prepublishOnly: runs lint, typecheck and build before any publish.
  • .github/workflows/release.yml: runs on a v* tag, checks that the tag matches the package.json version, then runs npm publish --provenance.
  • README: removes "(when published)" and fixes the from-source steps.

Before the first release

  1. Create an npm automation token for the @bindist org and add it to this repo as the NPM_TOKEN secret.
  2. Decide the version. It is currently 1.0.0.
  3. After merging, tag main (for example git tag v1.0.0 && git push --tags).

Testing

npm ci && npm run lint && npm run typecheck && npm run build passes locally. npm pack --dry-run lists the expected 7 files: the CJS/ESM builds, both .d.ts files, the README, the LICENSE and package.json.

🤖 Generated with Claude Code

- publishConfig.access public, so the first publish of the scoped
  package doesn't fail or land as private
- Fill in author, homepage, repository and bugs metadata
- Give the ESM and CJS entry points their own type declarations
  (index.d.mts / index.d.ts) instead of pointing both at the CJS ones
- prepublishOnly runs lint, typecheck and build
- Release workflow: on a v* tag, check the tag matches package.json
  and run npm publish --provenance using the NPM_TOKEN secret
- README: drop "(when published)" and fix the from-source steps

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@partouf
partouf merged commit a46d492 into main Nov 16, 2026
2 checks passed
@partouf
partouf deleted the chore/npm-publish branch November 16, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant