Skip to content

fix(adapter-node-pg): rename binder dependency to publishable package name#439

Merged
mk3008 merged 1 commit intomainfrom
fix/rename-shared-binder-package
Feb 6, 2026
Merged

fix(adapter-node-pg): rename binder dependency to publishable package name#439
mk3008 merged 1 commit intomainfrom
fix/rename-shared-binder-package

Conversation

@mk3008
Copy link
Owner

@mk3008 mk3008 commented Feb 6, 2026

Summary

  • rename internal binder package name to @rawsql-ts/shared-binder
  • update adapter dependency/import/path aliases to the new package name
  • add a changeset for adapter-node-pg patch release

Why

  • npm publish rejects dependency names like @scope/name/sub
  • this unblocks publishing @rawsql-ts/adapter-node-pg

Summary by CodeRabbit

  • Chores
    • Reorganized internal package dependencies for the Node.js PostgreSQL adapter to improve package distribution and publishing compatibility.

@coderabbitai
Copy link

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

This PR renames the internal binder package from @rawsql-ts/_shared/binder to @rawsql-ts/shared-binder, updating package metadata, import paths, and TypeScript path aliases across the codebase to reflect the new package identity.

Changes

Cohort / File(s) Summary
Binder Package Rename
packages/_shared/binder/package.json, packages/_shared/binder/README.md
Updated package name from @rawsql-ts/_shared/binder to @rawsql-ts/shared-binder in metadata and documentation.
Adapter Dependencies
packages/adapters/adapter-node-pg/package.json, packages/adapters/adapter-node-pg/src/driver/PgTestkitClient.ts, packages/adapters/adapter-node-pg/tests/binder-constraints.test.ts
Updated dependency reference and imports in adapter-node-pg to use new @rawsql-ts/shared-binder package name.
Build & TypeScript Configuration
packages/adapters/adapter-node-pg/tsconfig.build.json, tsconfig.json, vitest.config.ts
Updated TypeScript and test framework path aliases from @rawsql-ts/_shared/binder to @rawsql-ts/shared-binder to ensure correct module resolution.
Changeset Documentation
.changeset/friendly-buses-beam.md
Added changeset entry documenting the patch for adapter-node-pg and the package rename.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A binder renamed with care so fine,
From nested paths to one that's sleek and clean,
Across the configs, aliases align,
Dependencies dance to the new routine! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: renaming the internal binder dependency from @rawsql-ts/_shared/binder to @rawsql-ts/shared-binder to satisfy npm publish requirements.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/rename-shared-binder-package

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mk3008 mk3008 merged commit 9970b0c into main Feb 6, 2026
7 of 8 checks passed
@mk3008 mk3008 deleted the fix/rename-shared-binder-package branch February 6, 2026 14:06
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@packages/_shared/binder/package.json`:
- Around line 2-4: The package "@rawsql-ts/shared-binder" is marked "private":
true which prevents it being published and breaks consumers like adapter-node-pg
that import compileNamedParameters from it (see PgTestkitClient.ts and the
workspace:^ dependency). Fix by removing the "private": true field from
packages/_shared/binder/package.json and ensure the package has a proper version
and publish settings so it is published to npm; alternatively (if you prefer not
to publish the binder) update the adapter-node-pg build to bundle the binder by
adding noExternal: ['@rawsql-ts/shared-binder'] to the tsup/packager config so
compileNamedParameters is included in the adapter dist.

Comment on lines +2 to 4
"name": "@rawsql-ts/shared-binder",
"version": "0.0.0",
"private": true,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check adapter-node-pg package.json for shared-binder dependency
echo "=== Check adapter-node-pg dependencies ==="
cat packages/adapters/adapter-node-pg/package.json | grep -A 20 '"dependencies"'
echo ""

# Check if shared-binder is imported in adapter source
echo "=== Search for shared-binder imports in adapter-node-pg ==="
rg '@rawsql-ts/shared-binder' packages/adapters/adapter-node-pg/src/
echo ""

# Check if adapter has dist output
echo "=== Check adapter-node-pg dist structure ==="
ls -la packages/adapters/adapter-node-pg/dist 2>/dev/null || echo "No dist directory"
echo ""

# Look for build config
echo "=== Check build configuration ==="
fd -g 'tsup*' -g 'esbuild*' -g 'rollup*' packages/adapters/adapter-node-pg/
cat packages/adapters/adapter-node-pg/tsup.config.ts 2>/dev/null || echo "No tsup config"
echo ""

# Check package.json build/exports fields
echo "=== Check package.json exports and build ==="
cat packages/adapters/adapter-node-pg/package.json | jq '.exports, .main, .types, .scripts.build'

Repository: mk3008/rawsql-ts

Length of output: 1265


"private": true will break adapter-node-pg consumers after publish.

The package is marked "private": true (Line 4), so it will never be published to npm. However, adapter-node-pg (a public package) declares "@rawsql-ts/shared-binder": "workspace:^" as a runtime dependency and actively imports compileNamedParameters from it in PgTestkitClient.ts. The adapter uses plain tsc to compile (no bundling), so the dist output will contain bare require/import statements for @rawsql-ts/shared-binder. When pnpm publishes adapter-node-pg, the workspace: protocol is replaced with a concrete version — but since @rawsql-ts/shared-binder is never published, npm install @rawsql-ts/adapter-node-pg`` will fail for end users.

Common solutions:

  1. Remove "private": true and publish the binder package.
  2. Bundle the binder code into the adapter's dist (e.g., configure tsup with noExternal: ['@rawsql-ts/shared-binder']).
  3. Move the dependency to devDependencies if runtime presence is unnecessary (but it's imported and used).
🤖 Prompt for AI Agents
In `@packages/_shared/binder/package.json` around lines 2 - 4, The package
"@rawsql-ts/shared-binder" is marked "private": true which prevents it being
published and breaks consumers like adapter-node-pg that import
compileNamedParameters from it (see PgTestkitClient.ts and the workspace:^
dependency). Fix by removing the "private": true field from
packages/_shared/binder/package.json and ensure the package has a proper version
and publish settings so it is published to npm; alternatively (if you prefer not
to publish the binder) update the adapter-node-pg build to bundle the binder by
adding noExternal: ['@rawsql-ts/shared-binder'] to the tsup/packager config so
compileNamedParameters is included in the adapter dist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant