Skip to content

Commit

Permalink
Migrate to yarn 2 (svg#1602)
Browse files Browse the repository at this point in the history
Yarn supports windows with custom shell, has better tools for
dependencies upgrade and more readable lockfile.

Migrated with preserving lockfile data.
  • Loading branch information
TrySound authored Oct 5, 2021
1 parent 7601b17 commit 5fb42ab
Show file tree
Hide file tree
Showing 9 changed files with 5,805 additions and 10,317 deletions.
40 changes: 20 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE }}
- name: Set up npm cache
- name: Set up yarn cache
uses: actions/cache@v2
with:
path: |
~/.npm
~/.cache/ms-playwright
key: ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package-lock.json') }}
.yarn/cache
key: ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package-lock.json') }}
- run: npm ci
- run: npm run lint
- run: npm run typecheck
${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('yarn.lock') }}
- run: yarn install
- run: yarn lint
- run: yarn typecheck
regression:
name: Test regressions
runs-on: ubuntu-latest
Expand All @@ -38,17 +38,17 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE }}
- name: Set up npm cache
- name: Set up yarn cache
uses: actions/cache@v2
with:
path: |
~/.npm
~/.cache/ms-playwright
key: ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package-lock.json') }}
.yarn/cache
key: ${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('package-lock.json') }}
- run: npm ci
- run: npm run test-regression
${{ runner.os }}-node-${{ env.NODE }}-${{ hashFiles('yarn.lock') }}
- run: yarn install
- run: yarn test-regression
test:
name: Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
Expand All @@ -65,15 +65,15 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Set up npm cache
- name: Set up yarn cache
uses: actions/cache@v2
with:
path: |
~/.npm
~/.cache/ms-playwright
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }}
.yarn/cache
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }}
- run: npm ci
- run: npm test
- run: npm run test-browser
${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('yarn.lock') }}
- run: yarn install
- run: yarn test
- run: yarn test-browser
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

node_modules
dist
test/regression-fixtures
test/regression-diffs
coverage
bin/svgo-profiling
.DS_Store
*.log
363 changes: 363 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

55 changes: 55 additions & 0 deletions .yarn/releases/yarn-2.4.3.cjs

Large diffs are not rendered by default.

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

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"

yarnPath: .yarn/releases/yarn-2.4.3.cjs
Empty file modified bin/svgo
100644 → 100755
Empty file.
Loading

0 comments on commit 5fb42ab

Please sign in to comment.