Skip to content

Migrate to pnpm#818

Merged
machty merged 35 commits intomainfrom
nvp/pnpm
Mar 22, 2025
Merged

Migrate to pnpm#818
machty merged 35 commits intomainfrom
nvp/pnpm

Conversation

@NullVoxPopuli
Copy link
Copy Markdown
Contributor

No description provided.

@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review March 22, 2025 04:30
@NullVoxPopuli
Copy link
Copy Markdown
Contributor Author

The 1 failing test is the same as on main.

@NullVoxPopuli NullVoxPopuli requested a review from machty March 22, 2025 04:46
Copy link
Copy Markdown
Contributor

@machty machty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks awesome, thank you! Just some comments / questions but hopefully can merge ASAP!

@@ -0,0 +1,151 @@
// This file is generated by `vscode-ext-gen`. Do not modify manually.
// @see https://github.com/antfu/vscode-ext-gen
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the rationale for versioning this file? Vue just has it run on the "postinstall" script. We can probably check it in but it would just mean more noise in diffs when adding commands or bumping versions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've found lifecycle scripts to be kind of troll-y in the past, so I eliminated them.

That resulted in inlining the generate meta command in this library's test, because I kept getting errors about the generated-meta not existing.

I think this file, while small, is good to check in to source, because I feel like we'll need to know what's in here anyway to be good stewards of the upstream dependencies.

Comment thread CONTRIBUTING.md
- Run `yarn` in the root of the repo to install all the package dependencies. If you have Volta installed, it will automatically fetch and use the correct versions of Node and Yarn for you.
- Run `yarn build` in the root of the repository to build all of the projects the first time. This will make sure that once you start working on one of the packages, you are working with an up to date version of the other packages in the project it depends on.
- Run `pnpm install` in the root of the repo to install all the package dependencies. If you have Volta installed, it will automatically fetch and use the correct versions of Node and pnpm for you.
- Run `pnpm build` in the root of the repository to build all of the projects the first time. This will make sure that once you start working on one of the packages, you are working with an up to date version of the other packages in the project it depends on.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a comment here in case some docs here might answer my question:

Don't have all the implications of peer deps and pnpm injected dependencies in my head, but I'm wondering what is the particular workflow when working on a workspace that uses injected deps? i.e. if I add or remove a file from one of the packages, what is the mechanism that add/removes that file from all of their referencing packages' node_moduies hard links? Is it a manual mechanism i need to periodically remember to run, or is it tied to some kind of watch script?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a note to the CONTRIBUTING.md about sync, if needed.

but I'm wondering what is the particular workflow when working on a workspace that uses injected deps? i.e. if I add or remove a file from one of the packages, what is the mechanism that add/removes that file from all of their referencing packages' node_moduies hard links?

the either pnpm build or pnpm sync will update those hard links. This is configured in the .npmrc.

Is it a manual mechanism i need to periodically remember to run, or is it tied to some kind of watch script?

Unfortunately, there is no ability to have syncing in a watch script built in. I made this https://github.com/NullVoxPopuli/pnpm-sync-dependencies-meta-injected, but I don't yet know if it works with pnpm 10, and probably needs some tweaks to read the .npmrc, etc.

For now, the hard-links are synced whenever:

  • pnpm build
  • pnpm sync (a no-op, just syncs)

@machty machty merged commit 09e09ff into main Mar 22, 2025
3 of 4 checks passed
@machty machty deleted the nvp/pnpm branch March 22, 2025 16:26
Copy link
Copy Markdown
Contributor

@bartocc bartocc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think GLINT_V2.docs needs to be updated to replace "yarn" commands with "pnpm" now that #818 is merged

@NullVoxPopuli
Copy link
Copy Markdown
Contributor Author

ope, sorry I missed it -- here is an update: #832

@bartocc
Copy link
Copy Markdown
Contributor

bartocc commented Mar 23, 2025

Awesome @NullVoxPopuli

@github-actions github-actions Bot mentioned this pull request Mar 23, 2025
@NullVoxPopuli NullVoxPopuli added the internal Changes that don't impact the published packages label Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Changes that don't impact the published packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants