@modern-js/server-utils 2.3.0 → 2.4.1-beta.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,24 @@
|
|
|
1
1
|
# @modern-js/server-utils
|
|
2
2
|
|
|
3
|
+
## 2.4.1-beta.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [11c053b]
|
|
8
|
+
- @modern-js/utils@2.4.1-beta.0
|
|
9
|
+
- @modern-js/babel-preset-lib@2.4.1-beta.0
|
|
10
|
+
- @modern-js/babel-compiler@2.4.1-beta.0
|
|
11
|
+
|
|
12
|
+
## 2.4.0
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [98a2733]
|
|
17
|
+
- Updated dependencies [8c2db5f]
|
|
18
|
+
- @modern-js/utils@2.4.0
|
|
19
|
+
- @modern-js/babel-preset-lib@2.4.0
|
|
20
|
+
- @modern-js/babel-compiler@2.4.0
|
|
21
|
+
|
|
3
22
|
## 2.3.0
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,30 +1,26 @@
|
|
|
1
|
-
|
|
2
1
|
<p align="center">
|
|
3
2
|
<a href="https://modernjs.dev" target="blank"><img src="https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png" width="300" alt="Modern.js Logo" /></a>
|
|
4
3
|
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">Modern.js</h1>
|
|
6
|
+
|
|
5
7
|
<p align="center">
|
|
6
|
-
|
|
7
|
-
<br/>
|
|
8
|
-
<a href="https://modernjs.dev" target="blank">
|
|
9
|
-
modernjs.dev
|
|
10
|
-
</a>
|
|
11
|
-
</p>
|
|
12
|
-
<p align="center">
|
|
13
|
-
The meta-framework suite designed from scratch for frontend-focused modern web development
|
|
8
|
+
A Progressive React Framework for modern web development.
|
|
14
9
|
</p>
|
|
15
10
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.
|
|
11
|
+
## Getting Started
|
|
19
12
|
|
|
20
|
-
|
|
13
|
+
Please follow [Quick Start](https://modernjs.dev/en/guides/get-started/quick-start) to get started with Modern.js.
|
|
21
14
|
|
|
22
|
-
##
|
|
15
|
+
## Documentation
|
|
23
16
|
|
|
24
|
-
- [
|
|
25
|
-
- [
|
|
26
|
-
- [API References](https://modernjs.dev/docs/apis)
|
|
17
|
+
- [English Documentation](https://modernjs.dev/en/)
|
|
18
|
+
- [中文文档](https://modernjs.dev)
|
|
27
19
|
|
|
28
20
|
## Contributing
|
|
29
21
|
|
|
30
|
-
|
|
22
|
+
Please read the [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md).
|
|
23
|
+
|
|
24
|
+
## License
|
|
25
|
+
|
|
26
|
+
Modern.js is [MIT licensed](https://github.com/modern-js-dev/modern.js/blob/main/LICENSE).
|
|
@@ -144,7 +144,7 @@ var validateAbsolutePaths = function(filenames, messageFunc) {
|
|
|
144
144
|
};
|
|
145
145
|
var compile = function() {
|
|
146
146
|
var _ref = _asyncToGenerator(function(appDirectory, modernConfig, compileOptions) {
|
|
147
|
-
var
|
|
147
|
+
var _modernConfig_server, sourceDirs, distDir, tsconfigPath, compiler, isTsProject, _tmp;
|
|
148
148
|
return __generator(this, function(_state) {
|
|
149
149
|
switch(_state.label){
|
|
150
150
|
case 0:
|
|
@@ -153,7 +153,7 @@ var compile = function() {
|
|
|
153
153
|
return "source dir ".concat(dir, " is not an absolute path.");
|
|
154
154
|
});
|
|
155
155
|
validateAbsolutePath(distDir, "dist dir ".concat(distDir, " is not an absolute path."));
|
|
156
|
-
compiler = modernConfig === null || modernConfig === void 0 ? void 0 : (
|
|
156
|
+
compiler = modernConfig === null || modernConfig === void 0 ? void 0 : (_modernConfig_server = modernConfig.server) === null || _modernConfig_server === void 0 ? void 0 : _modernConfig_server.compiler;
|
|
157
157
|
_tmp = tsconfigPath;
|
|
158
158
|
if (!_tmp) return [
|
|
159
159
|
3,
|
|
@@ -207,7 +207,7 @@ var copyFiles = function() {
|
|
|
207
207
|
}();
|
|
208
208
|
var compileByTs = function() {
|
|
209
209
|
var _ref = _asyncToGenerator(function(appDirectory, config, compileOptions) {
|
|
210
|
-
var sourceDirs, distDir, tsconfigPath, ts2, createProgram, formatHost, alias, aliasOption,
|
|
210
|
+
var sourceDirs, distDir, tsconfigPath, ts2, createProgram, formatHost, alias, aliasOption, _aliasOption_paths, paths, _aliasOption_absoluteBaseUrl, absoluteBaseUrl, _readTsConfigByFile, options, fileNames, projectReferences, sourcePosixPaths, rootNames, program, tsconfigPathsPlugin, emitResult, allDiagnostics, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, source, err;
|
|
211
211
|
return __generator(this, function(_state) {
|
|
212
212
|
switch(_state.label){
|
|
213
213
|
case 0:
|
|
@@ -228,8 +228,8 @@ var compileByTs = function() {
|
|
|
228
228
|
appDirectory: appDirectory,
|
|
229
229
|
tsconfigPath: tsconfigPath
|
|
230
230
|
});
|
|
231
|
-
|
|
232
|
-
|
|
231
|
+
_aliasOption_paths = aliasOption.paths, paths = _aliasOption_paths === void 0 ? {} : _aliasOption_paths, _aliasOption_absoluteBaseUrl = aliasOption.absoluteBaseUrl, absoluteBaseUrl = _aliasOption_absoluteBaseUrl === void 0 ? "./" : _aliasOption_absoluteBaseUrl;
|
|
232
|
+
_readTsConfigByFile = readTsConfigByFile(tsconfigPath), options = _readTsConfigByFile.options, fileNames = _readTsConfigByFile.fileNames, projectReferences = _readTsConfigByFile.projectReferences;
|
|
233
233
|
sourcePosixPaths = sourceDirs.map(function(sourceDir) {
|
|
234
234
|
return sourceDir.split(path.sep).join(path.posix.sep);
|
|
235
235
|
});
|
|
@@ -102,7 +102,7 @@ var createAliasMatcher = function(baseUrl, alias) {
|
|
|
102
102
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
103
103
|
try {
|
|
104
104
|
for(var _iterator = aliasPairs[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
105
|
-
var
|
|
105
|
+
var _step_value = _slicedToArray(_step.value, 2), key = _step_value[0], value = _step_value[1];
|
|
106
106
|
if (_instanceof(key, RegExp)) {
|
|
107
107
|
if (key.test(requestedModule)) {
|
|
108
108
|
cacheMap.set(requestedModule, value);
|
|
@@ -173,8 +173,8 @@ function tsconfigPathsBeforeHookFactory(tsBinary, baseUrl, paths) {
|
|
|
173
173
|
}
|
|
174
174
|
if (tsBinary.isImportDeclaration(node) || tsBinary.isExportDeclaration(node) && node.moduleSpecifier) {
|
|
175
175
|
try {
|
|
176
|
-
var
|
|
177
|
-
var importPathWithQuotes1 = node === null || node === void 0 ? void 0 : (
|
|
176
|
+
var _node_moduleSpecifier;
|
|
177
|
+
var importPathWithQuotes1 = node === null || node === void 0 ? void 0 : (_node_moduleSpecifier = node.moduleSpecifier) === null || _node_moduleSpecifier === void 0 ? void 0 : _node_moduleSpecifier.getText();
|
|
178
178
|
if (!importPathWithQuotes1) {
|
|
179
179
|
return node;
|
|
180
180
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modern-js/server-utils",
|
|
3
|
-
"description": "
|
|
3
|
+
"description": "A Progressive React Framework for modern web development.",
|
|
4
4
|
"homepage": "https://modernjs.dev",
|
|
5
5
|
"bugs": "https://github.com/modern-js-dev/modern.js/issues",
|
|
6
6
|
"repository": "modern-js-dev/modern.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.4.1-beta.0",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"@babel/runtime": "^7.18.0",
|
|
37
37
|
"babel-plugin-module-resolver": "^4.1.0",
|
|
38
38
|
"babel-plugin-transform-typescript-metadata": "^0.3.2",
|
|
39
|
-
"@modern-js/babel-compiler": "2.
|
|
40
|
-
"@modern-js/
|
|
41
|
-
"@modern-js/
|
|
39
|
+
"@modern-js/babel-compiler": "2.4.1-beta.0",
|
|
40
|
+
"@modern-js/babel-preset-lib": "2.4.1-beta.0",
|
|
41
|
+
"@modern-js/utils": "2.4.1-beta.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/babel__core": "^7.1.15",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"jest": "^27",
|
|
48
48
|
"ts-jest": "^27.0.4",
|
|
49
49
|
"typescript": "^4",
|
|
50
|
-
"@modern-js/server-core": "2.
|
|
51
|
-
"@scripts/
|
|
52
|
-
"@scripts/
|
|
50
|
+
"@modern-js/server-core": "2.4.1-beta.0",
|
|
51
|
+
"@scripts/build": "2.4.0",
|
|
52
|
+
"@scripts/jest-config": "2.4.0"
|
|
53
53
|
},
|
|
54
54
|
"sideEffects": false,
|
|
55
55
|
"publishConfig": {
|