@modern-js/plugin-module-babel 2.27.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,27 @@
1
1
  # @modern-js/plugin-module-babel
2
2
 
3
+ ## 2.29.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [6993eb6]
8
+ - Updated dependencies [0f680ec]
9
+ - @modern-js/module-tools@2.29.0
10
+
11
+ ## 2.28.0
12
+
13
+ ### Patch Changes
14
+
15
+ - d3e52e4: chore(CI): update build config to improve vitest CI perf
16
+
17
+ chore(CI): 更新构建配置来提升 vitest CI 性能
18
+
19
+ - Updated dependencies [3092f1f]
20
+ - Updated dependencies [118c1c0]
21
+ - Updated dependencies [b7a8c43]
22
+ - Updated dependencies [d3e52e4]
23
+ - @modern-js/module-tools@2.28.0
24
+
3
25
  ## 2.27.0
4
26
 
5
27
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,7 +1,5 @@
1
1
  import { CliPlugin, ModuleTools } from '@modern-js/module-tools';
2
2
  import { babelPlugin } from '@modern-js/libuild-plugin-babel';
3
-
4
- type Options = typeof babelPlugin extends (arg1: infer P) => void ? P : never;
5
- declare const ModulePluginBabel: (options?: Options) => CliPlugin<ModuleTools>;
6
-
7
- export { ModulePluginBabel, Options, ModulePluginBabel as modulePluginBabel };
3
+ export type Options = typeof babelPlugin extends (arg1: infer P) => void ? P : never;
4
+ export declare const ModulePluginBabel: (options?: Options) => CliPlugin<ModuleTools>;
5
+ export { ModulePluginBabel as modulePluginBabel };
package/dist/index.js CHANGED
@@ -1,43 +1,30 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
6
  for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7
+ Object.defineProperty(target, name, {
8
+ enumerable: true,
9
+ get: all[name]
10
+ });
11
+ }
12
+ _export(exports, {
13
+ ModulePluginBabel: function() {
14
+ return ModulePluginBabel;
15
+ },
16
+ modulePluginBabel: function() {
17
+ return ModulePluginBabel;
14
18
  }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/index.ts
20
- var src_exports = {};
21
- __export(src_exports, {
22
- ModulePluginBabel: () => ModulePluginBabel,
23
- modulePluginBabel: () => ModulePluginBabel
24
19
  });
25
- module.exports = __toCommonJS(src_exports);
26
- var import_libuild_plugin_babel = require("@modern-js/libuild-plugin-babel");
27
- var ModulePluginBabel = (options) => ({
20
+ const _libuildpluginbabel = require("@modern-js/libuild-plugin-babel");
21
+ const ModulePluginBabel = (options) => ({
28
22
  name: "babel-plugin",
29
23
  setup: () => ({
30
24
  modifyLibuild(config) {
31
- var _a;
32
- (_a = config.plugins) == null ? void 0 : _a.unshift((0, import_libuild_plugin_babel.babelPlugin)(options != null ? options : {}));
25
+ var _config_plugins;
26
+ (_config_plugins = config.plugins) === null || _config_plugins === void 0 ? void 0 : _config_plugins.unshift((0, _libuildpluginbabel.babelPlugin)(options !== null && options !== void 0 ? options : {}));
33
27
  return config;
34
28
  }
35
29
  })
36
30
  });
37
- // Annotate the CommonJS export names for ESM import in node:
38
- 0 && (module.exports = {
39
- ModulePluginBabel,
40
- modulePluginBabel
41
- });
42
-
43
- //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -15,23 +15,24 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.27.0",
18
+ "version": "2.29.0",
19
19
  "types": "./dist/index.d.ts",
20
20
  "main": "./dist/index.js",
21
21
  "dependencies": {
22
- "@modern-js/libuild-plugin-babel": "0.7.1"
22
+ "@modern-js/libuild-plugin-babel": "0.7.1",
23
+ "@swc/helpers": "0.5.1"
23
24
  },
24
25
  "devDependencies": {
25
26
  "@types/jest": "^29",
26
27
  "@types/node": "^14",
27
28
  "typescript": "^5",
28
29
  "jest": "^29",
29
- "@modern-js/module-tools": "2.27.0",
30
- "@scripts/jest-config": "2.27.0",
31
- "@scripts/build": "2.27.0"
30
+ "@modern-js/module-tools": "2.29.0",
31
+ "@scripts/build": "2.29.0",
32
+ "@scripts/jest-config": "2.29.0"
32
33
  },
33
34
  "peerDependencies": {
34
- "@modern-js/module-tools": "^2.27.0"
35
+ "@modern-js/module-tools": "^2.29.0"
35
36
  },
36
37
  "sideEffects": false,
37
38
  "publishConfig": {
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kCAA4B;AAOrB,IAAM,oBAAoB,CAC/B,aAC4B;AAAA,EAC5B,MAAM;AAAA,EACN,OAAO,OAAO;AAAA,IACZ,cAAc,QAAQ;AAb1B;AAcM,mBAAO,YAAP,mBAAgB,YAAQ,yCAAY,4BAAW,CAAC,CAAC;AACjD,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { CliPlugin, ModuleTools } from '@modern-js/module-tools';\nimport { babelPlugin } from '@modern-js/libuild-plugin-babel';\n\nexport type Options = typeof babelPlugin extends (arg1: infer P) => void\n ? P\n : never;\n\n// deprecated named export\nexport const ModulePluginBabel = (\n options?: Options,\n): CliPlugin<ModuleTools> => ({\n name: 'babel-plugin',\n setup: () => ({\n modifyLibuild(config) {\n config.plugins?.unshift(babelPlugin(options ?? {}));\n return config;\n },\n }),\n});\n\n// right named export\nexport { ModulePluginBabel as modulePluginBabel };\n"]}