Skip to content

Bump cli-node SDK dep to ^0.25.0 and ship CLI in scaffold devDeps#70

Merged
etbyrd merged 2 commits into
mainfrom
cli-deps-bump-to-0.25
May 11, 2026
Merged

Bump cli-node SDK dep to ^0.25.0 and ship CLI in scaffold devDeps#70
etbyrd merged 2 commits into
mainfrom
cli-deps-bump-to-0.25

Conversation

@etbyrd
Copy link
Copy Markdown
Member

@etbyrd etbyrd commented May 11, 2026

Summary

Three cleanups now that sdk@0.25.0 is on npm:

  1. cli-node @primitivedotdev/sdk dep range bumped from ^0.23.0 to ^0.25.0. Under npm semver for 0.x packages, ^0.23.0 resolves only to >=0.23.0 <0.24.0, so cli-node's lockfile was pinned at sdk@0.23.0 and the bundled operation manifest didn't include the local_part body field shipped in Add local_part to testFunction spec and bump all SDKs to 0.25.0 #69. Lockfile refreshed against sdk@0.25.0. Result: primitive functions:test-function --help now surfaces --local-part as a flag.

  2. Scaffolder SDK_VERSION_RANGE moves from ^0.23.0 to ^0.25.0 in lockstep, satisfying the existing regression test that asserts the two ranges match byte-for-byte.

  3. Scaffolder generates @primitivedotdev/cli as a devDependency. Without this, the SDK's deprecated CLI bin wins the node_modules/.bin/primitive race inside a scaffolded project, so every npm run deploy prints the "CLI moved to @primitivedotdev/cli" stderr banner. AGX feedback flagged this exact behavior. New regression test pins the devDep so it can't silently regress.

Versions

  • cli-node: 0.25.0 -> 0.25.1
  • (sdk-node / sdk-python / sdk-go unchanged)

Test plan

  • CI green.
  • After publish, npm install -g @primitivedotdev/cli@0.25.1 && primitive functions:test-function --help lists --local-part.
  • After publish, primitive functions:init demo-fn && cd demo-fn && npm install && grep primitive node_modules/.bin/primitive resolves to the cli package, not the sdk alias. npm run deploy no longer prints the deprecation banner.

Three related cleanups now that sdk@0.25.0 is published:

1. cli-node @primitivedotdev/sdk dep range moves from ^0.23.0 to
   ^0.25.0. Under npm semver for 0.x packages, ^0.23.0 resolved only
   to >=0.23.0 <0.24.0, so the lockfile was pinned at sdk@0.23.0 and
   the CLI shipped a bundled operation manifest that did not include
   the local_part body field added in #69. The lockfile is refreshed
   against the published sdk@0.25.0 so `primitive functions:test-function
   --help` now surfaces --local-part as a flag.

2. functions:init scaffolder's SDK_VERSION_RANGE moves from ^0.23.0
   to ^0.25.0 in lockstep, satisfying the existing regression test
   that asserts the two ranges match.

3. The scaffolder now includes @primitivedotdev/cli as a devDependency
   in the generated package.json so node_modules/.bin/primitive
   resolves to the real CLI inside the scaffolded project. Without
   this, the SDK's deprecated CLI bin wins the bin race and every
   `npm run deploy` prints the "CLI moved to @primitivedotdev/cli"
   stderr banner. AGX feedback called this out: agents using the
   scaffold's deploy script kept hitting the deprecation banner with
   no way out short of editing package.json themselves.

A new regression test guards the cli devDep so the scaffold cannot
silently regress to the SDK-only state.

cli-node bumps to 0.25.1 to ship the bundled-manifest refresh and
the scaffold devDep. 163 tests green; lint and typecheck clean.
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 11, 2026

Greptile Summary

This PR bumps the CLI's @primitivedotdev/sdk dependency from ^0.23.0 to ^0.25.0 (refreshing the lockfile), moves the scaffolder's SDK_VERSION_RANGE in lockstep, and adds @primitivedotdev/cli as a devDependency in scaffolded projects so that node_modules/.bin/primitive resolves to the real CLI rather than the SDK's deprecated alias.

  • SDK dep range updated in both package.json and functions-init.ts from ^0.23.0 to ^0.25.0; lockfile refreshed to sdk@0.25.0.
  • CLI_VERSION_RANGE constant introduced separately from SDK_VERSION_RANGE, correctly decoupling the two packages' independent release cadences.
  • @primitivedotdev/cli added to scaffolded devDependencies, with a new lockstep regression test that verifies the constant's range includes the CLI's own published version via semver component comparison.

Confidence Score: 5/5

Safe to merge — all changes are version bumps, a lockfile refresh, and a well-guarded scaffold addition with dedicated regression tests.

The diff is limited to updating two version constants, refreshing the lockfile, and adding one new devDep to the scaffolded package.json. The new CLI_VERSION_RANGE constant is correctly decoupled from SDK_VERSION_RANGE, and the lockstep test reads the actual package.json version to prevent silent drift. No logic paths are altered.

No files require special attention.

Important Files Changed

Filename Overview
cli-node/package.json Version bumped to 0.25.1 and SDK dep updated from ^0.23.0 to ^0.25.0; straightforward and matches lockfile.
cli-node/pnpm-lock.yaml Lockfile refreshed to resolve @primitivedotdev/sdk@0.25.0; integrity hash updated, no other changes.
cli-node/src/oclif/commands/functions-init.ts SDK_VERSION_RANGE bumped to ^0.25.0, dedicated CLI_VERSION_RANGE constant added, and @primitivedotdev/cli added to scaffolded devDependencies; decoupling is correct and well-commented.
cli-node/tests/oclif/functions-init.test.ts Two new regression tests added: one verifies CLI devDep is present, one enforces CLI_VERSION_RANGE includes the actual package version via semver component comparison.

Reviews (2): Last reviewed commit: "Decouple scaffolded CLI version range fr..." | Re-trigger Greptile

Comment thread cli-node/src/oclif/commands/functions-init.ts
Comment thread cli-node/tests/oclif/functions-init.test.ts
Greptile flagged that the scaffolded @primitivedotdev/cli devDep
was pinned to SDK_VERSION_RANGE, which silently couples two
independent packages. If we ever bump SDK_VERSION_RANGE without
publishing a matching CLI release, npm install in every scaffolded
project starts 404ing on the CLI version that does not exist.

Split CLI_VERSION_RANGE into its own constant. They hold the same
literal today (^0.25.0) but a future bump of either side is now
an explicit decision in code instead of an accidental side effect.

Strengthen the regression test from the previous caret-only check
to a real lockstep invariant: the scaffolded CLI range must include
this CLI's own published version. A bump of cli-node/package.json
that forgets to update CLI_VERSION_RANGE now fails CI, in the same
shape as the pre-existing SDK lockstep test.
@etbyrd etbyrd merged commit 85e3c48 into main May 11, 2026
9 checks passed
@etbyrd etbyrd deleted the cli-deps-bump-to-0.25 branch May 11, 2026 09:19
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