@modern-js/server-utils 1.18.0 → 1.18.1
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,19 @@
|
|
|
1
1
|
# @modern-js/server-utils
|
|
2
2
|
|
|
3
|
+
## 1.18.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fb02c81: fix: alias should take precedence over package name
|
|
8
|
+
fix: 编译时,别名的优先级应该高于包名
|
|
9
|
+
- Updated dependencies [c1a4d9b]
|
|
10
|
+
- Updated dependencies [9fcfbd4]
|
|
11
|
+
- Updated dependencies [6c2c745]
|
|
12
|
+
- @modern-js/plugin@1.18.1
|
|
13
|
+
- @modern-js/utils@1.18.1
|
|
14
|
+
- @modern-js/babel-preset-lib@1.18.1
|
|
15
|
+
- @modern-js/babel-compiler@1.18.1
|
|
16
|
+
|
|
3
17
|
## 1.18.0
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -148,20 +148,7 @@ function getNotAliasedPath(sf, matcher, text) {
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
if (!path.isAbsolute(result)) {
|
|
151
|
-
|
|
152
|
-
// Installed packages (node modules) should take precedence over root files with the same name.
|
|
153
|
-
// Ref: https://github.com/nestjs/nest-cli/issues/838
|
|
154
|
-
const packagePath = require.resolve(text, {
|
|
155
|
-
paths: [process.cwd(), ...module.paths]
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
if (packagePath) {
|
|
159
|
-
// eslint-disable-next-line consistent-return
|
|
160
|
-
return text;
|
|
161
|
-
}
|
|
162
|
-
} catch (_unused2) {} // handle alias to alias
|
|
163
|
-
|
|
164
|
-
|
|
151
|
+
// handle alias to alias
|
|
165
152
|
if (!result.startsWith('.') && !result.startsWith('..')) {
|
|
166
153
|
try {
|
|
167
154
|
// Installed packages (node modules) should take precedence over root files with the same name.
|
|
@@ -174,8 +161,21 @@ function getNotAliasedPath(sf, matcher, text) {
|
|
|
174
161
|
// eslint-disable-next-line consistent-return
|
|
175
162
|
return result;
|
|
176
163
|
}
|
|
177
|
-
} catch (
|
|
164
|
+
} catch (_unused2) {}
|
|
178
165
|
}
|
|
166
|
+
|
|
167
|
+
try {
|
|
168
|
+
// Installed packages (node modules) should take precedence over root files with the same name.
|
|
169
|
+
// Ref: https://github.com/nestjs/nest-cli/issues/838
|
|
170
|
+
const packagePath = require.resolve(text, {
|
|
171
|
+
paths: [process.cwd(), ...module.paths]
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
if (packagePath) {
|
|
175
|
+
// eslint-disable-next-line consistent-return
|
|
176
|
+
return text;
|
|
177
|
+
}
|
|
178
|
+
} catch (_unused3) {}
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
const resolvedPath = posix.relative(dirname(sf.fileName), result) || './'; // eslint-disable-next-line consistent-return
|
|
@@ -163,20 +163,7 @@ function getNotAliasedPath(sf, matcher, text) {
|
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
if (!_path.default.isAbsolute(result)) {
|
|
166
|
-
|
|
167
|
-
// Installed packages (node modules) should take precedence over root files with the same name.
|
|
168
|
-
// Ref: https://github.com/nestjs/nest-cli/issues/838
|
|
169
|
-
const packagePath = require.resolve(text, {
|
|
170
|
-
paths: [process.cwd(), ...module.paths]
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
if (packagePath) {
|
|
174
|
-
// eslint-disable-next-line consistent-return
|
|
175
|
-
return text;
|
|
176
|
-
}
|
|
177
|
-
} catch (_unused2) {} // handle alias to alias
|
|
178
|
-
|
|
179
|
-
|
|
166
|
+
// handle alias to alias
|
|
180
167
|
if (!result.startsWith('.') && !result.startsWith('..')) {
|
|
181
168
|
try {
|
|
182
169
|
// Installed packages (node modules) should take precedence over root files with the same name.
|
|
@@ -189,8 +176,21 @@ function getNotAliasedPath(sf, matcher, text) {
|
|
|
189
176
|
// eslint-disable-next-line consistent-return
|
|
190
177
|
return result;
|
|
191
178
|
}
|
|
192
|
-
} catch (
|
|
179
|
+
} catch (_unused2) {}
|
|
193
180
|
}
|
|
181
|
+
|
|
182
|
+
try {
|
|
183
|
+
// Installed packages (node modules) should take precedence over root files with the same name.
|
|
184
|
+
// Ref: https://github.com/nestjs/nest-cli/issues/838
|
|
185
|
+
const packagePath = require.resolve(text, {
|
|
186
|
+
paths: [process.cwd(), ...module.paths]
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
if (packagePath) {
|
|
190
|
+
// eslint-disable-next-line consistent-return
|
|
191
|
+
return text;
|
|
192
|
+
}
|
|
193
|
+
} catch (_unused3) {}
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
const resolvedPath = _path.posix.relative((0, _path.dirname)(sf.fileName), result) || './'; // eslint-disable-next-line consistent-return
|
|
@@ -166,34 +166,34 @@ function getNotAliasedPath(sf, matcher, text) {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
if (!path.isAbsolute(result)) {
|
|
169
|
-
|
|
170
|
-
// Installed packages (node modules) should take precedence over root files with the same name.
|
|
171
|
-
// Ref: https://github.com/nestjs/nest-cli/issues/838
|
|
172
|
-
var packagePath = require.resolve(text, {
|
|
173
|
-
paths: [process.cwd()].concat(_toConsumableArray(module.paths))
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
if (packagePath) {
|
|
177
|
-
// eslint-disable-next-line consistent-return
|
|
178
|
-
return text;
|
|
179
|
-
}
|
|
180
|
-
} catch (_unused2) {} // handle alias to alias
|
|
181
|
-
|
|
182
|
-
|
|
169
|
+
// handle alias to alias
|
|
183
170
|
if (!result.startsWith('.') && !result.startsWith('..')) {
|
|
184
171
|
try {
|
|
185
172
|
// Installed packages (node modules) should take precedence over root files with the same name.
|
|
186
173
|
// Ref: https://github.com/nestjs/nest-cli/issues/838
|
|
187
|
-
var
|
|
174
|
+
var packagePath = require.resolve(result, {
|
|
188
175
|
paths: [process.cwd()].concat(_toConsumableArray(module.paths))
|
|
189
176
|
});
|
|
190
177
|
|
|
191
|
-
if (
|
|
178
|
+
if (packagePath) {
|
|
192
179
|
// eslint-disable-next-line consistent-return
|
|
193
180
|
return result;
|
|
194
181
|
}
|
|
195
|
-
} catch (
|
|
182
|
+
} catch (_unused2) {}
|
|
196
183
|
}
|
|
184
|
+
|
|
185
|
+
try {
|
|
186
|
+
// Installed packages (node modules) should take precedence over root files with the same name.
|
|
187
|
+
// Ref: https://github.com/nestjs/nest-cli/issues/838
|
|
188
|
+
var _packagePath = require.resolve(text, {
|
|
189
|
+
paths: [process.cwd()].concat(_toConsumableArray(module.paths))
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
if (_packagePath) {
|
|
193
|
+
// eslint-disable-next-line consistent-return
|
|
194
|
+
return text;
|
|
195
|
+
}
|
|
196
|
+
} catch (_unused3) {}
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
var resolvedPath = posix.relative(dirname(sf.fileName), result) || './'; // eslint-disable-next-line consistent-return
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.18.
|
|
14
|
+
"version": "1.18.1",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -35,18 +35,18 @@
|
|
|
35
35
|
"@babel/preset-env": "^7.18.0",
|
|
36
36
|
"@babel/preset-typescript": "^7.17.12",
|
|
37
37
|
"@babel/runtime": "^7.18.0",
|
|
38
|
-
"@modern-js/babel-compiler": "^1.18.
|
|
39
|
-
"@modern-js/babel-preset-lib": "1.18.
|
|
40
|
-
"@modern-js/plugin": "1.18.
|
|
41
|
-
"@modern-js/utils": "1.18.
|
|
38
|
+
"@modern-js/babel-compiler": "^1.18.1",
|
|
39
|
+
"@modern-js/babel-preset-lib": "1.18.1",
|
|
40
|
+
"@modern-js/plugin": "1.18.1",
|
|
41
|
+
"@modern-js/utils": "1.18.1",
|
|
42
42
|
"babel-plugin-module-resolver": "^4.1.0",
|
|
43
43
|
"babel-plugin-transform-typescript-metadata": "^0.3.2",
|
|
44
44
|
"tsconfig-paths": "3.14.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@modern-js/core": "1.18.
|
|
48
|
-
"@scripts/build": "1.18.
|
|
49
|
-
"@scripts/jest-config": "1.18.
|
|
47
|
+
"@modern-js/core": "1.18.1",
|
|
48
|
+
"@scripts/build": "1.18.1",
|
|
49
|
+
"@scripts/jest-config": "1.18.1",
|
|
50
50
|
"@types/babel__core": "^7.1.15",
|
|
51
51
|
"@types/jest": "^27",
|
|
52
52
|
"@types/node": "^14",
|