-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from dotcore64/chore/maintenance-2021
Maintenance 2021
- Loading branch information
Showing
22 changed files
with
28,455 additions
and
11,632 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 |
---|---|---|
@@ -1,14 +1,16 @@ | ||
module.exports = api => ({ | ||
module.exports = ({ env }) => ({ | ||
presets: [ | ||
(api.env() !== 'test') ? '@babel/env' : ['@babel/env', { | ||
targets: { | ||
browsers: ['chrome >= 60', 'firefox >= 56'], // Test in these browsers is enough | ||
}, | ||
['@babel/env', { | ||
...(env('test') ? { | ||
targets: { | ||
browsers: ['chrome >= 60', 'firefox >= 56'], // Test in these browsers is enough | ||
} | ||
} : {}), | ||
}], | ||
'@babel/react', | ||
], | ||
env('test') && ['@babel/react', { runtime: 'automatic' }], | ||
].filter(Boolean), | ||
plugins: [ | ||
'dev-expression', | ||
api.env() === 'test' && ['istanbul', { exclude: ['test/*.jsx'] }], | ||
env('test') && ['istanbul', { exclude: ['test/**'] }], | ||
].filter(Boolean), | ||
}); |
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 +1,4 @@ | ||
dist/*.js | ||
node_modules/ | ||
coverage/ | ||
examples/public/client.js |
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,32 @@ | ||
{ | ||
"extends": ["airbnb", "plugin:react/jsx-runtime"], | ||
"env": { | ||
"browser": true | ||
}, | ||
"rules": { | ||
"max-len": ["error", { "code": 100, "ignoreComments": true }], | ||
"import/no-extraneous-dependencies": ["error", { | ||
"devDependencies": [ | ||
"test/**", | ||
"karma.conf.js", | ||
"rollup.config.js", | ||
"examples/rollup.config.js" | ||
] | ||
}] | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["test/{,**}/*.js?(x)"], | ||
"extends": ["plugin:mocha/recommended"], | ||
"plugins": ["mocha"], | ||
"env": { | ||
"mocha": true, | ||
"browser": true | ||
}, | ||
"rules": { | ||
"mocha/no-mocha-arrows": 0, | ||
"import/no-extraneous-dependencies": [2, { "devDependencies": 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: npm | ||
directory: "/" | ||
versioning-strategy: increase | ||
schedule: | ||
interval: daily | ||
reviewers: | ||
- perrin4869 | ||
assignees: | ||
- perrin4869 |
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,38 @@ | ||
name: release | ||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: browser-actions/setup-firefox@latest | ||
|
||
- name: Use Node.js 16 | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
# help the linter | ||
- name: Install example dependencies | ||
working-directory: ./examples | ||
run: npm ci | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Test | ||
run: npm test | ||
|
||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: test | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: | ||
- 12.x | ||
- 14.x | ||
- 16.x | ||
react-version: | ||
- ^16.8.0 | ||
- ^17.0.0 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: browser-actions/setup-firefox@latest | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
# examples dir ci will fail on npm@6 | ||
- name: Install npm@8 | ||
run: npm install -g npm@8 | ||
|
||
# help the linter | ||
- name: Install example dependencies | ||
working-directory: ./examples | ||
run: npm ci | ||
|
||
- name: Install react | ||
run: npm install --no-save react@${{ matrix.react-version }} react-dom@${{ matrix.react-version }} | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Test | ||
uses: nick-invision/retry@v1 # tests are somewhat flakey | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COVERALLS_SERVICE_NAME: "github" | ||
COVERALLS_GIT_COMMIT: ${{ github.sha }} | ||
COVERALLS_GIT_BRANCH: ${{ github.ref }} | ||
COVERALLS_SERVICE_JOB_ID: ${{ github.run_id }} | ||
with: | ||
timeout_minutes: 1 # Tests run for about 45s | ||
max_attempts: 3 | ||
command: npm test |
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 |
---|---|---|
|
@@ -3,3 +3,4 @@ dist | |
coverage | ||
examples/public/* | ||
!examples/public/index.html | ||
.eslintcache |
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,4 @@ | ||
{ | ||
"reporter": "spec", | ||
"ui": "bdd" | ||
} |
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
Oops, something went wrong.