Closed jonathanolson closed 1 year ago
Recommend raising priority here, see https://github.com/phetsims/yotta/issues/17#issuecomment-180716501 (can't build some older currently published sim SHAs since we don't know what require.js versions we used to build then).
Today we discussed putting this back on our radar, to have @samreid and @jonathanolson work on in a couple of weeks.
This seems to be exactly what package-lock.json was designed for. We should look into this for chipper 2.0
Comments from https://github.com/phetsims/chipper/issues/1362
Today @marlitas and I investigated https://github.com/phetsims/chipper/issues/1361 and were shocked to discover that npm prune
and npm install
gave a very different version (4.7.4) than rm -rf node_modules
and npm install
(4.9.3). This led to a major difference in behavior in https://github.com/phetsims/chipper/issues/1361 and we would like to discuss how to get consistent versions across our project.
We did not understand why we aren't using package-lock.json, as discussed in https://github.com/phetsims/chipper/issues/578. We also discussed removing all the tildes and carets from package.jsons to protect against this in the future (even though it would probably be prohibitively expensive to do that for maintenance shas.)
We also observed that Deno supports npm specifiers like tilde and caret, so this problem wouldn't "go away" by just moving to Deno. https://deno.land/manual@v1.28.2/node/npm_specifiers
Tagging @jonathanolson since he helped discover #1361.
Running npm install
with package-lock enabled seems to modify that file AND package.json. Our tooling is set up to have npm operations NOT interfere with git/build/other operations.
Having something that pins exact dependencies sounds great (or possibly ways of supporting security fixes), but package-lock didn't seem to fulfill those requirements that well AND caused other breakage.
From 12/8/22 dev meeting:
@zepumph is going to replace all instances of the possibility of updating minor versions with the possibility of updating maintenance versions only. Thanks!
@jonathanolson can you please look at both commits. I'm happy that I separated these our so that you can look at all the previously pinned versions that now accept maintenance updates. Anything else here?
We decided at dev meeting discussion that this was not worthy of a maintenance release. @jonathanolson is that right? Do you want to just throw this in to the one you are currently working on? ("throw" obvious demonstrating that I have no idea how in depth MR patching is).
Looks good to me!
I think this should probably be tossed into the next maintenance release, tagging for that.
Although @jonathanolson and I were excited to punt on this until next MR, but were running into https://github.com/phetsims/perennial/issues/293 because of the shared cache update for Puppeteer 19. Thus we need to proceed with this now.
Please note that @jonathanolson and I ran into trouble here yesterday in a case where eslint was already on a high minor version, so changing from ^ -> ~ didn't change things, but for eslint-plugin-react, there were many minor versions ahead of where the version currently was (^7.18), so we needed https://github.com/phetsims/chipper/commit/cf881cc454cdde4f4df2a99bf9fbbe04a9d80359 where we set the version to ~7.31)
We saw another one of those in SOM 1.2 last night where we most likely want to update html-webpack-plugin from "~5.3.2" -> "~5.5.0". UPDATE: This was a translation build that wasn't using these changes, ignore this.
acid-base-solutions 1.2 (https://github.com/phetsims/chipper/issues/114)
area-builder 1.1 (https://github.com/phetsims/chipper/issues/114)
area-model-algebra 1.2 (https://github.com/phetsims/chipper/issues/114)
area-model-decimals 1.2 (https://github.com/phetsims/chipper/issues/114)
area-model-introduction 1.2 (https://github.com/phetsims/chipper/issues/114)
area-model-multiplication 1.2 (https://github.com/phetsims/chipper/issues/114)
arithmetic 1.0 (https://github.com/phetsims/chipper/issues/114)
atomic-interactions 1.2 (https://github.com/phetsims/chipper/issues/114)
balancing-act 1.1 (https://github.com/phetsims/chipper/issues/114)
balancing-act 1.2 (https://github.com/phetsims/chipper/issues/114)
balancing-chemical-equations 1.2 (https://github.com/phetsims/chipper/issues/114)
balloons-and-static-electricity 1.3-phetio (https://github.com/phetsims/chipper/issues/114)
balloons-and-static-electricity 1.5 (https://github.com/phetsims/chipper/issues/114)
beers-law-lab 1.4 (https://github.com/phetsims/chipper/issues/114)
beers-law-lab 1.6-phetio (https://github.com/phetsims/chipper/issues/114)
bending-light 1.1 (https://github.com/phetsims/chipper/issues/114)
blackbody-spectrum 1.0 (https://github.com/phetsims/chipper/issues/114)
build-a-fraction 1.0 (https://github.com/phetsims/chipper/issues/114)
build-a-molecule 1.0 (https://github.com/phetsims/chipper/issues/114)
build-a-nucleus 1.0 (https://github.com/phetsims/chipper/issues/114)
build-an-atom 1.5-phetio (https://github.com/phetsims/chipper/issues/114)
build-an-atom 1.6 (https://github.com/phetsims/chipper/issues/114)
capacitor-lab-basics 1.6 (https://github.com/phetsims/chipper/issues/114)
center-and-variability 1.0 (https://github.com/phetsims/chipper/issues/114)
charges-and-fields 1.0 (https://github.com/phetsims/chipper/issues/114)
charges-and-fields 1.0-phetio (https://github.com/phetsims/chipper/issues/114)
circuit-construction-kit-ac 1.0 (https://github.com/phetsims/chipper/issues/114)
circuit-construction-kit-ac-virtual-lab 1.0 (https://github.com/phetsims/chipper/issues/114)
circuit-construction-kit-black-box-study 1.1-phetio (https://github.com/phetsims/chipper/issues/114)
circuit-construction-kit-dc 1.2 (https://github.com/phetsims/chipper/issues/114)
circuit-construction-kit-dc-virtual-lab 1.2 (https://github.com/phetsims/chipper/issues/114)
collision-lab 1.1 (https://github.com/phetsims/chipper/issues/114)
color-vision 1.1 (https://github.com/phetsims/chipper/issues/114)
color-vision 1.2-phetio (https://github.com/phetsims/chipper/issues/114)
concentration 1.3 (https://github.com/phetsims/chipper/issues/114)
concentration 1.5-phetio (https://github.com/phetsims/chipper/issues/114)
coulombs-law 1.0 (https://github.com/phetsims/chipper/issues/114)
curve-fitting 1.0 (https://github.com/phetsims/chipper/issues/114)
density 1.0 (https://github.com/phetsims/chipper/issues/114)
diffusion 1.0 (https://github.com/phetsims/chipper/issues/114)
energy-forms-and-changes 1.4 (https://github.com/phetsims/chipper/issues/114)
energy-skate-park 1.1 (https://github.com/phetsims/chipper/issues/114)
energy-skate-park-basics 1.1 (https://github.com/phetsims/chipper/issues/114)
energy-skate-park-basics 1.3-phetio (https://github.com/phetsims/chipper/issues/114)
equality-explorer 1.1 (https://github.com/phetsims/chipper/issues/114)
equality-explorer-basics 1.0 (https://github.com/phetsims/chipper/issues/114)
equality-explorer-two-variables 1.0 (https://github.com/phetsims/chipper/issues/114)
expression-exchange 1.1 (https://github.com/phetsims/chipper/issues/114)
faradays-law 1.3-phetio (https://github.com/phetsims/chipper/issues/114)
faradays-law 1.4 (https://github.com/phetsims/chipper/issues/114)
forces-and-motion-basics 2.1-phetio (https://github.com/phetsims/chipper/issues/114)
forces-and-motion-basics 2.3 (https://github.com/phetsims/chipper/issues/114)
fourier-making-waves 1.0 (https://github.com/phetsims/chipper/issues/114)
fraction-matcher 1.2 (https://github.com/phetsims/chipper/issues/114)
fractions-equality 1.1 (https://github.com/phetsims/chipper/issues/114)
fractions-intro 1.0 (https://github.com/phetsims/chipper/issues/114)
fractions-mixed-numbers 1.0 (https://github.com/phetsims/chipper/issues/114)
friction 1.5 (https://github.com/phetsims/chipper/issues/114)
function-builder 1.2 (https://github.com/phetsims/chipper/issues/114)
function-builder-basics 1.2 (https://github.com/phetsims/chipper/issues/114)
gas-properties 1.0 (https://github.com/phetsims/chipper/issues/114)
gases-intro 1.0 (https://github.com/phetsims/chipper/issues/114)
gene-expression-essentials 1.0 (https://github.com/phetsims/chipper/issues/114)
geometric-optics 1.1 (https://github.com/phetsims/chipper/issues/114)
geometric-optics-basics 1.2 (https://github.com/phetsims/chipper/issues/114)
graphing-lines 1.3 (https://github.com/phetsims/chipper/issues/114)
graphing-quadratics 1.1 (https://github.com/phetsims/chipper/issues/114)
graphing-quadratics 1.2 (https://github.com/phetsims/chipper/issues/114)
graphing-slope-intercept 1.1 (https://github.com/phetsims/chipper/issues/114)
gravity-and-orbits 1.4 (https://github.com/phetsims/chipper/issues/114)
gravity-and-orbits 1.5 (https://github.com/phetsims/chipper/issues/114)
gravity-and-orbits 1.6 (https://github.com/phetsims/chipper/issues/114)
gravity-force-lab 2.2 (https://github.com/phetsims/chipper/issues/114)
gravity-force-lab-basics 1.1 (https://github.com/phetsims/chipper/issues/114)
greenhouse-effect 1.0 (https://github.com/phetsims/chipper/issues/114)
hookes-law 1.0 (https://github.com/phetsims/chipper/issues/114)
isotopes-and-atomic-mass 1.1 (https://github.com/phetsims/chipper/issues/114)
john-travoltage 1.4-phetio (https://github.com/phetsims/chipper/issues/114)
john-travoltage 1.6 (https://github.com/phetsims/chipper/issues/114)
least-squares-regression 1.1 (https://github.com/phetsims/chipper/issues/114)
make-a-ten 1.0 (https://github.com/phetsims/chipper/issues/114)
masses-and-springs 1.0 (https://github.com/phetsims/chipper/issues/114)
masses-and-springs-basics 1.0 (https://github.com/phetsims/chipper/issues/114)
mean-share-and-balance 1.0 (https://github.com/phetsims/chipper/issues/114)
molarity 1.4 (https://github.com/phetsims/chipper/issues/114)
molarity 1.5 (https://github.com/phetsims/chipper/issues/114)
molecule-polarity 1.2 (https://github.com/phetsims/chipper/issues/114)
molecule-shapes 1.2 (https://github.com/phetsims/chipper/issues/114)
molecule-shapes-basics 1.2 (https://github.com/phetsims/chipper/issues/114)
molecules-and-light 1.3-phetio (https://github.com/phetsims/chipper/issues/114)
molecules-and-light 1.5 (https://github.com/phetsims/chipper/issues/114)
my-solar-system 1.0 (https://github.com/phetsims/chipper/issues/114)
natural-selection 1.2 (https://github.com/phetsims/chipper/issues/114)
natural-selection 1.3 (https://github.com/phetsims/chipper/issues/114)
natural-selection 1.4 (https://github.com/phetsims/chipper/issues/114)
neuron 1.1 (https://github.com/phetsims/chipper/issues/114)
normal-modes 1.0 (https://github.com/phetsims/chipper/issues/114)
number-line-distance 1.0 (https://github.com/phetsims/chipper/issues/114)
number-line-integers 1.1 (https://github.com/phetsims/chipper/issues/114)
number-line-operations 1.0 (https://github.com/phetsims/chipper/issues/114)
number-play 1.0 (https://github.com/phetsims/chipper/issues/114)
ohms-law 1.4 (https://github.com/phetsims/chipper/issues/114)
pendulum-lab 1.0 (https://github.com/phetsims/chipper/issues/114)
ph-scale 1.5 (https://github.com/phetsims/chipper/issues/114)
ph-scale-basics 1.5 (https://github.com/phetsims/chipper/issues/114)
plinko-probability 1.1 (https://github.com/phetsims/chipper/issues/114)
projectile-motion 1.0 (https://github.com/phetsims/chipper/issues/114)
proportion-playground 1.0 (https://github.com/phetsims/chipper/issues/114)
ratio-and-proportion 1.0 (https://github.com/phetsims/chipper/issues/114)
reactants-products-and-leftovers 1.2 (https://github.com/phetsims/chipper/issues/114)
resistance-in-a-wire 1.3-phetio (https://github.com/phetsims/chipper/issues/114)
resistance-in-a-wire 1.6 (https://github.com/phetsims/chipper/issues/114)
rutherford-scattering 1.1 (https://github.com/phetsims/chipper/issues/114)
states-of-matter 1.2 (https://github.com/phetsims/chipper/issues/114)
states-of-matter-basics 1.2 (https://github.com/phetsims/chipper/issues/114)
trig-tour 1.0 (https://github.com/phetsims/chipper/issues/114)
under-pressure 1.1 (https://github.com/phetsims/chipper/issues/114)
unit-rates 1.0 (https://github.com/phetsims/chipper/issues/114)
vector-addition 1.0 (https://github.com/phetsims/chipper/issues/114)
vector-addition-equations 1.0 (https://github.com/phetsims/chipper/issues/114)
wave-interference 2.0 (https://github.com/phetsims/chipper/issues/114)
wave-on-a-string 1.1 (https://github.com/phetsims/chipper/issues/114)
waves-intro 1.1 (https://github.com/phetsims/chipper/issues/114)
Deployed, closing.
Right now, npm installing at different times will change how our build process works, and may cause changes in how sims are built.
We should figure out a way of using https://docs.npmjs.com/cli/shrinkwrap so that this does not happen.
As noted in Skype:
I just "npm installed", and I got grunt 0.4.5 (published May 2014) which itself got eventemitter 0.4.14 (published June 2014), BECAUSE grunt's package.json has "eventemitter2": "~0.4.13", (0.4.13 was published August 2013). This still occurs if I force "grunt": "0.4.5" instead of "grunt": "~0.4.1".