-
Notifications
You must be signed in to change notification settings - Fork 208
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
upgrade Yarn to v4 #9945
base: master
Are you sure you want to change the base?
upgrade Yarn to v4 #9945
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
ed72865
to
3e004b5
Compare
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.
exciting!
reviewed by commit
.gitignore
Outdated
@@ -42,8 +42,14 @@ typings/ | |||
# Output of 'npm pack' | |||
*.tgz | |||
|
|||
# Yarn Integrity file | |||
.yarn-integrity | |||
# Yarn (https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored) |
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.
👏 thanks for the clue
"lint": "run-s --continue-on-error lint:*", | ||
"lint:eslint": "eslint .", | ||
"lint:types": "tsc" | ||
"lint": "yarn run -T run-s --continue-on-error 'lint:*'", |
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.
TIL:
-T,--top-level Check the root workspace for scripts and/or binaries instead of the current one
fe462a3
to
7709da3
Compare
47b9336
to
4c01efe
Compare
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.
Looks like maintenance to me.
const cliEntrypoint = await importMetaResolve( | ||
'agoric/src/entrypoint.js', | ||
import.meta.url, | ||
).then(u => new URL(u).pathname); |
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.
Generally favor url.fileURLToPath
for portability.
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.
I lean toward createRequire
import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
@@ -47,6 +47,7 @@ The parent and child communicate using "commands". | |||
|
|||
![state diagram](doc/xsnap-states.svg) | |||
|
|||
<!-- FIXME this stopped working some time ago (was never in CI) |
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.
@@ -26,6 +26,7 @@ Then for the couple deeper packages | |||
yarn lerna exec --concurrency 1 --no-bail '../../../scripts/migrate-test-names.mjs' | |||
|
|||
`; | |||
console.log(usage); |
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.
Seems odd to log usage on the happy path.
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.
agreed. it was expedient to fix a lint error that usage
isn't ever used.
`yarn global add` is no longer supported. Yarn is just for managing project dependencies. NPM is recommended for global path.
closes: #451
#loadgen-branch: ta/yarn4-compat
Description
Attempting #8461 again after various other packageManager improvements. Starting with a fresh branch to be able to compare with the earlier attempt.
This time I'm deferring adoption of the workspace protocol to avoid having to test publishing (for all but
boot
package which is private)Security Considerations
None. Though Yarn 4 opens the option to keep the registry cache in the repo, reducing supply chain risk.
Scaling Considerations
n/a
Documentation Considerations
Any docs that advise a global install of Yarn will need updating. We should only be advising
corepack enable
so that thepackageManager
field can specify the correct version.Testing Considerations
CI
Upgrade Considerations
n/a