-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Move rollup to root package.json #5962
Conversation
Co-Authored-By: Ben Scott <[email protected]>
size-limit report 📦
|
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.
Looking good. Happy to see this stuff be pulled up.
I see a few other rollup build related things that could be pulled up:
We should also pull up the dependencies on rollup
(present in polaris-for-vscode, polaris-icons, polaris-tokens), @svgr/core
(from polaris-icons), @shopify/browserslist-config
(from polaris-tokens). Basically anything that gets mentioned from a rollup.config.js
We should also pull up and deduplicate the typescript
dependency
.eslintrc.js
Outdated
@@ -53,6 +53,7 @@ module.exports = { | |||
'@babel/no-unused-expressions': 'off', | |||
'import/named': 'off', | |||
'import/no-default-export': ['error'], | |||
'import/no-extraneous-dependencies': ['error', {packageDir: ['../', './']}], |
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.
@BPScott @aaronccasanova what do you think about this? It is working locally.
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 think this is ok but is is pretty brittle. It relies upon eslint being ran in the specific package folders.
If you don't do that, e.g. running yarn eslint ./polaris-react
in the root of the repo, causes thousands of errors for me. It also means I see errors in vscode, as that doesn't run with the cwd you're assuming. Sample:
/Users/ben/src/github.com/Shopify/polaris/polaris-react/tests/utilities/react-testing.tsx
0:1 error The package.json file could not be found import/no-extraneous-dependencies
1:1 error 'react' should be listed in the project's dependencies. Run 'npm i -S react' to add it import/no-extraneous-dependencies
2:1 error '@shopify/react-testing' should be listed in the project's dependencies. Run 'npm i -S @shopify/react-testing' to add it import/no-extraneous-dependencies
I suspect:
- These paths should be absolute so they don't depend upon the cwd
- We'd need to add overrides for each package to reference the correct package.json for each package.
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.
🎉
Co-authored-by: Ben Scott <[email protected]>
Co-Authored-By: Ben Scott [email protected]
Added a skip changelog as I don't think that consumers would be affected by this change.