Skip to content

Commit 2962dad

Browse files
committed
feat(deps): bump deps, lower tsconfig target, fix lints, update attribution
1 parent c1b2916 commit 2962dad

File tree

8 files changed

+475
-489
lines changed

8 files changed

+475
-489
lines changed

.yarn/releases/yarn-4.9.1.cjs renamed to .yarn/releases/yarn-4.9.2.cjs

Lines changed: 273 additions & 279 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
nodeLinker: node-modules
22

3-
yarnPath: .yarn/releases/yarn-4.9.1.cjs
3+
yarnPath: .yarn/releases/yarn-4.9.2.cjs

lib/util/url.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export function getProtocol(path: string | undefined) {
9595
export function getExtension(path: any) {
9696
const lastDot = path.lastIndexOf(".");
9797
if (lastDot >= 0) {
98-
return stripQuery(path.substr(lastDot).toLowerCase());
98+
return stripQuery(path.substring(lastDot).toLowerCase());
9999
}
100100
return "";
101101
}
@@ -109,7 +109,7 @@ export function getExtension(path: any) {
109109
export function stripQuery(path: any) {
110110
const queryIndex = path.indexOf("?");
111111
if (queryIndex >= 0) {
112-
path = path.substr(0, queryIndex);
112+
path = path.substring(0, queryIndex);
113113
}
114114
return path;
115115
}
@@ -173,7 +173,7 @@ export function isHttp(path: string) {
173173
* @param path - The URL or path to check
174174
* @returns true if the URL is unsafe/internal, false otherwise
175175
*/
176-
export function isUnsafeUrl(path: string): boolean {
176+
export function isUnsafeUrl(path: string | unknown): boolean {
177177
if (!path || typeof path !== "string") {
178178
return true;
179179
}
@@ -267,7 +267,7 @@ export function isUnsafeUrl(path: string): boolean {
267267
if (port && isInternalPort(parseInt(port))) {
268268
return true;
269269
}
270-
} catch (e) {
270+
} catch {
271271
// If URL parsing fails, check if it's a relative path or contains suspicious patterns
272272

273273
// Relative paths starting with / are generally safe for same-origin
@@ -425,14 +425,14 @@ export function toFileSystemPath(path: string | undefined, keepFileProtocol?: bo
425425

426426
// Step 3: If it's a "file://" URL, then format it consistently
427427
// or convert it to a local filesystem path
428-
let isFileUrl = path.substr(0, 7).toLowerCase() === "file://";
428+
let isFileUrl = path.substring(0, 7).toLowerCase() === "file://";
429429
if (isFileUrl) {
430430
// Strip-off the protocol, and the initial "/", if there is one
431-
path = path[7] === "/" ? path.substr(8) : path.substr(7);
431+
path = path[7] === "/" ? path.substring(8) : path.substring(7);
432432

433433
// insert a colon (":") after the drive letter on Windows
434434
if (isWindows() && path[1] === "/") {
435-
path = path[0] + ":" + path.substr(1);
435+
path = path[0] + ":" + path.substring(1);
436436
}
437437

438438
if (keepFileProtocol) {
@@ -453,8 +453,8 @@ export function toFileSystemPath(path: string | undefined, keepFileProtocol?: bo
453453
path = path.replace(forwardSlashPattern, "\\");
454454

455455
// Capitalize the drive letter
456-
if (path.substr(1, 2) === ":\\") {
457-
path = path[0].toUpperCase() + path.substr(1);
456+
if (path.substring(1, 2) === ":\\") {
457+
path = path[0].toUpperCase() + path.substring(1);
458458
}
459459
}
460460

package.json

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
"resolve"
2626
],
2727
"author": {
28-
"name": "James Messinger",
29-
"url": "https://jamesmessinger.com"
28+
"name": "JonLuca DeCaro",
29+
"url": "https://jonlu.ca",
30+
"email": "[email protected]"
3031
},
3132
"contributors": [
3233
{
@@ -42,8 +43,8 @@
4243
"email": "[email protected]"
4344
},
4445
{
45-
"name": "JonLuca DeCaro",
46-
"email": "[email protected]"
46+
"name": "James Messinger",
47+
"url": "https://jamesmessinger.com"
4748
}
4849
],
4950
"homepage": "https://apidevtools.com/json-schema-ref-parser/",
@@ -65,35 +66,37 @@
6566
"lib",
6667
"dist"
6768
],
69+
"peerDependencies": {
70+
"@types/json-schema": "^7.0.15"
71+
},
72+
"dependencies": {
73+
"js-yaml": "^4.1.0"
74+
},
6875
"devDependencies": {
69-
"@eslint/compat": "^1.3.1",
70-
"@eslint/js": "^9.30.0",
76+
"@eslint/compat": "^1.3.2",
77+
"@eslint/js": "^9.33.0",
7178
"@types/eslint": "^9.6.1",
7279
"@types/js-yaml": "^4.0.9",
80+
"@types/json-schema": "^7.0.15",
7381
"@types/node": "^24",
74-
"@typescript-eslint/eslint-plugin": "^8.35.1",
75-
"@typescript-eslint/parser": "^8.35.1",
82+
"@typescript-eslint/eslint-plugin": "^8.39.1",
83+
"@typescript-eslint/parser": "^8.39.1",
7684
"@vitest/coverage-v8": "^3.2.4",
77-
"cross-env": "^7.0.3",
78-
"eslint": "^9.30.0",
79-
"eslint-config-prettier": "^10.1.5",
80-
"eslint-config-standard": "^17.1.0",
85+
"cross-env": "^10.0.0",
86+
"eslint": "^9.33.0",
87+
"eslint-config-prettier": "^10.1.8",
8188
"eslint-plugin-import": "^2.32.0",
82-
"eslint-plugin-prettier": "^5.5.1",
89+
"eslint-plugin-prettier": "^5.5.4",
8390
"eslint-plugin-promise": "^7.2.1",
84-
"eslint-plugin-unused-imports": "^4.1.4",
85-
"globals": "^16.2.0",
91+
"eslint-plugin-unused-imports": "^4.2.0",
92+
"globals": "^16.3.0",
8693
"jsdom": "^26.1.0",
8794
"prettier": "^3.6.2",
8895
"rimraf": "^6.0.1",
89-
"typescript": "^5.8.3",
90-
"typescript-eslint": "^8.35.1",
96+
"typescript": "^5.9.2",
97+
"typescript-eslint": "^8.39.1",
9198
"vitest": "^3.2.4"
9299
},
93-
"dependencies": {
94-
"@types/json-schema": "^7.0.15",
95-
"js-yaml": "^4.1.0"
96-
},
97100
"release": {
98101
"branches": [
99102
"main"
@@ -105,5 +108,5 @@
105108
"@semantic-release/github"
106109
]
107110
},
108-
"packageManager": "[email protected].1"
111+
"packageManager": "[email protected].2"
109112
}

test/specs/circular-external-direct/circular-external-direct.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { describe, it } from "vitest";
22
import { expect } from "vitest";
33
import $RefParser from "../../../lib/index.js";
44
import path from "../../utils/path.js";
5-
import parsedSchema from "./parsed.js";
65
import dereferencedSchema from "./dereferenced.js";
76

87
describe("Schema with direct circular (recursive) external $refs", () => {

test/utils/serializeJson.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { SnapshotSerializer } from "vitest";
1+
import type { SnapshotSerializer } from "vitest";
22

33
/**
44
* This serializes JSON objects as plain JSON strings for snapshot testing
55
* Default formatter normally serializes JSON objects as a custom JS-like format
66
* But it doesn't look well in .json files
77
*/
88
export default {
9-
serialize(val, config, indentation, depth, refs, printer) {
9+
serialize(val) {
1010
return JSON.stringify(val, null, 2);
1111
},
1212
test(val) {

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
"compilerOptions": {
33
"module": "commonjs",
44
"outDir": "dist",
5-
"target": "ES2023",
5+
"target": "ES2022",
66
"allowJs": true,
77
"allowSyntheticDefaultImports": true,
88
"baseUrl": "src",
99
"declaration": true,
1010
"esModuleInterop": true,
1111
"inlineSourceMap": false,
12-
"lib": ["ES2023", "dom"],
12+
"lib": ["ES2022", "dom"],
1313
"listEmittedFiles": false,
1414
"listFiles": false,
1515
"noFallthroughCasesInSwitch": true,

0 commit comments

Comments
 (0)