-
-
Notifications
You must be signed in to change notification settings - Fork 355
Update dependencies #203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update dependencies #203
Conversation
jan-auer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use yarn add --dev (or yarn add -D) to add the dependency. Otherwise, fine with me.
| try { | ||
| props['cli/executable'] = require.resolve('sentry-cli-binary/bin/sentry-cli'); | ||
| const cliPath = require.resolve('sentry-cli-binary/bin/sentry-cli'); | ||
| props['cli/executable'] = path.relative(process.cwd(), cliPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pretty annoying that we need to do this. Should probably fix this in sentry-cli that it is always an absolute path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually don't want to have an absolute path because when we write this in the properties file and when the user check this in to their CI we will get a bad path because /User/name/bla/bla isn't valid on the CI.
And we need to resolve the sentry-cli-binary with require.resolve because it could be in node_modules directly or within react-native-sentry/node_modules depending on the npm version the user is using.
So by converting the absolute path to a relative path this should always work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the file is absolutized at load time in sentry-cli. So not sure why the path would mismatch later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind. I see that you are persisting this. Ignore me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try this to get the path:
npm explore sentry-cli-binary -- npm bin
| try { | ||
| props['cli/executable'] = require.resolve('sentry-cli-binary/bin/sentry-cli'); | ||
| const cliPath = require.resolve('sentry-cli-binary/bin/sentry-cli'); | ||
| props['cli/executable'] = path.relative(process.cwd(), cliPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind. I see that you are persisting this. Ignore me.
|
@HazAT don't release with |
|
@HazAT OK I released |
Fixes #191