feat(misc): support ts 4.9 (#14899)
This commit is contained in:
parent
5d54f71398
commit
3a98c6d3ab
@ -1,12 +1,12 @@
|
||||
export function sortCorePackagesFirst<ItemType>(
|
||||
export function sortCorePackagesFirst<ItemType extends object>(
|
||||
itemList: ItemType[],
|
||||
ref: PropertyKey
|
||||
): ItemType[] {
|
||||
const nxPackageIds = ['nx', 'workspace', 'devkit', 'nx-plugin'];
|
||||
function assertRef<OBJECT>(
|
||||
function assertRef(
|
||||
value: PropertyKey,
|
||||
target: OBJECT
|
||||
): value is keyof OBJECT {
|
||||
target: ItemType
|
||||
): value is keyof ItemType {
|
||||
if (!(value in target))
|
||||
throw new Error(
|
||||
`Property '${value.toString()}' can not be found in passed object.`
|
||||
|
||||
@ -247,7 +247,7 @@
|
||||
"tslint-to-eslint-config": "^2.13.0",
|
||||
"typedoc": "0.22.9",
|
||||
"typedoc-plugin-markdown": "3.11.6",
|
||||
"typescript": "~4.8.2",
|
||||
"typescript": "~4.9.5",
|
||||
"unzipper": "^0.10.11",
|
||||
"url-loader": "^4.1.1",
|
||||
"verdaccio": "^5.0.4",
|
||||
|
||||
@ -32,6 +32,11 @@ const BUILD_WATCH_SUCCEEDED = `[ ${chalk.green(
|
||||
'watch'
|
||||
)} ] build succeeded, watching for changes...`;
|
||||
|
||||
// since the workspace has esbuild 0.17+ installed, there's no definition
|
||||
// of esbuild without 'context', therefore, the esbuild import in the else
|
||||
// branch below has type never, getting the type to cast later
|
||||
type EsBuild = typeof esbuild;
|
||||
|
||||
export async function* esbuildExecutor(
|
||||
_options: EsBuildExecutorOptions,
|
||||
context: ExecutorContext
|
||||
@ -295,7 +300,7 @@ export async function* esbuildExecutor(
|
||||
for (let i = 0; i < options.format.length; i++) {
|
||||
const format = options.format[i];
|
||||
const esbuildOptions = buildEsbuildOptions(format, options, context);
|
||||
const buildResult = await esbuild.build(esbuildOptions);
|
||||
const buildResult = await (esbuild as EsBuild).build(esbuildOptions);
|
||||
|
||||
if (options.metafile) {
|
||||
const filename =
|
||||
|
||||
@ -31,5 +31,18 @@
|
||||
"factory": "./src/migrations/update-14-1-5/update-swcrc-path"
|
||||
}
|
||||
},
|
||||
"packageJsonUpdates": {}
|
||||
"packageJsonUpdates": {
|
||||
"15.8.0": {
|
||||
"version": "15.8.0-beta.2",
|
||||
"x-prompt": "Do you want to update to TypeScript v4.9?",
|
||||
"requires": {
|
||||
"typescript": ">=4.8.2 <4.9.0"
|
||||
},
|
||||
"packages": {
|
||||
"typescript": {
|
||||
"version": "~4.9.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,4 +6,4 @@ export const esbuildVersion = '^0.17.5';
|
||||
export const swcCliVersion = '~0.1.55';
|
||||
export const swcHelpersVersion = '~0.4.11';
|
||||
export const typesNodeVersion = '18.7.1';
|
||||
export const typescriptVersion = '~4.8.2';
|
||||
export const typescriptVersion = '~4.9.5';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
export const nxVersion = require('../../package.json').version;
|
||||
|
||||
export const angularCliVersion = '~15.1.0';
|
||||
export const typescriptVersion = '~4.8.2';
|
||||
export const typescriptVersion = '~4.9.5';
|
||||
export const prettierVersion = '^2.6.2';
|
||||
export const typescriptESLintVersion = '^5.36.1';
|
||||
export const eslintVersion = '~8.15.0';
|
||||
|
||||
@ -135,13 +135,25 @@
|
||||
},
|
||||
"14.8.0": {
|
||||
"version": "14.8.0-beta.0",
|
||||
"x-prompt": "Do you want to update the TypeScript version to v4.8?",
|
||||
"x-prompt": "Do you want to update to TypeScript v4.8?",
|
||||
"packages": {
|
||||
"typescript": {
|
||||
"version": "~4.8.2",
|
||||
"alwaysAddToPackageJson": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"15.8.0": {
|
||||
"version": "15.8.0-beta.2",
|
||||
"x-prompt": "Do you want to update to TypeScript v4.9?",
|
||||
"requires": {
|
||||
"typescript": ">=4.8.2 <4.9.0"
|
||||
},
|
||||
"packages": {
|
||||
"typescript": {
|
||||
"version": "~4.9.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@ Object {
|
||||
"@nrwl/workspace": "0.0.1",
|
||||
"nx": "0.0.1",
|
||||
"prettier": "^2.6.2",
|
||||
"typescript": "~4.8.2",
|
||||
"typescript": "~4.9.5",
|
||||
},
|
||||
"license": "MIT",
|
||||
"name": "my-workspace",
|
||||
@ -26,7 +26,7 @@ Object {
|
||||
"@nrwl/workspace": "0.0.1",
|
||||
"nx": "0.0.1",
|
||||
"prettier": "^2.6.2",
|
||||
"typescript": "~4.8.2",
|
||||
"typescript": "~4.9.5",
|
||||
},
|
||||
"license": "MIT",
|
||||
"name": "my-workspace",
|
||||
@ -44,7 +44,7 @@ Object {
|
||||
"@nrwl/workspace": "0.0.1",
|
||||
"nx": "0.0.1",
|
||||
"prettier": "^2.6.2",
|
||||
"typescript": "~4.8.2",
|
||||
"typescript": "~4.9.5",
|
||||
},
|
||||
"license": "MIT",
|
||||
"name": "my-workspace",
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
export const nxVersion = require('../../package.json').version;
|
||||
|
||||
export const angularCliVersion = '~15.1.0';
|
||||
export const typescriptVersion = '~4.8.2';
|
||||
export const typescriptVersion = '~4.9.5';
|
||||
export const prettierVersion = '^2.6.2';
|
||||
export const typescriptESLintVersion = '^5.36.1';
|
||||
export const eslintVersion = '~8.15.0';
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
// Create packages dictionary mapping
|
||||
export function convertToDictionary<OBJECT>(
|
||||
export function convertToDictionary<OBJECT extends object>(
|
||||
arr: OBJECT[],
|
||||
ref: PropertyKey
|
||||
): Record<PropertyKey, OBJECT> {
|
||||
|
||||
16
yarn.lock
16
yarn.lock
@ -24053,15 +24053,15 @@ typescript@4.8.2:
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.2.tgz#e3b33d5ccfb5914e4eeab6699cf208adee3fd790"
|
||||
integrity sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==
|
||||
|
||||
typescript@4.9.4, typescript@^4.6.2:
|
||||
typescript@4.9.4:
|
||||
version "4.9.4"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78"
|
||||
integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==
|
||||
|
||||
"typescript@^3 || ^4", typescript@~4.8.2:
|
||||
version "4.8.4"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6"
|
||||
integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==
|
||||
"typescript@^3 || ^4", typescript@^4.6.2, typescript@~4.9.5:
|
||||
version "4.9.5"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
|
||||
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
|
||||
|
||||
ua-parser-js@1.0.2:
|
||||
version "1.0.2"
|
||||
@ -24653,9 +24653,9 @@ vm-browserify@^1.0.1:
|
||||
integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==
|
||||
|
||||
vscode-oniguruma@^1.6.1:
|
||||
version "1.6.2"
|
||||
resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz#aeb9771a2f1dbfc9083c8a7fdd9cccaa3f386607"
|
||||
integrity sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==
|
||||
version "1.7.0"
|
||||
resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b"
|
||||
integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==
|
||||
|
||||
vscode-textmate@5.2.0:
|
||||
version "5.2.0"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user