@modern-js/plugin-module-banner 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,36 @@
1
1
  # @modern-js/plugin-module-banner
2
2
 
3
+ ## 2.29.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 0f680ec: chore(deps): bump swc-plugins 0.5.5 and libuild 0.14.3
8
+
9
+ chore(deps): 升级 swc-plugins 0.5.5 和 libuild 0.14.3
10
+
11
+ - Updated dependencies [6993eb6]
12
+ - Updated dependencies [0f680ec]
13
+ - @modern-js/module-tools@2.29.0
14
+
15
+ ## 2.28.0
16
+
17
+ ### Minor Changes
18
+
19
+ - 118c1c0: chore: upgrade libuild and libuild plugin version to 0.14.1
20
+ chore: 升级 libuild 和 libuild 插件的版本到 0.14.1
21
+
22
+ ### Patch Changes
23
+
24
+ - d3e52e4: chore(CI): update build config to improve vitest CI perf
25
+
26
+ chore(CI): 更新构建配置来提升 vitest CI 性能
27
+
28
+ - Updated dependencies [3092f1f]
29
+ - Updated dependencies [118c1c0]
30
+ - Updated dependencies [b7a8c43]
31
+ - Updated dependencies [d3e52e4]
32
+ - @modern-js/module-tools@2.28.0
33
+
3
34
  ## 2.27.0
4
35
 
5
36
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,14 +1,12 @@
1
- import { CliPlugin, ModuleTools } from '@modern-js/module-tools';
2
-
3
- declare const modulePluginBanner: (options: {
4
- banner: {
5
- js?: string;
6
- css?: string;
7
- };
8
- footer?: {
9
- js?: string;
10
- css?: string;
11
- };
1
+ import type { CliPlugin, ModuleTools } from '@modern-js/module-tools';
2
+ export declare const modulePluginBanner: (options: {
3
+ banner: {
4
+ js?: string;
5
+ css?: string;
6
+ };
7
+ footer?: {
8
+ js?: string;
9
+ css?: string;
10
+ };
12
11
  }) => CliPlugin<ModuleTools>;
13
-
14
- export { modulePluginBanner as default, modulePluginBanner };
12
+ export default modulePluginBanner;
package/dist/index.js CHANGED
@@ -1,46 +1,24 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
- var __spreadValues = (a, b) => {
11
- for (var prop in b || (b = {}))
12
- if (__hasOwnProp.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
14
- if (__getOwnPropSymbols)
15
- for (var prop of __getOwnPropSymbols(b)) {
16
- if (__propIsEnum.call(b, prop))
17
- __defNormalProp(a, prop, b[prop]);
18
- }
19
- return a;
20
- };
21
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
22
- var __export = (target, all) => {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
23
6
  for (var name in all)
24
- __defProp(target, name, { get: all[name], enumerable: true });
25
- };
26
- var __copyProps = (to, from, except, desc) => {
27
- if (from && typeof from === "object" || typeof from === "function") {
28
- for (let key of __getOwnPropNames(from))
29
- if (!__hasOwnProp.call(to, key) && key !== except)
30
- __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
+ modulePluginBanner: function() {
14
+ return modulePluginBanner;
15
+ },
16
+ // deprecated default export
17
+ default: function() {
18
+ return _default;
31
19
  }
32
- return to;
33
- };
34
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
-
36
- // src/index.ts
37
- var src_exports = {};
38
- __export(src_exports, {
39
- default: () => src_default,
40
- modulePluginBanner: () => modulePluginBanner
41
20
  });
42
- module.exports = __toCommonJS(src_exports);
43
- var modulePluginBanner = (options) => ({
21
+ const modulePluginBanner = (options) => ({
44
22
  name: "@modern-js/plugin-module-banner",
45
23
  setup: () => ({
46
24
  modifyLibuild(config, next) {
@@ -50,19 +28,14 @@ var modulePluginBanner = (options) => ({
50
28
  if (lastEsbuildOptions) {
51
29
  lastEsbuildConfig = lastEsbuildOptions(c);
52
30
  }
53
- return __spreadProps(__spreadValues({}, lastEsbuildConfig), {
31
+ return {
32
+ ...lastEsbuildConfig,
54
33
  footer: options.footer,
55
34
  banner: options.banner
56
- });
35
+ };
57
36
  };
58
37
  return next(config);
59
38
  }
60
39
  })
61
40
  });
62
- var src_default = modulePluginBanner;
63
- // Annotate the CommonJS export names for ESM import in node:
64
- 0 && (module.exports = {
65
- modulePluginBanner
66
- });
67
-
68
- //# sourceMappingURL=index.js.map
41
+ const _default = modulePluginBanner;
package/package.json CHANGED
@@ -15,7 +15,7 @@
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
  "exports": {
@@ -31,13 +31,14 @@
31
31
  "@types/node": "^14",
32
32
  "typescript": "^5",
33
33
  "jest": "^29",
34
- "@modern-js/libuild": "0.13.2",
35
- "@modern-js/module-tools": "2.27.0",
36
- "@scripts/build": "2.27.0",
37
- "@scripts/jest-config": "2.27.0"
34
+ "@swc/helpers": "0.5.1",
35
+ "@modern-js/libuild": "0.14.3",
36
+ "@scripts/jest-config": "2.29.0",
37
+ "@scripts/build": "2.29.0",
38
+ "@modern-js/module-tools": "2.29.0"
38
39
  },
39
40
  "peerDependencies": {
40
- "@modern-js/module-tools": "^2.27.0"
41
+ "@modern-js/module-tools": "^2.29.0"
41
42
  },
42
43
  "peerDependenciesMeta": {
43
44
  "@modern-js/module-tools": {
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,IAAM,qBAAqB,CAAC,aAGJ;AAAA,EAC7B,MAAM;AAAA,EACN,OAAO,OAAO;AAAA,IACZ,cAAc,QAAQ,MAAM;AAC1B,YAAM,qBAAqB,OAAO;AAClC,aAAO,iBAAiB,OAAK;AAC3B,YAAI,oBAAoB,CAAC;AACzB,YAAI,oBAAoB;AACtB,8BAAoB,mBAAmB,CAAC;AAAA,QAC1C;AAEA,eAAO,iCACF,oBADE;AAAA,UAEL,QAAQ,QAAQ;AAAA,UAChB,QAAQ,QAAQ;AAAA,QAClB;AAAA,MACF;AACA,aAAO,KAAK,MAAM;AAAA,IACpB;AAAA,EACF;AACF;AAGA,IAAO,cAAQ;","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { CliPlugin, ModuleTools } from '@modern-js/module-tools';\n\nexport const modulePluginBanner = (options: {\n banner: { js?: string; css?: string };\n footer?: { js?: string; css?: string };\n}): CliPlugin<ModuleTools> => ({\n name: '@modern-js/plugin-module-banner',\n setup: () => ({\n modifyLibuild(config, next) {\n const lastEsbuildOptions = config.esbuildOptions;\n config.esbuildOptions = c => {\n let lastEsbuildConfig = {};\n if (lastEsbuildOptions) {\n lastEsbuildConfig = lastEsbuildOptions(c);\n }\n\n return {\n ...lastEsbuildConfig,\n footer: options.footer,\n banner: options.banner,\n };\n };\n return next(config);\n },\n }),\n});\n\n// deprecated default export\nexport default modulePluginBanner;\n"]}