Skip to content

Commit 640d464

Browse files
committed
refactor(shared): keep cache-paths internal (drop public subpath export)
The cache-path resolvers are an internal monorepo helper, not part of the shared package's public API. The previous commit exposed them as a "./cli/commands/cache-paths" export (a side effect of adding a tsdown entry, which makes the exports plugin generate the mapping) — leaking shared's internal file layout for no benefit. appkit resolves the import via its tsconfig `paths` alias and bundles shared inline (noExternal), so the export is not load-bearing: dropping the tsdown entry (and thus the generated export) keeps typecheck, appkit build, vitest, and docs:build all green. shared stays private; cache-paths stays internal. xavier loop: iteration 7 -- keep cache-paths internal Co-authored-by: Isaac Signed-off-by: Atila Fassina <atila@fassina.eu>
1 parent bccf630 commit 640d464

2 files changed

Lines changed: 1 addition & 14 deletions

File tree

packages/shared/package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
"development": "./src/cli/index.ts",
1616
"default": "./dist/cli/index.js"
1717
},
18-
"./cli/commands/cache-paths": {
19-
"development": "./src/cli/commands/cache-paths.ts",
20-
"default": "./dist/cli/commands/cache-paths.js"
21-
},
2218
"./package.json": "./package.json"
2319
},
2420
"scripts": {
@@ -39,7 +35,6 @@
3935
"exports": {
4036
".": "./dist/index.js",
4137
"./cli": "./dist/cli/index.js",
42-
"./cli/commands/cache-paths": "./dist/cli/commands/cache-paths.js",
4338
"./package.json": "./package.json"
4439
}
4540
},

packages/shared/tsdown.config.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,7 @@ import { defineConfig } from "tsdown";
22

33
export default defineConfig({
44
name: "shared",
5-
entry: [
6-
"src/index.ts",
7-
"src/cli/index.ts",
8-
// Node-only path resolvers, exposed as the "shared/cache-paths" subpath so
9-
// appkit can import them without pulling node: builtins into the
10-
// client-safe root barrel. Must be a tsdown entry or the exports plugin
11-
// (exports.devExports below) drops the "./cache-paths" export on rebuild.
12-
"src/cli/commands/cache-paths.ts",
13-
],
5+
entry: ["src/index.ts", "src/cli/index.ts"],
146
outDir: "dist",
157
minify: false,
168
format: "esm",

0 commit comments

Comments
 (0)