-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
feat: pnpm #161
feat: pnpm #161
Conversation
Remove yarn / pnp, in favor of pnpm. ✅ $ pnpm unittest ✅ $ pnpm test:plugin ✅ $ pnpm build:plugin ✅ $ pnpm generate 🚩 $ pnpm lint
What would be tha advantage of pnpm in this repo? Could you work out some more context? |
Hi @sarahsporck, the primary motivation was to reduce the amount of build complexity with the current setup of yarn and pnp. I believe, and please correct me if I am wrong, but this PR eliminates a whole lot of unnecessary code and configuration - 45,000 lines. Please confirm. Tests run, lint works and the plugin and library build. There are additional benefits of PNPM over yarn and npm. It works well out of the box with monorepos and is really good at managing dependency disk space. I might be able to get both yarn and pnpm working in the same repo, if you think that is beneficial. Take a look at #162 that builds upon this PR to implement Expo in a Monorepo environment. |
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.
Could you run pnpm install in the example repo, too? It also seems there is a missing peer dependency here. I guess it could also make sense to set up the example repo as a workspace, but I'll keep that for you to decide.
@@ -22,17 +22,17 @@ | |||
}, | |||
"scripts": { | |||
"fetch:style:spec": "./scripts/download-style-spec.sh", | |||
"generate": "yarn node ./scripts/autogenerate", | |||
"test": "npm run lint && npm run unittest", | |||
"generate": "npx node ./scripts/autogenerate", |
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.
Why do we need npx
here?
"generate": "npx node ./scripts/autogenerate", | |
"generate": "node ./scripts/autogenerate", |
"test:plugin": "jest plugin", | ||
"build:plugin": "tsc --build plugin", | ||
"lint:plugin": "eslint plugin/src/*", | ||
"postinstall": "husky install", | ||
"_postinstall": "husky install", |
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.
Doing this in postinstall was a yarn 2+ workaround. Look here how to properly configure husky for pnpm https://typicode.github.io/husky/getting-started.html#automatic-recommended
Remove yarn / pnp, in favor of pnpm.
✅ $ pnpm unittest
✅ $ pnpm test:plugin
✅ $ pnpm build:plugin
✅ $ pnpm generate
🚩 $ pnpm lint
Checklist
yarn lint:fix
in the root folderyarn test
in the root folderyarn generate
in the root folderCHANGELOG.md
index.d.ts
)/example
)