@bamboocss/parser 1.52.0 → 1.53.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/dist/index.cjs +25 -0
- package/dist/index.d.cts +13 -0
- package/dist/index.d.mts +13 -0
- package/dist/index.mjs +25 -0
- package/package.json +11 -11
package/dist/index.cjs
CHANGED
|
@@ -2428,6 +2428,31 @@ var Project = class {
|
|
|
2428
2428
|
if (error?.code !== "ENOENT") throw error;
|
|
2429
2429
|
}
|
|
2430
2430
|
};
|
|
2431
|
+
/**
|
|
2432
|
+
* Install many sources at once, for the walk to find rather than for anything to parse.
|
|
2433
|
+
*
|
|
2434
|
+
* One membership change for the batch instead of one per file. That distinction is the whole
|
|
2435
|
+
* point: a file arriving on its own rewrites the synthesized config and makes the compiler
|
|
2436
|
+
* re-derive its program, which measured 409ms on a real application — so six hundred modules
|
|
2437
|
+
* reached by resolution cost four minutes that one bulk update would not.
|
|
2438
|
+
*
|
|
2439
|
+
* Files already held are skipped rather than overwritten, so this cannot displace text a
|
|
2440
|
+
* bundler installed or a hook rewrote. Nothing here is parsed; `parseSourceFile` still decides
|
|
2441
|
+
* that, and a caller that wants a file *extracted* puts it in `include`.
|
|
2442
|
+
*/
|
|
2443
|
+
addSourceFiles = (entries) => {
|
|
2444
|
+
this.#assertNotLoading();
|
|
2445
|
+
this.#ensureSourceFiles();
|
|
2446
|
+
const installed = [];
|
|
2447
|
+
for (const [filePath, content] of entries) {
|
|
2448
|
+
if (this.project.has(filePath)) continue;
|
|
2449
|
+
installed.push([filePath, content]);
|
|
2450
|
+
this.removedSourcePaths.delete(this.normalizePath(filePath));
|
|
2451
|
+
}
|
|
2452
|
+
if (!installed.length) return;
|
|
2453
|
+
this.project.addSourceFiles(installed);
|
|
2454
|
+
this.invalidate(true);
|
|
2455
|
+
};
|
|
2431
2456
|
addSourceFile = (filePath, content, options = {}) => {
|
|
2432
2457
|
this.#assertNotLoading();
|
|
2433
2458
|
this.#ensureSourceFiles();
|
package/dist/index.d.cts
CHANGED
|
@@ -641,6 +641,19 @@ declare class Project {
|
|
|
641
641
|
getResolutionConfigurationFiles: (filePath: string, targets?: Iterable<string>, previous?: Iterable<string>) => readonly string[];
|
|
642
642
|
createSourceFile: (filePath: string) => SourceFile;
|
|
643
643
|
createSourceFiles: () => void;
|
|
644
|
+
/**
|
|
645
|
+
* Install many sources at once, for the walk to find rather than for anything to parse.
|
|
646
|
+
*
|
|
647
|
+
* One membership change for the batch instead of one per file. That distinction is the whole
|
|
648
|
+
* point: a file arriving on its own rewrites the synthesized config and makes the compiler
|
|
649
|
+
* re-derive its program, which measured 409ms on a real application — so six hundred modules
|
|
650
|
+
* reached by resolution cost four minutes that one bulk update would not.
|
|
651
|
+
*
|
|
652
|
+
* Files already held are skipped rather than overwritten, so this cannot displace text a
|
|
653
|
+
* bundler installed or a hook rewrote. Nothing here is parsed; `parseSourceFile` still decides
|
|
654
|
+
* that, and a caller that wants a file *extracted* puts it in `include`.
|
|
655
|
+
*/
|
|
656
|
+
addSourceFiles: (entries: Iterable<readonly [string, string]>) => void;
|
|
644
657
|
addSourceFile: (filePath: string, content: string, options?: AddSourceFileOptions) => SourceFile;
|
|
645
658
|
/** Claim or release compiler ownership of one source, in the ledger's own spelling. */
|
|
646
659
|
private markAuxiliary;
|
package/dist/index.d.mts
CHANGED
|
@@ -641,6 +641,19 @@ declare class Project {
|
|
|
641
641
|
getResolutionConfigurationFiles: (filePath: string, targets?: Iterable<string>, previous?: Iterable<string>) => readonly string[];
|
|
642
642
|
createSourceFile: (filePath: string) => SourceFile;
|
|
643
643
|
createSourceFiles: () => void;
|
|
644
|
+
/**
|
|
645
|
+
* Install many sources at once, for the walk to find rather than for anything to parse.
|
|
646
|
+
*
|
|
647
|
+
* One membership change for the batch instead of one per file. That distinction is the whole
|
|
648
|
+
* point: a file arriving on its own rewrites the synthesized config and makes the compiler
|
|
649
|
+
* re-derive its program, which measured 409ms on a real application — so six hundred modules
|
|
650
|
+
* reached by resolution cost four minutes that one bulk update would not.
|
|
651
|
+
*
|
|
652
|
+
* Files already held are skipped rather than overwritten, so this cannot displace text a
|
|
653
|
+
* bundler installed or a hook rewrote. Nothing here is parsed; `parseSourceFile` still decides
|
|
654
|
+
* that, and a caller that wants a file *extracted* puts it in `include`.
|
|
655
|
+
*/
|
|
656
|
+
addSourceFiles: (entries: Iterable<readonly [string, string]>) => void;
|
|
644
657
|
addSourceFile: (filePath: string, content: string, options?: AddSourceFileOptions) => SourceFile;
|
|
645
658
|
/** Claim or release compiler ownership of one source, in the ledger's own spelling. */
|
|
646
659
|
private markAuxiliary;
|
package/dist/index.mjs
CHANGED
|
@@ -2427,6 +2427,31 @@ var Project = class {
|
|
|
2427
2427
|
if (error?.code !== "ENOENT") throw error;
|
|
2428
2428
|
}
|
|
2429
2429
|
};
|
|
2430
|
+
/**
|
|
2431
|
+
* Install many sources at once, for the walk to find rather than for anything to parse.
|
|
2432
|
+
*
|
|
2433
|
+
* One membership change for the batch instead of one per file. That distinction is the whole
|
|
2434
|
+
* point: a file arriving on its own rewrites the synthesized config and makes the compiler
|
|
2435
|
+
* re-derive its program, which measured 409ms on a real application — so six hundred modules
|
|
2436
|
+
* reached by resolution cost four minutes that one bulk update would not.
|
|
2437
|
+
*
|
|
2438
|
+
* Files already held are skipped rather than overwritten, so this cannot displace text a
|
|
2439
|
+
* bundler installed or a hook rewrote. Nothing here is parsed; `parseSourceFile` still decides
|
|
2440
|
+
* that, and a caller that wants a file *extracted* puts it in `include`.
|
|
2441
|
+
*/
|
|
2442
|
+
addSourceFiles = (entries) => {
|
|
2443
|
+
this.#assertNotLoading();
|
|
2444
|
+
this.#ensureSourceFiles();
|
|
2445
|
+
const installed = [];
|
|
2446
|
+
for (const [filePath, content] of entries) {
|
|
2447
|
+
if (this.project.has(filePath)) continue;
|
|
2448
|
+
installed.push([filePath, content]);
|
|
2449
|
+
this.removedSourcePaths.delete(this.normalizePath(filePath));
|
|
2450
|
+
}
|
|
2451
|
+
if (!installed.length) return;
|
|
2452
|
+
this.project.addSourceFiles(installed);
|
|
2453
|
+
this.invalidate(true);
|
|
2454
|
+
};
|
|
2430
2455
|
addSourceFile = (filePath, content, options = {}) => {
|
|
2431
2456
|
this.#assertNotLoading();
|
|
2432
2457
|
this.#ensureSourceFiles();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bamboocss/parser",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.53.0",
|
|
4
4
|
"description": "The static parser for bamboo css",
|
|
5
5
|
"homepage": "https://bamboocss.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,20 +33,20 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"ts-pattern": "5.9.0",
|
|
36
|
-
"@bamboocss/config": "^1.
|
|
37
|
-
"@bamboocss/core": "^1.
|
|
38
|
-
"@bamboocss/extractor": "1.
|
|
39
|
-
"@bamboocss/logger": "1.
|
|
40
|
-
"@bamboocss/shared": "1.
|
|
41
|
-
"@bamboocss/ts-ast": "1.
|
|
42
|
-
"@bamboocss/types": "1.
|
|
36
|
+
"@bamboocss/config": "^1.53.0",
|
|
37
|
+
"@bamboocss/core": "^1.53.0",
|
|
38
|
+
"@bamboocss/extractor": "1.53.0",
|
|
39
|
+
"@bamboocss/logger": "1.53.0",
|
|
40
|
+
"@bamboocss/shared": "1.53.0",
|
|
41
|
+
"@bamboocss/ts-ast": "1.53.0",
|
|
42
|
+
"@bamboocss/types": "1.53.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@typescript/api": "npm:typescript@7.1.0-dev.20260826.1",
|
|
46
46
|
"ts-morph": "28.0.0",
|
|
47
|
-
"@bamboocss/generator": "1.
|
|
48
|
-
"@bamboocss/plugin-svelte": "1.
|
|
49
|
-
"@bamboocss/plugin-vue": "1.
|
|
47
|
+
"@bamboocss/generator": "1.53.0",
|
|
48
|
+
"@bamboocss/plugin-svelte": "1.53.0",
|
|
49
|
+
"@bamboocss/plugin-vue": "1.53.0"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "tsdown src/index.ts --format=esm,cjs --dts",
|