@modern-js/server-utils 2.4.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,14 @@
|
|
|
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
|
+
|
|
3
12
|
## 2.4.0
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -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
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.4.0",
|
|
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.4.0",
|
|
40
|
-
"@modern-js/babel-preset-lib": "2.4.0",
|
|
41
|
-
"@modern-js/utils": "2.4.0"
|
|
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,7 +47,7 @@
|
|
|
47
47
|
"jest": "^27",
|
|
48
48
|
"ts-jest": "^27.0.4",
|
|
49
49
|
"typescript": "^4",
|
|
50
|
-
"@modern-js/server-core": "2.4.0",
|
|
50
|
+
"@modern-js/server-core": "2.4.1-beta.0",
|
|
51
51
|
"@scripts/build": "2.4.0",
|
|
52
52
|
"@scripts/jest-config": "2.4.0"
|
|
53
53
|
},
|