@bamboocss/node 1.60.0 → 1.60.1

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 CHANGED
@@ -5986,10 +5986,17 @@ var Builder = class {
5986
5986
  * Later calls stay narrow, which is what the guard was reaching for. A watch rebuild re-emits
5987
5987
  * only the artifacts a config change affected, and a rebuild that changed no config writes
5988
5988
  * nothing at all.
5989
+ *
5990
+ * Unless the output directory is gone: the flag says this builder wrote the artifacts once, not
5991
+ * that they are still there. A process running several builds with the same plugin instances,
5992
+ * and cleaning `styled-system/` between them, failed every build after the first on
5993
+ * `Could not load styled-system/css`.
5989
5994
  */
5990
5995
  async emit() {
5991
- if (!this.hasEmitted) {
5992
- _bamboocss_logger.logger.debug("builder", "Emit artifacts");
5996
+ const ctx = this.context;
5997
+ const gone = this.hasEmitted && ctx !== void 0 && !(0, node_fs.existsSync)(ctx.runtime.path.join(...ctx.paths.root));
5998
+ if (!this.hasEmitted || gone) {
5999
+ _bamboocss_logger.logger.debug("builder", gone ? "Emit artifacts, the output directory having been removed" : "Emit artifacts");
5993
6000
  await codegen(this.getContextOrThrow());
5994
6001
  } else if (this.affecteds?.hasConfigChanged) {
5995
6002
  _bamboocss_logger.logger.debug("builder", "Emit artifacts after config change");
package/dist/index.d.cts CHANGED
@@ -1023,6 +1023,11 @@ declare class Builder {
1023
1023
  * Later calls stay narrow, which is what the guard was reaching for. A watch rebuild re-emits
1024
1024
  * only the artifacts a config change affected, and a rebuild that changed no config writes
1025
1025
  * nothing at all.
1026
+ *
1027
+ * Unless the output directory is gone: the flag says this builder wrote the artifacts once, not
1028
+ * that they are still there. A process running several builds with the same plugin instances,
1029
+ * and cleaning `styled-system/` between them, failed every build after the first on
1030
+ * `Could not load styled-system/css`.
1026
1031
  */
1027
1032
  emit(): Promise<void>;
1028
1033
  setupContext: (options: SetupContextOptions) => Promise<BambooContext>;
package/dist/index.d.mts CHANGED
@@ -1023,6 +1023,11 @@ declare class Builder {
1023
1023
  * Later calls stay narrow, which is what the guard was reaching for. A watch rebuild re-emits
1024
1024
  * only the artifacts a config change affected, and a rebuild that changed no config writes
1025
1025
  * nothing at all.
1026
+ *
1027
+ * Unless the output directory is gone: the flag says this builder wrote the artifacts once, not
1028
+ * that they are still there. A process running several builds with the same plugin instances,
1029
+ * and cleaning `styled-system/` between them, failed every build after the first on
1030
+ * `Could not load styled-system/css`.
1026
1031
  */
1027
1032
  emit(): Promise<void>;
1028
1033
  setupContext: (options: SetupContextOptions) => Promise<BambooContext>;
package/dist/index.mjs CHANGED
@@ -5974,10 +5974,17 @@ var Builder = class {
5974
5974
  * Later calls stay narrow, which is what the guard was reaching for. A watch rebuild re-emits
5975
5975
  * only the artifacts a config change affected, and a rebuild that changed no config writes
5976
5976
  * nothing at all.
5977
+ *
5978
+ * Unless the output directory is gone: the flag says this builder wrote the artifacts once, not
5979
+ * that they are still there. A process running several builds with the same plugin instances,
5980
+ * and cleaning `styled-system/` between them, failed every build after the first on
5981
+ * `Could not load styled-system/css`.
5977
5982
  */
5978
5983
  async emit() {
5979
- if (!this.hasEmitted) {
5980
- logger.debug("builder", "Emit artifacts");
5984
+ const ctx = this.context;
5985
+ const gone = this.hasEmitted && ctx !== void 0 && !existsSync(ctx.runtime.path.join(...ctx.paths.root));
5986
+ if (!this.hasEmitted || gone) {
5987
+ logger.debug("builder", gone ? "Emit artifacts, the output directory having been removed" : "Emit artifacts");
5981
5988
  await codegen(this.getContextOrThrow());
5982
5989
  } else if (this.affecteds?.hasConfigChanged) {
5983
5990
  logger.debug("builder", "Emit artifacts after config change");
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bamboocss/node",
3
- "version": "1.60.0",
3
+ "version": "1.60.1",
4
4
  "description": "The core css bamboo library",
5
5
  "homepage": "https://bamboocss.com",
6
6
  "license": "MIT",
@@ -60,16 +60,16 @@
60
60
  "pkg-types": "2.3.0",
61
61
  "pluralize": "8.0.0",
62
62
  "ts-pattern": "5.9.0",
63
- "@bamboocss/config": "1.60.0",
64
- "@bamboocss/core": "1.60.0",
65
- "@bamboocss/generator": "1.60.0",
66
- "@bamboocss/logger": "1.60.0",
67
- "@bamboocss/plugin-svelte": "1.60.0",
68
- "@bamboocss/plugin-vue": "1.60.0",
69
- "@bamboocss/reporter": "1.60.0",
70
- "@bamboocss/shared": "1.60.0",
71
- "@bamboocss/token-dictionary": "1.60.0",
72
- "@bamboocss/types": "1.60.0"
63
+ "@bamboocss/config": "1.60.1",
64
+ "@bamboocss/core": "1.60.1",
65
+ "@bamboocss/generator": "1.60.1",
66
+ "@bamboocss/logger": "1.60.1",
67
+ "@bamboocss/plugin-svelte": "1.60.1",
68
+ "@bamboocss/plugin-vue": "1.60.1",
69
+ "@bamboocss/reporter": "1.60.1",
70
+ "@bamboocss/shared": "1.60.1",
71
+ "@bamboocss/token-dictionary": "1.60.1",
72
+ "@bamboocss/types": "1.60.1"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@astrojs/compiler": "3.0.1",
@@ -77,7 +77,7 @@
77
77
  "@types/fs-extra": "11.0.4",
78
78
  "@types/picomatch": "4.0.2",
79
79
  "boxen": "8.0.1",
80
- "@bamboocss/native-extractor": "1.60.0"
80
+ "@bamboocss/native-extractor": "1.60.1"
81
81
  },
82
82
  "peerDependencies": {
83
83
  "@astrojs/compiler": ">=2",