@lynx-js/rspeedy-canary 0.9.10-canary-20250620-57c33046 → 0.9.11-canary-20250626-0ff9eb54
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 +7 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +4 -4
- package/dist/register/hooks.js +14 -14
- package/dist/register/index.js +3 -3
- package/dist/src_cli_commands_ts.js +1 -1
- package/dist/src_config_validate_ts.js +3286 -3003
- package/dist/src_version_ts.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# @lynx-js/rspeedy
|
|
2
2
|
|
|
3
|
-
## 0.9.
|
|
3
|
+
## 0.9.11-canary-20250626115840-0ff9eb54e58dcbac602ea29c19a6daac1ed5746d
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- docs: remove chunks: 'all' in comments ([#1168](https://github.com/lynx-family/lynx-stack/pull/1168))
|
|
8
|
+
|
|
9
|
+
## 0.9.10
|
|
4
10
|
|
|
5
11
|
## 0.9.9
|
|
6
12
|
|
package/dist/index.d.ts
CHANGED
|
@@ -179,7 +179,6 @@ export declare interface ChunkSplit {
|
|
|
179
179
|
* react: {
|
|
180
180
|
* test: /node_modules[\\/](@lynx-js[\\/]react|react-router)[\\/]/,
|
|
181
181
|
* name: 'lib-react',
|
|
182
|
-
* chunks: 'all',
|
|
183
182
|
* },
|
|
184
183
|
* },
|
|
185
184
|
* },
|
|
@@ -282,7 +281,6 @@ export declare interface ChunkSplitCustom {
|
|
|
282
281
|
* react: {
|
|
283
282
|
* test: /node_modules[\\/](@lynx-js[\\/]react|react-router)[\\/]/,
|
|
284
283
|
* name: 'lib-react',
|
|
285
|
-
* chunks: 'all',
|
|
286
284
|
* },
|
|
287
285
|
* },
|
|
288
286
|
* },
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import * as __WEBPACK_EXTERNAL_MODULE_node_fs_promises_153e37e0__ from "node:fs/
|
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE_node_module_ab9f2194__ from "node:module";
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
|
|
6
6
|
import * as __WEBPACK_EXTERNAL_MODULE_node_process_786449bf__ from "node:process";
|
|
7
|
-
import
|
|
7
|
+
import node_fs from "node:fs";
|
|
8
8
|
import { pathToFileURL } from "node:url";
|
|
9
9
|
import { register } from "@lynx-js/rspeedy/register";
|
|
10
10
|
var __webpack_modules__ = {
|
|
@@ -112,7 +112,7 @@ var __webpack_modules__ = {
|
|
|
112
112
|
});
|
|
113
113
|
var core_ = __webpack_require__("@rsbuild/core");
|
|
114
114
|
var package_namespaceObject = {
|
|
115
|
-
i8: "0.9.
|
|
115
|
+
i8: "0.9.10"
|
|
116
116
|
};
|
|
117
117
|
const version = package_namespaceObject.i8;
|
|
118
118
|
const rspackVersion = core_.rspack.rspackVersion;
|
|
@@ -439,7 +439,7 @@ const resolveConfigPath = (root, customConfig)=>{
|
|
|
439
439
|
if (customConfig) {
|
|
440
440
|
(0, debug.fF)(`load custom config file ${customConfig} from ${root}`);
|
|
441
441
|
const customConfigPath = (0, external_node_path_.isAbsolute)(customConfig) ? customConfig : (0, external_node_path_.join)(root, customConfig);
|
|
442
|
-
if (
|
|
442
|
+
if (node_fs.existsSync(customConfigPath)) return customConfigPath;
|
|
443
443
|
throw new Error(`Cannot find config file: ${picocolors_default().dim(customConfigPath)}`);
|
|
444
444
|
}
|
|
445
445
|
const CONFIG_FILES = [
|
|
@@ -451,7 +451,7 @@ const resolveConfigPath = (root, customConfig)=>{
|
|
|
451
451
|
for (const file of CONFIG_FILES){
|
|
452
452
|
(0, debug.fF)(`load default config file ${file} from ${root}`);
|
|
453
453
|
const configFile = (0, external_node_path_.join)(root, file);
|
|
454
|
-
if (
|
|
454
|
+
if (node_fs.existsSync(configFile)) {
|
|
455
455
|
(0, debug.fF)(`default config ${configFile} found`);
|
|
456
456
|
return configFile;
|
|
457
457
|
}
|
package/dist/register/hooks.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { URL } from "node:url";
|
|
2
|
-
import
|
|
2
|
+
import typescript from "typescript";
|
|
3
3
|
const FLAG_REPLACE_WITH_OPEN_PAREN = 1;
|
|
4
4
|
const FLAG_REPLACE_WITH_CLOSE_PAREN = 2;
|
|
5
5
|
const FLAG_REPLACE_WITH_SEMI = 3;
|
|
@@ -67,17 +67,17 @@ class BlankString {
|
|
|
67
67
|
return out + input.slice(previousEnd);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
const SK =
|
|
70
|
+
const SK = typescript.SyntaxKind;
|
|
71
71
|
const VISIT_BLANKED = "";
|
|
72
72
|
const VISITED_JS = null;
|
|
73
73
|
const languageOptions = {
|
|
74
|
-
languageVersion:
|
|
75
|
-
impliedNodeFormat:
|
|
74
|
+
languageVersion: typescript.ScriptTarget.ESNext,
|
|
75
|
+
impliedNodeFormat: typescript.ModuleKind.ESNext
|
|
76
76
|
};
|
|
77
|
-
const scanner =
|
|
78
|
-
if (
|
|
79
|
-
languageOptions.jsDocParsingMode =
|
|
80
|
-
scanner.setJSDocParsingMode(
|
|
77
|
+
const scanner = typescript.createScanner(typescript.ScriptTarget.ESNext, true, typescript.LanguageVariant.Standard);
|
|
78
|
+
if (typescript.JSDocParsingMode) {
|
|
79
|
+
languageOptions.jsDocParsingMode = typescript.JSDocParsingMode.ParseNone;
|
|
80
|
+
scanner.setJSDocParsingMode(typescript.JSDocParsingMode.ParseNone);
|
|
81
81
|
}
|
|
82
82
|
let src = "";
|
|
83
83
|
let str = new BlankString("");
|
|
@@ -86,7 +86,7 @@ let onError;
|
|
|
86
86
|
let seenJS = false;
|
|
87
87
|
let parentStatement;
|
|
88
88
|
function tsBlankSpace(input, onErrorArg) {
|
|
89
|
-
return blankSourceFile(
|
|
89
|
+
return blankSourceFile(typescript.createSourceFile("input.ts", input, languageOptions, false, typescript.ScriptKind.TS), onErrorArg);
|
|
90
90
|
}
|
|
91
91
|
function blankSourceFile(source, onErrorArg) {
|
|
92
92
|
try {
|
|
@@ -110,7 +110,7 @@ function blankSourceFile(source, onErrorArg) {
|
|
|
110
110
|
}
|
|
111
111
|
function visitUnknownNodeArray(nodes) {
|
|
112
112
|
if (0 === nodes.length) return VISITED_JS;
|
|
113
|
-
return visitNodeArray(nodes,
|
|
113
|
+
return visitNodeArray(nodes, typescript.isStatement(nodes[0]), false);
|
|
114
114
|
}
|
|
115
115
|
function visitNodeArray(nodes, isStatementLike, isFunctionBody) {
|
|
116
116
|
const previousParentStatement = parentStatement;
|
|
@@ -371,7 +371,7 @@ function visitImportDeclaration(node) {
|
|
|
371
371
|
return VISIT_BLANKED;
|
|
372
372
|
}
|
|
373
373
|
const { namedBindings } = node.importClause;
|
|
374
|
-
if (namedBindings &&
|
|
374
|
+
if (namedBindings && typescript.isNamedImports(namedBindings)) {
|
|
375
375
|
const elements = namedBindings.elements;
|
|
376
376
|
for(let i = 0; i < elements.length; i++){
|
|
377
377
|
const e = elements[i];
|
|
@@ -387,7 +387,7 @@ function visitExportDeclaration(node) {
|
|
|
387
387
|
return VISIT_BLANKED;
|
|
388
388
|
}
|
|
389
389
|
const { exportClause } = node;
|
|
390
|
-
if (exportClause &&
|
|
390
|
+
if (exportClause && typescript.isNamedExports(exportClause)) {
|
|
391
391
|
const elements = exportClause.elements;
|
|
392
392
|
for(let i = 0; i < elements.length; i++){
|
|
393
393
|
const e = elements[i];
|
|
@@ -405,7 +405,7 @@ function visitExportAssignment(node) {
|
|
|
405
405
|
return VISITED_JS;
|
|
406
406
|
}
|
|
407
407
|
function visitModule(node) {
|
|
408
|
-
if (node.flags &
|
|
408
|
+
if (node.flags & typescript.NodeFlags.GlobalAugmentation || node.flags & typescript.NodeFlags.Namespace && (node.modifiers && modifiersContainsDeclare(node.modifiers) || !valueNamespaceWorker(node)) || node.name.kind === SK.StringLiteral) {
|
|
409
409
|
blankStatement(node);
|
|
410
410
|
return VISIT_BLANKED;
|
|
411
411
|
}
|
|
@@ -432,7 +432,7 @@ function valueNamespaceWorker(node) {
|
|
|
432
432
|
}
|
|
433
433
|
case SK.ModuleDeclaration:
|
|
434
434
|
{
|
|
435
|
-
if (!(node.flags &
|
|
435
|
+
if (!(node.flags & typescript.NodeFlags.Namespace)) return true;
|
|
436
436
|
const { body } = node;
|
|
437
437
|
if (!body) return false;
|
|
438
438
|
if (body.kind === SK.ModuleDeclaration) return valueNamespaceWorker(body);
|
package/dist/register/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import node_module from "node:module";
|
|
2
2
|
function register() {
|
|
3
|
-
if (!
|
|
3
|
+
if (!node_module.register) throw new Error([
|
|
4
4
|
`This version of Node.js (${process.version}) does not support module.register(). You can either:`,
|
|
5
5
|
" - Upgrade to Node.js v18.19 or v20.6 and above",
|
|
6
6
|
" - Use `lynx.config.js` instead of `lynx.config.ts`"
|
|
7
7
|
].join('\n'));
|
|
8
8
|
const { port1, port2 } = new MessageChannel();
|
|
9
|
-
|
|
9
|
+
node_module.register(`./hooks.js?${Date.now()}`, import.meta.url, {
|
|
10
10
|
parentURL: import.meta.url,
|
|
11
11
|
data: {
|
|
12
12
|
port: port2
|
|
@@ -40,7 +40,7 @@ export const __webpack_modules__ = {
|
|
|
40
40
|
});
|
|
41
41
|
var core_ = __webpack_require__("@rsbuild/core");
|
|
42
42
|
var package_namespaceObject = {
|
|
43
|
-
i8: "0.9.
|
|
43
|
+
i8: "0.9.10"
|
|
44
44
|
};
|
|
45
45
|
const version = package_namespaceObject.i8;
|
|
46
46
|
const rspackVersion = core_.rspack.rspackVersion;
|