Upgrade typescript config to target NodeJS 20

Fixes the error:

```
src/parsers/dart-json/dart-json-parser.ts:209:123 - error TS1501: This regular expression flag is only available when targeting 'es2018' or later.

209         /^══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞═+\s+(.*)\s+When the exception was thrown, this was the stack:/ms
```
This commit is contained in:
Jozef Izso 2024-06-25 15:52:26 +02:00
parent 4067b7aa0f
commit bec9662ac9
2 changed files with 14 additions and 7 deletions

View file

@ -77,5 +77,8 @@
"suiteNameTemplate": "{filepath}", "suiteNameTemplate": "{filepath}",
"classNameTemplate": "{classname}", "classNameTemplate": "{classname}",
"titleTemplate": "{title}" "titleTemplate": "{title}"
},
"engines": {
"node": ">=20"
} }
} }

View file

@ -1,12 +1,16 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ "lib": ["es2023"],
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ "module": "node16",
"outDir": "./lib", /* Redirect output structure to the directory. */ "target": "es2022",
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
"strict": true, /* Enable all strict type-checking options. */ "strict": true,
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ "esModuleInterop": true,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ "skipLibCheck": true,
"moduleResolution": "node16",
"outDir": "./lib",
"rootDir": "./src",
}, },
"exclude": ["node_modules", "**/*.test.ts"] "exclude": ["node_modules", "**/*.test.ts"]
} }