fix(cli): move pkg dependency to devDependencies#2342
Merged
Conversation
The `pkg` dependency is a build tool used to create native binaries for the CLI, as confirmed by its usage in `bin/build-native`. It is not a runtime dependency and thus belongs in `devDependencies` to accurately reflect its role in the project and resolve potential dependency conflicts during installation.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR corrects the categorization of the pkg dependency by moving it from dependencies to devDependencies. The pkg tool is exclusively used for creating native binaries during the build process (via bin/build-native script and test setup), not at runtime. This change accurately reflects the tool's role as a build-time dependency and helps reduce unnecessary dependencies in production installations.
Key changes:
- Moved
pkg(version5.8.1-patched) fromdependenciestodevDependencies
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
hleb-rubanau
approved these changes
Nov 24, 2025
A workaround has been added to `packages/cli/tests/setup.js` to address an incompatibility with Node.js versions (e.g., Node 25) that introduce `localStorage` as an empty proxy. This behavior caused jest-environment-node to throw errors during Jest test runs because `localStorage.getItem` was missing. The workaround explicitly sets `globalThis.localStorage = undefined` if `localStorage.localStorage.getItem` is not present, preventing the error and allowing tests to execute successfully. This is a temporary measure to be removed once the upstream Node.js bug is resolved.
0d0c073 to
a7e6513
Compare
Contributor
|
🎉 This PR is included in version @appland/appmap-v3.196.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
pkgdependency is a build tool used to create native binaries for the CLI. It is not a runtime dependency and thus belongs indevDependenciesto accurately reflect its role in the project and resolve potential dependency conflicts during installation.This PR also includes a workaround for an error running CLI tests in node 25 due to nodejs/node#60303