upgrade-rspeedy-canary 0.11.3-canary-20250919-30893376 → 0.11.3-canary-20250919-077fb22e
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 +1 -1
- package/dist/upgrade-rspeedy.js +13 -15
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
package/dist/upgrade-rspeedy.js
CHANGED
|
@@ -343,6 +343,9 @@ var __webpack_modules__ = {
|
|
|
343
343
|
const INDENT_REGEX = /^(?:( )+|\t+)/;
|
|
344
344
|
const INDENT_TYPE_SPACE = 'space';
|
|
345
345
|
const INDENT_TYPE_TAB = 'tab';
|
|
346
|
+
function shouldIgnoreSingleSpace(ignoreSingleSpaces, indentType, value) {
|
|
347
|
+
return ignoreSingleSpaces && indentType === INDENT_TYPE_SPACE && 1 === value;
|
|
348
|
+
}
|
|
346
349
|
function makeIndentsMap(string, ignoreSingleSpaces) {
|
|
347
350
|
const indents = new Map();
|
|
348
351
|
let previousSize = 0;
|
|
@@ -350,41 +353,36 @@ var __webpack_modules__ = {
|
|
|
350
353
|
let key;
|
|
351
354
|
for (const line of string.split(/\n/g)){
|
|
352
355
|
if (!line) continue;
|
|
353
|
-
let indent;
|
|
354
|
-
let indentType;
|
|
355
|
-
let use;
|
|
356
|
-
let weight;
|
|
357
|
-
let entry;
|
|
358
356
|
const matches = line.match(INDENT_REGEX);
|
|
359
357
|
if (null === matches) {
|
|
360
358
|
previousSize = 0;
|
|
361
359
|
previousIndentType = '';
|
|
362
360
|
} else {
|
|
363
|
-
indent = matches[0].length;
|
|
364
|
-
indentType = matches[1] ? INDENT_TYPE_SPACE : INDENT_TYPE_TAB;
|
|
365
|
-
if (ignoreSingleSpaces
|
|
361
|
+
const indent = matches[0].length;
|
|
362
|
+
const indentType = matches[1] ? INDENT_TYPE_SPACE : INDENT_TYPE_TAB;
|
|
363
|
+
if (shouldIgnoreSingleSpace(ignoreSingleSpaces, indentType, indent)) continue;
|
|
366
364
|
if (indentType !== previousIndentType) previousSize = 0;
|
|
367
365
|
previousIndentType = indentType;
|
|
368
|
-
use = 1;
|
|
369
|
-
weight = 0;
|
|
366
|
+
let use = 1;
|
|
367
|
+
let weight = 0;
|
|
370
368
|
const indentDifference = indent - previousSize;
|
|
371
369
|
previousSize = indent;
|
|
372
370
|
if (0 === indentDifference) {
|
|
373
371
|
use = 0;
|
|
374
372
|
weight = 1;
|
|
375
373
|
} else {
|
|
376
|
-
const absoluteIndentDifference = indentDifference
|
|
374
|
+
const absoluteIndentDifference = Math.abs(indentDifference);
|
|
375
|
+
if (shouldIgnoreSingleSpace(ignoreSingleSpaces, indentType, absoluteIndentDifference)) continue;
|
|
377
376
|
key = encodeIndentsKey(indentType, absoluteIndentDifference);
|
|
378
377
|
}
|
|
379
|
-
entry = indents.get(key);
|
|
380
|
-
|
|
378
|
+
const entry = indents.get(key);
|
|
379
|
+
indents.set(key, void 0 === entry ? [
|
|
381
380
|
1,
|
|
382
381
|
0
|
|
383
382
|
] : [
|
|
384
383
|
entry[0] + use,
|
|
385
384
|
entry[1] + weight
|
|
386
|
-
];
|
|
387
|
-
indents.set(key, entry);
|
|
385
|
+
]);
|
|
388
386
|
}
|
|
389
387
|
}
|
|
390
388
|
return indents;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "upgrade-rspeedy-canary",
|
|
3
|
-
"version": "0.11.3-canary-20250919-
|
|
3
|
+
"version": "0.11.3-canary-20250919-077fb22e",
|
|
4
4
|
"description": "Upgrade Rspeedy-related packages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -34,18 +34,18 @@
|
|
|
34
34
|
"@rsbuild/plugin-less": "1.5.0",
|
|
35
35
|
"@rsbuild/plugin-sass": "1.4.0",
|
|
36
36
|
"commander": "^13.1.0",
|
|
37
|
-
"detect-indent": "^7.0.
|
|
37
|
+
"detect-indent": "^7.0.2",
|
|
38
38
|
"memfs": "^4.38.2",
|
|
39
39
|
"picocolors": "^1.1.1",
|
|
40
40
|
"rsbuild-plugin-tailwindcss": "0.2.3",
|
|
41
41
|
"rslog": "^1.2.11",
|
|
42
42
|
"type-fest": "^4.41.0",
|
|
43
43
|
"@lynx-js/qrcode-rsbuild-plugin": "npm:@lynx-js/qrcode-rsbuild-plugin-canary@0.4.1",
|
|
44
|
-
"@lynx-js/react": "npm:@lynx-js/react-canary@0.114.0-canary-20250919-
|
|
45
|
-
"@lynx-js/
|
|
46
|
-
"@lynx-js/
|
|
47
|
-
"@lynx-js/web-core": "npm:@lynx-js/web-core-canary@0.17.0-canary-20250919-
|
|
48
|
-
"@lynx-js/web-elements": "npm:@lynx-js/web-elements-canary@0.8.7-canary-20250919-
|
|
44
|
+
"@lynx-js/react": "npm:@lynx-js/react-canary@0.114.0-canary-20250919-077fb22e",
|
|
45
|
+
"@lynx-js/react-rsbuild-plugin": "npm:@lynx-js/react-rsbuild-plugin-canary@0.11.0-canary-20250919-077fb22e",
|
|
46
|
+
"@lynx-js/rspeedy": "npm:@lynx-js/rspeedy-canary@0.11.3-canary-20250919-077fb22e",
|
|
47
|
+
"@lynx-js/web-core": "npm:@lynx-js/web-core-canary@0.17.0-canary-20250919-077fb22e",
|
|
48
|
+
"@lynx-js/web-elements": "npm:@lynx-js/web-elements-canary@0.8.7-canary-20250919-077fb22e"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|
|
51
51
|
"node": ">=18"
|