Skip to content

chore: use lockfiles for NPM dependencies#42

Merged
zhukaihan merged 2 commits into
mainfrom
codex/release-lockfiles
Mar 20, 2026
Merged

chore: use lockfiles for NPM dependencies#42
zhukaihan merged 2 commits into
mainfrom
codex/release-lockfiles

Conversation

@daniel-graham-amplitude
Copy link
Copy Markdown
Contributor

Applies the equivalent of amplitude/Amplitude-Swift#350 in this repository.

Changes

  • switch release workflow from inline npx -p ... installs to lockfile-based commands
  • run npm ci before semantic-release in dry-run and release steps
  • run semantic-release via npm exec
  • add root package.json + package-lock.json for deterministic dependency resolution
  • ignore node_modules/ in .gitignore where needed

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces lockfile-based Node dependency management for the release workflow to make semantic-release execution deterministic in this Go repository.

Changes:

  • Add a root package.json / package-lock.json to lock semantic-release tooling dependencies.
  • Update the GitHub Actions release workflow to run npm ci and execute semantic-release via npm exec (dry-run and real release).
  • Ignore node_modules/ at the repo root.

Reviewed changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated 4 comments.

File Description
package.json Adds Node tooling dependencies intended for semantic-release execution.
package-lock.json Locks resolved dependency graph for deterministic installs in CI.
.gitignore Ignores node_modules/ to avoid committing installs.
.github/workflows/release.yml Switches from npx -p ... to npm ci + npm exec semantic-release.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release.yml
Comment thread package.json
Comment on lines +4 to +9
"lodash": "latest",
"semantic-release": "latest",
"@semantic-release/changelog": "latest",
"@semantic-release/git": "latest",
"@google/semantic-release-replace-plugin": "latest",
"@semantic-release/exec": "latest"
Comment thread package.json
Comment on lines +2 to +10
"private": true,
"dependencies": {
"lodash": "latest",
"semantic-release": "latest",
"@semantic-release/changelog": "latest",
"@semantic-release/git": "latest",
"@google/semantic-release-replace-plugin": "latest",
"@semantic-release/exec": "latest"
}
Comment thread package.json
{
"private": true,
"dependencies": {
"lodash": "latest",
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@zhukaihan zhukaihan merged commit 0929804 into main Mar 20, 2026
4 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.11.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants