Repository navigation
Consolidate examples to TypeScript, add programmatic usage, Docker base node 24 - #302
Merged
mesaugat merged 2 commits intoOct 10, 2026
Conversation
…ic usage Remove the JavaScript samples (node-app-mssql, node-app-pg) and the separate node-mssql-programmatic-use sample. Both TypeScript examples now include a type-checked programmatic usage script (src/sync-db.ts, `yarn synchronize:programmatic`) that fixes the old sample's missing resolveConnections argument. Add @types/node and types:[node] required by TypeScript 6, and fix the stale package names. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
6 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #301 (base is that PR's branch); retarget to
masteronce #300 and #301 merge.Summary
node-app-mssql,node-app-pg) and the separatenode-mssql-programmatic-usesample. Onlynode-app-mssql-tsandnode-app-pg-tsremain; the root README's examples list is updated.src/sync-db.ts(loadssync-db.ymland the connections, runssynchronize, exits non-zero on failure), run withyarn synchronize:programmatic, plus a README section. This replaces the old sample'ssync-db.js, which used ESMimportin a plain.jsfile, had no script to run it, and calledresolveConnections()without its requiredconfigargument.@types/nodeandtypes: ["node"]totsconfig.json; fix stale package names (app-pg,node-app-mssql).node:18-slimtonode:24-slimin both examples.Test plan
yarn format:checkyarn synchronize:programmatictype-checks and runs against real Postgres 13 and SQL Server 2022 containers; a second run is idempotent and each example'sstartscript reads the synced objectsnode:24-slimimage has Node 24.21 and yarn 1.22, and installs and runssync-db. Theyarnstep needed strict SSL disabled in a scratch copy because of TLS interception on my machine (the unmodifiednode:18-slimbuild fails the same way), so the committed Dockerfile's fulldocker-compose upflow has not been rundocker-compose upfor both examples on a machine without TLS interceptionThe examples install the published
@leapfrogtechnology/sync-db@^2.0.0from npm, so they exercise the released CLI and not this branch's code.🤖 Generated with Claude Code