-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use yarn 2, bump node requirements * bump caniuse-lite, built via terser * loosen node support as we are not publishing modules :( * breaking: use workbox-build * use GitHub CI * fix typo * fix build * add tests for deprecation message * run coverage * tune docs
- Loading branch information
Showing
24 changed files
with
8,063 additions
and
6,320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
YARN_NODE_LINKER: pnp # use pnp linker for better linking performance | ||
YARN_ENABLE_SCRIPTS: false # disable post-install scripts | ||
|
||
jobs: | ||
prepare-yarn-cache: | ||
name: Prepare Cache | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js latest | ||
uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: "*" | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | ||
- uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
yarn- | ||
- name: Check Yarn dedupe | ||
if: steps.yarn-cache.outputs.cache-hit != 'true' | ||
run: | | ||
yarn dedupe --check | ||
- name: Check or update Yarn cache | ||
env: | ||
run: | | ||
yarn install --immutable --skip-builds | ||
test: | ||
name: Test on Node.js # GitHub will add ${{ matrix.node-version }} to this title | ||
needs: prepare-yarn-cache | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
node-version: ["*", 14, 12] | ||
os: ["ubuntu-latest", "windows-latest"] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js latest # Run yarn on latest node | ||
uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: "*" # Build Babel on latest node LTS versions | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: yarn-${{ hashFiles('yarn.lock') }} | ||
- name: Install | ||
run: | | ||
yarn install | ||
- name: Use Node.js ${{ matrix.node-version }} # Checkout node version for test executor | ||
uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Test | ||
run: | | ||
yarn test --coverage | ||
- name: Coveralls GitHub Action | ||
if: matrix.node-version == '*' | ||
uses: coverallsapp/github-action@v1.1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
YARN_NODE_LINKER: pnp # use pnp linker for better linking performance | ||
YARN_ENABLE_SCRIPTS: false # disable post-install scripts | ||
|
||
jobs: | ||
prepare-yarn-cache: | ||
name: Prepare Cache | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js latest | ||
uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: "*" | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | ||
- uses: actions/cache@v2 | ||
id: yarn-cache | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
yarn- | ||
- name: Check Yarn dedupe | ||
if: steps.yarn-cache.outputs.cache-hit != 'true' | ||
run: | | ||
yarn dedupe --check | ||
- name: Check or update Yarn cache | ||
run: | | ||
yarn install --immutable --skip-builds | ||
test: | ||
name: Test on Node.js # GitHub will add ${{ matrix.node-version }} to this title | ||
needs: prepare-yarn-cache | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
node-version: ["*", 14, 12] | ||
os: ["ubuntu-latest", "windows-latest"] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Use Node.js latest # Run yarn on latest node | ||
uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: "*" # Build Babel on latest node LTS versions | ||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: yarn-${{ hashFiles('yarn.lock') }} | ||
- name: Install | ||
run: | | ||
yarn install | ||
- name: Use Node.js ${{ matrix.node-version }} # Checkout node version for test executor | ||
uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Test | ||
run: | | ||
yarn test --coverage | ||
yarn spellcheck | ||
- name: Coveralls GitHub Action | ||
if: matrix.node-version == '*' | ||
uses: coverallsapp/github-action@v1.1.2 | ||
with: | ||
github-token: ${{ secrets.github_token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
yarnPath: ".yarn/releases/yarn-berry.cjs" | ||
nodeLinker: node-modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,8 @@ | |
"ServiceWorker", | ||
"sw", | ||
"travis", | ||
"vuejs", | ||
"v1", | ||
"workbox", | ||
"yaspeller" | ||
], | ||
"excludeFiles": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { "node": "12.17" } | ||
} | ||
] | ||
], | ||
"overrides": [ | ||
{ | ||
"test": ["./src/lib/template.js"], | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"forceAllTransforms": true | ||
} | ||
] | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module.exports = { | ||
hooks: { | ||
"pre-commit": "lint-staged" | ||
} | ||
"pre-commit": "lint-staged", | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = { | ||
"*.{js,md,yml}": ["prettier --write", "git add"] | ||
"*.{js,md,yml}": ["prettier --write"], | ||
}; |
Oops, something went wrong.