-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Run in background during watch mode (nonblocking) Use ESM Use Parcel * Fix failing tests Export compiler function * lint * Update readme * Update dependencies * Update pipeline * Fix coverage output * Add caching Add matrix testing Update test triggers * Increase timeout * Update version Co-authored-by: Dominic Birch <[email protected]>
- Loading branch information
1 parent
f0695e6
commit 3f483fe
Showing
21 changed files
with
8,797 additions
and
6,148 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
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 |
---|---|---|
|
@@ -17,6 +17,8 @@ module.exports = { | |
], | ||
ignorePatterns: [ | ||
'lib/*.*', | ||
'dist/*.*', | ||
'test/*.*', | ||
], | ||
rules: {}, | ||
}; |
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 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,15 +1,34 @@ | ||
name: Run tests | ||
|
||
on: [push, pull_request] | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: [ 16, 17, 18, 19 ] | ||
name: Run tests on Node ${{ matrix.node }} | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/cache@v3 | ||
with: | ||
path: .parcel-cache | ||
key: ${{ runner.os }}-node${{ matrix.node }}-parcel | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: npm | ||
- run: npm ci | ||
- run: npx parcel build --no-source-maps --no-autoinstall | ||
env: | ||
NODE_ENV: production | ||
- run: npm test -- --ci --coverage --json --outputFile=test-results.json --testResultsProcessor="jest-junit" | ||
- name: Code Coverage Summary Report | ||
uses: irongut/[email protected] | ||
|
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 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 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 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 |
---|---|---|
|
@@ -7,4 +7,5 @@ | |
"*.js": "$(capture).*", | ||
"*.json": "$(capture)*.json", | ||
}, | ||
"typescript.tsdk": "./node_modules/typescript/lib" | ||
} |
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,46 @@ | ||
{ | ||
"version": "2.0.0", | ||
"inputs": [], | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "watch", | ||
"label": "parcel:watch", | ||
"detail": "parcel watch", | ||
"isBackground": true, | ||
"problemMatcher": [ | ||
{ | ||
"owner": "npm", | ||
"pattern": [ | ||
{ | ||
"regexp": "^.*?@parcel\\S+?:\\s*(.*)$", | ||
"message": 1, | ||
|
||
}, | ||
{ | ||
"regexp": "^.*?(\\S+?):(\\d+):(\\d+)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"loop": true, | ||
}, | ||
], | ||
"background": { | ||
"activeOnStart": true, | ||
"beginsPattern": "(.*?)", | ||
"endsPattern": "(^.*?Buil(t\\sin\\s\\d+|d\\sfailed))" | ||
} | ||
} | ||
], | ||
"presentation": { | ||
"echo": true, | ||
"focus": true, | ||
"clear": true, | ||
"close": true, | ||
"panel": "dedicated", | ||
"reveal": "always", | ||
"revealProblems": "onProblem", | ||
}, | ||
} | ||
] | ||
} |
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,13 +1,30 @@ | ||
import type { InitialOptionsTsJest } from "ts-jest"; | ||
import type { JestConfigWithTsJest } from "ts-jest"; | ||
|
||
|
||
export default <InitialOptionsTsJest>{ | ||
preset: "ts-jest", | ||
export default <JestConfigWithTsJest>{ | ||
preset: "ts-jest/presets/default-esm", | ||
testEnvironment: "node", | ||
collectCoverageFrom: ['src/**/*.ts', '!**/*.d.ts'], | ||
coverageDirectory: "coverage", | ||
coverageReporters: [ | ||
"cobertura", | ||
"clover", | ||
"lcov", | ||
] | ||
], | ||
moduleDirectories: ['node_modules', 'src'], | ||
moduleNameMapper: { | ||
'^(\\.{1,2}/.*)\\.[tj]s$': '$1', | ||
}, | ||
moduleFileExtensions: ["js", "ts"], | ||
extensionsToTreatAsEsm: [".ts"], | ||
transform: { | ||
'\\.ts$': [ | ||
'ts-jest', | ||
{ | ||
useESM: true, | ||
isolatedModules: true, | ||
tsconfig: "./tsconfig.json", | ||
}, | ||
], | ||
}, | ||
}; |
Oops, something went wrong.