From 0110032ef42dd0109929558f0718ae4ab60ab5fe Mon Sep 17 00:00:00 2001 From: James Chen Date: Thu, 22 Feb 2024 15:23:29 +0800 Subject: [PATCH 1/3] 2.2.5 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c98a2d4..7e4d9fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@cocos/ccbuild", - "version": "2.2.4", + "version": "2.2.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@cocos/ccbuild", - "version": "2.2.4", + "version": "2.2.5", "hasInstallScript": true, "license": "MIT", "workspaces": [ diff --git a/package.json b/package.json index e819e99..6ddd4a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cocos/ccbuild", - "version": "2.2.4", + "version": "2.2.5", "description": "The next generation of build tool for Cocos engine.", "main": "./lib/index.js", "types": "./lib/index.d.ts", From 349047b5fb4ae665b55fd4bf5baa0a4d6c7cf557 Mon Sep 17 00:00:00 2001 From: James Chen Date: Thu, 22 Feb 2024 15:26:26 +0800 Subject: [PATCH 2/3] __before_bundle directory should be inside the engine folder. Otherwise, dragonbones library will not be found, the bundled .d.ts file will not contain dragonbones librarys, there will be lots of 'codec' type. --- modules/dts-bundler/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/dts-bundler/src/index.ts b/modules/dts-bundler/src/index.ts index e3a5fd7..4f03c56 100644 --- a/modules/dts-bundler/src/index.ts +++ b/modules/dts-bundler/src/index.ts @@ -48,7 +48,7 @@ export async function build (options: Options): Promise { const tsConfigPath = statsQuery.tsConfigPath; - const unbundledOutDir = ps.join(outDir, '__before_bundle'); + const unbundledOutDir = ps.join(engine, '__dts_before_bundle'); const parsedCommandLine = ts.getParsedCommandLineOfConfigFile( tsConfigPath, { declaration: true, From b4fc57952e3d103294de3274b26985a2218edf8d Mon Sep 17 00:00:00 2001 From: James Chen Date: Thu, 22 Feb 2024 15:26:50 +0800 Subject: [PATCH 3/3] Add utility function: path.basename. --- modules/utils/src/path.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/utils/src/path.ts b/modules/utils/src/path.ts index cadd834..1eb3cb1 100644 --- a/modules/utils/src/path.ts +++ b/modules/utils/src/path.ts @@ -11,6 +11,10 @@ export function dirname (path: string): string { return formatPath(ps.dirname(path)); } +export function basename (path: string): string { + return formatPath(ps.basename(path)); +} + export function join (...args: string[]): string { return formatPath(ps.join(...args)); }