From a8e7a480da040bef29a9c25f886182d6bea84523 Mon Sep 17 00:00:00 2001 From: PP_Pro Date: Tue, 19 Sep 2023 13:52:42 +0800 Subject: [PATCH] fix dts bundle --- package-lock.json | 174 +++++++++++++++++++++++++-- package.json | 2 +- pal/env/package.json | 2 +- pal/env/src/{index.d.ts => index.ts} | 0 4 files changed, 164 insertions(+), 14 deletions(-) rename pal/env/src/{index.d.ts => index.ts} (100%) diff --git a/package-lock.json b/package-lock.json index eb3a2875eae..07cbbfaf650 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,9 +15,10 @@ "cocos/base/*" ], "dependencies": { + "@base/global": "*", "@cocos/box2d": "1.0.1", "@cocos/cannon": "1.2.8", - "@cocos/ccbuild": "2.0.3-alpha.14", + "@cocos/ccbuild": "2.0.3-alpha.16", "@cocos/dragonbones-js": "^1.0.1", "@pal/env": "*", "@pal/utils": "*" @@ -86,6 +87,7 @@ } }, "cocos/base/global": { + "name": "@base/global", "version": "1.0.0", "license": "MIT" }, @@ -1969,9 +1971,9 @@ } }, "node_modules/@cocos/ccbuild": { - "version": "2.0.3-alpha.14", - "resolved": "https://registry.npmjs.org/@cocos/ccbuild/-/ccbuild-2.0.3-alpha.14.tgz", - "integrity": "sha512-Hy6dInlmxnLwaaYeZKjPlUCvDmJk0bWb/2irqCIGSvU4JBEjFJCPVsGK1+9MCMQyb2YPW1StAgjVM651nGWGuw==", + "version": "2.0.3-alpha.16", + "resolved": "https://registry.npmjs.org/@cocos/ccbuild/-/ccbuild-2.0.3-alpha.16.tgz", + "integrity": "sha512-rrJTgQI3ugnpWTVo0YKRVAgyZ+T3pCt9CQgCjsYmBow6mkPgvvazRloXZfyYTAIPtmqfjxhkgfbRaimqmv6/gg==", "dependencies": { "@babel/core": "^7.20.12", "@babel/helper-module-imports": "7.18.6", @@ -1983,7 +1985,7 @@ "@babel/preset-env": "^7.20.2", "@babel/traverse": "^7.20.13", "@cocos/babel-plugin-dynamic-import-vars": "^1.0.2", - "@cocos/creator-programming-babel-preset-cc": "1.0.1-alpha.4", + "@cocos/creator-programming-babel-preset-cc": "1.0.1-alpha.5", "@rollup/plugin-babel": "^6.0.3", "@rollup/plugin-commonjs": "^11.1.0", "@rollup/plugin-json": "^4.1.0", @@ -2008,7 +2010,7 @@ "rollup": "^2.79.1", "rollup-plugin-terser": "^7.0.2", "semver": "~7.5.3", - "tfig": "^3.3.1", + "tfig": "^3.3.2", "typescript": "^4.9.5" } }, @@ -2197,9 +2199,9 @@ } }, "node_modules/@cocos/ccbuild/node_modules/@cocos/creator-programming-babel-preset-cc": { - "version": "1.0.1-alpha.4", - "resolved": "https://registry.npmjs.org/@cocos/creator-programming-babel-preset-cc/-/creator-programming-babel-preset-cc-1.0.1-alpha.4.tgz", - "integrity": "sha512-oQbVg2/GJ2eCg/0dzPxrVYkWqjlqK73oK7lQT4dS1VShXmOyG4vmVS5NkPSIiaO0M11u/IoIuGhvLGRnTxWmlQ==", + "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", + "integrity": "sha512-XSS5N3/8w1u3WD5qolRmhdYpLfo9nbiqNl1nMNO/PybXhIArn9e1cGOcg51tkLTwCxdonxHsOIJEzGY8Vj+CJw==", "dependencies": { "@babel/core": "7.19.6", "@babel/generator": "7.20.1", @@ -2344,9 +2346,9 @@ } }, "node_modules/@cocos/ccbuild/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", "dependencies": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -2428,6 +2430,24 @@ "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", @@ -2436,6 +2456,11 @@ "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", @@ -2467,6 +2492,14 @@ "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", @@ -2478,6 +2511,11 @@ "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,6 +2544,69 @@ "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/universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -2514,6 +2615,55 @@ "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.2", "resolved": "https://registry.npmjs.org/@cocos/creator-programming-babel-preset-cc/-/creator-programming-babel-preset-cc-1.0.1-alpha.2.tgz", diff --git a/package.json b/package.json index 7fd85e628ee..521b667aa8d 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "dependencies": { "@cocos/box2d": "1.0.1", "@cocos/cannon": "1.2.8", - "@cocos/ccbuild": "2.0.3-alpha.14", + "@cocos/ccbuild": "2.0.3-alpha.16", "@cocos/dragonbones-js": "^1.0.1", "@pal/env": "*", "@pal/utils": "*", diff --git a/pal/env/package.json b/pal/env/package.json index fd575880504..9911a7618d7 100644 --- a/pal/env/package.json +++ b/pal/env/package.json @@ -9,7 +9,7 @@ "exports": { ".": { "node": "./package.json", - "types": "./src/index.d.ts", + "types": "./src/index.ts", "native": "./src/native/env.ts", "web": "./src/web/env.ts", "minigame": { diff --git a/pal/env/src/index.d.ts b/pal/env/src/index.ts similarity index 100% rename from pal/env/src/index.d.ts rename to pal/env/src/index.ts