From edffc52ed83d18453b786b83df5ec62cae1bb787 Mon Sep 17 00:00:00 2001 From: Jason Dent Date: Sun, 8 Oct 2023 09:07:09 +0200 Subject: [PATCH] chore: fix build with respect to `@types/mocha` (#2855) --- package-lock.json | 15 +++++++-------- package.json | 1 - packages/_integrationTests/package.json | 2 +- packages/_server/package.json | 4 ++-- packages/_server/tsconfig.api.json | 4 +++- packages/_server/tsconfig.json | 3 ++- packages/_server/tsconfig.schema.json | 8 ++++++++ 7 files changed, 23 insertions(+), 14 deletions(-) create mode 100644 packages/_server/tsconfig.schema.json diff --git a/package-lock.json b/package-lock.json index 71cd8bbb63..2afcb2813a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,6 @@ }, "devDependencies": { "@tsconfig/node16": "^16.1.1", - "@types/jest": "^29.5.5", "@types/jest-when": "^3.5.3", "@types/node": "^18.18.3", "@types/vscode": "1.80.0", @@ -2844,6 +2843,12 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/mocha": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.2.tgz", + "integrity": "sha512-NaHL0+0lLNhX6d9rs+NSt97WH/gIlRHmszXbQ/8/MV/eVcFNdeJ/GYhrFuUc8K7WuPhRhTSdMkCp8VMzhUq85w==", + "dev": true + }, "node_modules/@types/ms": { "version": "0.7.31", "dev": true, @@ -17181,7 +17186,7 @@ "@types/chai": "^4.3.6", "@types/decompress": "^4.2.5", "@types/glob": "^8.1.0", - "@types/mocha": "10.0.1", + "@types/mocha": "^10.0.2", "@types/node": "^18.18.3", "chai": "^4.3.10", "cross-env": "^7.0.3", @@ -17221,12 +17226,6 @@ "dev": true, "license": "MIT" }, - "packages/_integrationTests/node_modules/@types/mocha": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.1.tgz", - "integrity": "sha512-/fvYntiO1GeICvqbQ3doGDIP97vWmvFt83GKguJ6prmQM2iXZfFcq6YE8KteFyRtX2/h5Hf91BYvPodJKFYv5Q==", - "dev": true - }, "packages/_integrationTests/node_modules/ansi-colors": { "version": "4.1.1", "license": "MIT", diff --git a/package.json b/package.json index c1753786d0..680914985b 100644 --- a/package.json +++ b/package.json @@ -2580,7 +2580,6 @@ }, "devDependencies": { "@tsconfig/node16": "^16.1.1", - "@types/jest": "^29.5.5", "@types/jest-when": "^3.5.3", "@types/node": "^18.18.3", "@types/vscode": "1.80.0", diff --git a/packages/_integrationTests/package.json b/packages/_integrationTests/package.json index a043993144..db04f061d1 100644 --- a/packages/_integrationTests/package.json +++ b/packages/_integrationTests/package.json @@ -27,7 +27,7 @@ "@types/chai": "^4.3.6", "@types/decompress": "^4.2.5", "@types/glob": "^8.1.0", - "@types/mocha": "10.0.1", + "@types/mocha": "^10.0.2", "@types/node": "^18.18.3", "chai": "^4.3.10", "cross-env": "^7.0.3", diff --git a/packages/_server/package.json b/packages/_server/package.json index 0df403411a..9fca605457 100644 --- a/packages/_server/package.json +++ b/packages/_server/package.json @@ -64,8 +64,8 @@ "scripts": { "build": "npm run build:esbuild && npm run build:api && npm run build:tsc && npm run build-schema", "build-production": "npm run clean-build-production", - "build-schema": "node ./scripts/ts-json-schema-generator.cjs --markdown-description --no-top-ref --expose none --path src/config/cspellConfig/cspellConfig.mts --type SpellCheckerSettingsVSCode --validation-keywords markdownDescription --validation-keywords scope --validation-keywords patternErrorMessage --validation-keywords deprecationMessage --validation-keywords enumDescriptions --validation-keywords deprecated --validation-keywords order -o spell-checker-config.schema.json", - "build-schema-new": "ts-json-schema-generator/bin/ts-json-schema-generator --markdown-description --no-top-ref --expose none --path src/config/cspellConfig/cspellConfig.mts --type SpellCheckerSettingsVSCode --validation-keywords markdownDescription --validation-keywords scope --validation-keywords patternErrorMessage --validation-keywords deprecationMessage --validation-keywords enumDescriptions --validation-keywords deprecated --validation-keywords order -o spell-checker-config.schema.json", + "build-schema": "node ./scripts/ts-json-schema-generator.cjs --tsconfig=./tsconfig.schema.json --markdown-description --no-top-ref --expose none --path src/config/cspellConfig/cspellConfig.mts --type SpellCheckerSettingsVSCode --validation-keywords markdownDescription --validation-keywords scope --validation-keywords patternErrorMessage --validation-keywords deprecationMessage --validation-keywords enumDescriptions --validation-keywords deprecated --validation-keywords order -o spell-checker-config.schema.json", + "build-schema-new": "ts-json-schema-generator/bin/ts-json-schema-generator --tsconfig=./tsconfig.schema.json --markdown-description --no-top-ref --expose none --path src/config/cspellConfig/cspellConfig.mts --type SpellCheckerSettingsVSCode --validation-keywords markdownDescription --validation-keywords scope --validation-keywords patternErrorMessage --validation-keywords deprecationMessage --validation-keywords enumDescriptions --validation-keywords deprecated --validation-keywords order -o spell-checker-config.schema.json", "build:production": "npm run build:esbuild -- --production && npm run build:api && npm run build-schema", "build:esbuild": "node ./build.mjs", "build:api": "npm run build:api.d.ts && npm run build:api.d.cts", diff --git a/packages/_server/tsconfig.api.json b/packages/_server/tsconfig.api.json index b7c6fcd479..7d69d93e8d 100644 --- a/packages/_server/tsconfig.api.json +++ b/packages/_server/tsconfig.api.json @@ -2,7 +2,9 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./dist", - "emitDeclarationOnly": true + "emitDeclarationOnly": true, + "skipLibCheck": true, + "types": ["node"] }, "files": ["src/api.ts"] } diff --git a/packages/_server/tsconfig.json b/packages/_server/tsconfig.json index e2995a29d0..54daa59934 100644 --- a/packages/_server/tsconfig.json +++ b/packages/_server/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig.packages.base.json", "compilerOptions": { "moduleResolution": "Node16", - "outDir": "./dist" + "outDir": "./dist", + "types": ["node"] }, "include": ["src"] } diff --git a/packages/_server/tsconfig.schema.json b/packages/_server/tsconfig.schema.json new file mode 100644 index 0000000000..d23d998916 --- /dev/null +++ b/packages/_server/tsconfig.schema.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.packages.base.json", + "compilerOptions": { + "skipLibCheck": true, + "types": [] + }, + "include": ["src"] +}