Commit cfcc02e
chore: tighten package boundary + clean rebuild
Two changes that prevent long-term shape drift once published:
- package.json `exports`: gate the public surface to the documented
default import (`postcss-calc` → `./dist/src/index.js`) plus
`./package.json` for tooling that reads it. Modern Node and
bundlers will reject deep imports like `postcss-calc/dist/...`
or `postcss-calc/src/...`, preventing consumers from accidentally
locking themselves to the internal AST / tokenizer modules.
- Add a `prebuild` script that `rm -rf dist`s before each tsc emit.
Without this, stale build output from earlier directory layouts
(e.g., a previous `dist/src/v11/` tree) survives across rebuilds
and ships in the npm tarball.
Also sync pnpm-lock.yaml — the previous commit dropped
postcss-selector-parser from dependencies but didn't regenerate
the lockfile, which would break `pnpm install --frozen-lockfile`
on the maintainer's CI.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 48d3454 commit cfcc02e
2 files changed
Lines changed: 24 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
| |||
24 | 31 | | |
25 | 32 | | |
26 | 33 | | |
| 34 | + | |
27 | 35 | | |
28 | 36 | | |
29 | 37 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments