@modern-js/module-tools 2.28.0 → 2.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @modern-js/module-tools
2
2
 
3
+ ## 2.29.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 6993eb6: fix(module-tools): set platform to browser when build umd output
8
+
9
+ fix(module-tools): 构建 umd 时默认将 platform 设置为 browser
10
+
11
+ - 0f680ec: chore(deps): bump swc-plugins 0.5.5 and libuild 0.14.3
12
+
13
+ chore(deps): 升级 swc-plugins 0.5.5 和 libuild 0.14.3
14
+
15
+ - Updated dependencies [e6b5355]
16
+ - Updated dependencies [93db783]
17
+ - Updated dependencies [cba7675]
18
+ - Updated dependencies [99052ea]
19
+ - Updated dependencies [1d71d2e]
20
+ - @modern-js/utils@2.29.0
21
+ - @modern-js/core@2.29.0
22
+ - @modern-js/plugin-changeset@2.29.0
23
+ - @modern-js/plugin-i18n@2.29.0
24
+ - @modern-js/plugin-lint@2.29.0
25
+ - @modern-js/new-action@2.29.0
26
+ - @modern-js/plugin@2.29.0
27
+ - @modern-js/upgrade@2.29.0
28
+
3
29
  ## 2.28.0
4
30
 
5
31
  ### Minor Changes
@@ -128,6 +128,7 @@ const npmLibraryWithUmdPresetConfig = [
128
128
  {
129
129
  format: "umd",
130
130
  target: "es6",
131
+ platform: "browser",
131
132
  buildType: "bundle",
132
133
  outDir: "./dist/umd",
133
134
  dts: false
@@ -181,6 +182,7 @@ const npmComponentWithUmdPresetConfig = [
181
182
  {
182
183
  format: "umd",
183
184
  target: "es6",
185
+ platform: "browser",
184
186
  buildType: "bundle",
185
187
  outDir: "./dist/umd",
186
188
  dts: false
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;;;;;;;EAMaA,SAAO;WAAPA;;EAcAC,kBAAgB;WAAhBA;;EAQAC,wBAAsB;WAAtBA;;EAoBAC,+BAA6B;WAA7BA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BP,QAAQ,IAAIP,mBACxC,0BACAe,IAAIC;AACJ,WAAO;MAAE,GAAGA;MAAQT;IAAO;EAC7B;AACA,SAAOO;AACT,GAAG,CAAC;AAEG,MAAMZ,kBAA4C;EACvD;IACEM,WAAW;IACXF,QAAQ;IACRC,QAAQ;IACRG,KAAK;IACLO,iBAAiB;IACjBR,QAAQ;EACV;EACA;IACED,WAAW;IACXF,QAAQ;IACRC,QAAQ;IACRG,KAAK;IACLO,iBAAiB;IACjBR,QAAQ;EACV;EACA;IACED,WAAW;IACXE,KAAK;MACHE,MAAM;IACR;IACAH,QAAQ;EACV;;AAGK,MAAMN,uBAAiD;EAC5D;IACEK,WAAW;IACXF,QAAQ;IACRC,QAAQ;IACRG,KAAK;IACLO,iBAAiB;IACjBR,QAAQ;EACV;EACA;IACED,WAAW;IACXF,QAAQ;IACRC,QAAQ;IACRG,KAAK;IACLO,iBAAiB;IACjBR,QAAQ;EACV;EACA;IACED,WAAW;IACXF,QAAQ;IACRC,QAAQ;IACRG,KAAK;IACLO,iBAAiB;IACjBR,QAAQ;EACV;EACA;IACED,WAAW;IACXE,KAAK;MACHE,MAAM;IACR;IACAH,QAAQ;EACV;;AAGK,MAAML,aAAa;EACxB,GAAGV;EACH,GAAGC;EACH,GAAGC;EACH,GAAGC;EACH,GAAGC;EACH,GAAGC;EACH,GAAGC;EACH,GAAGC;EACH,kBAAkBC;EAClB,uBAAuBC;AACzB;AAEO,MAAME,gBAAgB;EAC3Ba,aAAa7B;EACb,eAAeA;EACf8B,aAAa7B;EACb,eAAeA;EACf8B,sBAAsB7B;EACtB,wBAAwBA;EACxB8B,eAAe7B;EACf,iBAAiBA;EACjB8B,wBAAwB7B;EACxB,0BAA0BA;EAC1B,kBAAkBS;EAClB,uBAAuBC;AACzB;","names":["targets","basePresetConfig","npmLibraryPresetConfig","npmLibraryWithUmdPresetConfig","npmComponentPresetConfig","npmComponentWithUmdPresetConfig","libraryPreset","libraryPresetWithTarget","libraryUmdPreset","libraryUmdPresetWithTarget","componentPreset","componentPresetWithTarget","componentUmdPreset","componentUmdPresetWithTarget","nodeBuildConfig","universalBuildConfig","presetList","BuildInPreset","format","target","buildType","outDir","dts","distPath","only","reduce","ret","map","config","externalHelpers","BASE_CONFIG","NPM_LIBRARY","NPM_LIBRARY_WITH_UMD","NPM_COMPONENT","NPM_COMPONENT_WITH_UMD"],"sources":["../../src/constants/home/runner/work/modern.js/modern.js/packages/solutions/module-tools/src/constants/buildPresets.ts"],"sourcesContent":["import type {\n PartialBuildConfig,\n PartialBaseBuildConfig,\n Target,\n} from '../types';\n\nexport const targets: Target[] = [\n 'es5',\n 'es6',\n 'es2015',\n 'es2016',\n 'es2017',\n 'es2018',\n 'es2019',\n 'es2020',\n 'es2021',\n 'es2022',\n 'esnext',\n];\n\nexport const basePresetConfig: PartialBuildConfig = {\n format: 'esm',\n target: 'es6',\n buildType: 'bundle',\n outDir: './dist',\n dts: { distPath: './types' },\n};\n\nexport const npmLibraryPresetConfig: PartialBaseBuildConfig[] = [\n {\n format: 'cjs',\n target: 'es6',\n buildType: 'bundle',\n outDir: './dist/lib',\n dts: false,\n },\n {\n format: 'esm',\n target: 'es6',\n buildType: 'bundle',\n outDir: './dist/es',\n dts: false,\n },\n {\n buildType: 'bundle',\n dts: { only: true, distPath: './types' },\n },\n];\nexport const npmLibraryWithUmdPresetConfig: PartialBaseBuildConfig[] = [\n {\n format: 'cjs',\n target: 'es6',\n buildType: 'bundle',\n outDir: './dist/lib',\n dts: false,\n },\n {\n format: 'esm',\n target: 'es6',\n buildType: 'bundle',\n outDir: './dist/es',\n dts: false,\n },\n {\n format: 'umd',\n target: 'es6',\n buildType: 'bundle',\n outDir: './dist/umd',\n dts: false,\n },\n {\n buildType: 'bundle',\n dts: { only: true, distPath: './types' },\n },\n];\nexport const npmComponentPresetConfig: PartialBaseBuildConfig[] = [\n {\n format: 'cjs',\n target: 'es6',\n buildType: 'bundleless',\n outDir: './dist/lib',\n dts: false,\n },\n {\n format: 'esm',\n target: 'es6',\n buildType: 'bundleless',\n outDir: './dist/es',\n dts: false,\n },\n {\n buildType: 'bundleless',\n outDir: './dist/types',\n dts: { only: true },\n },\n];\nexport const npmComponentWithUmdPresetConfig: PartialBaseBuildConfig[] = [\n {\n format: 'cjs',\n target: 'es6',\n buildType: 'bundleless',\n outDir: './dist/lib',\n dts: false,\n },\n {\n format: 'esm',\n target: 'es6',\n buildType: 'bundleless',\n outDir: './dist/es',\n dts: false,\n },\n {\n format: 'umd',\n target: 'es6',\n buildType: 'bundle',\n outDir: './dist/umd',\n dts: false,\n },\n {\n buildType: 'bundleless',\n dts: { only: true, distPath: './types' },\n },\n];\n\nexport const libraryPreset = { 'npm-library': npmLibraryPresetConfig };\n\nexport const libraryPresetWithTarget = targets.reduce((ret, target) => {\n ret[`npm-library-${target}`] = libraryPreset['npm-library'].map(config => {\n return { ...config, target };\n });\n return ret;\n}, {} as Record<`npm-library-${Target}`, PartialBuildConfig>);\n\nexport const libraryUmdPreset = {\n 'npm-library-with-umd': npmLibraryWithUmdPresetConfig,\n};\nexport const libraryUmdPresetWithTarget = targets.reduce((ret, target) => {\n ret[`npm-library-with-umd-${target}`] = libraryUmdPreset[\n 'npm-library-with-umd'\n ].map(config => {\n return { ...config, target };\n });\n return ret;\n}, {} as Record<`npm-library-with-umd-${Target}`, PartialBuildConfig>);\n\nexport const componentPreset = {\n 'npm-component': npmComponentPresetConfig,\n};\nexport const componentPresetWithTarget = targets.reduce((ret, target) => {\n ret[`npm-component-${target}`] = componentPreset['npm-component'].map(\n config => {\n return { ...config, target };\n },\n );\n return ret;\n}, {} as Record<`npm-component-${Target}`, PartialBuildConfig>);\n\nexport const componentUmdPreset = {\n 'npm-component-with-umd': npmComponentWithUmdPresetConfig,\n};\nexport const componentUmdPresetWithTarget = targets.reduce((ret, target) => {\n ret[`npm-component-with-umd-${target}`] = componentUmdPreset[\n 'npm-component-with-umd'\n ].map(config => {\n return { ...config, target };\n });\n return ret;\n}, {} as Record<`npm-component-with-umd-${Target}`, PartialBuildConfig>);\n\nexport const nodeBuildConfig: PartialBaseBuildConfig[] = [\n {\n buildType: 'bundleless',\n format: 'cjs',\n target: 'es2019',\n dts: false,\n externalHelpers: true,\n outDir: './dist/cjs',\n },\n {\n buildType: 'bundleless',\n format: 'esm',\n target: 'es2019',\n dts: false,\n externalHelpers: true,\n outDir: './dist/esm',\n },\n {\n buildType: 'bundleless',\n dts: {\n only: true,\n },\n outDir: './dist/types',\n },\n];\n\nexport const universalBuildConfig: PartialBaseBuildConfig[] = [\n {\n buildType: 'bundleless',\n format: 'cjs',\n target: 'es2019',\n dts: false,\n externalHelpers: true,\n outDir: './dist/cjs',\n },\n {\n buildType: 'bundleless',\n format: 'esm',\n target: 'es5',\n dts: false,\n externalHelpers: true,\n outDir: './dist/esm',\n },\n {\n buildType: 'bundleless',\n format: 'esm',\n target: 'es2019',\n dts: false,\n externalHelpers: true,\n outDir: './dist/esm-node',\n },\n {\n buildType: 'bundleless',\n dts: {\n only: true,\n },\n outDir: './dist/types',\n },\n];\n\nexport const presetList = {\n ...libraryPreset,\n ...libraryPresetWithTarget,\n ...libraryUmdPreset,\n ...libraryUmdPresetWithTarget,\n ...componentPreset,\n ...componentPresetWithTarget,\n ...componentUmdPreset,\n ...componentUmdPresetWithTarget,\n 'modern-js-node': nodeBuildConfig,\n 'modern-js-universal': universalBuildConfig,\n};\n\nexport const BuildInPreset = {\n BASE_CONFIG: basePresetConfig,\n 'base-config': basePresetConfig,\n NPM_LIBRARY: npmLibraryPresetConfig,\n 'npm-library': npmLibraryPresetConfig,\n NPM_LIBRARY_WITH_UMD: npmLibraryWithUmdPresetConfig,\n 'npm-library-with-umd': npmLibraryWithUmdPresetConfig,\n NPM_COMPONENT: npmComponentPresetConfig,\n 'npm-component': npmComponentPresetConfig,\n NPM_COMPONENT_WITH_UMD: npmComponentWithUmdPresetConfig,\n 'npm-component-with-umd': npmComponentWithUmdPresetConfig,\n 'modern-js-node': nodeBuildConfig,\n 'modern-js-universal': univers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wB9B;EACxB,0BAA0BA;EAC1B,kBAAkBS;EAClB,uBAAuBC;AACzB;","names":["targets","basePresetConfig","npmLibraryPresetConfig","npmLibraryWithUmdPresetConfig","npmComponentPresetConfig","npmComponentWithUmdPresetConfig","libraryPreset","libraryPresetWithTarget","libraryUmdPreset","libraryUmdPresetWithTarget","componentPreset","componentPresetWithTarget","componentUmdPreset","componentUmdPresetWithTarget","nodeBuildConfig","universalBuildConfig","presetList","BuildInPreset","format","target","buildType","outDir","dts","distPath","only","platform","reduce","ret","map","config","externalHelpers","BASE_CONFIG","NPM_LIBRARY","NPM_LIBRARY_WITH_UMD","NPM_COMPONENT","NPM_COMPONENT_WITH_UMD"],"sources":["../../src/constants/home/runner/work/modern.js/modern.js/packages/solutions/module-tools/src/constants/buildPresets.ts"],"sourcesContent":["import type {\n PartialBuildConfig,\n PartialBaseBuildConfig,\n Target,\n} from '../types';\n\nexport const targets: Target[] = [\n 'es5',\n 'es6',\n 'es2015',\n 'es2016',\n 'es2017',\n 'es2018',\n 'es2019',\n 'es2020',\n 'es2021',\n 'es2022',\n 'esnext',\n];\n\nexport const basePresetConfig: PartialBuildConfig = {\n format: 'esm',\n target: 'es6',\n buildType: 'bundle',\n outDir: './dist',\n dts: { distPath: './types' },\n};\n\nexport const npmLibraryPresetConfig: PartialBaseBuildConfig[] = [\n {\n format: 'cjs',\n target: 'es6',\n buildType: 'bundle',\n outDir: './dist/lib',\n dts: false,\n },\n {\n format: 'esm',\n target: 'es6',\n buildType: 'bundle',\n outDir: './dist/es',\n dts: false,\n },\n {\n buildType: 'bundle',\n dts: { only: true, distPath: './types' },\n },\n];\nexport const npmLibraryWithUmdPresetConfig: PartialBaseBuildConfig[] = [\n {\n format: 'cjs',\n target: 'es6',\n buildType: 'bundle',\n outDir: './dist/lib',\n dts: false,\n },\n {\n format: 'esm',\n target: 'es6',\n buildType: 'bundle',\n outDir: './dist/es',\n dts: false,\n },\n {\n format: 'umd',\n target: 'es6',\n platform: 'browser',\n buildType: 'bundle',\n outDir: './dist/umd',\n dts: false,\n },\n {\n buildType: 'bundle',\n dts: { only: true, distPath: './types' },\n },\n];\nexport const npmComponentPresetConfig: PartialBaseBuildConfig[] = [\n {\n format: 'cjs',\n target: 'es6',\n buildType: 'bundleless',\n outDir: './dist/lib',\n dts: false,\n },\n {\n format: 'esm',\n target: 'es6',\n buildType: 'bundleless',\n outDir: './dist/es',\n dts: false,\n },\n {\n buildType: 'bundleless',\n outDir: './dist/types',\n dts: { only: true },\n },\n];\nexport const npmComponentWithUmdPresetConfig: PartialBaseBuildConfig[] = [\n {\n format: 'cjs',\n target: 'es6',\n buildType: 'bundleless',\n outDir: './dist/lib',\n dts: false,\n },\n {\n format: 'esm',\n target: 'es6',\n buildType: 'bundleless',\n outDir: './dist/es',\n dts: false,\n },\n {\n format: 'umd',\n target: 'es6',\n platform: 'browser',\n buildType: 'bundle',\n outDir: './dist/umd',\n dts: false,\n },\n {\n buildType: 'bundleless',\n dts: { only: true, distPath: './types' },\n },\n];\n\nexport const libraryPreset = { 'npm-library': npmLibraryPresetConfig };\n\nexport const libraryPresetWithTarget = targets.reduce((ret, target) => {\n ret[`npm-library-${target}`] = libraryPreset['npm-library'].map(config => {\n return { ...config, target };\n });\n return ret;\n}, {} as Record<`npm-library-${Target}`, PartialBuildConfig>);\n\nexport const libraryUmdPreset = {\n 'npm-library-with-umd': npmLibraryWithUmdPresetConfig,\n};\nexport const libraryUmdPresetWithTarget = targets.reduce((ret, target) => {\n ret[`npm-library-with-umd-${target}`] = libraryUmdPreset[\n 'npm-library-with-umd'\n ].map(config => {\n return { ...config, target };\n });\n return ret;\n}, {} as Record<`npm-library-with-umd-${Target}`, PartialBuildConfig>);\n\nexport const componentPreset = {\n 'npm-component': npmComponentPresetConfig,\n};\nexport const componentPresetWithTarget = targets.reduce((ret, target) => {\n ret[`npm-component-${target}`] = componentPreset['npm-component'].map(\n config => {\n return { ...config, target };\n },\n );\n return ret;\n}, {} as Record<`npm-component-${Target}`, PartialBuildConfig>);\n\nexport const componentUmdPreset = {\n 'npm-component-with-umd': npmComponentWithUmdPresetConfig,\n};\nexport const componentUmdPresetWithTarget = targets.reduce((ret, target) => {\n ret[`npm-component-with-umd-${target}`] = componentUmdPreset[\n 'npm-component-with-umd'\n ].map(config => {\n return { ...config, target };\n });\n return ret;\n}, {} as Record<`npm-component-with-umd-${Target}`, PartialBuildConfig>);\n\nexport const nodeBuildConfig: PartialBaseBuildConfig[] = [\n {\n buildType: 'bundleless',\n format: 'cjs',\n target: 'es2019',\n dts: false,\n externalHelpers: true,\n outDir: './dist/cjs',\n },\n {\n buildType: 'bundleless',\n format: 'esm',\n target: 'es2019',\n dts: false,\n externalHelpers: true,\n outDir: './dist/esm',\n },\n {\n buildType: 'bundleless',\n dts: {\n only: true,\n },\n outDir: './dist/types',\n },\n];\n\nexport const universalBuildConfig: PartialBaseBuildConfig[] = [\n {\n buildType: 'bundleless',\n format: 'cjs',\n target: 'es2019',\n dts: false,\n externalHelpers: true,\n outDir: './dist/cjs',\n },\n {\n buildType: 'bundleless',\n format: 'esm',\n target: 'es5',\n dts: false,\n externalHelpers: true,\n outDir: './dist/esm',\n },\n {\n buildType: 'bundleless',\n format: 'esm',\n target: 'es2019',\n dts: false,\n externalHelpers: true,\n outDir: './dist/esm-node',\n },\n {\n buildType: 'bundleless',\n dts: {\n only: true,\n },\n outDir: './dist/types',\n },\n];\n\nexport const presetList = {\n ...libraryPreset,\n ...libraryPresetWithTarget,\n ...libraryUmdPreset,\n ...libraryUmdPresetWithTarget,\n ...componentPreset,\n ...componentPresetWithTarget,\n ...componentUmdPreset,\n ...componentUmdPresetWithTarget,\n 'modern-js-node': nodeBuildConfig,\n 'modern-js-universal': universalBuildConfig,\n};\n\nexport const BuildInPreset = {\n BASE_CONFIG: basePresetConfig,\n 'base-config': basePresetConfig,\n NPM_LIBRARY: npmLibraryPresetConfig,\n 'npm-library': npmLibraryPresetConfig,\n NPM_LIBRARY_WITH_UMD: npmLibraryWithUmdPresetConfig,\n 'npm-library-with-umd': npmLibraryWithUmdPresetConfig,\n NPM_COMPONENT: npmComponentPresetConfig,\n 'npm-component': npmComponentPresetConfig,\n NPM_COMPONENT_WITH_UMD: npmComponentWithUmdPresetConfig,\n 'npm-component-with-umd': npmComponentWithUmdPresetConfig,\n 'modern-js-node': nodeBuildConfig,\n 'modern-js-universal': universalBuildConfig,\n};\n"]}
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "module-tools",
16
16
  "lib-tools"
17
17
  ],
18
- "version": "2.28.0",
18
+ "version": "2.29.0",
19
19
  "bin": {
20
20
  "modern": "./bin/modern.js",
21
21
  "modern-module": "./bin/modern.js"
@@ -50,19 +50,19 @@
50
50
  "@babel/generator": "^7.21.5",
51
51
  "@babel/types": "^7.21.5",
52
52
  "@babel/traverse": "^7.21.5",
53
- "@modern-js/libuild": "0.14.1",
54
- "@modern-js/libuild-plugin-svgr": "0.14.1",
55
- "@modern-js/libuild-plugin-swc": "0.14.1",
53
+ "@modern-js/libuild": "0.14.3",
54
+ "@modern-js/libuild-plugin-svgr": "0.14.3",
55
+ "@modern-js/libuild-plugin-swc": "0.14.3",
56
56
  "postcss": "8.4.6",
57
57
  "@swc/helpers": "0.5.1",
58
- "@modern-js/core": "2.28.0",
59
- "@modern-js/new-action": "2.28.0",
60
- "@modern-js/plugin": "2.28.0",
61
- "@modern-js/plugin-changeset": "2.28.0",
62
- "@modern-js/plugin-i18n": "2.28.0",
63
- "@modern-js/plugin-lint": "2.28.0",
64
- "@modern-js/upgrade": "2.28.0",
65
- "@modern-js/utils": "2.28.0"
58
+ "@modern-js/core": "2.29.0",
59
+ "@modern-js/new-action": "2.29.0",
60
+ "@modern-js/plugin": "2.29.0",
61
+ "@modern-js/plugin-changeset": "2.29.0",
62
+ "@modern-js/plugin-i18n": "2.29.0",
63
+ "@modern-js/plugin-lint": "2.29.0",
64
+ "@modern-js/upgrade": "2.29.0",
65
+ "@modern-js/utils": "2.29.0"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@types/babel__generator": "7.6.4",
@@ -77,10 +77,10 @@
77
77
  "postcss-alias": "2.0.0",
78
78
  "react": "17",
79
79
  "typescript": "^5",
80
- "@modern-js/builder-webpack-provider": "2.28.0",
81
- "@modern-js/self": "npm:@modern-js/module-tools@2.28.0",
82
- "@scripts/build": "2.28.0",
83
- "@scripts/jest-config": "2.28.0"
80
+ "@modern-js/builder-webpack-provider": "2.29.0",
81
+ "@modern-js/self": "npm:@modern-js/module-tools@2.29.0",
82
+ "@scripts/build": "2.29.0",
83
+ "@scripts/jest-config": "2.29.0"
84
84
  },
85
85
  "publishConfig": {
86
86
  "registry": "https://registry.npmjs.org/",