@bamboocss/vite 1.45.0 → 1.45.2

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
@@ -3361,7 +3361,25 @@ const bamboocss = (options = {}) => {
3361
3361
  added.push(module);
3362
3362
  }
3363
3363
  if (!added.length) return;
3364
- if (modules.length) return;
3364
+ /**
3365
+ * Gated on whether Vite's own pass will actually *reach* these modules, not merely on whether
3366
+ * it has something to propagate from.
3367
+ *
3368
+ * `propagateUpdate` stops at the first self-accepting module and never walks its importers.
3369
+ * So when every module Vite matched for the changed file accepts itself — which is what React
3370
+ * Fast Refresh makes of any file exporting a component — the consumers that folded a value out
3371
+ * of it are hard-invalidated here and then never announced to anybody. The browser keeps
3372
+ * running the module it already has, with the class string compiled from the *previous*
3373
+ * contents, until something else forces a reload. Editing a component that a sibling folds
3374
+ * from is the ordinary way to meet that.
3375
+ *
3376
+ * A module that does not accept itself does propagate outward, and `addWatchFile` has made
3377
+ * each consumer a direct importer, so Vite sends the same update by itself; naming them again
3378
+ * is the duplication measured in the doc comment above. Hence `some` rather than `length`:
3379
+ * one non-self-accepting module is enough for the walk to arrive. An empty list keeps its old
3380
+ * meaning — nothing to duplicate, so this is the only announcement there will be.
3381
+ */
3382
+ if (modules.some((module) => !module.isSelfAccepting)) return;
3365
3383
  return [...modules, ...added];
3366
3384
  };
3367
3385
  let ctx;
package/dist/index.mjs CHANGED
@@ -3331,7 +3331,25 @@ const bamboocss = (options = {}) => {
3331
3331
  added.push(module);
3332
3332
  }
3333
3333
  if (!added.length) return;
3334
- if (modules.length) return;
3334
+ /**
3335
+ * Gated on whether Vite's own pass will actually *reach* these modules, not merely on whether
3336
+ * it has something to propagate from.
3337
+ *
3338
+ * `propagateUpdate` stops at the first self-accepting module and never walks its importers.
3339
+ * So when every module Vite matched for the changed file accepts itself — which is what React
3340
+ * Fast Refresh makes of any file exporting a component — the consumers that folded a value out
3341
+ * of it are hard-invalidated here and then never announced to anybody. The browser keeps
3342
+ * running the module it already has, with the class string compiled from the *previous*
3343
+ * contents, until something else forces a reload. Editing a component that a sibling folds
3344
+ * from is the ordinary way to meet that.
3345
+ *
3346
+ * A module that does not accept itself does propagate outward, and `addWatchFile` has made
3347
+ * each consumer a direct importer, so Vite sends the same update by itself; naming them again
3348
+ * is the duplication measured in the doc comment above. Hence `some` rather than `length`:
3349
+ * one non-self-accepting module is enough for the walk to arrive. An empty list keeps its old
3350
+ * meaning — nothing to duplicate, so this is the only announcement there will be.
3351
+ */
3352
+ if (modules.some((module) => !module.isSelfAccepting)) return;
3335
3353
  return [...modules, ...added];
3336
3354
  };
3337
3355
  let ctx;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bamboocss/vite",
3
- "version": "1.45.0",
3
+ "version": "1.45.2",
4
4
  "description": "Vite integration for Bamboo CSS",
5
5
  "homepage": "https://bamboocss.com",
6
6
  "license": "MIT",
@@ -40,18 +40,18 @@
40
40
  "postcss": "8.5.26",
41
41
  "postcss-selector-parser": "7.1.5",
42
42
  "ts-morph": "28.0.0",
43
- "@bamboocss/config": "1.45.0",
44
- "@bamboocss/core": "1.45.0",
45
- "@bamboocss/extractor": "1.45.0",
46
- "@bamboocss/logger": "1.45.0",
47
- "@bamboocss/node": "1.45.0",
48
- "@bamboocss/shared": "1.45.0",
49
- "@bamboocss/types": "1.45.0"
43
+ "@bamboocss/config": "1.45.2",
44
+ "@bamboocss/core": "1.45.2",
45
+ "@bamboocss/extractor": "1.45.2",
46
+ "@bamboocss/node": "1.45.2",
47
+ "@bamboocss/logger": "1.45.2",
48
+ "@bamboocss/shared": "1.45.2",
49
+ "@bamboocss/types": "1.45.2"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@jridgewell/trace-mapping": "^0.3.31",
53
53
  "vite": "7.2.6",
54
- "@bamboocss/fixture": "1.45.0"
54
+ "@bamboocss/fixture": "1.45.2"
55
55
  },
56
56
  "peerDependencies": {
57
57
  "vite": ">=5"