Upgrade to yarn 2 (#9500)

This commit is contained in:
Bram Kragten 2021-07-07 16:33:24 +02:00 committed by GitHub
parent 9e28b3447e
commit fc6e459c09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 18824 additions and 13780 deletions

View File

@ -10,26 +10,20 @@ on:
- dev - dev
- master - master
env:
NODE_VERSION: 12
jobs: jobs:
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out files from GitHub - name: Check out files from GitHub
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Setting up Node.js - name: Set up Node ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1 uses: actions/setup-node@v2
with: with:
node-version: 12.x node-version: ${{ env.NODE_VERSION }}
- name: Get yarn cache path cache: yarn
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Fetching Yarn cache
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies - name: Install dependencies
run: yarn install run: yarn install
env: env:
@ -47,46 +41,28 @@ jobs:
steps: steps:
- name: Check out files from GitHub - name: Check out files from GitHub
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Setting up Node.js - name: Set up Node ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1 uses: actions/setup-node@v2
with: with:
node-version: 12.x node-version: ${{ env.NODE_VERSION }}
- name: Get yarn cache path cache: yarn
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Fetching Yarn cache
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies - name: Install dependencies
run: yarn install run: yarn install
env: env:
CI: true CI: true
- name: Run Mocha - name: Run Mocha
run: npm run mocha run: yarn run mocha
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [lint, test] needs: [lint, test]
steps: steps:
- name: Check out files from GitHub - name: Check out files from GitHub
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Setting up Node.js - name: Set up Node ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1 uses: actions/setup-node@v2
with: with:
node-version: 12.x node-version: ${{ env.NODE_VERSION }}
- name: Get yarn cache path cache: yarn
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Fetching Yarn cache
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies - name: Install dependencies
run: yarn install run: yarn install
env: env:
@ -101,20 +77,11 @@ jobs:
steps: steps:
- name: Check out files from GitHub - name: Check out files from GitHub
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Setting up Node.js - name: Set up Node ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1 uses: actions/setup-node@v2
with: with:
node-version: 12.x node-version: ${{ env.NODE_VERSION }}
- name: Get yarn cache path cache: yarn
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Fetching Yarn cache
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies - name: Install dependencies
run: yarn install run: yarn install
env: env:

View File

@ -4,26 +4,21 @@ on:
push: push:
branches: branches:
- dev - dev
env:
NODE_VERSION: 12
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out files from GitHub - name: Check out files from GitHub
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Setting up Node.js - name: Set up Node ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1 uses: actions/setup-node@v2
with: with:
node-version: 12.x node-version: ${{ env.NODE_VERSION }}
- name: Get yarn cache path cache: yarn
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Fetching Yarn cache
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies - name: Install dependencies
run: yarn install run: yarn install
env: env:

View File

@ -29,6 +29,7 @@ jobs:
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: ${{ env.NODE_VERSION }} node-version: ${{ env.NODE_VERSION }}
cache: yarn
- name: Build and release package - name: Build and release package
run: | run: |

View File

@ -20,11 +20,6 @@ jobs:
- name: Checkout the repository - name: Checkout the repository
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Set up Node ${{ env.NODE_VERSION }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
- name: Upload Translations - name: Upload Translations
run: | run: |
export LOKALISE_TOKEN="${{ secrets.LOKALISE_TOKEN }}" export LOKALISE_TOKEN="${{ secrets.LOKALISE_TOKEN }}"
@ -44,12 +39,13 @@ jobs:
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: ${{ env.NODE_VERSION }} node-version: ${{ env.NODE_VERSION }}
cache: yarn
- name: Download Translations - name: Download Translations
run: | run: |
export LOKALISE_TOKEN="${{ secrets.LOKALISE_TOKEN }}" export LOKALISE_TOKEN="${{ secrets.LOKALISE_TOKEN }}"
npm install yarn install
./script/translations_download ./script/translations_download
- name: Initialize git - name: Initialize git

10
.gitignore vendored
View File

@ -8,9 +8,15 @@ hass_frontend/*
dist dist
# yarn # yarn
.yarn .yarn/*
yarn-error.log !.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*
node_modules/* node_modules/*
yarn-error.log
npm-debug.log npm-debug.log
# Python stuff # Python stuff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

55
.yarn/releases/yarn-berry.cjs vendored Executable file

File diff suppressed because one or more lines are too long

9
.yarnrc.yml Normal file
View File

@ -0,0 +1,9 @@
nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: "@yarnpkg/plugin-typescript"
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
yarnPath: .yarn/releases/yarn-berry.cjs

32342
yarn.lock

File diff suppressed because it is too large Load Diff