Skip to content

Commit

Permalink
Update Yarn to version Berry
Browse files Browse the repository at this point in the history
  • Loading branch information
tiziodcaio committed Apr 7, 2022
1 parent f56dfe9 commit 559b64d
Show file tree
Hide file tree
Showing 23 changed files with 24,745 additions and 17,414 deletions.
43 changes: 14 additions & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ aliases:
restore_cache:
name: Restore node_modules cache
keys:
- v2-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ checksum "workspace_info.txt" }}-node-modules
- v2-node-{{ arch }}-{{ .Branch }}-{{ checksum "/tmp/checksum.txt" }}-node-modules

- &TEST_PARALLELISM 20

Expand Down Expand Up @@ -46,23 +46,25 @@ jobs:
- *restore_yarn_cache
- run:
name: Install Packages
command: yarn --frozen-lockfile --cache-folder ~/.cache/yarn
- run: yarn workspaces info | head -n -1 > workspace_info.txt
command: yarn --immutable --immutable-cache --check-cache
- run:
name: Generate cache key
command: ./scripts/circleci/checksum.sh /tmp/checksum.txt
- save_cache:
# Store the yarn cache globally for all lock files with this same
# checksum. This will speed up the setup job for all PRs where the
# lockfile is the same.
name: Save yarn cache for future installs
key: v2-node-{{ arch }}-{{ checksum "yarn.lock" }}-yarn
paths:
- ~/.cache/yarn
- ~/.yarn/berry/cache
- save_cache:
# Store node_modules for all jobs in this workflow so that they don't
# need to each run a yarn install for each job. This will speed up
# all jobs run on this branch with the same lockfile.
# all jobs run on this branch with the same lockfile. Because of yarn workspaces info is deprecated, all yarn.lock and package.json files are checksummed.
name: Save node_modules cache
# This cache key is per branch, a yarn install in setup is required.
key: v2-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ checksum "workspace_info.txt" }}-node-modules
key: v2-node-{{ arch }}-{{ .Branch }}-{{ checksum "/tmp/checksum.txt" }}-node-modules
paths:
- node_modules

Expand All @@ -72,7 +74,6 @@ jobs:

steps:
- checkout
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run: node ./scripts/prettier/index
- run: node ./scripts/tasks/eslint
Expand All @@ -87,7 +88,6 @@ jobs:

steps:
- checkout
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run: node ./scripts/tasks/flow-ci

Expand All @@ -97,7 +97,6 @@ jobs:

steps:
- checkout
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run:
command: |
Expand All @@ -114,7 +113,6 @@ jobs:
parallelism: 40
steps:
- checkout
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run: yarn build-combined
- persist_to_workspace:
Expand Down Expand Up @@ -153,7 +151,6 @@ jobs:
- checkout
- attach_workspace:
at: .
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run: echo "<< pipeline.git.revision >>" >> build/COMMIT_SHA
# Compress build directory into a single tarball for easy download
Expand All @@ -173,7 +170,6 @@ jobs:
- attach_workspace:
at: .
- run: echo "<< pipeline.git.revision >>" >> build/COMMIT_SHA
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run:
command: node ./scripts/tasks/danger
Expand All @@ -185,11 +181,10 @@ jobs:
- checkout
- attach_workspace:
at: .
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run:
name: Install Packages
command: yarn --frozen-lockfile --cache-folder ~/.cache/yarn
command: yarn --immutable
- run:
environment:
RELEASE_CHANNEL: experimental
Expand All @@ -204,16 +199,15 @@ jobs:
- checkout
- attach_workspace:
at: .
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run:
name: Install Packages
command: yarn --frozen-lockfile --cache-folder ~/.cache/yarn
command: yarn --immutable
- run:
name: Playwright install deps
command: |
npx playwright install
sudo npx playwright install-deps
yarn dlx playwright install
sudo yarn dlx playwright install-deps
- run:
environment:
RELEASE_CHANNEL: experimental
Expand All @@ -226,7 +220,6 @@ jobs:
- checkout
- attach_workspace:
at: .
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run: yarn lint-build

Expand All @@ -237,7 +230,6 @@ jobs:
- checkout
- attach_workspace:
at: .
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run: yarn check-release-dependencies

Expand All @@ -248,7 +240,6 @@ jobs:
steps:
- checkout
- attach_workspace: *attach_workspace
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run:
name: Search build artifacts for unminified errors
Expand All @@ -265,7 +256,6 @@ jobs:
type: string
steps:
- checkout
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run: yarn test <<parameters.args>> --ci

