Skip to content

Commit

Permalink
maint: modernize devDependencies (#261)
Browse files Browse the repository at this point in the history
* maint: modernize devDependencies

* build: fix tests path
  • Loading branch information
wolfy1339 authored Jan 7, 2025
1 parent 571151a commit 9c62452
Show file tree
Hide file tree
Showing 8 changed files with 1,884 additions and 319 deletions.
2,128 changes: 1,857 additions & 271 deletions package-lock.json

Large diffs are not rendered by default.

56 changes: 8 additions & 48 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"lint": "prettier --check '{src,test}/**/*' README.md package.json",
"lint:fix": "prettier --write '{src,test}/**/*' README.md package.json",
"pretest": "npm run -s lint && npm run build",
"test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" npx jest --coverage",
"test": "vitest run --coverage test/*.test.ts",
"test:typescript": "npx tsc --noEmit --declaration --noUnusedLocals --esModuleInterop --strict --module node16 --moduleResolution node16 --exactOptionalPropertyTypes --strict test/typescript-validate.ts",
"test:watch": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" npx jest --watch",
"test:e2e": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" npx jest --testRegex test/*.e2e.ts"
"test:watch": "vitest watch test/*.test.ts",
"test:e2e": "vitest test/*.e2e.ts"
},
"repository": "github:octokit/plugin-paginate-graphql.js",
"keywords": [
Expand All @@ -29,61 +29,21 @@
"@octokit/core": ">=6"
},
"devDependencies": {
"@octokit/core": "^6.0.0",
"@octokit/core": "^6.1.3",
"@octokit/plugin-rest-endpoint-methods": "^13.0.0",
"@octokit/tsconfig": "^4.0.0",
"@types/fetch-mock": "^7.3.1",
"@types/jest": "^29.0.0",
"@types/node": "^22.0.0",
"@vitest/coverage-v8": "^2.1.8",
"esbuild": "^0.24.0",
"fetch-mock": "npm:@gr2m/fetch-mock@9.11.0-pull-request-644.1",
"fetch-mock": "^11.0.0",
"glob": "^10.2.6",
"jest": "^29.0.0",
"prettier": "3.4.2",
"semantic-release-plugin-update-version-in-files": "^1.0.0",
"ts-jest": "^29.0.0",
"typescript": "^5.0.0"
},
"jest": {
"preset": "ts-jest",
"extensionsToTreatAsEsm": [
".ts"
],
"transform": {
"^.+\\.(ts|tsx)$": [
"ts-jest",
{
"tsconfig": "test/tsconfig.test.json",
"useESM": true
}
]
},
"coveragePathIgnorePatterns": [
"./test/testHelpers",
"./pkg"
],
"coverageThreshold": {
"global": {
"statements": 100,
"branches": 100,
"functions": 100,
"lines": 100
}
},
"moduleNameMapper": {
"^(.+)\\.jsx?$": "$1"
}
"typescript": "^5.0.0",
"vitest": "^2.1.8"
},
"release": {
"branches": [
"+([0-9]).x",
"main",
"next",
{
"name": "beta",
"prerelease": true
}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
Expand Down
1 change: 1 addition & 0 deletions test/extract-page-infos.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from "vitest";
import { MissingPageInfo } from "../src/errors.js";
import { extractPageInfos } from "../src/extract-page-info.js";
import type { PageInfoContext } from "../src/page-info.js";
Expand Down
1 change: 1 addition & 0 deletions test/merge-responses.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from "vitest";
import { mergeResponses } from "../src/merge-responses.js";

describe(".mergeResponses()", (): void => {
Expand Down
1 change: 1 addition & 0 deletions test/paginate-graphql.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from "vitest";
import { Octokit } from "@octokit/core";
import { paginateGraphQL } from "../src/index.js";

Expand Down
1 change: 1 addition & 0 deletions test/paginate.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from "vitest";
import fetchMock from "fetch-mock";
import { MissingCursorChange, MissingPageInfo } from "../src/errors.js";
import type { PageInfo } from "../src/page-info.js";
Expand Down
1 change: 1 addition & 0 deletions test/smoke.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { describe, expect, it } from "vitest";
import { paginateGraphQL, VERSION } from "../pkg/dist-bundle/index.js";

describe("Test package exports", () => {
Expand Down
14 changes: 14 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineConfig } from "vite";

export default defineConfig({
test: {
include: ["test/**/*.test.ts", "test/**/*.e2e.ts"],
coverage: {
include: ["src/**/*.ts"],
reporter: ["html"],
thresholds: {
100: true,
},
},
},
});

0 comments on commit 9c62452

Please sign in to comment.