@theholocron/tsdown-config 8.5.1 → 8.5.3

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.
@@ -2,7 +2,17 @@ import { UserConfig } from "tsdown";
2
2
  //#region presets/library.d.ts
3
3
  /**
4
4
  * tsdown preset for a published ESM library.
5
- * Single entry point, generates types, does not bundle @theholocron/* peers.
5
+ * Single entry point, generates types, externalizes every dependency.
6
+ *
7
+ * `neverBundle: true` externalizes every bare-specifier import, not just
8
+ * `@theholocron/*` peers -- the narrower regex this used to carry only
9
+ * ever protected org packages, so a package with real third-party runtime
10
+ * deps (e.g. google-client's googleapis/google-auth-library) got them
11
+ * bundled by default. Confirmed harmless there today only because
12
+ * rolldown's tree-shaking happened to strip the unreachable code back out
13
+ * before final emit -- fragile (a future import could reach code that
14
+ * doesn't shake away) and slow (~15s vs sub-second for a properly
15
+ * externalized build).
6
16
  */
7
17
  declare function library(options?: UserConfig): UserConfig;
8
18
  /** Ready-to-use config for packages that need no customisation. */
@@ -3,7 +3,17 @@ import { defineConfig } from "tsdown";
3
3
  //#region presets/library.ts
4
4
  /**
5
5
  * tsdown preset for a published ESM library.
6
- * Single entry point, generates types, does not bundle @theholocron/* peers.
6
+ * Single entry point, generates types, externalizes every dependency.
7
+ *
8
+ * `neverBundle: true` externalizes every bare-specifier import, not just
9
+ * `@theholocron/*` peers -- the narrower regex this used to carry only
10
+ * ever protected org packages, so a package with real third-party runtime
11
+ * deps (e.g. google-client's googleapis/google-auth-library) got them
12
+ * bundled by default. Confirmed harmless there today only because
13
+ * rolldown's tree-shaking happened to strip the unreachable code back out
14
+ * before final emit -- fragile (a future import could reach code that
15
+ * doesn't shake away) and slow (~15s vs sub-second for a properly
16
+ * externalized build).
7
17
  */
8
18
  function library(options = {}) {
9
19
  const merged = {
@@ -11,7 +21,7 @@ function library(options = {}) {
11
21
  format: "esm",
12
22
  dts: true,
13
23
  clean: true,
14
- deps: { neverBundle: [/^@theholocron\//] },
24
+ deps: { neverBundle: true },
15
25
  ...options
16
26
  };
17
27
  return defineConfig({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/tsdown-config",
3
- "version": "8.5.1",
3
+ "version": "8.5.3",
4
4
  "description": "Shared tsdown configurations for @theholocron packages.",
5
5
  "homepage": "https://github.com/theholocron/configs/tree/main/packages/tsdown-config#readme",
6
6
  "bugs": "https://github.com/theholocron/configs/issues",
@@ -25,8 +25,8 @@
25
25
  "tsdown": "^0.22.14",
26
26
  "typescript": "^5.9.3",
27
27
  "vitest": "^4.1.10",
28
- "@theholocron/tsconfig": "8.5.1",
29
- "@theholocron/vitest-config": "8.5.1"
28
+ "@theholocron/tsconfig": "8.5.3",
29
+ "@theholocron/vitest-config": "8.5.3"
30
30
  },
31
31
  "exports": {
32
32
  ".": {