Expand All @@ -280,11 +270,10 @@ jobs:
- checkout
- attach_workspace:
at: .
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run:
name: Install nested packages from Yarn cache
command: yarn --frozen-lockfile --cache-folder ~/.cache/yarn
command: yarn --immutable
- run: yarn test --build <<parameters.args>> --ci

RELEASE_CHANNEL_stable_yarn_test_dom_fixtures:
Expand All @@ -294,15 +283,14 @@ jobs:
- checkout
- attach_workspace:
at: .
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run:
name: Run DOM fixture tests
environment:
RELEASE_CHANNEL: stable
command: |
cd fixtures/dom
yarn --frozen-lockfile
yarn
yarn prestart
yarn test --maxWorkers=2
Expand All @@ -311,7 +299,6 @@ jobs:
environment: *environment
steps:
- checkout
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run:
name: Run fuzz tests
Expand All @@ -331,7 +318,6 @@ jobs:
environment: *environment
steps:
- checkout
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run:
name: Run publish script
Expand All @@ -350,7 +336,6 @@ jobs:
environment: *environment
steps:
- checkout
- run: yarn workspaces info | head -n -1 > workspace_info.txt
- *restore_node_modules
- run:
name: Confirm reconciler forks are the same
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ chrome-user-data
.vscode
*.swp
*.swo
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

packages/react-devtools-core/dist
packages/react-devtools-extensions/chrome/build
Expand Down
785 changes: 785 additions & 0 deletions .yarn/releases/yarn-3.2.0.cjs

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.2.0.cjs
enableGlobalCache: true
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ deploy: off

install:
- ps: Install-Product node $env:nodejs_version $env:platform
- yarn install --frozen-lockfile
- yarn --immutable

test_script:
- node --version
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,5 +149,6 @@
},
"resolutions": {
"react-is": "npm:react-is"
}
},
"packageManager": "[email protected]"
}
4 changes: 2 additions & 2 deletions packages/jest-mock-scheduler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"description": "Jest matchers and utilities for testing the scheduler package.",
"main": "index.js",
"repository": {
"type" : "git",
"url" : "https://github.com/facebook/react.git",
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/jest-mock-scheduler"
},
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions packages/react-cache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"description": "A basic cache for React applications",
"version": "2.0.0-alpha.0",
"repository": {
"type" : "git",
"url" : "https://github.com/facebook/react.git",
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/react-cache"
},
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/react-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"cjs/"
],
"repository": {
"type" : "git",
"url" : "https://github.com/facebook/react.git",
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/react-client"
},
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions packages/react-debug-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
],
"main": "index.js",
"repository": {
"type" : "git",
"url" : "https://github.com/facebook/react.git",
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/react-debug-tools"
},
"engines": {
Expand Down
4 changes: 1 addition & 3 deletions packages/react-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
"url": "https://github.com/facebook/react.git",
"directory": "packages/react-devtools"
},
"bin": {
"react-devtools": "./bin.js"
},
"bin": "./bin.js",
"files": [
"bin.js",
"app.html",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"description": "Helpers for creating React data sources",
"version": "0.0.0",
"repository": {
"type" : "git",
"url" : "https://github.com/facebook/react.git",
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/react-fetch"
},
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/react-fs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"description": "React bindings for the filesystem",
"version": "0.0.0",
"repository": {
"type" : "git",
"url" : "https://github.com/facebook/react.git",
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/react-fs"
},
"files": [
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native-renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "16.0.0",
"private": true,
"repository": {
"type" : "git",
"url" : "https://github.com/facebook/react.git",
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/react-native-renderer"
},
"dependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/react-noop-renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
"description": "React package for testing the Fiber, Fizz and Flight reconcilers.",
"main": "index.js",
"repository": {
"type" : "git",
"url" : "https://github.com/facebook/react.git",
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/react-noop-renderer"
},
"license": "MIT",
"dependencies": {
"react-reconciler": "*",
"react-client": "*",
"react-reconciler": "*",
"react-server": "*"
},
"peerDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions packages/react-pg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"description": "React bindings for PostgreSQL",
"version": "0.0.0",
"repository": {
"type" : "git",
"url" : "https://github.com/facebook/react.git",
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/react-pg"
},
"files": [
Expand All @@ -28,7 +28,7 @@
"./package.json": "./package.json"
},
"peerDependencies": {
"react": "^17.0.0",
"pg": "*"
"pg": "*",
"react": "^17.0.0"
}
}
4 changes: 2 additions & 2 deletions packages/react-server-dom-relay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.1.0",
"private": true,
"repository": {
"type" : "git",
"url" : "https://github.com/facebook/react.git",
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/react-server-dom-relay"
},
"dependencies": {
Expand Down
Loading

0 comments on commit 559b64d

Please sign in to comment.