diff --git a/cocos/core/platform/debug.ts b/cocos/core/platform/debug.ts index 24afa7496f8..a228f78fef5 100644 --- a/cocos/core/platform/debug.ts +++ b/cocos/core/platform/debug.ts @@ -22,6 +22,7 @@ THE SOFTWARE. */ +/* eslint-disable no-console */ import { EDITOR, JSB, DEV, DEBUG } from 'internal:constants'; import debugInfos from '../../../DebugInfos'; import { legacyCC, ccwindow } from '../global-exports'; @@ -120,8 +121,8 @@ export function debug (...data: unknown[]): void { */ export function _resetDebugSetting (mode: DebugMode): void { // reset - ccLog = ccWarn = ccError = ccAssert = ccDebug = (): void => { - }; + // eslint-disable-next-line @typescript-eslint/no-empty-function + ccLog = ccWarn = ccError = ccAssert = ccDebug = (): void => {}; if (mode === DebugMode.NONE) { return; @@ -138,7 +139,8 @@ export function _resetDebugSetting (mode: DebugMode): void { const logDiv = ccdocument.createElement('Div'); logDiv.setAttribute('id', 'logInfoDiv'); logDiv.setAttribute('width', '200'); - logDiv.setAttribute('height', legacyCC.game.canvas.height); + const height: number = legacyCC.game.canvas.height; + logDiv.setAttribute('height', `${height}`); const logDivStyle = logDiv.style; logDivStyle.zIndex = '99999'; logDivStyle.position = 'absolute'; @@ -189,10 +191,13 @@ export function _resetDebugSetting (mode: DebugMode): void { if (!console.error) { console.error = console.log; } + if (!console.warn) { console.warn = console.log; } + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore if (EDITOR || console.error.bind) { // use bind to avoid pollute call stacks ccError = console.error.bind(console); diff --git a/cocos/core/value-types/bitmask.ts b/cocos/core/value-types/bitmask.ts index 61db17e9a95..3e6cdcbfc1e 100644 --- a/cocos/core/value-types/bitmask.ts +++ b/cocos/core/value-types/bitmask.ts @@ -57,7 +57,7 @@ import { errorID } from '../platform/debug'; * BitMask(obj); * ``` */ -export function BitMask (obj: T): T { +export function BitMask (obj: T): T { if ('__bitmask__' in obj) { return obj; } @@ -95,7 +95,7 @@ export function BitMask (obj: T): T { * @returns @en True if it is a BitMask, false else. * @zh 如果是 BitMask,返回 true;否则返回 false。 */ -BitMask.isBitMask = (BitMaskType): any => BitMaskType && BitMaskType.hasOwnProperty('__bitmask__'); +BitMask.isBitMask = (BitMaskType): any => BitMaskType && Object.prototype.hasOwnProperty.call(BitMaskType, '__bitmask__'); /** * @@ -148,7 +148,7 @@ export function ccbitmask (bitmaskx): void { if ('__bitmask__' in bitmaskx) { return; } - value(bitmaskx, '__bitmask__', null, true); + value(bitmaskx as Record, '__bitmask__', null, true); } legacyCC.BitMask = BitMask; diff --git a/cocos/core/value-types/enum.ts b/cocos/core/value-types/enum.ts index 9601d30ef0a..dd561939494 100644 --- a/cocos/core/value-types/enum.ts +++ b/cocos/core/value-types/enum.ts @@ -29,6 +29,8 @@ import { legacyCC } from '../global-exports'; import { errorID } from '../platform/debug'; import { assertIsTrue } from '../data/utils/asserts'; +const hasOwnPropertyProto = Object.prototype.hasOwnProperty; + export type EnumType = Record; /** @@ -46,7 +48,7 @@ export type EnumType = Record; * @zh 包含枚举名和值的 JavaScript literal 对象,或者是一个 TypeScript enum 类型。 * @return @en The defined enum type. @zh 定义的枚举类型。 */ -export function Enum (obj: T): T { +export function Enum (obj: T): T { if ('__enums__' in obj) { return obj; } @@ -61,7 +63,7 @@ export function Enum (obj: T): T { * 更新枚举对象的属性列表。 * @param obj @en The enum object to update. @zh 需要更新的枚举对象。 */ -Enum.update = (obj: T): T => { +Enum.update = (obj: T): T => { let lastIndex = -1; const keys: string[] = Object.keys(obj); @@ -115,17 +117,17 @@ interface EnumExtras { * Determines if the object is an enum type. * @param enumType @en The object to judge. @zh 需要判断的对象。 */ -Enum.isEnum = (enumType: EnumT): boolean => enumType && enumType.hasOwnProperty('__enums__'); +Enum.isEnum = (enumType: EnumT): boolean => enumType && hasOwnPropertyProto.call(enumType, '__enums__'); -function assertIsEnum (enumType: EnumT): asserts enumType is EnumT & EnumExtras { - assertIsTrue(enumType.hasOwnProperty('__enums__')); +function assertIsEnum (enumType: EnumT): asserts enumType is EnumT & EnumExtras { + assertIsTrue(hasOwnPropertyProto.call(enumType, '__enums__')); } /** * Get the enumerators from the enum type. * @param enumType @en An enum type. @zh 枚举类型。 */ -Enum.getList = (enumType: EnumT): readonly Enum.Enumerator[] => { +Enum.getList = (enumType: EnumT): readonly Enum.Enumerator[] => { assertIsEnum(enumType); if (enumType.__enums__) { @@ -140,7 +142,7 @@ Enum.getList = (enumType: EnumT): readonly Enum.Enumerator (enumType: EnumT): readonly Enum.Enumerator[] { +function updateList (enumType: EnumT): readonly Enum.Enumerator[] { assertIsEnum(enumType); const enums: any[] = enumType.__enums__ || []; enums.length = 0; @@ -170,7 +172,7 @@ function updateList (enumType: EnumT): readonly Enum.Enumerato * @param enumType @en The enum type defined from [[Enum]] @zh 从[[Enum]]定义的枚举类型。 * @param compareFn @en Function used to determine the order of the elements. @zh 用于确定元素顺序的函数。 */ -Enum.sortList = (enumType: EnumT, compareFn: (a, b) => number): void => { +Enum.sortList = (enumType: EnumT, compareFn: (a, b) => number): void => { assertIsEnum(enumType); if (!Array.isArray(enumType.__enums__)) { return; @@ -200,7 +202,7 @@ if (DEV) { * @en enumType An enum type, eg, a kind of type with similar semantic defined by TypeScript. * @zh 枚举类型,例如 TypeScript 中定义的类型。 */ -export function ccenum (enumType: EnumT): void { +export function ccenum (enumType: EnumT): void { if (!('__enums__' in enumType)) { value(enumType, '__enums__', null, true); } diff --git a/package-lock.json b/package-lock.json index 10d25013d59..00d241a16fd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@babel/plugin-proposal-class-properties": "^7.18.6", "@cocos/box2d": "1.0.1", "@cocos/cannon": "1.2.8", - "@cocos/ccbuild": "2.2.9", + "@cocos/ccbuild": "2.2.10", "@cocos/dragonbones-js": "^1.0.1" }, "devDependencies": { @@ -52,7 +52,7 @@ "tmp": "^0.2.1", "tree-kill": "^1.2.0", "ts-jest": "^28.0.8", - "typescript": "^4.3.5", + "typescript": "^4.9.5", "vinyl-buffer": "^1.0.1", "vinyl-source-stream": "^2.0.0", "which": "^2.0.2", @@ -2056,9 +2056,9 @@ } }, "node_modules/@cocos/ccbuild": { - "version": "2.2.9", - "resolved": "https://registry.npmjs.org/@cocos/ccbuild/-/ccbuild-2.2.9.tgz", - "integrity": "sha512-nCWSZ6w5yj1Z2l3HYC/WZuOSka0vXcH8Hw3FvKrZOSKSVUVKxxk9TRUY/KvVt5gtTjlGWnO3sQFue8dC/t2JQg==", + "version": "2.2.10", + "resolved": "https://registry.npmjs.org/@cocos/ccbuild/-/ccbuild-2.2.10.tgz", + "integrity": "sha512-SGj+JwdJDELkCXoD6L+wVvIPBCP+UK8ov6xZlzhFywE5yAe/5rZopPY7ix4MxVHISuUfUafotqwT1ymMDBN2qA==", "dependencies": { "@babel/core": "^7.20.12", "@babel/helper-module-imports": "7.18.6", @@ -2071,6 +2071,7 @@ "@babel/traverse": "^7.20.13", "@cocos/babel-plugin-dynamic-import-vars": "^1.0.2", "@cocos/creator-programming-babel-preset-cc": "1.0.1-alpha.5", + "@cocos/tfig": "3.3.3", "@rollup/plugin-babel": "^6.0.3", "@rollup/plugin-commonjs": "^11.1.0", "@rollup/plugin-json": "^4.1.0", @@ -2095,7 +2096,6 @@ "rollup": "^2.79.1", "rollup-plugin-terser": "^7.0.2", "semver": "~7.5.3", - "tfig": "^3.3.2", "typescript": "^4.9.5" }, "optionalDependencies": { @@ -2392,24 +2392,6 @@ "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==" }, - "node_modules/@cocos/ccbuild/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "engines": { - "node": ">=6" - } - }, - "node_modules/@cocos/ccbuild/node_modules/cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dependencies": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } - }, "node_modules/@cocos/ccbuild/node_modules/commander": { "version": "11.0.0", "resolved": "https://registry.npmjs.org/commander/-/commander-11.0.0.tgz", @@ -2418,11 +2400,6 @@ "node": ">=16" } }, - "node_modules/@cocos/ccbuild/node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" - }, "node_modules/@cocos/ccbuild/node_modules/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", @@ -2454,14 +2431,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/@cocos/ccbuild/node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, "node_modules/@cocos/ccbuild/node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -2473,11 +2442,6 @@ "graceful-fs": "^4.1.6" } }, - "node_modules/@cocos/ccbuild/node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" - }, "node_modules/@cocos/ccbuild/node_modules/rollup": { "version": "2.79.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.79.1.tgz", @@ -2506,81 +2470,6 @@ "node": ">=10" } }, - "node_modules/@cocos/ccbuild/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@cocos/ccbuild/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@cocos/ccbuild/node_modules/tfig": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/tfig/-/tfig-3.3.2.tgz", - "integrity": "sha512-tNHgcai8dGxB7CW8qZRhlT+YW+I54k+VIbErxdkNyxBFU1ykuYiswEV1NrU74nf2Iy7TAdGg2KPrKsC+NhGYPw==", - "dependencies": { - "fs-extra": "^7.0.1", - "typescript": "^4.9.3", - "yargs": "^13.2.2" - } - }, - "node_modules/@cocos/ccbuild/node_modules/tfig/node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/@cocos/ccbuild/node_modules/tfig/node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/@cocos/ccbuild/node_modules/tfig/node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/@cocos/ccbuild/node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, "node_modules/@cocos/ccbuild/node_modules/universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -2589,55 +2478,6 @@ "node": ">= 10.0.0" } }, - "node_modules/@cocos/ccbuild/node_modules/which-module": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", - "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==" - }, - "node_modules/@cocos/ccbuild/node_modules/wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dependencies": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/@cocos/ccbuild/node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" - }, - "node_modules/@cocos/ccbuild/node_modules/yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dependencies": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - } - }, - "node_modules/@cocos/ccbuild/node_modules/yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, "node_modules/@cocos/creator-programming-babel-preset-cc": { "version": "1.0.1-alpha.5", "resolved": "https://registry.npmjs.org/@cocos/creator-programming-babel-preset-cc/-/creator-programming-babel-preset-cc-1.0.1-alpha.5.tgz", @@ -2709,6 +2549,125 @@ "resolved": "https://registry.npmjs.org/@cocos/dragonbones-js/-/dragonbones-js-1.0.1.tgz", "integrity": "sha512-1bWAW8td2WTGicyCqxtpIjc1YuK5EzMWfMEWaJlskPAQwLS0JfxEGka71sZ1BzudiWiKS7hPMg+FvXr5NRnVwQ==" }, + "node_modules/@cocos/tfig": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@cocos/tfig/-/tfig-3.3.3.tgz", + "integrity": "sha512-gKMI4WWeD/K6zQ4kf8SVN/eLzMPpQWN2YQrnvyqG2nHKds0Azrg6ngKwLZGHHNyVp8fy7ctN+yKARQ0vThZeTg==", + "dependencies": { + "fs-extra": "^7.0.1", + "typescript": "^4.9.3", + "yargs": "^13.2.2" + } + }, + "node_modules/@cocos/tfig/node_modules/ansi-regex": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", + "engines": { + "node": ">=6" + } + }, + "node_modules/@cocos/tfig/node_modules/cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dependencies": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "node_modules/@cocos/tfig/node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + }, + "node_modules/@cocos/tfig/node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/@cocos/tfig/node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" + }, + "node_modules/@cocos/tfig/node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@cocos/tfig/node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@cocos/tfig/node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==" + }, + "node_modules/@cocos/tfig/node_modules/wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dependencies": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@cocos/tfig/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" + }, + "node_modules/@cocos/tfig/node_modules/yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dependencies": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + } + }, + "node_modules/@cocos/tfig/node_modules/yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.3.0.tgz", @@ -8806,7 +8765,6 @@ "version": "7.0.1", "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-7.0.1.tgz", "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, "dependencies": { "graceful-fs": "^4.1.2", "jsonfile": "^4.0.0", @@ -13631,7 +13589,6 @@ "version": "4.0.0", "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-4.0.0.tgz", "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, "optionalDependencies": { "graceful-fs": "^4.1.6" } @@ -15044,7 +15001,7 @@ }, "node_modules/path-exists": { "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/path-exists/-/path-exists-3.0.0.tgz", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", "engines": { "node": ">=4" @@ -17626,9 +17583,9 @@ "dev": true }, "node_modules/typescript": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", - "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -17808,7 +17765,6 @@ "version": "0.1.2", "resolved": "https://registry.npmmirror.com/universalify/-/universalify-0.1.2.tgz", "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, "engines": { "node": ">= 4.0.0" } @@ -18435,18 +18391,6 @@ "wrap-ansi": "^2.0.0" } }, - "node_modules/yargs/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/yargs/node_modules/invert-kv": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/invert-kv/-/invert-kv-2.0.0.tgz", @@ -18468,19 +18412,6 @@ "node": ">=6" } }, - "node_modules/yargs/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/yargs/node_modules/os-locale": { "version": "3.1.0", "resolved": "https://registry.npmmirror.com/os-locale/-/os-locale-3.1.0.tgz", @@ -18495,27 +18426,6 @@ "node": ">=6" } }, - "node_modules/yargs/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/yargs/node_modules/string-width": { "version": "2.1.1", "resolved": "https://registry.npmmirror.com/string-width/-/string-width-2.1.1.tgz", diff --git a/package.json b/package.json index efa82eab7c1..d8133658461 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "tmp": "^0.2.1", "tree-kill": "^1.2.0", "ts-jest": "^28.0.8", - "typescript": "^4.3.5", + "typescript": "^4.9.5", "vinyl-buffer": "^1.0.1", "vinyl-source-stream": "^2.0.0", "which": "^2.0.2", @@ -80,7 +80,7 @@ "@babel/plugin-proposal-class-properties": "^7.18.6", "@cocos/box2d": "1.0.1", "@cocos/cannon": "1.2.8", - "@cocos/ccbuild": "2.2.9", + "@cocos/ccbuild": "2.2.10", "@cocos/dragonbones-js": "^1.0.1" } }