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
Migrate to yarn for installing dependencies #8762
Conversation
067c82a
to
3bf9f74
Compare
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'd be happy moving to yarn, thanks for the hard work! Just a bit concerned about the bundle size change, the bundle report may shed some light on what's going on?
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.
updates snapshots for some reason
😆
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.
Brilliant!
replace npm scripts commands with yarn
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.
Found a package not at latest and I've taken the liberty of updating the renovate docs
package.json
Outdated
@@ -111,10 +111,10 @@ | |||
"@bbc/psammead-useful-links": "3.0.14", | |||
"@bbc/psammead-visually-hidden-text": "2.0.3", | |||
"@bbc/web-vitals": "1.0.2", | |||
"@emotion/cache": "11.1.3", | |||
"@emotion/react": "11.1.4", | |||
"@emotion/cache": "11.0.0", |
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.
Shouldn't this be at the latest version? Probably should test this with the latest version
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 must have missed this when upgrading the others 🙁
@@ -0,0 +1,19 @@ | |||
const ensureYarn = () => { | |||
// If npm is being run, print a message and cause 'npm install' to fail. |
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.
Nice touch!
d52e82f
to
ad1be8a
Compare
Resolves #8761
Overall change:
Switch to using Yarn for installing node modules.
Simorgh infrastructure changes https://github.com/bbc/simorgh-infrastructure/pull/1329
Code changes:
npm ci
withyarn install --frozen-lockfile
in github actions directory.github/workflows/
package-lock.json
and addsyarn.lock
including any references in code--no-save
option when installing and they are very opinionated on why. This is a problem in one of our GH actions where we install puppeteer. I've changed the action toyarn add puppeteer
which by default saves to the lock file then I remove the package after running the puppeteer tests withyarn remove puppeteer
. Not 100% sure if we need to do this but I suppose it cleans up the puppeteer side-effects. This might actually be needed for caching node modules in GH actions for faster build times cache node_modules in github actions #8831 since a change to the lock file will bust the cache.updates snapshots for some reasoncross-team
label to this PR if it requires visibility across World Service teamsTesting:
CYPRESS_APP_ENV=local CYPRESS_SMOKE=false npm run test:e2e:interactive
)