Skip to content

Configure npm publishing for JavaScript SDK - #3

Merged
nicolasiscoding merged 1 commit into
mainfrom
npm-publish-setup
Dec 11, 2025
Merged

Configure npm publishing for JavaScript SDK#3
nicolasiscoding merged 1 commit into
mainfrom
npm-publish-setup

Conversation

@nicolasiscoding

Copy link
Copy Markdown
Member

Summary

Configures npm publishing setup for the JavaScript SDK with tag-based automated releases.

Changes

Fixed critical build issues:

  • Changed TypeScript rootDir from "." to "./src" - fixes build output path from dist/src/ to dist/
  • Excluded tests from TypeScript compilation

Added npm workspace support:

  • Created root package.json with workspaces configuration
  • Fixes npm ci failures in GitHub Actions

Enhanced publishing configuration:

  • Added publishConfig with provenance: true for supply chain security
  • Added .npmignore to exclude source files from published package
  • Added LICENSE to published files

Streamlined GitHub workflows:

  • Removed auto-publish workflow (release-js.yml) that ran on every main push
  • Enhanced tag-based release workflow with provenance support
  • Added tag filtering to build job for efficiency

Release Process

After merging:

  1. Create a GitHub release with tag: js-sdk-v0.1.0
  2. GitHub Actions automatically builds, tests, and publishes to npm
  3. Package available at https://www.npmjs.com/package/@turbodocx/sdk

Tag Strategy

  • JavaScript SDK: js-sdk-v{version} (e.g., js-sdk-v0.1.0)
  • Python SDK (future): py-sdk-v{version}
  • Go SDK (future): go-sdk-v{version}

The tag prefix ensures only the intended SDK workflow runs.

Verification

All tests pass ✅

  • Build outputs correctly to dist/ (not dist/src/)
  • Package tarball verified (12.6 kB, 13 files)
  • Only includes: dist/, README.md, LICENSE, package.json

🤖 Generated with Claude Code

- Fix TypeScript build output path (dist/ instead of dist/src/)
- Add root package.json with npm workspaces support
- Add publishConfig with provenance for supply chain security
- Remove auto-publish workflow, keep tag-based releases only
- Add .npmignore to exclude source files from package
- Update GitHub Actions workflow with provenance support

Release process: Create GitHub release with tag format js-sdk-v{version}

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@nicolasiscoding
nicolasiscoding merged commit d689085 into main Dec 11, 2025
4 checks passed
@nicolasiscoding
nicolasiscoding deleted the npm-publish-setup branch December 11, 2025 18:45
nicolasiscoding pushed a commit that referenced this pull request Jul 29, 2026
…ns (#50)

Resolves all 6 open high-severity Dependabot alerts in this repo:

| Package         | Alerts   | Was     | Now     | Advisory            |
|-----------------|----------|---------|---------|---------------------|
| brace-expansion | #17, #35 | 1.1.12  | 1.1.16  | GHSA-3jxr-9vmj-r5cp |
| js-yaml         | #18, #36 | 3.14.2  | 3.15.0  | GHSA-52cp-r559-cp3m |
| minimatch       | #3,  #21 | 3.1.2   | 3.1.5   | GHSA-7r86-cg39-jmmj |

Each alert is filed twice, once per lockfile (root and
packages/js-sdk), so both lockfiles are updated.

All three are dev-only transitive dependencies of the Jest/ts-jest test
toolchain — none is a direct dependency, none appears in any
package.json, and the JS SDK has zero runtime dependencies, so nothing
here ships to consumers.

No manifest change was needed: every patched version already satisfies
the existing semver range its consumers declare (minimatch ^3.1.1,
brace-expansion ^1.1.x, js-yaml ^3.13.x), so a plain `npm update`
resolves them. No `overrides` pin is used, which keeps future patch
releases flowing normally.

Verified: `npm ci`, `npm run build:js` (tsc), and `npm run test:js`
(271/271 tests) all pass.

Co-authored-by: yacineKahlerras <kahlerasse@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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