Conversation
|
No dependency changes detected. Learn more about Socket for GitHub ↗︎ 👍 No dependency changes detected in pull request |
jdalton
reviewed
Feb 20, 2025
jdalton
previously approved these changes
Feb 20, 2025
jdalton
approved these changes
Feb 21, 2025
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.
This creates a separate published build for the CLI that includes Sentry for error reporting.
The package will be published to
@socketsecurity/socket-with-sentryand expose bins that have-with-sentryappended to them for clarity.We've chosen for a separate build to be very explicit about the inclusion of Sentry. This way the default package does not need anything of the sorts, making it very clear that it doesn't contain or depend any Sentry things.
See the provinance for details but basically to create a build:
SOCKET_WITH_SENTRY=1will generate a special build (it will modify the package json!)IS_PUBLISH=1will set a flag in the build to recognize that the build is published to npmI've updated the rollup config to generate some kind of version scheme at the top of the
cli.jsfile (in either build). It contains a few things:The nonce can be used to either confirm that the build-file changed after a rebuild locally, or to confirm whether various build artifacts belong together. The git commit SHA does not suffice locally for local dev since your repo may be dirty and/or out of sync with
main.Also updated the rollup config to inline
process.env['SOCKET_IS_PUBLISHED']andprocess.env['SOCKET_VERSION'].Also added a hidden
socket oopscommand that will trigger an exception. May remove that later.