Skip to content

Commit 9c62452

Browse files
authored
maint: modernize devDependencies (#261)
* maint: modernize devDependencies * build: fix tests path
1 parent 571151a commit 9c62452

File tree

8 files changed

+1884
-319
lines changed

8 files changed

+1884
-319
lines changed

package-lock.json

Lines changed: 1857 additions & 271 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"lint": "prettier --check '{src,test}/**/*' README.md package.json",
1313
"lint:fix": "prettier --write '{src,test}/**/*' README.md package.json",
1414
"pretest": "npm run -s lint && npm run build",
15-
"test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" npx jest --coverage",
15+
"test": "vitest run --coverage test/*.test.ts",
1616
"test:typescript": "npx tsc --noEmit --declaration --noUnusedLocals --esModuleInterop --strict --module node16 --moduleResolution node16 --exactOptionalPropertyTypes --strict test/typescript-validate.ts",
17-
"test:watch": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" npx jest --watch",
18-
"test:e2e": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" npx jest --testRegex test/*.e2e.ts"
17+
"test:watch": "vitest watch test/*.test.ts",
18+
"test:e2e": "vitest test/*.e2e.ts"
1919
},
2020
"repository": "github:octokit/plugin-paginate-graphql.js",
2121
"keywords": [
@@ -29,61 +29,21 @@
2929
"@octokit/core": ">=6"
3030
},
3131
"devDependencies": {
32-
"@octokit/core": "^6.0.0",
32+
"@octokit/core": "^6.1.3",
3333
"@octokit/plugin-rest-endpoint-methods": "^13.0.0",
3434
"@octokit/tsconfig": "^4.0.0",
35-
"@types/fetch-mock": "^7.3.1",
36-
"@types/jest": "^29.0.0",
3735
"@types/node": "^22.0.0",
36+
"@vitest/coverage-v8": "^2.1.8",
3837
"esbuild": "^0.24.0",
39-
"fetch-mock": "npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1",
38+
"fetch-mock": "^11.0.0",
4039
"glob": "^10.2.6",
41-
"jest": "^29.0.0",
4240
"prettier": "3.4.2",
4341
"semantic-release-plugin-update-version-in-files": "^1.0.0",
4442
"ts-jest": "^29.0.0",
45-
"typescript": "^5.0.0"
46-
},
47-
"jest": {
48-
"preset": "ts-jest",
49-
"extensionsToTreatAsEsm": [
50-
".ts"
51-
],
52-
"transform": {
53-
"^.+\\.(ts|tsx)$": [
54-
"ts-jest",
55-
{
56-
"tsconfig": "test/tsconfig.test.json",
57-
"useESM": true
58-
}
59-
]
60-
},
61-
"coveragePathIgnorePatterns": [
62-
"./test/testHelpers",
63-
"./pkg"
64-
],
65-
"coverageThreshold": {
66-
"global": {
67-
"statements": 100,
68-
"branches": 100,
69-
"functions": 100,
70-
"lines": 100
71-
}
72-
},
73-
"moduleNameMapper": {
74-
"^(.+)\\.jsx?$": "$1"
75-
}
43+
"typescript": "^5.0.0",
44+
"vitest": "^2.1.8"
7645
},
7746
"release": {
78-
"branches": [
79-
"+([0-9]).x",
80-
"main",
81-
"next",
82-
{
83-
"name": "beta",
84-
"prerelease": true
85-
}
86-
],
8747
"plugins": [
8848
"@semantic-release/commit-analyzer",
8949
"@semantic-release/release-notes-generator",

test/extract-page-infos.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, expect, it } from "vitest";
12
import { MissingPageInfo } from "../src/errors.js";
23
import { extractPageInfos } from "../src/extract-page-info.js";
34
import type { PageInfoContext } from "../src/page-info.js";

test/merge-responses.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, expect, it } from "vitest";
12
import { mergeResponses } from "../src/merge-responses.js";
23

34
describe(".mergeResponses()", (): void => {

test/paginate-graphql.e2e.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, expect, it } from "vitest";
12
import { Octokit } from "@octokit/core";
23
import { paginateGraphQL } from "../src/index.js";
34

test/paginate.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, expect, it } from "vitest";
12
import fetchMock from "fetch-mock";
23
import { MissingCursorChange, MissingPageInfo } from "../src/errors.js";
34
import type { PageInfo } from "../src/page-info.js";

test/smoke.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, expect, it } from "vitest";
12
import { paginateGraphQL, VERSION } from "../pkg/dist-bundle/index.js";
23

34
describe("Test package exports", () => {

vite.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineConfig } from "vite";
2+
3+
export default defineConfig({
4+
test: {
5+
include: ["test/**/*.test.ts", "test/**/*.e2e.ts"],
6+
coverage: {
7+
include: ["src/**/*.ts"],
8+
reporter: ["html"],
9+
thresholds: {
10+
100: true,
11+
},
12+
},
13+
},
14+
});

0 commit comments

Comments
 (0)