@modern-js/plugin-module-banner 2.35.1 → 2.37.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/dist/index.d.ts CHANGED
@@ -1,4 +1,8 @@
1
1
  import type { CliPlugin, ModuleTools } from '@modern-js/module-tools';
2
+ /**
3
+ * @deprecated
4
+ * use config 'banner' instead.
5
+ */
2
6
  export declare const modulePluginBanner: (options: {
3
7
  banner: {
4
8
  js?: string;
package/dist/index.js CHANGED
@@ -1,27 +1,31 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- function _export(target, all) {
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
6
7
  for (var name in all)
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;
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
15
  }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var src_exports = {};
20
+ __export(src_exports, {
21
+ default: () => src_default,
22
+ modulePluginBanner: () => modulePluginBanner
20
23
  });
24
+ module.exports = __toCommonJS(src_exports);
21
25
  const modulePluginBanner = (options) => ({
22
26
  name: "@modern-js/plugin-module-banner",
23
27
  setup: () => ({
24
- modifyLibuild(config, next) {
28
+ beforeBuildTask(config) {
25
29
  const lastEsbuildOptions = config.esbuildOptions;
26
30
  config.esbuildOptions = (c) => {
27
31
  let lastEsbuildConfig = {};
@@ -34,8 +38,12 @@ const modulePluginBanner = (options) => ({
34
38
  banner: options.banner
35
39
  };
36
40
  };
37
- return next(config);
41
+ return config;
38
42
  }
39
43
  })
40
44
  });
41
- const _default = modulePluginBanner;
45
+ var src_default = modulePluginBanner;
46
+ // Annotate the CommonJS export names for ESM import in node:
47
+ 0 && (module.exports = {
48
+ modulePluginBanner
49
+ });
package/package.json CHANGED
@@ -1,6 +1,13 @@
1
1
  {
2
2
  "name": "@modern-js/plugin-module-banner",
3
+ "version": "2.37.0",
3
4
  "description": "The banner plugin of Modern.js Module.",
5
+ "keywords": [
6
+ "react",
7
+ "framework",
8
+ "modern",
9
+ "modern.js"
10
+ ],
4
11
  "homepage": "https://modernjs.dev/module-tools",
5
12
  "bugs": "https://github.com/modern-js-dev/modern.js/issues",
6
13
  "repository": {
@@ -9,15 +16,6 @@
9
16
  "directory": "packages/module/plugin-module-banner"
10
17
  },
11
18
  "license": "MIT",
12
- "keywords": [
13
- "react",
14
- "framework",
15
- "modern",
16
- "modern.js"
17
- ],
18
- "version": "2.35.1",
19
- "types": "./dist/index.d.ts",
20
- "main": "./dist/index.js",
21
19
  "exports": {
22
20
  ".": {
23
21
  "node": {
@@ -26,36 +24,37 @@
26
24
  }
27
25
  }
28
26
  },
27
+ "main": "./dist/index.js",
28
+ "types": "./dist/index.d.ts",
29
+ "dependencies": {
30
+ "@swc/helpers": "0.5.1"
31
+ },
29
32
  "devDependencies": {
33
+ "@swc/helpers": "0.5.1",
30
34
  "@types/jest": "^29",
31
35
  "@types/node": "^14",
32
- "typescript": "^5",
33
36
  "jest": "^29",
34
- "@swc/helpers": "0.5.1",
35
- "@scripts/jest-config": "2.35.1",
36
- "@scripts/build": "2.35.1",
37
- "@modern-js/module-tools": "2.35.1",
38
- "@modern-js/libuild": "2.35.1"
37
+ "typescript": "^5",
38
+ "@modern-js/module-tools": "2.37.0",
39
+ "@scripts/build": "2.37.0",
40
+ "@scripts/jest-config": "2.37.0"
39
41
  },
40
42
  "peerDependencies": {
41
- "@modern-js/module-tools": "^2.35.1"
43
+ "@modern-js/module-tools": "^2.37.0"
42
44
  },
43
45
  "peerDependenciesMeta": {
44
46
  "@modern-js/module-tools": {
45
47
  "optional": true
46
48
  }
47
49
  },
48
- "dependencies": {
49
- "@swc/helpers": "0.5.1"
50
- },
51
50
  "publishConfig": {
52
- "registry": "https://registry.npmjs.org/",
53
51
  "access": "public",
54
- "provenance": true
52
+ "provenance": true,
53
+ "registry": "https://registry.npmjs.org/"
55
54
  },
56
55
  "scripts": {
57
- "dev": "mdn build --watch",
58
56
  "build": "mdn build",
57
+ "dev": "mdn build --watch",
59
58
  "test": "jest --passWithNoTests"
60
59
  }
61
60
  }