-
Notifications
You must be signed in to change notification settings - Fork 219
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
Draft
turadg
wants to merge
20
commits into
master
Choose a base branch
from
451-yarn-4
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+17,891
−12,527
Draft
upgrade Yarn to v4 #9945
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
2b47669
ci: rm unused check-dependencies
turadg 5cb4630
build: upgrade yarn to 4.4
turadg 27d5f4e
build: scripts chmod+x
turadg f882f5c
test: helpers lib
turadg d07a2c8
chore(deps): upgrade Yarn 1 to 4
turadg 99923a7
feat: list workspaces without yarn
turadg 1b1625e
build: configure yarn cache
turadg 11c9f51
lint: berry-compatible lint glob
turadg 0ef87f0
chore: `yarn run --top-level` for Berry compat
turadg a7c9d37
build: compat with Berry shell behavior
turadg e4cf3db
chore(deps): ava devDependency
turadg ee164c5
chore(deps): ava-xs (xsnap) devDependency
turadg 38241fb
test: run without yarn
turadg 77f7333
ci: remove registry/yarn test
turadg 3068cb6
docs: xsnap REPL bin not working
turadg d0279d3
ci: lint top level scripts
turadg efeb21b
chore(deps): declare 'agoric' cli
turadg 66e5975
ci: yarn 4 dropped --silent
turadg 2514098
build: yarn 4 dropped engine checking
turadg fd40918
build: golang/cosmos compat with Yarn 4
turadg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# https://yarnpkg.com/configuration/yarnrc#compressionLevel | ||
compressionLevel: 0 | ||
|
||
nodeLinker: node-modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,5 +31,5 @@ | |
"!submission" | ||
] | ||
}, | ||
"packageManager": "yarn@4.2.2" | ||
"packageManager": "yarn@4.4.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,5 +24,5 @@ | |
"ava": { | ||
"concurrency": 1 | ||
}, | ||
"packageManager": "yarn@4.2.2" | ||
"packageManager": "yarn@4.4.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,19 @@ | ||
#! /usr/bin/env node | ||
/* global process, Buffer */ | ||
import { spawn } from 'child_process'; | ||
// @ts-check | ||
/* eslint-env node */ | ||
import { execFileSync } from 'child_process'; | ||
import { basename } from 'path'; | ||
import { listWorkspaces } from '../src/lib/yarn.js'; | ||
|
||
const ps = spawn('yarn', ['workspaces', '--silent', 'info'], { | ||
stdio: ['ignore', 'pipe', 'inherit'], | ||
shell: true, | ||
}); | ||
const workspaces = listWorkspaces({ execFileSync }); | ||
|
||
// Get Buffers of output. | ||
const chunks = []; | ||
ps.stdout.on('data', data => chunks.push(data)); | ||
const packageNames = workspaces.map(w => w.name); | ||
|
||
// Wait for the process to exit. | ||
ps.on('close', code => { | ||
if (code !== 0) { | ||
throw Error(`yarn info exited with code ${code}`); | ||
} | ||
|
||
// Get the output. | ||
const json = Buffer.concat(chunks).toString('utf8'); | ||
// process.stderr.write(json); | ||
|
||
// Write the module. | ||
const workspaces = Object.keys(JSON.parse(json)).sort(); | ||
process.stdout.write(`\ | ||
// Write the module. | ||
process.stdout.write(`\ | ||
// DO NOT EDIT - automatically generated by ${basename( | ||
new URL(import.meta.url).pathname, | ||
)} | ||
new URL(import.meta.url).pathname, | ||
)} | ||
// prettier-ignore | ||
export default ${JSON.stringify(workspaces, null, 2)}; | ||
export default ${JSON.stringify(packageNames.sort(), null, 2)}; | ||
`); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// @ts-check | ||
|
||
/** | ||
* @import { execFileSync } from 'child_process'; | ||
*/ | ||
|
||
/** | ||
* Omits the root | ||
* | ||
* @param {{ execFileSync: execFileSync }} io | ||
* @returns {Array<{ location: string, name: string }>} | ||
*/ | ||
export const listWorkspaces = ({ execFileSync }) => { | ||
const out = execFileSync('npm', ['query', '.workspace'], { | ||
stdio: ['ignore', 'pipe', 'inherit'], | ||
shell: true, | ||
encoding: 'utf-8', | ||
}); | ||
/** @type {Array<{ location: string, name: string, description: string }>} */ | ||
const result = JSON.parse(out); | ||
return result.filter(({ location }) => location !== '.'); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** @file the `helpers` module is exported to test its API */ | ||
|
||
import '@endo/init/debug.js'; | ||
|
||
import test from 'ava'; | ||
|
||
import { getSDKBinaries } from '../src/helpers.js'; | ||
|
||
test('getSDKBinaries', t => { | ||
const binaries = getSDKBinaries(); | ||
t.log(binaries); | ||
t.is(typeof binaries.agSolo, 'string'); | ||
t.is(typeof binaries.agSoloBuild, 'object'); | ||
t.is(typeof binaries.cosmosChain, 'string'); | ||
t.is(typeof binaries.cosmosChainBuild, 'object'); | ||
t.is(typeof binaries.cosmosClientBuild, 'object'); | ||
t.is(typeof binaries.cosmosHelper, 'string'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: