Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
.pnpmrc
Outdated
| @@ -0,0 +1 @@ | |||
| legacy-peer-deps=true | |||
There was a problem hiding this comment.
I don't think this is a config option at all in pnpm
etrepum
left a comment
There was a problem hiding this comment.
Haven't had a chance to look through all of it or try it locally yet but this is what I noticed with a quick look
| strategy: | ||
| matrix: | ||
| node-version: [22.19.0] | ||
| node-version: [22.x] |
There was a problem hiding this comment.
Is there a strong reason to keep 22.x instead of upgrading to the active lts 24.x?
There was a problem hiding this comment.
For some reason, 24.x and 25.x hang when running Playwright, which I why I intentionally put an engine restriction of < 23.0. I was thinking to look at it separately, maybe upgrading the latest Playwright version will do but there's already a lot going on in this PR
| "@lexical/clipboard": "file:../../npm/lexical-clipboard-0.39.0.tgz", | ||
| "@lexical/dragon": "file:../../npm/lexical-dragon-0.39.0.tgz", | ||
| "@lexical/extension": "file:../../npm/lexical-extension-0.39.0.tgz", | ||
| "@lexical/history": "file:../../npm/lexical-history-0.39.0.tgz", | ||
| "@lexical/html": "file:../../npm/lexical-html-0.39.0.tgz", | ||
| "@lexical/list": "file:../../npm/lexical-list-0.39.0.tgz", | ||
| "@lexical/rich-text": "file:../../npm/lexical-rich-text-0.39.0.tgz", | ||
| "@lexical/selection": "file:../../npm/lexical-selection-0.39.0.tgz", | ||
| "@lexical/table": "file:../../npm/lexical-table-0.39.0.tgz", | ||
| "@lexical/utils": "file:../../npm/lexical-utils-0.39.0.tgz", | ||
| "emoji-datasource-facebook": "15.1.2", | ||
| "lexical": "0.39.0" | ||
| "lexical": "file:../../npm/lexical-0.39.0.tgz" |
There was a problem hiding this comment.
this looks like an accident
| "vitest-browser-svelte": "^0.1.0" | ||
| }, | ||
| "optionalDependencies": { | ||
| "@rollup/rollup-linux-x64-gnu": "4.6.1" |
There was a problem hiding this comment.
I wonder if we might want to add other platforms to this or to include @rollup/wasm-node or something
| async () => { | ||
| await withCwd(exampleDir, () => expectSuccessfulExec('npm run test')); | ||
| await withCwd(exampleDir, () => | ||
| expectSuccessfulExec('pnpm run test'), |
There was a problem hiding this comment.
This is a bit inconsistent, right now everything else with examples and integration tests is run with npm and uses package-lock.json. I think it happens to work because the node_modules is set up properly but it is a bit strange
There was a problem hiding this comment.
@etrepum This was actually intentional but I'm happy to do either way. My thought process is, documentation and examples are user-oriented, and folks are the most familiar with NPM. For developers in our repo, PNPM is preferable option. Would you agree with this / or do you think that these examples are more test oriented as opposed to user facing?
There was a problem hiding this comment.
I think either is fine but it should be consistent, if we’re installing example with npm we should be testing the examples with npm (and making sure to handle the correct lock files). I don’t think it’s a big deal either way, the examples should still work for users with any package manager, the only difference should be whether a lockfile is used or not.
There was a problem hiding this comment.
Ah yes, you're completely right, sorry I misread the code pointer
| await exec(cmd); | ||
| await exec( | ||
| `git checkout package-lock.json package.json packages/*/package.json`, | ||
| `git checkout pnpm-lock.yaml package.json packages/*/package.json`, |
There was a problem hiding this comment.
This might not be working correctly because the examples are still using npm and package-lock.json?
CONTRIBUTING.md
Outdated
| npm install -g pnpm | ||
| # or if you have Node.js 16.13+ | ||
| corepack enable |
There was a problem hiding this comment.
I think these instructions might be a bit out of date, the latest node versions have moved corepack out of the distribution so it might be something more like
npx corepack@latest enable
|
I confirmed that installing and running the unit tests & e2e tests works as expected. After a closer look I think it's probably worth auditing each The solution is probably to just get rid of all the |
|
Neat - curious to learn more about the advantages of PNPM |
|
The primary motivation for this PR is better security defaults. There are also some developer ergonomic improvements such as better script argument passing with |
We have made the decision to migrate to PNPM. We believe Lexical can benefit from its security and performance.
This PR encapsulates the minimum viables changes to get there, which boil down to:
npmforpnpmand adjusting the syntaxTest plan:
docs/)