chore: use lockfiles for NPM dependencies#80
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the release workflow to use a committed npm lockfile (instead of npx -p ...) so semantic-release runs with deterministic dependency resolution.
Changes:
- Add root
package.json/package-lock.jsonand update release workflow to runnpm ci+npm exec semantic-release. - Update
.gitignoreto excludenode_modules/. - Switch semantic-release execution from inline
npx -pinstalls to local, lockfile-resolved tooling.
Reviewed changes
Copilot reviewed 2 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
package.json |
Introduces pinned npm dependencies used by the release workflow. |
package-lock.json |
Locks the dependency graph for deterministic installs in CI (npm ci). |
.gitignore |
Ignores node_modules/ in the repo. |
.github/workflows/release.yml |
Runs npm ci before semantic-release and executes semantic-release via npm exec. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@zhukaihan I've opened a new pull request, #81, to work on those changes. Once the pull request is ready, I'll request review from you. |
…81) * Initial plan * ci: add setup-node step with Node 22 before npm ci Co-authored-by: zhukaihan <7332407+zhukaihan@users.noreply.github.com> Agent-Logs-Url: https://github.com/amplitude/experiment-ruby-server/sessions/9cea838f-75a4-4b8b-98d8-1e0f6017660c --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: zhukaihan <7332407+zhukaihan@users.noreply.github.com>
* Add base64 and logger as explicit gem dependencies Ruby 3.4+ no longer bundles these in default gems; JRuby fails with LoadError when requiring them without a declared dependency. Co-authored-by: Peter Zhu <zhukaihan@users.noreply.github.com> * fix(spec): synchronize Set updates in multithreaded storage test Ruby Set is not thread-safe; concurrent add from worker threads could corrupt the expected set and fail equality with pull_all results. Co-authored-by: Peter Zhu <zhukaihan@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Peter Zhu <zhukaihan@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Applies the equivalent of amplitude/Amplitude-Swift#350 in this repository.
Changes
npx -p ...installs to lockfile-based commandsnpm cibefore semantic-release in dry-run and release stepsnpm execpackage.json+package-lock.jsonfor deterministic dependency resolutionnode_modules/in.gitignorewhere neededNote
Medium Risk
Release automation now depends on
npm ci/lockfile resolution and Node 22, so mis-specified or drifting JS deps could break publishing. Addingbase64/loggeras runtime gem dependencies can affect downstream dependency graphs but is otherwise straightforward.Overview
Updates the GitHub release workflow to use a deterministic Node-based toolchain: installs Node.js 22, runs
npm ci, and invokessemantic-releasevianpm execinstead of inlinenpx -p ...installs (for both dry-run and real releases).Adds
node_modules/to.gitignore, introduces rootpackage.json/package-lock.jsonto pin semantic-release-related dependencies, and declaresbase64andloggeras runtime dependencies inamplitude-experiment.gemspec.Written by Cursor Bugbot for commit 5abb468. This will update automatically on new commits. Configure here.