You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix CI build failure and add main package publishing support
- Add --disable-thread-safety flag to fix PostgreSQL configure in Emscripten
- Add publishMainPackage function to support @pgsql/parser publishing
- Add CLI options --main and --publish-as for main package publishing
- Add npm scripts for convenient main package publishing
- Update documentation with dual publishing strategy examples
- Support independent versioning for main package vs version packages
Co-Authored-By: Dan Lynch <pyramation@gmail.com>
This allows different PostgreSQL versions to have different semantic versions while maintaining the dist-tag system.
224
+
225
+
## Main Package Publishing (@pgsql/parser)
226
+
227
+
The main libpg-query package can be published as @pgsql/parser with comprehensive functionality including parse, deparse, parsePlPgSQL, scan, fingerprint, and normalize capabilities.
228
+
229
+
### Publishing Main Package Examples
230
+
231
+
#### Example 1: Publishing Main Package (Dry Run)
232
+
```bash
233
+
# Test publishing main package as @pgsql/parser
234
+
node scripts/publish-versions.js --dry-run --main
235
+
```
236
+
237
+
**What happens:**
238
+
1. Script backs up `libpg-query/package.json`
239
+
2. Temporarily changes name from `libpg-query` to `@pgsql/parser`
240
+
3. Keeps existing version (currently 17.3.3)
241
+
4. Runs `pnpm build` in `libpg-query/`
242
+
5. Would publish with `pnpm publish`
243
+
6. Restores original `package.json`
244
+
245
+
**Result:** Users can install with `npm install @pgsql/parser`
0 commit comments