-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- [x] bump all deps - [x] configure vite - [x] refactor code - [x] remove globals - [x] add chrome compatibility - [x] rewrite docs - [x] build test dev component - [x] test log - [x] test debug - [x] test info - [x] test warn - [x] test error - [x] test critical - [x] test run - [x] test success - [x] configure vitest - [x] refactor tests - [x] configure Playwright - [x] write e2e tests - [x] configure peer dependencies - [x] add GH actions - [x] add NPM publish - [x] test imports locally - [x] bump version - [x] update CHANGELOG - [ ] publish new version Fixes slipmatio/slipmatio#83
- Loading branch information
Showing
39 changed files
with
2,430 additions
and
4,602 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,29 @@ | ||
/* eslint-env node */ | ||
require('@rushstack/eslint-patch/modern-module-resolution') | ||
|
||
module.exports = { | ||
root: true, | ||
extends: [ | ||
'plugin:vue/vue3-recommended', | ||
'@vue/eslint-config-typescript', | ||
'@vue/eslint-config-prettier/skip-formatting', | ||
'plugin:security/recommended', | ||
], | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
}, | ||
rules: { | ||
'no-var': 'error', | ||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | ||
'comma-dangle': ['error', 'only-multiline'], | ||
'id-length': [2, { exceptions: ['i', 'j', '_'] }], | ||
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '_' }], | ||
}, | ||
globals: { | ||
defineProps: 'readonly', | ||
defineEmits: 'readonly', | ||
defineExpose: 'readonly', | ||
withDefaults: 'readonly', | ||
}, | ||
} |
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,28 @@ | ||
{ | ||
"extends": [ | ||
"config:base", | ||
"group:all", | ||
":widenPeerDependencies", | ||
"config:basic-github-automerge" | ||
], | ||
"enabledManagers": [ | ||
"npm" | ||
], | ||
"packageRules": [ | ||
{ | ||
"matchManagers": [ | ||
"npm" | ||
], | ||
"automerge": true, | ||
"stabilityDays": 2 | ||
}, | ||
{ | ||
"matchPackagePatterns": [ | ||
"npm" | ||
], | ||
"rangeStrategy": "auto" | ||
} | ||
], | ||
"timezone": "Europe/Helsinki", | ||
"dependencyDashboard": 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,62 @@ | ||
name: E2E Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '.github/workflows/e2e.yml' | ||
- 'pnpm-lock.yaml' | ||
- 'src/**/*.ts' | ||
- 'src/**/*.vue' | ||
- 'tests/e2e/*.spec.ts' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/e2e.yml' | ||
- 'pnpm-lock.yaml' | ||
- 'src/**/*.ts' | ||
- 'src/**/*.vue' | ||
- 'tests/e2e/*.spec.ts' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: e2e-${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
e2e-tests: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
DEBUG: 0 | ||
PLAYWRIGHT_BROWSERS_PATH: 0 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: /home/runner/.local/share/pnpm/store | ||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}- | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
run_install: true | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'pnpm' | ||
|
||
- name: Install Playwright browsers | ||
run: npx playwright install --with-deps | ||
|
||
- name: Run e2e tests | ||
run: pnpm test-e2e-ci | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: test-results/ | ||
retention-days: 30 |
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,25 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
run_install: false | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- run: | | ||
pnpm i --frozen-lockfile | ||
pnpm build | ||
- uses: JS-DevTools/npm-publish@v2 | ||
with: | ||
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,58 @@ | ||
name: Build + Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '.github/workflows/test.yml' | ||
- 'pnpm-lock.yaml' | ||
- 'src/**/*.ts' | ||
- 'src/**/*.vue' | ||
- 'tests/unit/*.ts' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/test.yml' | ||
- 'pnpm-lock.yaml' | ||
- 'src/**/*.ts' | ||
- 'src/**/*.vue' | ||
- 'tests/unit/*.ts' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: test-${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
env: | ||
DEBUG: 0 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install dependencies | ||
run: pnpm i --frozen-lockfile | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
- name: Test | ||
run: pnpm test | ||
|
||
- name: Component Coverage | ||
uses: davelosert/vitest-coverage-report-action@v1.4.0 | ||
if: ${{ always() }} | ||
with: | ||
working-directory: ./ | ||
vite-config-path: ./vite.config.ts |
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,17 +1,33 @@ | ||
.DS_Store | ||
node_modules | ||
coverage | ||
npm-debug.log | ||
yarn-error.log | ||
.nyc_output | ||
dist | ||
package-lock.json | ||
.DS_Store | ||
tests/e2e | ||
plugins | ||
build | ||
/index.d.ts | ||
/index.d.ts.map | ||
/index.js | ||
/index.js.map | ||
/global | ||
/vue | ||
|
||
/tests/e2e/videos/ | ||
/tests/e2e/screenshots/ | ||
/instrumented | ||
/coverage | ||
.nyc_output | ||
|
||
# local env files | ||
.env | ||
.env.local | ||
.env.*.local | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
test-results | ||
|
||
LOCAL_NOTES.md |
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
Oops, something went wrong.