-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
npm installing jest at a specific version actually installs a different version #3391
Comments
One additional question; Why are users directed to install the The entire source code of the
|
You are right, we should actually be using |
Seems like the folks on lerna recommend against this. lerna/lerna#76 (comment) If you'd like a specific version of Jest, install |
Actually, installing |
It's probably worth noting that I actually only encountered this because I specifically wanted to npm install 18.0.0 and 18.1.0 because there was a breaking change (removal of It look me a while to figure out why specifically installing 18.0.0 still didn't have |
Got it. I'm sorry for causing you churn. That particular breaking change happened accidentally because node.js made a breaking change two days before Christmas and I was on vacation trying to push out a hotfix, which accidentally published a change that shouldn't have gone out. We normally don't do this ;) Oh... dependencies. |
Understandable :) no worries! thanks! I found a minor version change in moment.js that I can use to demonstrate in my presentation ;) |
Is this still closed? |
yes? |
no it's open? |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
Because of the way jest packages are set up, if you:
npm install jest@18.0.0
then it actually installsjest-cli@18.1.0
(or whatever the greatest minor version release is)If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can
yarn install
andyarn test
.npm install jest@18.0.0 --save
package.json
is set to depend on `"jest":"18.0.0" (exact version)grep version node_modules/jest/package.json
node node_modules/jest/bin/jest.js -v
v18.1.0
(WRONG VERSION!)grep version node_modules/jest-cli/package.json
What is the expected behavior?
The exact version of jest should be installed.
The problem is that
packages/jest/package.json
contains carrot versions ofjest-cli
so when
jest@18.0.0
is installed, it also gets the latest^18.*
release ofjest-cli
installed.all the package.json files in /packages should be exact-version dependencies when they are tagged.
The same holds true with v19 releases... they contain the dependency "jest-cli@^19.0.2" so if jest 19.7.0 were to be released and someone tries to
npm install jest@~19.0.2
then too bad, you get 19.7.0 anyway even though you only wanted 19.0.* releases.Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
The text was updated successfully, but these errors were encountered: