diff --git a/packages/core/build/src/build.ts b/packages/core/build/src/build.ts index d861bfbc3b..3b2f72a985 100755 --- a/packages/core/build/src/build.ts +++ b/packages/core/build/src/build.ts @@ -53,7 +53,8 @@ export async function build(pkgs: string[]) { if (clientCore) { await buildPackage(clientCore, 'es', buildClient); } - const esmPackages = cjsPackages.filter(pkg => ESM_PACKAGES.includes(pkg.name)); + const esmPackages = packages.filter(pkg => ESM_PACKAGES.includes(pkg.name)); + await buildPackages(esmPackages, 'lib', buildCjs); await buildPackages(esmPackages, 'es', buildEsm); // plugins/*、samples/* diff --git a/packages/core/build/src/constant.ts b/packages/core/build/src/constant.ts index 3b91cbd397..a19585b488 100644 --- a/packages/core/build/src/constant.ts +++ b/packages/core/build/src/constant.ts @@ -49,6 +49,7 @@ export const getCjsPackages = (packages: Package[]) => packages .filter((item) => !PLUGINS_DIR.some((dir) => item.location.startsWith(dir))) .filter((item) => !item.location.startsWith(PRESETS_DIR)) + .filter((item) => !ESM_PACKAGES.includes(item.name)) .filter((item) => !CJS_EXCLUDE_PACKAGES.includes(item.location)); // tar diff --git a/packages/core/server/src/plugin-manager/utils.ts b/packages/core/server/src/plugin-manager/utils.ts index b1068af784..f2f200072b 100644 --- a/packages/core/server/src/plugin-manager/utils.ts +++ b/packages/core/server/src/plugin-manager/utils.ts @@ -522,8 +522,7 @@ export async function getCompatible(packageName: string) { if (hasSrc) { try { externalVersion = await getExternalVersionFromSource(packageName); - } catch (error) { - console.log('getExternalVersionFromSource error:', error); + } catch { hasError = true; } } diff --git a/packages/plugins/@nocobase/plugin-workflow-action-trigger/.npmignore b/packages/plugins/@nocobase/plugin-workflow-action-trigger/.npmignore new file mode 100644 index 0000000000..c593fe9df7 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-workflow-action-trigger/.npmignore @@ -0,0 +1,2 @@ +/node_modules +/src \ No newline at end of file diff --git a/packages/plugins/@nocobase/plugin-workflow-aggregate/.npmignore b/packages/plugins/@nocobase/plugin-workflow-aggregate/.npmignore new file mode 100644 index 0000000000..c593fe9df7 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-workflow-aggregate/.npmignore @@ -0,0 +1,2 @@ +/node_modules +/src \ No newline at end of file diff --git a/packages/plugins/@nocobase/plugin-workflow-delay/.npmignore b/packages/plugins/@nocobase/plugin-workflow-delay/.npmignore new file mode 100644 index 0000000000..c593fe9df7 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-workflow-delay/.npmignore @@ -0,0 +1,2 @@ +/node_modules +/src \ No newline at end of file diff --git a/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/.npmignore b/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/.npmignore new file mode 100644 index 0000000000..c593fe9df7 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-workflow-dynamic-calculation/.npmignore @@ -0,0 +1,2 @@ +/node_modules +/src \ No newline at end of file diff --git a/packages/plugins/@nocobase/plugin-workflow-loop/.npmignore b/packages/plugins/@nocobase/plugin-workflow-loop/.npmignore new file mode 100644 index 0000000000..c593fe9df7 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-workflow-loop/.npmignore @@ -0,0 +1,2 @@ +/node_modules +/src \ No newline at end of file diff --git a/packages/plugins/@nocobase/plugin-workflow-manual/.npmignore b/packages/plugins/@nocobase/plugin-workflow-manual/.npmignore new file mode 100644 index 0000000000..c593fe9df7 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-workflow-manual/.npmignore @@ -0,0 +1,2 @@ +/node_modules +/src \ No newline at end of file diff --git a/packages/plugins/@nocobase/plugin-workflow-parallel/.npmignore b/packages/plugins/@nocobase/plugin-workflow-parallel/.npmignore new file mode 100644 index 0000000000..c593fe9df7 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-workflow-parallel/.npmignore @@ -0,0 +1,2 @@ +/node_modules +/src \ No newline at end of file diff --git a/packages/plugins/@nocobase/plugin-workflow-request/.npmignore b/packages/plugins/@nocobase/plugin-workflow-request/.npmignore new file mode 100644 index 0000000000..c593fe9df7 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-workflow-request/.npmignore @@ -0,0 +1,2 @@ +/node_modules +/src \ No newline at end of file diff --git a/packages/plugins/@nocobase/plugin-workflow-sql/.npmignore b/packages/plugins/@nocobase/plugin-workflow-sql/.npmignore new file mode 100644 index 0000000000..c593fe9df7 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-workflow-sql/.npmignore @@ -0,0 +1,2 @@ +/node_modules +/src \ No newline at end of file diff --git a/packages/plugins/@nocobase/plugin-workflow-test/.npmignore b/packages/plugins/@nocobase/plugin-workflow-test/.npmignore new file mode 100644 index 0000000000..c593fe9df7 --- /dev/null +++ b/packages/plugins/@nocobase/plugin-workflow-test/.npmignore @@ -0,0 +1,2 @@ +/node_modules +/src \ No newline at end of file