-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Migrate to pnpm #8848
Migrate to pnpm #8848
Conversation
🦋 Changeset detectedLatest commit: 2a8de2c The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
await fse.copy( | ||
path.join(__dirname, "../../build/node_modules"), | ||
path.join(projectDir, "node_modules"), | ||
{ overwrite: true } | ||
); |
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.
This throws an error when combined with pnpm's use of symlinks. As an alternative approach, we now always copy the root build
package directories to each package's dist
directory and then use workspace:*
dependencies so that the built versions of packages are available within workspace packages.
@@ -26,7 +26,7 @@ | |||
"access": "public", | |||
"baseBranch": "dev", | |||
"updateInternalDependencies": "patch", | |||
"ignore": [], | |||
"ignore": ["integration", "integration-*"], |
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.
This gets rid of all the changesets noise for packages that aren't published, which would otherwise be made even worse in this PR now that each integration helper template is a workspace package.
engine-strict=true | ||
shell-emulator=true | ||
enable-pre-post-scripts=true |
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 may want to remove this flag in the future, but I've enabled this flag for now to reduce the number of unnecessary changes.
engine-strict=true | ||
shell-emulator=true |
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.
This allows us to remove cross-env
.
"changeset": "changeset", | ||
"changeset:version": "changeset version && node ./scripts/remove-prerelease-changelogs.mjs && node ./scripts/patchup-version.mjs", | ||
"changeset:release": "yarn build --tsc --publish && changeset publish", |
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.
The --publish
flag has been removed in this PR. Only --tsc
is required.
exec("pnpm", ["rollup", "-c"]) | ||
.then(() => tsc && exec("pnpm", ["--recursive", "tsc", "-b"])) | ||
.then(() => | ||
exec("node", ["scripts/copy-build-to-dist.mjs", ...(tsc ? ["--tsc"] : [])]) |
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 now always run this script. See https://github.com/remix-run/remix/pull/8848/files#r1513657148.
Note that this means it's not guaranteed a --tsc
build is being run, so we now need to pass the flag down to this script too, otherwise this script fails trying to copy non-existent .d.ts
files.
@@ -15,7 +15,7 @@ function getTaggedVersion() { | |||
* @param {string} tag | |||
*/ | |||
function publish(dir, tag) { | |||
execSync(`npm publish --tag ${tag} ${dir}`, { stdio: "inherit" }); | |||
execSync(`pnpm publish ${dir} --tag ${tag}`, { stdio: "inherit" }); |
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.
Since I haven't attempted a publish, I've rearranged args to match the pnpm docs just in case the order is important.
@markdalgleish nice job on this one, will be a much nicer workflow now 🎉 |
No description provided.