Skip to content

Commit cf0000e

Browse files
update dependencies (#630)
1 parent 336cac7 commit cf0000e

File tree

4 files changed

+688
-593
lines changed

4 files changed

+688
-593
lines changed

package.json

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,25 @@
4141
"schema"
4242
],
4343
"dependencies": {
44-
"@types/json-schema": "^7.0.9",
45-
"@types/node": "^18.11.9",
46-
"glob": "^7.1.7",
44+
"@types/json-schema": "^7.0.15",
45+
"@types/node": "^24.10.2",
46+
"glob": "^13.0.0",
4747
"path-equal": "^1.2.5",
48-
"safe-stable-stringify": "^2.2.0",
49-
"ts-node": "^10.9.1",
50-
"typescript": "~5.5.0",
48+
"safe-stable-stringify": "^2.5.0",
49+
"ts-node": "^10.9.2",
50+
"typescript": "~5.9.3",
5151
"vm2": "^3.10.0",
52-
"yargs": "^17.1.1"
52+
"yargs": "^18.0.0"
5353
},
5454
"devDependencies": {
55-
"@types/chai": "^4.2.21",
56-
"@types/glob": "^7.1.4",
57-
"@types/mocha": "^9.0.0",
58-
"ajv": "^8.6.3",
59-
"ajv-formats": "^2.1.1",
60-
"chai": "^4.3.4",
61-
"mocha": "^9.1.3",
62-
"prettier": "^2.4.1",
63-
"source-map-support": "^0.5.20",
55+
"@types/chai": "^5.2.3",
56+
"@types/mocha": "^10.0.10",
57+
"ajv": "^8.17.1",
58+
"ajv-formats": "^3.0.1",
59+
"chai": "^6.2.1",
60+
"mocha": "^11.7.5",
61+
"prettier": "^3.7.4",
62+
"source-map-support": "^0.5.21",
6463
"tslint": "^6.1.3"
6564
},
6665
"scripts": {

test/schema.test.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { assert } from "chai";
44
import { readFileSync } from "fs";
55
import { resolve } from "path";
66
import * as TJS from "../typescript-json-schema";
7+
import { isRegExp } from "util/types";
78

89
const { versionMajorMinor: typescriptVersionMajorMinor } = TJS.ts;
910

@@ -125,7 +126,8 @@ export function assertRejection(
125126
) {
126127
it(group + " should reject input", () => {
127128
let schema = null;
128-
assert.throws(() => {
129+
130+
const fn = () => {
129131
if (!("required" in settings)) {
130132
settings.required = true;
131133
}
@@ -136,7 +138,13 @@ export function assertRejection(
136138

137139
const files = [resolve(BASE + group + "/main.ts")];
138140
schema = TJS.generateSchema(TJS.getProgramFromFiles(files, compilerOptions), type, settings, files);
139-
}, errType || /.*/);
141+
};
142+
143+
if (isRegExp(errType)) {
144+
assert.throws(fn, errType || /.*/);
145+
} else {
146+
assert.throws(fn, errType);
147+
}
140148
assert.equal(schema, null, "Expected no schema to be generated");
141149
});
142150
}

tsconfig.json

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,27 @@
11
{
2-
"compilerOptions": {
3-
"target": "es5",
4-
"module": "commonjs",
5-
"moduleResolution": "node",
6-
"outDir": "dist",
7-
"isolatedModules": false,
8-
"experimentalDecorators": true,
9-
"emitDecoratorMetadata": true,
10-
"declaration": true,
11-
"noImplicitAny": true,
12-
"strictNullChecks": true,
13-
"noImplicitReturns": true,
14-
"noFallthroughCasesInSwitch": true,
15-
"noUnusedLocals": true,
16-
"noUnusedParameters": true,
17-
"removeComments": true,
18-
"noLib": false,
19-
"preserveConstEnums": true,
20-
"sourceMap": true,
21-
"typeRoots" : ["node_modules/@types"],
22-
},
23-
"include": [
24-
"**/*.ts",
25-
"node_modules/@types/**/*.d.ts"
26-
],
27-
"exclude": [
28-
"node_modules",
29-
"example",
30-
"test/programs",
31-
"dist"
32-
],
33-
"compileOnSave": true,
34-
"buildOnSave": false
2+
"compilerOptions": {
3+
"target": "es2015",
4+
"module": "commonjs",
5+
"moduleResolution": "node",
6+
"outDir": "dist",
7+
"isolatedModules": false,
8+
"experimentalDecorators": true,
9+
"emitDecoratorMetadata": true,
10+
"declaration": true,
11+
"noImplicitAny": true,
12+
"strictNullChecks": true,
13+
"noImplicitReturns": true,
14+
"noFallthroughCasesInSwitch": true,
15+
"noUnusedLocals": true,
16+
"noUnusedParameters": true,
17+
"removeComments": true,
18+
"noLib": false,
19+
"preserveConstEnums": true,
20+
"sourceMap": true,
21+
"typeRoots": ["node_modules/@types"]
22+
},
23+
"include": ["**/*.ts", "node_modules/@types/**/*.d.ts"],
24+
"exclude": ["node_modules", "example", "test/programs", "dist"],
25+
"compileOnSave": true,
26+
"buildOnSave": false
3527
}

0 commit comments

Comments
 (0)