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

chore: yarn berry #6652

Merged
merged 4 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/pre-commit-hooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Enable Corepack
run: corepack enable

- name: set up Node.js
uses: actions/setup-node@v3
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ jspm_packages
.node_repl_history
*.tgz
.yarn-integrity
.yarn/*
**/.yarn/*
!.yarn/cache
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.DS_Store
.vscode/launch.json

Expand Down
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
13 changes: 4 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"test:integration:legacy:since:release": "yarn test:e2e:legacy:since:release",
"test:protocols": "yarn build:protocols && lerna run test --scope '@aws-sdk/aws-protocoltests-*'",
"test:server-protocols": "yarn build:server-protocols && lerna run test --scope '@aws-sdk/*-server'",
"test:size": "cd scripts/benchmark-size/runner && yarn && ts-node ./cli.ts",
"test:size": "cd scripts/benchmark-size/runner && yarn && npx tsx ./cli.ts",
"test:unit": "make test-unit",
"test:versions": "jest --config tests/versions/jest.config.js tests/versions/index.spec.ts",
"update:versions:default": "node --es-module-specifier-resolution=node ./scripts/update-versions/default.mjs",
Expand Down Expand Up @@ -102,16 +102,15 @@
"rimraf": "3.0.2",
"ts-jest": "29.1.1",
"ts-loader": "9.4.2",
"ts-node": "10.9.1",
"tsx": "4.19.2",
"turbo": "2.1.2",
"typescript": "~4.9.5",
"verdaccio": "5.25.0",
"vite": "4.5.5",
"vitest": "0.34.6",
"webpack": "5.76.0",
"webpack-cli": "4.10.0",
"yargs": "17.5.1",
"yarn": "1.22.13"
"yargs": "17.5.1"
},
"overrides": {
"vite": "4.5.5"
Expand All @@ -125,10 +124,6 @@
"lib/*",
"packages/*",
"private/*"
],
"nohoist": [
"**/@aws-sdk/client-sso/**",
"**/@babel/**"
]
},
"husky": {
Expand All @@ -144,5 +139,5 @@
],
"**/*.{ts,js,md,json}": "prettier --write"
},
"packageManager": "yarn@1.22.22"
"packageManager": "yarn@4.5.1"
}
4 changes: 2 additions & 2 deletions packages/credential-provider-web-identity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"test:watch": "vitest watch"
},
"browser": {
"./dist-es/fromTokenFile": false,
"./dist-cjs/fromTokenFile": false
"./dist-cjs/fromTokenFile": false,
"./dist-es/fromTokenFile": false
},
"react-native": {
"./dist-es/fromTokenFile": false,
Expand Down
4 changes: 2 additions & 2 deletions packages/util-dns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
"directory": "packages/util-dns"
},
"browser": {
"./dist-es/index": "./dist-es/index.browser",
"./dist-es/HostResolver": "./dist-es/HostResolver.browser",
"./dist-es/NodeDnsLookupHostResolver": false
"./dist-es/NodeDnsLookupHostResolver": false,
"./dist-es/index": "./dist-es/index.browser"
},
"react-native": {
"./dist-es/index": "./dist-es/index.browser",
Expand Down
1 change: 1 addition & 0 deletions scripts/benchmark-size/runner/local-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const localPublishChangedPackages = async (): Promise<string> => {
console.info(`the package versions will be the actual version up with a patch version and preid "ci".`);
await exec("yarn", ["local-publish"], {
cwd: PROJECT_ROOT,
stdio: "inherit",
});
console.info(`published ${readdirSync(join(PROJECT_ROOT, "verdaccio", "storage", "@aws-sdk")).length} packages`);
return join(PROJECT_ROOT, "verdaccio", "config.yaml");
Expand Down
6 changes: 1 addition & 5 deletions scripts/benchmark-size/runner/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
{
"compilerOptions": {
"module": "ESNext", // to run ts-node with ESM dependencies
"module": "ESNext",
"target": "ESNext",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true
},
"ts-node": {
// Tell ts-node CLI to install the --loader automatically, explained below
"esm": true
}
}
6 changes: 3 additions & 3 deletions scripts/benchmark-size/runner/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ export const sleep = (ms: number) =>

export const validateRuntime = async () => {
try {
await exec("yarn", ["--version"]);
await exec("npx", ["--version"]);
} catch (e) {
console.error("yarn is not available, please install yarn globally");
console.error("npx is not available, please install npx globally");
throw e;
}
try {
await exec("yarn", ["--silent", "lerna", "--version"], {
await exec("npx", ["lerna", "--version"], {
cwd: PROJECT_ROOT,
});
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/benchmark-size/runner/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const loadWorkspacePackages = async (options?: {
}
}

const { stdout } = await exec("yarn", ["--silent", "lerna", ...args], {
const { stdout } = await exec("npx", ["lerna", ...args], {
cwd: PROJECT_ROOT,
encoding: "utf8",
});
Expand Down
Loading
Loading