Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .changeset/publish-spec-and-source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
'@dunky.dev/controllable': patch
'@dunky.dev/dialog': patch
'@dunky.dev/dom-focus-trap': patch
'@dunky.dev/dom-navigation': patch
'@dunky.dev/dom-overlay': patch
'@dunky.dev/dom-scroll-lock': patch
'@dunky.dev/overlay': patch
'@dunky.dev/react-dialog': patch
'@dunky.dev/react-use-focus-trap': patch
'@dunky.dev/react-use-scroll-lock': patch
---

Ship `SPEC.md` and the TypeScript sources in the published package, alongside
the built `dist`.

The tarball used to carry `dist` and `README.md` only, so the two things you
actually want when a behavior surprises you — the spec that defines the contract
and the code that implements it — were reachable only by finding the repo and
guessing which tag matches the installed version. Both now sit in
`node_modules/<pkg>/`, pinned to the exact version installed.

Nothing about resolution changes: `publishConfig` still points `main`, `types`,
and `exports` at `dist`, and the sources are inert payload — read them, don't
import them.
4 changes: 4 additions & 0 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ directory into the templates — the script discovers it. See
`packages/react/.storybook`, run with `pnpm dev [substrate]`.
- Publishable packages are listed explicitly in `tsdown.config.ts`; a private
package gets a tsconfig path but is never published.
- A published tarball carries `dist`, `src`, and the package's docs
(`README.md`, `SPEC.md`; pnpm copies in the root `LICENSE`). Consumers import
`dist` — `publishConfig` points every entry at it. The source and spec ship
so they can be read.

## Versioning

Expand Down
4 changes: 3 additions & 1 deletion packages/core/dialog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"directory": "packages/core/dialog"
},
"files": [
"dist"
"dist",
"src",
"SPEC.md"
],
"type": "module",
"sideEffects": false,
Expand Down
4 changes: 3 additions & 1 deletion packages/core/utils/controllable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"directory": "packages/core/utils/controllable"
},
"files": [
"dist"
"dist",
"src",
"SPEC.md"
],
"type": "module",
"sideEffects": false,
Expand Down
4 changes: 3 additions & 1 deletion packages/core/utils/overlay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"directory": "packages/core/utils/overlay"
},
"files": [
"dist"
"dist",
"src",
"SPEC.md"
],
"type": "module",
"sideEffects": false,
Expand Down
4 changes: 3 additions & 1 deletion packages/dom/utils/focus-trap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"directory": "packages/dom/utils/focus-trap"
},
"files": [
"dist"
"dist",
"src",
"SPEC.md"
],
"type": "module",
"sideEffects": false,
Expand Down
4 changes: 3 additions & 1 deletion packages/dom/utils/navigation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"directory": "packages/dom/utils/navigation"
},
"files": [
"dist"
"dist",
"src",
"SPEC.md"
],
"type": "module",
"sideEffects": false,
Expand Down
4 changes: 3 additions & 1 deletion packages/dom/utils/overlay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"directory": "packages/dom/utils/overlay"
},
"files": [
"dist"
"dist",
"src",
"SPEC.md"
],
"type": "module",
"sideEffects": false,
Expand Down
4 changes: 3 additions & 1 deletion packages/dom/utils/scroll-lock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"directory": "packages/dom/utils/scroll-lock"
},
"files": [
"dist"
"dist",
"src",
"SPEC.md"
],
"type": "module",
"sideEffects": false,
Expand Down
4 changes: 3 additions & 1 deletion packages/react/dialog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"directory": "packages/react/dialog"
},
"files": [
"dist"
"dist",
"src",
"SPEC.md"
],
"type": "module",
"sideEffects": false,
Expand Down
4 changes: 3 additions & 1 deletion packages/react/hooks/use-focus-trap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"directory": "packages/react/hooks/use-focus-trap"
},
"files": [
"dist"
"dist",
"src",
"SPEC.md"
],
"type": "module",
"sideEffects": false,
Expand Down
4 changes: 3 additions & 1 deletion packages/react/hooks/use-scroll-lock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"directory": "packages/react/hooks/use-scroll-lock"
},
"files": [
"dist"
"dist",
"src",
"SPEC.md"
],
"type": "module",
"sideEffects": false,
Expand Down
4 changes: 3 additions & 1 deletion scripts/templates/packages/core/__name__/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"directory": "packages/core/__name__"
},
"files": [
"dist"
"dist",
"src",
"SPEC.md"
],
"type": "module",
"sideEffects": false,
Expand Down
4 changes: 3 additions & 1 deletion scripts/templates/packages/react/__name__/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"directory": "packages/react/__name__"
},
"files": [
"dist"
"dist",
"src",
"SPEC.md"
],
"type": "module",
"sideEffects": false,
Expand Down
Loading