@modern-js/module-tools 1.1.4 → 1.1.5-rc.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/js/modern/tasks/build-source-code.js +2 -1
- package/dist/js/modern/tasks/build-watch-source-code.js +9 -1
- package/dist/js/node/tasks/build-source-code.js +2 -1
- package/dist/js/node/tasks/build-watch-source-code.js +9 -1
- package/package.json +16 -16
- package/src/tasks/build-source-code.ts +1 -0
- package/src/tasks/build-watch-source-code.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @modern-js/module-tools
|
|
2
2
|
|
|
3
|
+
## 1.1.5-rc.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 2da27d3b: fix sourcemap 'source' config
|
|
8
|
+
- Updated dependencies [5e3de7d8]
|
|
9
|
+
- Updated dependencies [2da27d3b]
|
|
10
|
+
- Updated dependencies [4819a3c7]
|
|
11
|
+
- Updated dependencies [b7fb82ec]
|
|
12
|
+
- Updated dependencies [81d93503]
|
|
13
|
+
- @modern-js/plugin-i18n@1.1.2-rc.0
|
|
14
|
+
- @modern-js/babel-compiler@1.1.4-rc.0
|
|
15
|
+
- @modern-js/new-action@1.2.2-rc.0
|
|
16
|
+
- @modern-js/plugin-changeset@1.1.2-rc.0
|
|
17
|
+
- @modern-js/utils@1.1.6-rc.0
|
|
18
|
+
- @modern-js/core@1.2.1-rc.0
|
|
19
|
+
- @modern-js/plugin-analyze@1.1.3-rc.0
|
|
20
|
+
- @modern-js/babel-preset-module@1.1.5-rc.0
|
|
21
|
+
- @modern-js/css-config@1.1.3-rc.0
|
|
22
|
+
- @modern-js/i18n-cli-language-detector@1.1.1
|
|
23
|
+
- @modern-js/plugin-fast-refresh@1.1.2-rc.0
|
|
24
|
+
- @modern-js/style-compiler@1.1.4-rc.0
|
|
25
|
+
- @modern-js/module-tools-hooks@1.1.3-rc.0
|
|
26
|
+
|
|
3
27
|
## 1.1.4
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -63,7 +63,8 @@ export const getWillCompilerCode = (srcDirOrFile, option) => {
|
|
|
63
63
|
const exts = getExts(isTsProject);
|
|
64
64
|
const globPattern = `${srcDirOrFile}/**/*{${exts.join(',')}}`;
|
|
65
65
|
const files = glob.sync(globPattern, {
|
|
66
|
-
ignore: [`${srcDirOrFile}/**/*.d.ts`]
|
|
66
|
+
ignore: [`${srcDirOrFile}/**/*.d.ts`],
|
|
67
|
+
absolute: true
|
|
67
68
|
});
|
|
68
69
|
return files;
|
|
69
70
|
};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
+
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
|
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
|
|
1
7
|
import { Import, fs } from '@modern-js/utils';
|
|
2
8
|
import { initEnv } from "../utils/init-env";
|
|
3
9
|
const babelCompiler = Import.lazy('@modern-js/babel-compiler', require);
|
|
@@ -61,7 +67,9 @@ const runBabelCompiler = async (config, modernConfig) => {
|
|
|
61
67
|
distDir: config.distDir,
|
|
62
68
|
watchDir: config.srcRootDir,
|
|
63
69
|
extensions: getExts(isTs)
|
|
64
|
-
}, babelConfig)
|
|
70
|
+
}, _objectSpread(_objectSpread({}, babelConfig), {}, {
|
|
71
|
+
sourceMaps: config.sourceMaps
|
|
72
|
+
}));
|
|
65
73
|
emitter.on(babelCompiler.BuildWatchEvent.compiling, () => {
|
|
66
74
|
console.info(logger.clearFlag, `Compiling...`);
|
|
67
75
|
});
|
|
@@ -79,7 +79,8 @@ const getWillCompilerCode = (srcDirOrFile, option) => {
|
|
|
79
79
|
const exts = getExts(isTsProject);
|
|
80
80
|
const globPattern = `${srcDirOrFile}/**/*{${exts.join(',')}}`;
|
|
81
81
|
const files = glob.sync(globPattern, {
|
|
82
|
-
ignore: [`${srcDirOrFile}/**/*.d.ts`]
|
|
82
|
+
ignore: [`${srcDirOrFile}/**/*.d.ts`],
|
|
83
|
+
absolute: true
|
|
83
84
|
});
|
|
84
85
|
return files;
|
|
85
86
|
};
|
|
@@ -4,6 +4,12 @@ var _utils = require("@modern-js/utils");
|
|
|
4
4
|
|
|
5
5
|
var _initEnv = require("../utils/init-env");
|
|
6
6
|
|
|
7
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
8
|
+
|
|
9
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10
|
+
|
|
11
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
|
|
7
13
|
const babelCompiler = _utils.Import.lazy('@modern-js/babel-compiler', require);
|
|
8
14
|
|
|
9
15
|
const logger = _utils.Import.lazy('../features/build/logger', require);
|
|
@@ -73,7 +79,9 @@ const runBabelCompiler = async (config, modernConfig) => {
|
|
|
73
79
|
distDir: config.distDir,
|
|
74
80
|
watchDir: config.srcRootDir,
|
|
75
81
|
extensions: getExts(isTs)
|
|
76
|
-
}, babelConfig)
|
|
82
|
+
}, _objectSpread(_objectSpread({}, babelConfig), {}, {
|
|
83
|
+
sourceMaps: config.sourceMaps
|
|
84
|
+
}));
|
|
77
85
|
emitter.on(babelCompiler.BuildWatchEvent.compiling, () => {
|
|
78
86
|
console.info(logger.clearFlag, `Compiling...`);
|
|
79
87
|
});
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.1.
|
|
14
|
+
"version": "1.1.5-rc.0",
|
|
15
15
|
"bin": {
|
|
16
16
|
"modern": "./bin/modern.js"
|
|
17
17
|
},
|
|
@@ -44,19 +44,19 @@
|
|
|
44
44
|
"@babel/runtime": "^7",
|
|
45
45
|
"@babel/traverse": "^7.15.0",
|
|
46
46
|
"@babel/types": "^7.15.0",
|
|
47
|
-
"@modern-js/babel-compiler": "^1.1.
|
|
48
|
-
"@modern-js/babel-preset-module": "^1.1.
|
|
49
|
-
"@modern-js/core": "^1.2.0",
|
|
50
|
-
"@modern-js/css-config": "^1.1.
|
|
47
|
+
"@modern-js/babel-compiler": "^1.1.4-rc.0",
|
|
48
|
+
"@modern-js/babel-preset-module": "^1.1.5-rc.0",
|
|
49
|
+
"@modern-js/core": "^1.2.1-rc.0",
|
|
50
|
+
"@modern-js/css-config": "^1.1.3-rc.0",
|
|
51
51
|
"@modern-js/i18n-cli-language-detector": "^1.1.1",
|
|
52
|
-
"@modern-js/module-tools-hooks": "^1.1.
|
|
53
|
-
"@modern-js/new-action": "^1.2.
|
|
54
|
-
"@modern-js/plugin-analyze": "^1.1.
|
|
55
|
-
"@modern-js/plugin-changeset": "^1.1.
|
|
56
|
-
"@modern-js/plugin-fast-refresh": "^1.1.
|
|
57
|
-
"@modern-js/plugin-i18n": "^1.1.
|
|
58
|
-
"@modern-js/style-compiler": "^1.1.
|
|
59
|
-
"@modern-js/utils": "^1.1.
|
|
52
|
+
"@modern-js/module-tools-hooks": "^1.1.3-rc.0",
|
|
53
|
+
"@modern-js/new-action": "^1.2.1",
|
|
54
|
+
"@modern-js/plugin-analyze": "^1.1.3-rc.0",
|
|
55
|
+
"@modern-js/plugin-changeset": "^1.1.2-rc.0",
|
|
56
|
+
"@modern-js/plugin-fast-refresh": "^1.1.2-rc.0",
|
|
57
|
+
"@modern-js/plugin-i18n": "^1.1.2-rc.0",
|
|
58
|
+
"@modern-js/style-compiler": "^1.1.4-rc.0",
|
|
59
|
+
"@modern-js/utils": "^1.1.6-rc.0",
|
|
60
60
|
"chalk": "^4.1.2",
|
|
61
61
|
"chokidar": "^3.5.2",
|
|
62
62
|
"dotenv": "^10.0.0",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@babel/preset-typescript": "^7.15.0",
|
|
78
|
-
"@modern-js/babel-chain": "^1.1.
|
|
78
|
+
"@modern-js/babel-chain": "^1.1.2-rc.0",
|
|
79
79
|
"@types/babel__core": "^7.1.15",
|
|
80
80
|
"@types/babel__generator": "^7.6.3",
|
|
81
81
|
"@types/babel__traverse": "^7.14.2",
|
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
"@types/signale": "^1.4.2",
|
|
89
89
|
"commander": "^8.1.0",
|
|
90
90
|
"typescript": "^4",
|
|
91
|
-
"@modern-js/plugin-testing": "^1.2.
|
|
92
|
-
"@modern-js/module-tools": "^1.1.
|
|
91
|
+
"@modern-js/plugin-testing": "^1.2.2",
|
|
92
|
+
"@modern-js/module-tools": "^1.1.4"
|
|
93
93
|
},
|
|
94
94
|
"sideEffects": false,
|
|
95
95
|
"modernConfig": {
|
|
@@ -82,7 +82,7 @@ const runBabelCompiler = async (
|
|
|
82
82
|
watchDir: config.srcRootDir,
|
|
83
83
|
extensions: getExts(isTs),
|
|
84
84
|
},
|
|
85
|
-
babelConfig,
|
|
85
|
+
{ ...babelConfig, sourceMaps: config.sourceMaps },
|
|
86
86
|
);
|
|
87
87
|
emitter.on(babelCompiler.BuildWatchEvent.compiling, () => {
|
|
88
88
|
console.info(logger.clearFlag, `Compiling...`);
|