Upgrade to TypeScript 4.5

This commit is contained in:
Tony Garnock-Jones 2021-12-03 14:42:25 +01:00
parent 4673de5db4
commit e12d978915
6 changed files with 947 additions and 1414 deletions

View File

@ -2,14 +2,14 @@
"name": "@preserves/root",
"private": true,
"devDependencies": {
"@types/jest": "^26.0.19",
"jest": "^26.6.3",
"lerna": "^4.0.0",
"rollup": "^2.40.0",
"rollup-plugin-terser": "^7.0.2",
"ts-jest": "^26.5.2",
"ts-node-dev": "^1.1.6",
"typescript": "^4.2.3"
"@types/jest": "^27.0",
"jest": "^27.4",
"lerna": "^4.0",
"rollup": "^2.60",
"rollup-plugin-terser": "^7.0",
"ts-jest": "^27.0",
"ts-node-dev": "^1.1",
"typescript": "^4.5"
},
"workspaces": [
"packages/*"

View File

@ -28,12 +28,12 @@
},
"dependencies": {
"@preserves/core": "^0.17.0",
"@types/glob": "^7.1.3",
"@types/minimatch": "^3.0.3",
"chalk": "^4.1.0",
"chokidar": "^3.5.1",
"commander": "^7.2.0",
"glob": "^7.1.6",
"minimatch": "^3.0.4"
"@types/glob": "^7.1",
"@types/minimatch": "^3.0",
"chalk": "^4.1",
"chokidar": "^3.5",
"commander": "^7.2",
"glob": "^7.1",
"minimatch": "^3.0"
}
}

View File

@ -69,7 +69,7 @@ export function expandInputGlob(input: string[], base0: string | undefined): Exp
});
return [{ inputFilePath, text, baseRelPath, modulePath, schema }];
} catch (e) {
failures.push({ type: 'error', file: inputFilePath, detail: e });
failures.push({ type: 'error', file: inputFilePath, detail: e as Error });
return [];
}
}),

View File

@ -125,7 +125,7 @@ export function runOnce(options: CommandLineArguments): CompilationResult {
failures.push({ type: 'warn', file: c.inputFilePath, detail: { message, pos } }),
});
} catch (e) {
failures.push({ type: 'error', file: c.inputFilePath, detail: e });
failures.push({ type: 'error', file: c.inputFilePath, detail: e as Error });
}
if (compiledModule !== void 0) {
if (options.stdout) {

View File

@ -366,7 +366,7 @@ function parsePattern(name: symbol, body0: Array<Input>): Pattern {
}
function findName(x: Input): symbol | false {
if (!Annotated.isAnnotated<never>(x)) return false;
if (!Annotated.isAnnotated(x)) return false;
for (const a0 of x.annotations) {
const a = peel(a0);
if (typeof a === 'symbol') return M.isValidToken(a.description!) && a;

File diff suppressed because it is too large Load Diff