Skip to content

Commit

Permalink
chore: migrate to yarn v2 (#655)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Sep 4, 2020
1 parent e15a8d1 commit 99774cd
Show file tree
Hide file tree
Showing 10 changed files with 12,255 additions and 9,089 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/lint.yml
Expand Up @@ -19,6 +19,15 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ubuntu-latest-node-12.x-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
ubuntu-latest-node-12.x-yarn-
- uses: actions/setup-node@v2.1.1
with:
node-version: 12.x
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/nodejs.yml
Expand Up @@ -24,6 +24,15 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ubuntu-latest-node-12.x-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
ubuntu-latest-node-12.x-yarn-
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2.1.1
with:
Expand Down Expand Up @@ -53,6 +62,17 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key:
${{ runner.os }}-node-${{ matrix.node-version }}-yarn-${{
hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}-yarn-
- uses: actions/setup-node@v2.1.1
with:
node-version: 12.x
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Expand Up @@ -10,9 +10,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ubuntu-latest-node-12.x-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
ubuntu-latest-node-12.x-yarn-
- uses: actions/setup-node@v2.1.1
with:
node-version: '12.x'
node-version: 12.x
- name: install
run: yarn
- name: run prettier
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Expand Up @@ -3,3 +3,9 @@ node_modules/
coverage/
lib/
*.log
.yarn/*
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*
38 changes: 38 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-sources.cjs

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions .yarnrc
@@ -0,0 +1,6 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


lastUpdateCheck 1576854265612
yarn-path ".yarn/releases/yarn-sources.cjs"
9 changes: 9 additions & 0 deletions .yarnrc.yml
@@ -0,0 +1,9 @@
enableGlobalCache: true

nodeLinker: node-modules

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

yarnPath: .yarn/releases/yarn-sources.cjs
11 changes: 5 additions & 6 deletions package.json
Expand Up @@ -20,12 +20,11 @@
"lib/"
],
"scripts": {
"build": "babel --extensions .js,.ts src --out-dir lib --copy-files",
"postbuild": "rimraf lib/__tests__ lib/**/__tests__",
"build": "babel --extensions .js,.ts src --out-dir lib --copy-files && rimraf lib/__tests__ 'lib/**/__tests__'",
"lint": "eslint . --ignore-pattern '!.eslintrc.js' --ext js,ts",
"prepack": "yarn build",
"prettier:check": "prettier --check docs/**/*.md README.md .github/** package.json tsconfig.json src/globals.json",
"prettier:write": "prettier --write docs/**/*.md README.md .github/** package.json tsconfig.json src/globals.json",
"prepack": "rimraf lib && yarn build",
"prettier:check": "prettier --check 'docs/**/*.md' README.md '.github/**' package.json tsconfig.json src/globals.json .yarnrc.yml",
"prettier:write": "prettier --write 'docs/**/*.md' README.md '.github/**' package.json tsconfig.json src/globals.json .yarnrc.yml",
"test": "jest",
"tools:regenerate-docs": "ts-node -T tools/regenerate-docs",
"typecheck": "tsc -p ."
Expand All @@ -43,7 +42,7 @@
},
"lint-staged": {
"*.{js,ts}": "eslint --fix",
"*.{md,json}": "prettier --write"
"*.{md,json,yml}": "prettier --write"
},
"prettier": {
"arrowParens": "avoid",
Expand Down

0 comments on commit 99774cd

Please sign in to comment.