@theholocron/tsdown-config 8.9.0-alpha.1 → 8.9.0-alpha.4

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.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { cli } from "./presets/cli.js";
2
- import { library } from "./presets/library.js";
2
+ import { t as library } from "./library-CsBMxOb0.js";
3
3
  export { cli, library };
@@ -12,6 +12,10 @@ import { UserConfig } from "tsdown";
12
12
  * before final emit -- fragile (a future import could reach code that
13
13
  * doesn't shake away) and slow (~15s vs sub-second for a properly
14
14
  * externalized build).
15
+ *
16
+ * After every successful build, `onSuccess` fails it if an emitted bundle is
17
+ * over 500KB -- the symptom of a dependency that failed to externalize
18
+ * (holocron#762). A caller's own `onSuccess` (function or shell command) runs after the check.
15
19
  */
16
20
  export declare function library(options?: UserConfig): UserConfig;
17
21
  /** Ready-to-use config for packages that need no customisation. */
@@ -1,36 +1 @@
1
- import { n as resolveOutDir, t as resolveEntry } from "../resolve-entry-DJ2WMho2.js";
2
- import { defineConfig } from "tsdown";
3
- // presets/library.ts
4
- /**
5
- * tsdown preset for a published ESM library.
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).
17
- */
18
- function library(options = {}) {
19
- const merged = {
20
- entry: ["src/index.ts"],
21
- outDir: "dist",
22
- format: "esm",
23
- dts: true,
24
- clean: true,
25
- deps: { neverBundle: true },
26
- ...options
27
- };
28
- return defineConfig({
29
- ...merged,
30
- entry: resolveEntry(merged.entry),
31
- outDir: resolveOutDir(merged.outDir ?? "dist")
32
- });
33
- }
34
- /** Ready-to-use config for packages that need no customisation. */
35
- var library_default = library();
36
- export { library_default as default, library };
1
+ export { n as default, t as library } from "../library-CsBMxOb0.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/tsdown-config",
3
- "version": "8.9.0-alpha.1",
3
+ "version": "8.9.0-alpha.4",
4
4
  "description": "Shared tsdown configurations for @theholocron packages.",
5
5
  "keywords": [
6
6
  "tsdown",
@@ -46,8 +46,8 @@
46
46
  "tsdown": "^0.23.3",
47
47
  "typescript": "^5.9.3",
48
48
  "vitest": "^5.0.5",
49
- "@theholocron/tsconfig": "8.9.0-alpha.1",
50
- "@theholocron/vitest-config": "8.9.0-alpha.1"
49
+ "@theholocron/tsconfig": "8.9.0-alpha.4",
50
+ "@theholocron/vitest-config": "8.9.0-alpha.4"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "tsdown": "^0"