@modern-js/node-bundle-require 2.40.0 → 2.42.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.
@@ -1,33 +1,33 @@
1
1
  import { Plugin, BuildOptions } from 'esbuild';
2
2
  export declare const EXTERNAL_REGEXP: RegExp;
3
3
  export interface Options {
4
- /**
5
- * The `require` function that is used to load the output file
6
- * Default to the global `require` function
7
- * This function can be asynchronous, i.e. returns a Promise
8
- */
9
- require?: (outfile: string) => any;
10
- /**
11
- * esbuild options
12
- */
13
- esbuildOptions?: BuildOptions;
14
- /**
15
- * esbuild plugin
16
- */
17
- esbuildPlugins?: Plugin[];
18
- /**
19
- * Get the path to the output file
20
- * By default we simply replace the extension with `.bundled.cjs`
21
- */
22
- getOutputFile?: (filepath: string) => Promise<string>;
23
- /**
24
- * auto clear bundle file
25
- */
26
- autoClear?: boolean;
27
- /**
28
- * Whether to enable watch mode
29
- */
30
- watch?: boolean;
4
+ /**
5
+ * The `require` function that is used to load the output file
6
+ * Default to the global `require` function
7
+ * This function can be asynchronous, i.e. returns a Promise
8
+ */
9
+ require?: (outfile: string) => any;
10
+ /**
11
+ * esbuild options
12
+ */
13
+ esbuildOptions?: BuildOptions;
14
+ /**
15
+ * esbuild plugin
16
+ */
17
+ esbuildPlugins?: Plugin[];
18
+ /**
19
+ * Get the path to the output file
20
+ * By default we simply replace the extension with `.bundled.cjs`
21
+ */
22
+ getOutputFile?: (filepath: string) => Promise<string>;
23
+ /**
24
+ * auto clear bundle file
25
+ */
26
+ autoClear?: boolean;
27
+ /**
28
+ * Whether to enable watch mode
29
+ */
30
+ watch?: boolean;
31
31
  }
32
32
  export declare const defaultGetOutputFile: (filepath: string) => Promise<string>;
33
- export declare function bundle(filepath: string, options?: Options): Promise<string>;
33
+ export declare function bundle(filepath: string, options?: Options): Promise<string>;
@@ -2,4 +2,4 @@ import type { Options } from './bundle';
2
2
  import { bundle, defaultGetOutputFile } from './bundle';
3
3
  export { bundle, defaultGetOutputFile };
4
4
  export type { Options };
5
- export declare function bundleRequire(filepath: string, options?: Options): Promise<any>;
5
+ export declare function bundleRequire(filepath: string, options?: Options): Promise<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modern-js/node-bundle-require",
3
- "version": "2.40.0",
3
+ "version": "2.42.0",
4
4
  "description": "A Progressive React Framework for modern web development.",
5
5
  "homepage": "https://modernjs.dev",
6
6
  "bugs": "https://github.com/web-infra-dev/modern.js/issues",
@@ -46,16 +46,16 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "esbuild": "0.17.19",
49
- "@swc/helpers": "0.5.1",
50
- "@modern-js/utils": "2.40.0"
49
+ "@swc/helpers": "0.5.3",
50
+ "@modern-js/utils": "2.42.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/jest": "^29",
54
54
  "@types/node": "^14",
55
55
  "jest": "^29",
56
56
  "typescript": "^5",
57
- "@scripts/build": "2.40.0",
58
- "@scripts/jest-config": "2.40.0"
57
+ "@scripts/jest-config": "2.42.0",
58
+ "@scripts/build": "2.42.0"
59
59
  },
60
60
  "sideEffects": false,
61
61
  "publishConfig": {