Skip to content

feat: migrate npm package to @flagsmith organization scope#40

Open
kyle-ssg wants to merge 3 commits into
mainfrom
feat/migrate-npm-scope
Open

feat: migrate npm package to @flagsmith organization scope#40
kyle-ssg wants to merge 3 commits into
mainfrom
feat/migrate-npm-scope

Conversation

@kyle-ssg
Copy link
Copy Markdown
Member

@kyle-ssg kyle-ssg commented May 22, 2026

Summary

  • Renames flagsmith-cli@flagsmith/cli (major version bump 0.2.3 → 1.0.0)
  • Bumps bundled JS client dep flagsmith@^9.0.5@flagsmith/flagsmith@^12.0.0
  • Adds publishConfig: { access: "public" } so first scoped publish is public
  • Updates README install snippets and example imports

Related PRs

Publish sequence

The PR ships with version: "1.0.0" because that is the canonical first stable release of the scoped package. To work around the trusted-publisher chicken-and-egg, the first push to npm happens locally as a prerelease (mirroring flagsmith-js-client which ran 11.0.0-internal.0.7 before 11.0.0):

  1. Locally from this branch, logged into npm with @flagsmith org write access:
    npm install && npm run build
    npm version 1.0.0-internal.0 --no-git-tag-version   # edits package.json only, not committed
    npm publish --tag internal
    git checkout package.json package-lock.json         # discard the local version edit
    The package is now on npm under the internal dist-tag. latest is still empty so npm i @flagsmith/cli does not pick up the prerelease.
  2. On npmjs.com, configure the trusted publisher entry for @flagsmith/cli pointing at this repo + .github/workflows/publish.yml.
  3. Iterate (bump to internal.1, .2, …) the same way until happy.
  4. Cut the real 1.0.0 either by another local npm publish from the merged commit, or by merging this PR and letting release-please / CI publish via OIDC.
  5. npm deprecate flagsmith-cli@"*" "Moved to @flagsmith/cli" to redirect existing users.

Test plan

  • npm install resolves cleanly on the new dep
  • npm run build succeeds
  • flagsmith get CLI command still produces a valid flagsmith.json against a real environment
  • First manual publish lands @flagsmith/cli@1.0.0-internal.0 on the internal dist-tag

🤖 Generated with Claude Code

Renames flagsmith-cli to @flagsmith/cli and updates the bundled flagsmith
JS client dependency from flagsmith@9 to @Flagsmith/flagsmith@12.

Mirrors the flagsmith-js-client migration in PR #367.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kyle-ssg kyle-ssg changed the title feat!: migrate npm package to @flagsmith organization scope feat: migrate npm package to @flagsmith organization scope May 22, 2026
kyle-ssg and others added 2 commits May 22, 2026 17:29
Mirrors the flagsmith-js-client approach (11.0.0-internal.0 ... .7 before
11.0.0) so the initial scoped publish can validate the npm + trusted
publisher setup under a separate dist-tag before claiming `latest`.

Co-Authored-By: Claude Opus 4.7 (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.

3 participants