This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
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.
react-scripts > v2.1.1 don't have a webpack.config.dev #20
react-scripts > v2.1.1 don't have a webpack.config.dev #20
Changes from 3 commits
a1d0e24
d722abb
0c504fc
1d56f1c
bfbe83a
74410d5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
semver.major only accepts a version string, not a ^ or ~ prefixed comparison string.
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.
Hum, did you get an error with the previous behavior? I'd rather prefer that the prefix is taken into account because having
^1.3.0
does not mean that you have1.3.0
installed hence you could have1.3.7
. That's the reason I use thesemver
utils for.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.
Yes:
TypeError: Invalid Version: ^2.1.3
at new SemVer (/Users/johnsingleton/cra-test/my-app/node_modules/semver/semver.js:312:11)
I think because "^2.1.3" is a constraint not a version number. As is the code is just pulling whatever is in package.json, so I don't think it's getting the actual installed version anyway.
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.
Yeah you are right, there could always be a difference with the actual version installed but at least I feel we are a bit closer to the truth. 😄 I'll need to look a bit more in
semver
docs or look for another solution before I settle for this. If we don't have another solution then we'll roll with it.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.
I've found a better way to get the package version and to be sure it is the actual version installed by the user. However I don't think it should be a part of this PR. I'll make the development in another PR. I'll just change your PR destination to
develop
and in the meantime can you delete the modifications you did to thegetReactScriptsVersion
function, please?