Skip to content

Commit fa4cf84

Browse files
committed
fix(shared): restore cache-paths subpath export (required at runtime)
Reverts the previous "keep cache-paths internal" change, which broke the Playground Integration Tests with ERR_PACKAGE_PATH_NOT_EXPORTED. The export IS load-bearing on a path the earlier verification missed: dev-playground runs its server via `tsx` under the `development` export condition, so @databricks/appkit resolves to SOURCE, whose `import "shared/cli/commands/cache-paths"` is a bare cross-package specifier that tsx resolves through shared's package.json exports map at runtime — tsconfig `paths` do not apply there. Without the export the server never boots and Playwright times out. Re-add the tsdown entry (which regenerates the export) with a comment explaining the runtime dependency so it isn't dropped again. The export is monorepo-internal only: shared is private and appkit bundles it inline (noExternal), so it never reaches published-appkit consumers. Verified by booting the dev-playground server under the development condition (starts clean, no export error). xavier loop: iteration 8 -- restore runtime-required cache-paths export Co-authored-by: Isaac Signed-off-by: Atila Fassina <atila@fassina.eu>
1 parent 640d464 commit fa4cf84

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

packages/shared/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
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+
},
1822
"./package.json": "./package.json"
1923
},
2024
"scripts": {
@@ -35,6 +39,7 @@
3539
"exports": {
3640
".": "./dist/index.js",
3741
"./cli": "./dist/cli/index.js",
42+
"./cli/commands/cache-paths": "./dist/cli/commands/cache-paths.js",
3843
"./package.json": "./package.json"
3944
}
4045
},

packages/shared/tsdown.config.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,17 @@ import { defineConfig } from "tsdown";
22

33
export default defineConfig({
44
name: "shared",
5-
entry: ["src/index.ts", "src/cli/index.ts"],
5+
entry: [
6+
"src/index.ts",
7+
"src/cli/index.ts",
8+
// Node-only path resolvers. Needs its own entry (→ generated
9+
// "./cli/commands/cache-paths" export) because appkit imports it as a bare
10+
// cross-package specifier that tsx resolves via shared's exports map at
11+
// runtime (dev-playground's `development`-condition source run) — tsconfig
12+
// paths don't apply there. Kept OUT of the client-safe root barrel because
13+
// it imports node:path (would break the docs client webpack bundle).
14+
"src/cli/commands/cache-paths.ts",
15+
],
616
outDir: "dist",
717
minify: false,
818
format: "esm",

0 commit comments

Comments
 (0)