Skip to content

Commit 9529af6

Browse files
fix: publish dist entry points instead of src (1.0.19)
npm publishConfig does not override main/types; consumers on 1.0.18 resolved src/index.ts and broke TypeScript. Ship dist/ only with exports. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 2a3aeb4 commit 9529af6

4 files changed

Lines changed: 15 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
## 1.0.19 — 2025-06-25
44

5-
Hotfix: restore published package entry points to `dist/` so TypeScript consumers resolve `SqlExecutor`, `eq`, `PostgresAdapter`, and other exports correctly. v1.0.18 accidentally shipped with `main`/`types` pointing at `src/`.
5+
Fix npm package entry points so TypeScript consumers resolve `dist/` types instead of unpublished `src/` sources.
6+
7+
### Fixes
8+
9+
- **`main` / `types` / `module` / `exports`** — point at `dist/index.*` (removed broken `publishConfig` + `src/index.ts` dev entries that were published as-is in 1.0.18).
10+
- **`files`** — tarball no longer includes `src/index.ts`; only `dist/` is shipped.
11+
- **`prepublishOnly`** — runs `build` before every `npm publish`.
612

713
## 1.0.18 — 2025-06-25
814

apps/playground/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7+
"predev": "bun run --filter sqlkit build",
78
"dev": "bun --watch src/index.ts",
89
"start": "bun src/index.ts"
910
},

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"apps/*"
88
],
99
"scripts": {
10-
"dev": "bun run build && mprocs",
10+
"build": "bun run --filter sqlkit build",
11+
"predev": "bun run build",
12+
"dev": "mprocs",
1113
"build": "bun run --filter sqlkit build",
1214
"test": "bun run --filter sqlkit test",
1315
"format": "bun run --filter sqlkit format",

packages/sqlkit/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@
1919
".": {
2020
"types": "./dist/index.d.ts",
2121
"import": "./dist/index.mjs",
22-
"require": "./dist/index.cjs"
22+
"require": "./dist/index.cjs",
23+
"default": "./dist/index.mjs"
2324
}
2425
},
2526
"files": [
2627
"dist"
2728
],
2829
"scripts": {
2930
"build": "pkgroll --sourcemap --clean-dist --minify",
30-
"prepublishOnly": "npm run build",
31+
"prepublishOnly": "bun run build",
3132
"tinker": "bun --watch src/tinker.ts",
3233
"test": "jest --testPathPattern=repository --runInBand",
3334
"format": "prettier --write \"src/**/*.ts\"",
@@ -57,7 +58,7 @@
5758
},
5859
"peerDependenciesMeta": {
5960
"pg": {
60-
"optional": false
61+
"optional": true
6162
}
6263
}
6364
}

0 commit comments

Comments
 (0)