@bamboocss/node 1.40.0 → 1.41.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 +22 -1
- package/dist/index.d.cts +18 -0
- package/dist/index.d.mts +18 -0
- package/dist/index.mjs +22 -1
- package/package.json +12 -12
package/dist/index.cjs
CHANGED
|
@@ -3000,8 +3000,29 @@ var Builder = class {
|
|
|
3000
3000
|
ctx.project.reloadSourceFiles();
|
|
3001
3001
|
}
|
|
3002
3002
|
};
|
|
3003
|
+
/**
|
|
3004
|
+
* Write the generated `styled-system`, so an integration can be a project's only codegen.
|
|
3005
|
+
*
|
|
3006
|
+
* The first call writes everything. That looks like the redundant half — a project that ran
|
|
3007
|
+
* `bamboo codegen` already has the files — but it is the only call that ever mattered, and it
|
|
3008
|
+
* used to do nothing: the guard below read `hasEmitted` before it was ever set, so the first
|
|
3009
|
+
* call fell straight through to setting the flag and the artifacts were written only after a
|
|
3010
|
+
* *subsequent* config change. A clone with no `styled-system/` on disk therefore got none from
|
|
3011
|
+
* `vite dev` or `vite build` either, which is what the callers exist to guarantee — the dev
|
|
3012
|
+
* server answered with an error overlay, and the build failed to resolve `styled-system/css`
|
|
3013
|
+
* from the first module that imports it. Every project has had to run the CLI first and pass
|
|
3014
|
+
* for a build step, which on one react-router app is 585 ms of a 2,242 ms build, ~97% of it
|
|
3015
|
+
* spent loading modules to do 21 ms of work.
|
|
3016
|
+
*
|
|
3017
|
+
* Later calls stay narrow, which is what the guard was reaching for. A watch rebuild re-emits
|
|
3018
|
+
* only the artifacts a config change affected, and a rebuild that changed no config writes
|
|
3019
|
+
* nothing at all.
|
|
3020
|
+
*/
|
|
3003
3021
|
async emit() {
|
|
3004
|
-
if (this.hasEmitted
|
|
3022
|
+
if (!this.hasEmitted) {
|
|
3023
|
+
_bamboocss_logger.logger.debug("builder", "Emit artifacts");
|
|
3024
|
+
await codegen(this.getContextOrThrow());
|
|
3025
|
+
} else if (this.affecteds?.hasConfigChanged) {
|
|
3005
3026
|
_bamboocss_logger.logger.debug("builder", "Emit artifacts after config change");
|
|
3006
3027
|
await codegen(this.getContextOrThrow(), Array.from(this.affecteds.artifacts));
|
|
3007
3028
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -229,6 +229,24 @@ declare class Builder {
|
|
|
229
229
|
configPath?: string;
|
|
230
230
|
cwd?: string;
|
|
231
231
|
}) => Promise<BambooContext | undefined>;
|
|
232
|
+
/**
|
|
233
|
+
* Write the generated `styled-system`, so an integration can be a project's only codegen.
|
|
234
|
+
*
|
|
235
|
+
* The first call writes everything. That looks like the redundant half — a project that ran
|
|
236
|
+
* `bamboo codegen` already has the files — but it is the only call that ever mattered, and it
|
|
237
|
+
* used to do nothing: the guard below read `hasEmitted` before it was ever set, so the first
|
|
238
|
+
* call fell straight through to setting the flag and the artifacts were written only after a
|
|
239
|
+
* *subsequent* config change. A clone with no `styled-system/` on disk therefore got none from
|
|
240
|
+
* `vite dev` or `vite build` either, which is what the callers exist to guarantee — the dev
|
|
241
|
+
* server answered with an error overlay, and the build failed to resolve `styled-system/css`
|
|
242
|
+
* from the first module that imports it. Every project has had to run the CLI first and pass
|
|
243
|
+
* for a build step, which on one react-router app is 585 ms of a 2,242 ms build, ~97% of it
|
|
244
|
+
* spent loading modules to do 21 ms of work.
|
|
245
|
+
*
|
|
246
|
+
* Later calls stay narrow, which is what the guard was reaching for. A watch rebuild re-emits
|
|
247
|
+
* only the artifacts a config change affected, and a rebuild that changed no config writes
|
|
248
|
+
* nothing at all.
|
|
249
|
+
*/
|
|
232
250
|
emit(): Promise<void>;
|
|
233
251
|
setupContext: (options: SetupContextOptions) => Promise<BambooContext>;
|
|
234
252
|
getContextOrThrow: () => BambooContext;
|
package/dist/index.d.mts
CHANGED
|
@@ -229,6 +229,24 @@ declare class Builder {
|
|
|
229
229
|
configPath?: string;
|
|
230
230
|
cwd?: string;
|
|
231
231
|
}) => Promise<BambooContext | undefined>;
|
|
232
|
+
/**
|
|
233
|
+
* Write the generated `styled-system`, so an integration can be a project's only codegen.
|
|
234
|
+
*
|
|
235
|
+
* The first call writes everything. That looks like the redundant half — a project that ran
|
|
236
|
+
* `bamboo codegen` already has the files — but it is the only call that ever mattered, and it
|
|
237
|
+
* used to do nothing: the guard below read `hasEmitted` before it was ever set, so the first
|
|
238
|
+
* call fell straight through to setting the flag and the artifacts were written only after a
|
|
239
|
+
* *subsequent* config change. A clone with no `styled-system/` on disk therefore got none from
|
|
240
|
+
* `vite dev` or `vite build` either, which is what the callers exist to guarantee — the dev
|
|
241
|
+
* server answered with an error overlay, and the build failed to resolve `styled-system/css`
|
|
242
|
+
* from the first module that imports it. Every project has had to run the CLI first and pass
|
|
243
|
+
* for a build step, which on one react-router app is 585 ms of a 2,242 ms build, ~97% of it
|
|
244
|
+
* spent loading modules to do 21 ms of work.
|
|
245
|
+
*
|
|
246
|
+
* Later calls stay narrow, which is what the guard was reaching for. A watch rebuild re-emits
|
|
247
|
+
* only the artifacts a config change affected, and a rebuild that changed no config writes
|
|
248
|
+
* nothing at all.
|
|
249
|
+
*/
|
|
232
250
|
emit(): Promise<void>;
|
|
233
251
|
setupContext: (options: SetupContextOptions) => Promise<BambooContext>;
|
|
234
252
|
getContextOrThrow: () => BambooContext;
|
package/dist/index.mjs
CHANGED
|
@@ -2986,8 +2986,29 @@ var Builder = class {
|
|
|
2986
2986
|
ctx.project.reloadSourceFiles();
|
|
2987
2987
|
}
|
|
2988
2988
|
};
|
|
2989
|
+
/**
|
|
2990
|
+
* Write the generated `styled-system`, so an integration can be a project's only codegen.
|
|
2991
|
+
*
|
|
2992
|
+
* The first call writes everything. That looks like the redundant half — a project that ran
|
|
2993
|
+
* `bamboo codegen` already has the files — but it is the only call that ever mattered, and it
|
|
2994
|
+
* used to do nothing: the guard below read `hasEmitted` before it was ever set, so the first
|
|
2995
|
+
* call fell straight through to setting the flag and the artifacts were written only after a
|
|
2996
|
+
* *subsequent* config change. A clone with no `styled-system/` on disk therefore got none from
|
|
2997
|
+
* `vite dev` or `vite build` either, which is what the callers exist to guarantee — the dev
|
|
2998
|
+
* server answered with an error overlay, and the build failed to resolve `styled-system/css`
|
|
2999
|
+
* from the first module that imports it. Every project has had to run the CLI first and pass
|
|
3000
|
+
* for a build step, which on one react-router app is 585 ms of a 2,242 ms build, ~97% of it
|
|
3001
|
+
* spent loading modules to do 21 ms of work.
|
|
3002
|
+
*
|
|
3003
|
+
* Later calls stay narrow, which is what the guard was reaching for. A watch rebuild re-emits
|
|
3004
|
+
* only the artifacts a config change affected, and a rebuild that changed no config writes
|
|
3005
|
+
* nothing at all.
|
|
3006
|
+
*/
|
|
2989
3007
|
async emit() {
|
|
2990
|
-
if (this.hasEmitted
|
|
3008
|
+
if (!this.hasEmitted) {
|
|
3009
|
+
logger.debug("builder", "Emit artifacts");
|
|
3010
|
+
await codegen(this.getContextOrThrow());
|
|
3011
|
+
} else if (this.affecteds?.hasConfigChanged) {
|
|
2991
3012
|
logger.debug("builder", "Emit artifacts after config change");
|
|
2992
3013
|
await codegen(this.getContextOrThrow(), Array.from(this.affecteds.artifacts));
|
|
2993
3014
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bamboocss/node",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.41.0",
|
|
4
4
|
"description": "The core css bamboo library",
|
|
5
5
|
"homepage": "https://bamboocss.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -52,17 +52,17 @@
|
|
|
52
52
|
"postcss": "8.5.26",
|
|
53
53
|
"ts-morph": "28.0.0",
|
|
54
54
|
"ts-pattern": "5.9.0",
|
|
55
|
-
"@bamboocss/config": "1.
|
|
56
|
-
"@bamboocss/core": "1.
|
|
57
|
-
"@bamboocss/generator": "1.
|
|
58
|
-
"@bamboocss/logger": "1.
|
|
59
|
-
"@bamboocss/parser": "1.
|
|
60
|
-
"@bamboocss/plugin-svelte": "1.
|
|
61
|
-
"@bamboocss/plugin-vue": "1.
|
|
62
|
-
"@bamboocss/reporter": "1.
|
|
63
|
-
"@bamboocss/shared": "1.
|
|
64
|
-
"@bamboocss/token-dictionary": "1.
|
|
65
|
-
"@bamboocss/types": "1.
|
|
55
|
+
"@bamboocss/config": "1.41.0",
|
|
56
|
+
"@bamboocss/core": "1.41.0",
|
|
57
|
+
"@bamboocss/generator": "1.41.0",
|
|
58
|
+
"@bamboocss/logger": "1.41.0",
|
|
59
|
+
"@bamboocss/parser": "1.41.0",
|
|
60
|
+
"@bamboocss/plugin-svelte": "1.41.0",
|
|
61
|
+
"@bamboocss/plugin-vue": "1.41.0",
|
|
62
|
+
"@bamboocss/reporter": "1.41.0",
|
|
63
|
+
"@bamboocss/shared": "1.41.0",
|
|
64
|
+
"@bamboocss/token-dictionary": "1.41.0",
|
|
65
|
+
"@bamboocss/types": "1.41.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@types/fs-extra": "11.0.4",
|