Skip to content

Commit b267a3f

Browse files
committed
ci(nvm): use NodeJS 16, 18, and 19 for verification
1 parent 78ab88b commit b267a3f

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

.github/workflows/master.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@ jobs:
1111
test-build-publish:
1212
name: Test and build
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
node: [ 16, 18, 19 ]
1417
steps:
1518
- uses: actions/checkout@v1
1619
- uses: actions/setup-node@v3
20+
name: Setup node ${{ matrix.node }}
1721
with:
18-
node-version: 16
22+
node-version: ${{ matrix.node }}
1923
cache: 'npm'
2024
- name: Install dependencies
2125
run: npm ci
@@ -24,14 +28,17 @@ jobs:
2428
- name: Build
2529
run: npm run build
2630
- name: Report coverage
31+
if: ${{ matrix.node == '18' }}
2732
uses: codecov/codecov-action@v3
2833
- name: Publish docs
34+
if: ${{ matrix.node == '18' }}
2935
uses: crazy-max/ghaction-github-pages@v2
3036
with:
3137
build_dir: docs
3238
env:
3339
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3440
- name: Publish package
41+
if: ${{ matrix.node == '18' }}
3542
run: npx semantic-release
3643
env:
3744
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/pr.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@ jobs:
1111
test-and-build:
1212
name: Test and build
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
node: [16, 18, 19]
1417
steps:
1518
- uses: actions/checkout@v1
1619
- uses: actions/setup-node@v3
20+
name: Setup node ${{ matrix.node }}
1721
with:
18-
node-version: 16
22+
node-version: ${{ matrix.node }}
1923
cache: 'npm'
2024
- name: Install dependencies
2125
run: npm ci
@@ -24,4 +28,5 @@ jobs:
2428
- name: Build
2529
run: npm run build
2630
- name: Report coverage
31+
if: ${{ matrix.node == '18' }}
2732
uses: codecov/codecov-action@v3

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"build:lib": "tsc -b ./tsconfig.cjs.json ./tsconfig.esm.json ./tsconfig.types.json",
3838
"build:docs": "typedoc --out docs src/yet-another-fetch-mock.ts",
3939
"test": "vitest run --coverage",
40+
"testdev": "vitest watch --coverage ",
4041
"commit": "git-cz",
4142
"precommit": "lint-staged",
4243
"prepush": "npm run test && npm run build",

src/matcher-utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { HttpMethod, MatcherUrl, RequestUrl, RouteMatcher } from './types.js';
22
import { createUrlRegex, findRequestMethod, findRequestUrl } from './internal-utils.js';
3-
import { pathToRegexp, Key } from 'path-to-regexp';
43

54
const heuristics = [/\?\w=\w/, /\&\w=\w/, /\?\w$/, /\&\w$/];
65
function containsQueryParams(matcherUrl: string): boolean {

0 commit comments

Comments
 (0)