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

build: upgrade to yarn 3 #4120

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions .circleci/config.yml
Expand Up @@ -24,9 +24,12 @@ commands:
- restore_cache:
keys:
- v3b-<< pipeline.parameters.wireit_cache_name >>-{{ arch }}-{{ checksum "package.json" }}-
- run:
name: Enable Corepack
command: corepack enable
- run:
name: Installing Dependencies
command: yarn --frozen-lockfile --cache-folder ~/.cache/yarn
command: yarn install --immutable
- save_cache:
paths:
- ~/.cache/yarn
Expand Down Expand Up @@ -123,9 +126,12 @@ jobs:
- restore_cache:
keys:
- v3b-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
- run:
name: Enable Corepack
command: corepack enable
- run:
name: Installing Dependencies
command: yarn --ignore-scripts --frozen-lockfile --cache-folder ~/.cache/yarn
command: yarn install --immutable
- save_cache:
paths:
- ~/.cache/yarn
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pr-update.yml
Expand Up @@ -15,8 +15,10 @@ jobs:
with:
cache: yarn
node-version: 18
- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: yarn install --frozen-lockfile
run: yarn install --immutable
# README: https://github.com/castastrophe/actions-pr-auto-update#auto-update-pull-requests
- uses: castastrophe/actions-pr-auto-update@v1.1.0
with:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/publish.yml
Expand Up @@ -19,9 +19,10 @@ jobs:
node-version: '18'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: yarn --frozen-lockfile
run: yarn install --immutable

- name: Generate Docs
run: yarn docs:ci
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/smoke.yml
Expand Up @@ -15,9 +15,10 @@ jobs:
node-version: 18
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: yarn --frozen-lockfile
run: yarn install --immutable
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
Expand Down
25 changes: 15 additions & 10 deletions .github/workflows/test.yml
Expand Up @@ -26,9 +26,10 @@ jobs:
node-version: '18'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: yarn --frozen-lockfile
run: yarn install --immutable

- name: Post Previews
uses: actions/github-script@v7
Expand Down Expand Up @@ -74,9 +75,10 @@ jobs:
node-version: '18'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: yarn --frozen-lockfile
run: yarn install --immutable

- name: Extract branch name
shell: bash
Expand Down Expand Up @@ -146,9 +148,10 @@ jobs:
node-version: '18'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: yarn --frozen-lockfile
run: yarn install --immutable

- run: firefox --version

Expand Down Expand Up @@ -187,9 +190,10 @@ jobs:
node-version: '18'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: yarn --frozen-lockfile
run: yarn install --immutable

- name: Tachometer the changed packages
run: yarn test:changed
Expand Down Expand Up @@ -227,9 +231,10 @@ jobs:
node-version: '18'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'

- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: yarn --frozen-lockfile
run: yarn install --immutable

- name: Retrieve tachometer results archives
uses: actions/download-artifact@v4
Expand Down
10 changes: 10 additions & 0 deletions .gitignore
Expand Up @@ -93,3 +93,13 @@ test/visual/test.js
node_modules
npm-debug.log
package-lock.json


# yarn 3
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.1.0.cjs

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions .yarnrc.yml
@@ -0,0 +1,6 @@
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-4.1.0.cjs
cacheFolder: ./.yarn/cache
npmScopes:
'@adobe':
npmRegistryServer: 'https://registry.npmjs.org/'
14 changes: 14 additions & 0 deletions README.md
Expand Up @@ -6,6 +6,20 @@ To this end, Spectrum Web Components only targets _modern_, evergreen browsers t

# Requirements

This project uses **Node** and modern **yarn**. You must enable [corepack](https://yarnpkg.com/corepack) to use modern yarn. This only needs to be done once; to check if you've already enabled corepack:

```sh
yarn exec env
```

if you get a path as output, Corepack is properly installed. Otherwise, try:

```shell
corepack enable
```

Read more about [installing yarn](https://yarnpkg.com/getting-started/install);

- NodeJS >= 18.17.0
- Typescript
- Browsers with Custom Elements V1 and Shadow DOM support, e.g. Chrome, Firefox, Safari, Edge (79+)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -92,7 +92,6 @@
"peerDependencies": {
"common-tags": "^1.8.0"
},
"dependencies": {},
"devDependencies": {
"@commitlint/cli": "^19.0.1",
"@commitlint/config-conventional": "^19.0.0",
Expand Down Expand Up @@ -194,6 +193,7 @@
"wireit": "^0.14.3",
"yargs": "^17.2.1"
},
"packageManager": "yarn@4.1.0",
"wireit": {
"build:css:watch": {
"command": "node ./tasks/watch-css.js",
Expand Down
1 change: 0 additions & 1 deletion projects/css-custom-vars-viewer/package.json
@@ -1,7 +1,6 @@
{
"name": "@spectrum-web-components/custom-vars-viewer",
"version": "0.41.1",
"private": "true",
"description": "Demo app created with Spectrum Web Components, following open-wc guidelines",
"license": "Apache-2.0",
"author": "najikahalsema",
Expand Down