-
Notifications
You must be signed in to change notification settings - Fork 30
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
build: Use NPM Workspace instead of Lerna to bootstrap #1142
build: Use NPM Workspace instead of Lerna to bootstrap #1142
Conversation
Basically, npm would run `prepare` on each packages in alphabetical order but components need design to be built first. This works around that limitation by firing the scripts manually through `npm run [script] -w` which respects the order under `workspaces` npm/rfcs#548
ea33080
to
ef2dba8
Compare
a595a3a
to
cf32562
Compare
nvm, just had to run |
I think Cloudfare failed because the build command is set to |
@rodrigoeidelvein cloudflare failed becauase it's building on node 18 which it can't haha. Cloudflare fires |
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'm going to make a list of things that I noticed here, just to see if I understood correctly:
- Removed the
sum_lockfiles
because there's nopackage-lock.json
inpackages/*
anymore? Are they all in the rootpackage-lock?
--no-optional == -omit=optional
?- You reorganized the npm command in the root
package.json
, and renamed some of them, but the only thing that changed inside the commands is theexport NODE_OPTIONS=--openssl-legacy-provider
in Storybook? - Why did some snapshots change?
- Loved the bonus refactor on
FormatRelativeDateTime
tests, was it failing?
Yup
Yup
Sorted alphabetically. Yes and also this Line 31 in 3d589ee
Normally happens on node update
|
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.
Niiiice! Looks good to me!
- npm ci works
- storybook runs and builds
I just would like an approval from @MichaelParadis too
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.
LGTM!
* build: update nvmrc to use 18 * build: repackage package locks * build: temporarily set legacy-peer-deps to true * build: Use NPM Workspace instead of Lerna to bootstrap (#1142) * build: use NPM workspace instead of Lerna * fix: workaround npm's lack of topological oder Basically, npm would run `prepare` on each packages in alphabetical order but components need design to be built first. This works around that limitation by firing the scripts manually through `npm run [script] -w` which respects the order under `workspaces` npm/rfcs#548 * fix: reorder scripts for my own sanity * build: update circle to not look for lock files * build: use node 18 image on circle ci * fix: js and css linters * build: use -omit=optional * fix: update time test work on node 18 * fix: don't update snaps * fix: update some snaps * build: make storybook run on node 18 Thanks @rodrigoeidelvein for the workaround! * fix: reinstall ts-node * chore: use lerna recommended setting for symlink * fix: refix storybook by using js file * fix: match * on preventManualRelease check * docs: Node 18 update readme (#1149) * Update versions in readme * Update engines in package.json * fix: reset package-lock * chore: strict engine and package lock * docs: Fix cloudflare Pages deploy (#1150) * Trying build * Correcting variables * Removed resource class Co-authored-by: Darryl Tec <darryl.t@getjobber.com> --------- Co-authored-by: Kingston Fung <kingstonfung@gmail.com> Co-authored-by: Darryl Tec <darryl.t@getjobber.com> * fix: update package-lock.json --------- Co-authored-by: Michael Paradis <michael.p@getjobber.com> Co-authored-by: Kingston Fung <kingstonfung@gmail.com>
Motivations
Lerna is planning to deprecate bootstrap on their V7 since NPM can do it in a much better way. With the Node 18 upgrade, the need to move has become more apparent since it totally broke the way it worked for us.
Known issues
Changes
Added
Changed
prepare
on each packages in alphabetical order but components need design to be built first.npm run [script] -w
which respects the order underworkspaces
Deprecated
Removed
Fixed
Security
Testing
nvm use
npm ci
successfully with no error. Warning is fine.npm start
and storybook runs locallyIn Atlantis we use Github's built in pull request reviews.
JOB-63633