-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[code-infra] Change package manager to pnpm
#11875
Merged
Merged
Changes from 96 commits
Commits
Show all changes
104 commits
Select commit
Hold shift + click to select a range
26636c1
specify package manager
LukasTy dba95e9
Generate pnpm-lock
LukasTy e8e915a
define pnpm workspace
LukasTy 78b2c2f
Remove `yarn.lock`
LukasTy 1920b08
Replace deprecated proposals with transform packages
LukasTy a72fd80
sync transform versions
LukasTy 55719c9
run install
LukasTy 7f9a5c6
npmrc
LukasTy d72dd0c
Downgrade monorepo to current version
LukasTy 8d02d44
Replace `yarn` calls with `pnpm`
LukasTy d66ccfd
Use `workspace:*` for direct monorepo deps
LukasTy 2ad73e3
Remove `yarn-deduplicate`
LukasTy 1c03ce9
Update remaining scripts
LukasTy a3122b8
Specify publish directory
LukasTy 2482ab5
Remove not used `@trendmicro/react-interpolate` package
LukasTy 0591518
Replace remaining `yarn` usages
LukasTy edc8b44
Refactor patches into `pnpm` solution
LukasTy 0f48bed
fix eslint
LukasTy 0b830ab
Add `@types/prop-types` where necessary
LukasTy 6a5c146
Fix `moment-hijri` missing types
LukasTy 87d93fb
Fix data-grid typing issues
LukasTy a085a5a
Fix missing import in docs
LukasTy eecb512
Fix docs packages
LukasTy 597745f
Fix remaining `docs` package TS issues
LukasTy 9a52d23
Add missing dev packages
LukasTy d1420dc
Make `typescript` happy
LukasTy 06a3927
Fix build
LukasTy 3adcd19
Fix missing `fs-extra` types warning
LukasTy 37b89a9
Lock to a commit to avoid `dedupe` updating it
LukasTy 679241c
Merge branch 'master' into yarn-to-pnpm
LukasTy 516a7be
Fix new `yarn` instances
LukasTy 174d7cb
Run install
LukasTy 64e72b8
Sync monorepo version with `master` branch
LukasTy 5b0471a
Sync and lock (for now) `@types/react-dom`
LukasTy 6d2a386
docs:typescript:formatted
LukasTy 77cf266
Try raising node heap memory to avoid OOM error
LukasTy f07661a
Add `chance` package to docs for charts demos
LukasTy 4133d07
Add `stylis` package as its used in `DataGridRTL` demo
LukasTy 686b441
Add `jscodeshift` to docs package as its used in `populatePickersDemos`
LukasTy 0a68b4a
Eslint ignore `netlify/functions`
LukasTy 423cdf1
Add `lodash` to root package as it's used in `sizeSnapshot/create`
LukasTy 902fe88
Add packages to make `scripts/sizeSnapshot/webpack.config` happy
LukasTy 4df06af
Add missing `@types/d3-shape` package
LukasTy 649e822
Add `test` "package"
LukasTy 04d76c4
Fix test package TS issues
LukasTy 724ee70
Lock React types to the versions installed with yarn to avoid errors
LukasTy f0f4202
Remove duplicate `@mui/base` resolution
LukasTy 8026b61
Fix links to `themeCssVarsAugmentation`
LukasTy a6959d6
Run `pnpm:dedupe`
LukasTy c8a8b72
Fix `tsconfig`
LukasTy 7e66313
Remove redundant script
LukasTy a6ab14b
prettier
LukasTy b175565
Fix `build:types` on `x-tree-view`
LukasTy eb8c85d
Bump TS to avoid data grid type compilation issues
LukasTy ac22b7b
Remove no longer used component
LukasTy a971535
Fix to successfully build `x-charts` dynamically imported types
LukasTy 95656db
Increase heap size for `docs:api`
LukasTy 5581622
Reduce `typescript` heap size even further to avoid OOM
LukasTy 0870afb
Run `pnpm dedupe`
LukasTy 30da4b2
Rename charts `tsx` files to `ts`
LukasTy cbd8073
Fix `x-data-grid` and `x-date-pickers` type building
LukasTy d331834
Enable the `pre/post` scripts
LukasTy 58a4bc0
Add `preinstall` script
LukasTy 3f2039d
Add `rimraf` to dev deps to fix `prebuild` script
LukasTy a149241
Merge commit '8efee23e8ba67ea1e3c31ab54ac71561b3cd9223' into yarn-to-…
JCQuintas 2e5abd0
Revert typescript to 5.3.3.
LukasTy b3bcc60
dedupe
LukasTy a840b29
Change specifier
LukasTy 8680628
Fix `@mui/x-data-grid-premium` types build
LukasTy 28ad040
Fix `@mui/x-charts` types build
LukasTy f50ccd2
prettier
LukasTy 32c243f
Fix to let babel transpile `@mui/monorepo`
LukasTy 6287b78
prettier
LukasTy 04f88ed
Add missing `@babel/runtime` package
LukasTy 587d91a
Fix `test:karma` and `test:regressions` by adjusting the `webpack.exc…
LukasTy 515ce69
Patch problematic babel.config.js resolution `parseTest`
LukasTy 1be7c1d
Move `@mui/internal-markdown` to root folder to avoid not being detec…
LukasTy 8fcb660
Merge remote-tracking branch 'upstream/master' into yarn-to-pnpm
LukasTy 5338a06
Cleanup
LukasTy 6a14142
Update package.json
LukasTy ec30c92
Clean-up `date-fns-v3` dep declaration
LukasTy d2e83f7
Merge remote-tracking branch 'upstream/master' into yarn-to-pnpm
LukasTy 43abdec
Use regex instead of an exclude function
LukasTy ccf6005
Fix `importDocsStatic` script
LukasTy e935f3c
Grid packages have already been flattened
LukasTy f84086d
Simplify Pickers tsconfig
LukasTy dcdd4e3
Simplify Charts tsconfig
LukasTy ccae289
Simplify codemod tsconfig
LukasTy 2ea33ef
Simplify Data Grid tsconfig
LukasTy 911f5ca
Bump typescript to fix `x-data-grid-premium` `buildTypes`
LukasTy 9f4fec3
Further Data Grid package tsconfig simplifications
LukasTy fe04389
Remove unused entry
LukasTy 23355c7
Simplify Tree View tsconfig
LukasTy 34cfe46
prettier
LukasTy ee4c36d
Merge remote-tracking branch 'upstream/master' into yarn-to-pnpm
LukasTy 98807b0
Add `engine-strict`
LukasTy ef331f7
Simplify license tsconfig
LukasTy 14701d9
Omit pnpm cache
LukasTy dd410a7
Merge remote-tracking branch 'upstream/master' into yarn-to-pnpm
LukasTy 77d3ddf
Fix release scripts
LukasTy 0f60f5f
Revert to original `dry-run` script solution
LukasTy 3fc38db
Add note about `release:publish:dry-run` usage
LukasTy e620216
Simplify `docs` and `test` package `tsconfig`
LukasTy 0bc1da9
prettier
LukasTy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
/.git | ||
pnpm-lock.yaml | ||
netlify/functions | ||
/docs/.next | ||
/docs/export | ||
/docs/pages/playground/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
engine-strict = true | ||
auto-install-peers = true | ||
LukasTy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
enable-pre-post-scripts = true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Broken links found by `yarn docs:link-check` that exist: | ||
Broken links found by `docs:link-check` that exist: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Should cache the pnpm store instead?
This would require running
pnpm config set store-dir .pnpm-store
after installing pnpm – see https://pnpm.io/continuous-integration#circleciThere 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.
Thanks for spotting it. This is a great question. 👍
On one hand, it seems to make sense, but on the other hand, I think that it won't change anything given our current setup.
For now, our cache is hashed based on the
lock
file.Whenever anything in the lock file changes, the store will not be used and all new dependencies will be downloaded. 🤔
This is the same setup we had with
yarn
.WDYT @mui/code-infra, does it make sense to cache the pnpm store instead, as suggested in the tool documentation? 🤔
Or should the pnpm cache be removed altogether?
I've checked the latest configuration for
base-ui
,toolpad
, andmaterial-ui
and none have explicit caching config, even though it was present in the migration PRs. 🙈 🤷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.
We've removed cache altogether in core and Toolpad, but on X ymmv
mui/material-ui#40670 and mui/toolpad#3133
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, this is correct.
But what is cached in the current setup?
If I understand it correctly, there are only symlinks in
node_modules
that point to actual files in the store. Is this correct? Do we cache all files pointed to by symlinks innode_modules
? And what's restored when we hit the cache?To clarify: my original point was to make sure we don't cache symlinks without caching actual files 😅
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.
Hmm, this makes sense to me if we miss the cache often 👍🏻
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.
Thanks for the insight regarding the cache.
I've checked our case:
Seems like there is indeed no need for it as we basically save no time and use storage, which probably costs more money. 🙈 🤷
Do you agree that we can drop the
pnpm cache
on x as well @Janpot @cherniavskii?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.
Yep, go for 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.
Possibly a worst-case/slowest scenario: 75s