Skip to content

Commit

Permalink
Merge pull request #284 from lume/update-to-yarn-4.0
Browse files Browse the repository at this point in the history
infra: update to Yarn 4.0
  • Loading branch information
trusktr committed Oct 27, 2023
2 parents ba17d60 + 163ea3f commit 8778721
Show file tree
Hide file tree
Showing 6 changed files with 9,526 additions and 9,532 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ jobs:
run: |
npm run fresh
npm run build:all
npm run test:all:ci
npm run test:all
env:
CI: true
28 changes: 0 additions & 28 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

This file was deleted.

33 changes: 28 additions & 5 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
checksumBehavior: ignore
nmHoistingLimits: workspaces
progressBarStyle: patrick # "patrick" | "simba" | "jack" | "hogsfather" | "default",

# without this, Windows was failing to pass checksum validation.
# checksumBehavior: ignore

# Tells Yarn to install packages to `node_modules`. Without this, it uses its
# more magical .pnp files, which change the Node runtime to find packages in a
# different way outside of node_modules, and this does not work for our
# client-side projects and import maps that we've set up to find packages in
# node_modules. It would be too cubersome to have the import maps map to .yarn/
# cache locations which include ugly hashes in their name.
nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: '@yarnpkg/plugin-workspace-tools'

# Hoist dependencies up to workspace boundaries, rather than all the way up to
# the root. Without this, importmaps in a client-side examples would not be able
# to access dependencies because node_modules would not exist in the local
# project.
nmHoistingLimits: workspaces

# Yarn recommends enabling this with Yarn 4.0.0 to catch version constraint
# errors locally before running in CI. In particular, when enabled, Yarn
# enforces that no two workspaces depend on different versions of any given
# dependencies, unless explicitly allowed.
# (https://yarnpkg.com/blog/release/4.0)
enableConstraintsChecks: true

# Define whether to reuse most common dependency ranges or not when adding dependencies to a package.
# If true, yarn add will attempt to reuse the most common dependency range in other workspaces.
preferReuse: true
1 change: 1 addition & 0 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"packages": [".", "apps/*", "packages/*"],
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "independent"
}
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@
"build:all:noFail": "npm run clean:all && corepack yarn lerna run build --ignore classy-solid -- -- --noFail",
"dev:all": "echo TODO run everything in dev mode with rebuild on changed files",
"clean:all": "corepack yarn lerna run clean --ignore classy-solid || echo 'clean:all: missing executables, skipping.'",
"test:all": "corepack yarn lerna run test --scope '{lume,@lume/element,element-behaviors,@lume/variable,@lume/eventful,@lume/autolayout,@lume/kiwi,@lume/three-projected-material,custom-attributes,james-bond,lowclass}'",
"test:all:ci": "npm run test:all -- --concurrency 1",
"// ^ Concurrency needs to be 1 in CI for some reason, but I forgot to comment why.": "",
"test:all": "corepack yarn workspaces foreach -Rtp --from 'lume' run test",
"// WEBSITE XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX": "",
"website": "(npm run docs:serve & p1=$!; npm run website:serve & p2=$!; wait $p1 $p2)",
"website:serve": "cd apps/website && meteor",
Expand Down Expand Up @@ -186,5 +184,5 @@
"web-component",
"webcomponent"
],
"packageManager": "yarn@3.6.4"
"packageManager": "yarn@4.0.0"
}

0 comments on commit 8778721

Please sign in to comment.