Skip to content
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 #1123

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft

Migrate to pnpm #1123

wants to merge 16 commits into from

Conversation

jeremywiebe
Copy link
Contributor

Summary:

This PR migrates this repo to pnpm. After the initial import, there were several changes I had to make to get all the scripts working. Many of these were the result of yarn resolving modules through the workspace root's node_modules whereas pnpm puts a node_modules dir in each package's dir.

Changes include:

  • Use workspace:* version for all in-repo dependencies
  • Prevent usage of package managers other than pnpm and pin pnpm to v10.0.0
  • Approve packages that have post-install scripts (pnpm doesn't run a script's post-install script unless it's approved) #security
  • Move all scripts to use pnpm instead of yarn
  • Fix globbing in check-type-definitions.js so that pnpm build:types works
  • Fix globbing in pre-publish-check-ci.js
  • ESLint: ignore generated docs/ directory
  • Add dependencies to eslint-plugin-khan that used to be available implicitly by yarn
  • ESLint: allow typedoc.config.js to be CJS
  • Migrate typedoc config to be a js file so we can just glob the packages to build docs for

Issue: FEI-6300

Test plan:

I ran each of the scripts in package.json including the publish:ci (which I temporarily modified to not do the last step which acctually publishes).

@jeremywiebe jeremywiebe self-assigned this Feb 28, 2025
Copy link

changeset-bot bot commented Feb 28, 2025

⚠️ No Changeset found

Latest commit: e15dd2f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@@ -17,16 +17,16 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"test": "bash -c 'yarn --silent --cwd \"../..\" test ${@:0} $($([[ ${@: -1} = -* ]] || [[ ${@: -1} = bash ]]) && echo $PWD)'"
"test": "bash -c 'pnpm --silent --dir \"../..\" test ${@:0} $($([[ ${@: -1} = -* ]] || [[ ${@: -1} = bash ]]) && echo $PWD)'"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Despite some work, I cannot get this to work. It runs, but does not run any tests.

I'm inclined to remove these test scripts from each of these packages. I don't know that anyone uses them and running tests from the root is quite easy (including the ability to filter to a single package by running pnpm test packages/wonder-stuff-ci).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant