@bleedingdev/modern-js-utils 3.5.0-ultramodern.98 → 3.5.0-ultramodern.99
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.
|
@@ -48,7 +48,13 @@ const external_node_path_namespaceObject = require("node:path");
|
|
|
48
48
|
var external_node_path_default = /*#__PURE__*/ __webpack_require__.n(external_node_path_namespaceObject);
|
|
49
49
|
const SOURCE_EXTENSIONS = [
|
|
50
50
|
'.ts',
|
|
51
|
-
'.
|
|
51
|
+
'.tsx',
|
|
52
|
+
'.js',
|
|
53
|
+
'.jsx'
|
|
54
|
+
];
|
|
55
|
+
const TS_EXTENSIONS = [
|
|
56
|
+
'.ts',
|
|
57
|
+
'.tsx'
|
|
52
58
|
];
|
|
53
59
|
const JS_LIKE_EXTENSION_RE = /\.(?:c|m)?js$/;
|
|
54
60
|
const isFile = (filepath)=>external_node_fs_default().existsSync(filepath) && external_node_fs_default().statSync(filepath).isFile();
|
|
@@ -57,8 +63,11 @@ const findSourceEntry = (resolvedPath)=>{
|
|
|
57
63
|
if (ext) {
|
|
58
64
|
if (isFile(resolvedPath)) return resolvedPath;
|
|
59
65
|
if (JS_LIKE_EXTENSION_RE.test(resolvedPath)) {
|
|
60
|
-
const
|
|
61
|
-
|
|
66
|
+
const withoutExt = resolvedPath.slice(0, -ext.length);
|
|
67
|
+
for (const candidateExt of TS_EXTENSIONS){
|
|
68
|
+
const tsPath = `${withoutExt}${candidateExt}`;
|
|
69
|
+
if (isFile(tsPath)) return tsPath;
|
|
70
|
+
}
|
|
62
71
|
}
|
|
63
72
|
return;
|
|
64
73
|
}
|
|
@@ -64,16 +64,16 @@ var __webpack_exports__ = {};
|
|
|
64
64
|
"default"
|
|
65
65
|
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_backend_federation_contract__rspack_import_0[__rspack_import_key];
|
|
66
66
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
67
|
-
var
|
|
67
|
+
var _path__rspack_import_1 = __webpack_require__("./path");
|
|
68
|
+
var _surface_resolution__rspack_import_2 = __webpack_require__("./surface-resolution");
|
|
68
69
|
var __rspack_reexport = {};
|
|
69
|
-
for(const __rspack_import_key in
|
|
70
|
+
for(const __rspack_import_key in _surface_resolution__rspack_import_2)if ([
|
|
70
71
|
"cutNameByHyphen",
|
|
71
72
|
"default"
|
|
72
|
-
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>
|
|
73
|
+
].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] = ()=>_surface_resolution__rspack_import_2[__rspack_import_key];
|
|
73
74
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
74
|
-
var _path__rspack_import_2 = __webpack_require__("./path");
|
|
75
75
|
__webpack_require__.d(__webpack_exports__, {
|
|
76
|
-
cutNameByHyphen: ()=>
|
|
76
|
+
cutNameByHyphen: ()=>_path__rspack_import_1.cutNameByHyphen
|
|
77
77
|
});
|
|
78
78
|
})();
|
|
79
79
|
exports.cutNameByHyphen = __webpack_exports__.cutNameByHyphen;
|
|
@@ -2,7 +2,13 @@ import node_fs from "node:fs";
|
|
|
2
2
|
import node_path from "node:path";
|
|
3
3
|
const SOURCE_EXTENSIONS = [
|
|
4
4
|
'.ts',
|
|
5
|
-
'.
|
|
5
|
+
'.tsx',
|
|
6
|
+
'.js',
|
|
7
|
+
'.jsx'
|
|
8
|
+
];
|
|
9
|
+
const TS_EXTENSIONS = [
|
|
10
|
+
'.ts',
|
|
11
|
+
'.tsx'
|
|
6
12
|
];
|
|
7
13
|
const JS_LIKE_EXTENSION_RE = /\.(?:c|m)?js$/;
|
|
8
14
|
const isFile = (filepath)=>node_fs.existsSync(filepath) && node_fs.statSync(filepath).isFile();
|
|
@@ -11,8 +17,11 @@ const findSourceEntry = (resolvedPath)=>{
|
|
|
11
17
|
if (ext) {
|
|
12
18
|
if (isFile(resolvedPath)) return resolvedPath;
|
|
13
19
|
if (JS_LIKE_EXTENSION_RE.test(resolvedPath)) {
|
|
14
|
-
const
|
|
15
|
-
|
|
20
|
+
const withoutExt = resolvedPath.slice(0, -ext.length);
|
|
21
|
+
for (const candidateExt of TS_EXTENSIONS){
|
|
22
|
+
const tsPath = `${withoutExt}${candidateExt}`;
|
|
23
|
+
if (isFile(tsPath)) return tsPath;
|
|
24
|
+
}
|
|
16
25
|
}
|
|
17
26
|
return;
|
|
18
27
|
}
|
|
@@ -3,7 +3,13 @@ import node_fs from "node:fs";
|
|
|
3
3
|
import node_path from "node:path";
|
|
4
4
|
const SOURCE_EXTENSIONS = [
|
|
5
5
|
'.ts',
|
|
6
|
-
'.
|
|
6
|
+
'.tsx',
|
|
7
|
+
'.js',
|
|
8
|
+
'.jsx'
|
|
9
|
+
];
|
|
10
|
+
const TS_EXTENSIONS = [
|
|
11
|
+
'.ts',
|
|
12
|
+
'.tsx'
|
|
7
13
|
];
|
|
8
14
|
const JS_LIKE_EXTENSION_RE = /\.(?:c|m)?js$/;
|
|
9
15
|
const isFile = (filepath)=>node_fs.existsSync(filepath) && node_fs.statSync(filepath).isFile();
|
|
@@ -12,8 +18,11 @@ const findSourceEntry = (resolvedPath)=>{
|
|
|
12
18
|
if (ext) {
|
|
13
19
|
if (isFile(resolvedPath)) return resolvedPath;
|
|
14
20
|
if (JS_LIKE_EXTENSION_RE.test(resolvedPath)) {
|
|
15
|
-
const
|
|
16
|
-
|
|
21
|
+
const withoutExt = resolvedPath.slice(0, -ext.length);
|
|
22
|
+
for (const candidateExt of TS_EXTENSIONS){
|
|
23
|
+
const tsPath = `${withoutExt}${candidateExt}`;
|
|
24
|
+
if (isFile(tsPath)) return tsPath;
|
|
25
|
+
}
|
|
17
26
|
}
|
|
18
27
|
return;
|
|
19
28
|
}
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"modern",
|
|
18
18
|
"modern.js"
|
|
19
19
|
],
|
|
20
|
-
"version": "3.5.0-ultramodern.
|
|
20
|
+
"version": "3.5.0-ultramodern.99",
|
|
21
21
|
"types": "./dist/types/index.d.ts",
|
|
22
22
|
"main": "./dist/cjs/index.js",
|
|
23
23
|
"module": "./dist/esm/index.mjs",
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
"rslog": "^2.1.3"
|
|
188
188
|
},
|
|
189
189
|
"devDependencies": {
|
|
190
|
-
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.5.0-ultramodern.
|
|
190
|
+
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.5.0-ultramodern.99",
|
|
191
191
|
"@rslib/core": "0.23.2",
|
|
192
192
|
"@scripts/rstest-config": "2.66.0",
|
|
193
193
|
"@types/node": "^26.1.1",
|