@typestyles/build-runner 0.5.0 → 0.5.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
@@ -540,6 +540,25 @@ async function runTypestylesBuild({
540
540
  format: "cjs",
541
541
  target: "node18",
542
542
  external: ["typestyles"],
543
+ // Style registration calls (styles.component/class, createTypeStyles) are
544
+ // side-effect-only: the CSS they register into the global registry is the
545
+ // point, regardless of whether the returned classname function is ever
546
+ // read. esbuild's default tree shaking doesn't know that, so any
547
+ // consumer module reached only through an unread namespace/barrel import
548
+ // (or a package marked "sideEffects": false) can have its registration
549
+ // calls silently dropped as "unused". Disable tree shaking here so every
550
+ // registration in the extraction graph survives.
551
+ treeShaking: false,
552
+ // `treeShaking: false` only stops esbuild from pruning declarations
553
+ // *within* an already-included module. It's a separate esbuild behavior
554
+ // by the treeShaking option — that drops a plain bare import entirely
555
+ // (`import './some-lib'` with no binding at all) when it resolves to a
556
+ // module/package marked "sideEffects": false, before that module is ever
557
+ // considered for inclusion. A real extraction entry is exactly this
558
+ // shape: several side-effect-only imports, any one of which may point at
559
+ // a (correctly) tree-shakeable component library. Ignore both kinds of
560
+ // annotation so every import in the extraction graph is included.
561
+ ignoreAnnotations: true,
543
562
  stdin: {
544
563
  contents: importLines,
545
564
  resolveDir: root,
package/dist/index.js CHANGED
@@ -494,6 +494,25 @@ async function runTypestylesBuild({
494
494
  format: "cjs",
495
495
  target: "node18",
496
496
  external: ["typestyles"],
497
+ // Style registration calls (styles.component/class, createTypeStyles) are
498
+ // side-effect-only: the CSS they register into the global registry is the
499
+ // point, regardless of whether the returned classname function is ever
500
+ // read. esbuild's default tree shaking doesn't know that, so any
501
+ // consumer module reached only through an unread namespace/barrel import
502
+ // (or a package marked "sideEffects": false) can have its registration
503
+ // calls silently dropped as "unused". Disable tree shaking here so every
504
+ // registration in the extraction graph survives.
505
+ treeShaking: false,
506
+ // `treeShaking: false` only stops esbuild from pruning declarations
507
+ // *within* an already-included module. It's a separate esbuild behavior
508
+ // by the treeShaking option — that drops a plain bare import entirely
509
+ // (`import './some-lib'` with no binding at all) when it resolves to a
510
+ // module/package marked "sideEffects": false, before that module is ever
511
+ // considered for inclusion. A real extraction entry is exactly this
512
+ // shape: several side-effect-only imports, any one of which may point at
513
+ // a (correctly) tree-shakeable component library. Ignore both kinds of
514
+ // annotation so every import in the extraction graph is included.
515
+ ignoreAnnotations: true,
497
516
  stdin: {
498
517
  contents: importLines,
499
518
  resolveDir: root,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typestyles/build-runner",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Shared module execution utilities for typestyles build integrations",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -29,7 +29,8 @@
29
29
  "eslint": "^9.39.2",
30
30
  "tsup": "^8.0.0",
31
31
  "typescript": "^5.4.0",
32
- "vitest": "^3.0.0"
32
+ "vitest": "^3.0.0",
33
+ "typestyles": "0.8.2"
33
34
  },
34
35
  "license": "Apache-2.0",
35
36
  "repository": {