@modern-js/node-bundle-require 2.5.0 → 2.7.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 +24 -0
- package/dist/cjs/bundle.js +9 -0
- package/dist/esm/bundle.js +5 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @modern-js/node-bundle-require
|
|
2
2
|
|
|
3
|
+
## 2.7.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1eea234fdd: chore: make test files naming consistent
|
|
8
|
+
|
|
9
|
+
chore: 统一测试文件命名为小驼峰格式
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [0f15fc597c]
|
|
12
|
+
- Updated dependencies [dcad887024]
|
|
13
|
+
- Updated dependencies [a4672f7c16]
|
|
14
|
+
- Updated dependencies [7fff9020e1]
|
|
15
|
+
- Updated dependencies [84bfb439b8]
|
|
16
|
+
- @modern-js/utils@2.7.0
|
|
17
|
+
|
|
18
|
+
## 2.6.0
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [e1f799e]
|
|
23
|
+
- Updated dependencies [7915ab3]
|
|
24
|
+
- Updated dependencies [0fe658a]
|
|
25
|
+
- @modern-js/utils@2.6.0
|
|
26
|
+
|
|
3
27
|
## 2.5.0
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/dist/cjs/bundle.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
|
@@ -66,10 +70,14 @@ async function bundle(filepath, options) {
|
|
|
66
70
|
format: "cjs",
|
|
67
71
|
platform: "node",
|
|
68
72
|
bundle: true,
|
|
73
|
+
// fix transforming error when the project's tsconfig.json
|
|
74
|
+
// sets `target: "es5"`
|
|
75
|
+
// reference: https://github.com/evanw/esbuild/releases/tag/v0.12.6
|
|
69
76
|
target: "esnext",
|
|
70
77
|
...options == null ? void 0 : options.esbuildOptions,
|
|
71
78
|
plugins: [
|
|
72
79
|
...(options == null ? void 0 : options.esbuildPlugins) || [],
|
|
80
|
+
// https://github.com/evanw/esbuild/issues/1051#issuecomment-806325487
|
|
73
81
|
{
|
|
74
82
|
name: "native-node-modules",
|
|
75
83
|
setup(build2) {
|
|
@@ -114,6 +122,7 @@ async function bundle(filepath, options) {
|
|
|
114
122
|
});
|
|
115
123
|
}
|
|
116
124
|
},
|
|
125
|
+
// https://github.com/evanw/esbuild/issues/619#issuecomment-751995294
|
|
117
126
|
{
|
|
118
127
|
name: "make-all-packages-external",
|
|
119
128
|
setup(_build) {
|
package/dist/esm/bundle.js
CHANGED
|
@@ -42,10 +42,14 @@ async function bundle(filepath, options) {
|
|
|
42
42
|
format: "cjs",
|
|
43
43
|
platform: "node",
|
|
44
44
|
bundle: true,
|
|
45
|
+
// fix transforming error when the project's tsconfig.json
|
|
46
|
+
// sets `target: "es5"`
|
|
47
|
+
// reference: https://github.com/evanw/esbuild/releases/tag/v0.12.6
|
|
45
48
|
target: "esnext",
|
|
46
49
|
...options == null ? void 0 : options.esbuildOptions,
|
|
47
50
|
plugins: [
|
|
48
51
|
...(options == null ? void 0 : options.esbuildPlugins) || [],
|
|
52
|
+
// https://github.com/evanw/esbuild/issues/1051#issuecomment-806325487
|
|
49
53
|
{
|
|
50
54
|
name: "native-node-modules",
|
|
51
55
|
setup(build2) {
|
|
@@ -90,6 +94,7 @@ async function bundle(filepath, options) {
|
|
|
90
94
|
});
|
|
91
95
|
}
|
|
92
96
|
},
|
|
97
|
+
// https://github.com/evanw/esbuild/issues/619#issuecomment-751995294
|
|
93
98
|
{
|
|
94
99
|
name: "make-all-packages-external",
|
|
95
100
|
setup(_build) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js/node-bundle-require",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "A Progressive React Framework for modern web development.",
|
|
5
5
|
"homepage": "https://modernjs.dev",
|
|
6
6
|
"bugs": "https://github.com/modern-js-dev/modern.js/issues",
|
|
@@ -39,15 +39,15 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@babel/runtime": "^7.18.0",
|
|
41
41
|
"esbuild": "0.15.7",
|
|
42
|
-
"@modern-js/utils": "2.
|
|
42
|
+
"@modern-js/utils": "2.7.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/jest": "^27",
|
|
46
46
|
"@types/node": "^14",
|
|
47
47
|
"jest": "^27",
|
|
48
48
|
"typescript": "^4",
|
|
49
|
-
"@scripts/build": "2.
|
|
50
|
-
"@scripts/jest-config": "2.
|
|
49
|
+
"@scripts/build": "2.7.0",
|
|
50
|
+
"@scripts/jest-config": "2.7.0"
|
|
51
51
|
},
|
|
52
52
|
"sideEffects": false,
|
|
53
53
|
"publishConfig": {
|