@modern-js/plugin-module-node-polyfill 0.0.0-next-1690345473644 → 0.0.0-next-1690354890697

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,7 +1,13 @@
1
1
  # @modern-js/plugin-module-node-polyfill
2
2
 
3
- ## 0.0.0-next-1690345473644
3
+ ## 0.0.0-next-1690354890697
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - @modern-js/module-tools@0.0.0-next-1690345473644
7
+ - d3e52e4f69: chore(CI): update build config to improve vitest CI perf
8
+
9
+ chore(CI): 更新构建配置来提升 vitest CI 性能
10
+
11
+ - Updated dependencies [3092f1fc9c]
12
+ - Updated dependencies [d3e52e4f69]
13
+ - @modern-js/module-tools@0.0.0-next-1690354890697
package/dist/index.d.ts CHANGED
@@ -1,6 +1,3 @@
1
- import { CliPlugin, ModuleTools } from '@modern-js/module-tools';
2
- import { NodePolyfillPluginOptions } from '@modern-js/libuild-plugin-node-polyfill';
3
-
4
- declare const modulePluginNodePolyfill: (polyfillOption?: NodePolyfillPluginOptions) => CliPlugin<ModuleTools>;
5
-
6
- export { modulePluginNodePolyfill };
1
+ import type { CliPlugin, ModuleTools } from '@modern-js/module-tools';
2
+ import type { NodePolyfillPluginOptions } from '@modern-js/libuild-plugin-node-polyfill';
3
+ export declare const modulePluginNodePolyfill: (polyfillOption?: NodePolyfillPluginOptions) => CliPlugin<ModuleTools>;
package/dist/index.js CHANGED
@@ -1,46 +1,26 @@
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) => {
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 });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "modulePluginNodePolyfill", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return modulePluginNodePolyfill;
14
9
  }
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
- modulePluginNodePolyfill: () => modulePluginNodePolyfill
23
10
  });
24
- module.exports = __toCommonJS(src_exports);
25
- var import_libuild_plugin_node_polyfill = require("@modern-js/libuild-plugin-node-polyfill");
26
- var modulePluginNodePolyfill = (polyfillOption = {}) => ({
11
+ const _libuildpluginnodepolyfill = require("@modern-js/libuild-plugin-node-polyfill");
12
+ const modulePluginNodePolyfill = (polyfillOption = {}) => ({
27
13
  name: "polyfill-plugin",
28
14
  setup() {
29
15
  return {
30
16
  modifyLibuild(config, next) {
31
- var _a;
17
+ var _config_plugins;
32
18
  config.plugins = [
33
- ...(_a = config.plugins) != null ? _a : [],
34
- (0, import_libuild_plugin_node_polyfill.nodePolyfillPlugin)(polyfillOption)
19
+ ...(_config_plugins = config.plugins) !== null && _config_plugins !== void 0 ? _config_plugins : [],
20
+ (0, _libuildpluginnodepolyfill.nodePolyfillPlugin)(polyfillOption)
35
21
  ];
36
22
  return next(config);
37
23
  }
38
24
  };
39
25
  }
40
26
  });
41
- // Annotate the CommonJS export names for ESM import in node:
42
- 0 && (module.exports = {
43
- modulePluginNodePolyfill
44
- });
45
-
46
- //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "0.0.0-next-1690345473644",
18
+ "version": "0.0.0-next-1690354890697",
19
19
  "types": "./dist/index.d.ts",
20
20
  "main": "./dist/index.js",
21
21
  "devDependencies": {
@@ -23,12 +23,13 @@
23
23
  "@types/node": "^14",
24
24
  "typescript": "^5",
25
25
  "jest": "^29",
26
- "@scripts/build": "0.0.0-next-1690345473644",
27
- "@modern-js/module-tools": "0.0.0-next-1690345473644",
28
- "@scripts/jest-config": "0.0.0-next-1690345473644"
26
+ "@swc/helpers": "0.5.1",
27
+ "@scripts/build": "0.0.0-next-1690354890697",
28
+ "@scripts/jest-config": "0.0.0-next-1690354890697",
29
+ "@modern-js/module-tools": "0.0.0-next-1690354890697"
29
30
  },
30
31
  "peerDependencies": {
31
- "@modern-js/module-tools": "0.0.0-next-1690345473644"
32
+ "@modern-js/module-tools": "0.0.0-next-1690354890697"
32
33
  },
33
34
  "peerDependenciesMeta": {
34
35
  "@modern-js/module-tools": {
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,0CAAmC;AAE5B,IAAM,2BAA2B,CACtC,iBAA4C,CAAC,OACjB;AAAA,EAC5B,MAAM;AAAA,EACN,QAAQ;AACN,WAAO;AAAA,MACL,cAAc,QAAQ,MAAM;AAVlC;AAWQ,eAAO,UAAU;AAAA,UACf,IAAI,YAAO,YAAP,YAAkB,CAAC;AAAA,cACvB,wDAAmB,cAAc;AAAA,QACnC;AACA,eAAO,KAAK,MAAM;AAAA,MACpB;AAAA,IACF;AAAA,EACF;AACF;","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { CliPlugin, ModuleTools } from '@modern-js/module-tools';\nimport type { NodePolyfillPluginOptions } from '@modern-js/libuild-plugin-node-polyfill';\nimport { nodePolyfillPlugin } from '@modern-js/libuild-plugin-node-polyfill';\n\nexport const modulePluginNodePolyfill = (\n polyfillOption: NodePolyfillPluginOptions = {},\n): CliPlugin<ModuleTools> => ({\n name: 'polyfill-plugin',\n setup() {\n return {\n modifyLibuild(config, next) {\n config.plugins = [\n ...(config.plugins ?? []),\n nodePolyfillPlugin(polyfillOption),\n ];\n return next(config);\n },\n };\n },\n});\n"]}