From 3b6f6ec9b5c50c087fcc1009191d90cab16923cb Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 24 Oct 2026 20:56:45 +0000 Subject: [PATCH 1/3] docs: remove npm install line that installs someone else's package npm "json2sql" is an unrelated 2022 package owned by another user; this project has never been published to npm. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0111byzLrKKTCJ23uTT6PyZq --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index bd75a8f..ab33c15 100644 --- a/README.md +++ b/README.md @@ -40,12 +40,6 @@ scoop bucket add Coding-Dev-Tools https://github.com/Coding-Dev-Tools/scoop-buck scoop install json2sql-cli ``` -**npm (Node.js wrapper):** -```bash -npm install -g json2sql -``` -Then run: `json2sql --help` - ## Quick Start ```bash From 011868fb59ebe0ab843c030f1445a14dd11f4589 Mon Sep 17 00:00:00 2001 From: Coding-Dev-Tools <274649000+Coding-Dev-Tools@users.noreply.github.com> Date: Sat, 14 Nov 2026 19:41:16 -0500 Subject: [PATCH 2/3] test(smoke): add regression guard against third-party npm install line Verify README.md documents only supported git+ pip, Homebrew, and Scoop install paths and rejects the unrelated `npm install -g json2sql` string. --- tests/smoke.test.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/smoke.test.js b/tests/smoke.test.js index c5026b3..eb5f5b1 100644 --- a/tests/smoke.test.js +++ b/tests/smoke.test.js @@ -24,3 +24,24 @@ test("smoke: required repo files present", () => { assert.ok(fs.existsSync(path.join(root, f)), `${f} must exist`); } }); + +test("smoke: README documents supported install paths only", () => { + const readmePath = path.join(__dirname, "..", "README.md"); + assert.ok(fs.existsSync(readmePath), "README.md must exist"); + + const readme = fs.readFileSync(readmePath, "utf8"); + + const installPaths = [ + ["pip install git+https://", "pip install from git"], + ["brew tap ", "Homebrew tap"], + ["scoop bucket add ", "Scoop bucket"], + ]; + for (const [needle, label] of installPaths) { + assert.ok(readme.includes(needle), `README must document ${label}`); + } + + assert.ok( + !/npm\s+install\s+(?:-g|--global)\s+json2sql(?![\w-])/i.test(readme), + "README must not advertise `npm install -g json2sql`: npm `json2sql` is an unrelated third-party package" + ); +}); From e5f85e3f5b6a9a4b1792e02e2e9d89ec89bd391d Mon Sep 17 00:00:00 2001 From: Coding-Dev-Tools <274649000+Coding-Dev-Tools@users.noreply.github.com> Date: Sun, 15 Nov 2026 07:35:57 -0500 Subject: [PATCH 3/3] test(smoke): scan full README against npm install and clarify changelog --- CHANGELOG.md | 4 ++-- tests/smoke.test.js | 58 ++++++++++++++++++++++++++++++++++++++------- 2 files changed, 51 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c4eae6..2fa8c33 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,6 @@ All notable changes to json2sql will be documented in this file. - CLI integration tests with comprehensive coverage (#8, #9, #10) - Standalone dialect tests and converter edge cases (#10) -- npm wrapper (`package.json` + `cli.js`) for npm publishing - GitHub Actions: PyPI publish workflow (release or manual dispatch) - GitHub Actions: GitHub Pages deployment workflow - GitHub Actions: npm publish workflow (release or manual dispatch) @@ -45,13 +44,14 @@ All notable changes to json2sql will be documented in this file. - README rewritten with unified pricing tables, Revenue Holdings branding - README expanded with CI/CD integration examples and alternatives comparison - README tool count and DevForge URLs updated -- npm install instructions added to README +- README install instructions limited to pip, Homebrew, and Scoop (no npm package) ## [0.1.0] — 2026-05-14 ### Added - Initial release +- PyPI package publishing (json2sql-cli) and local Node.js CLI wrapper - JSON to SQL INSERT conversion - Nested JSON auto-flattening into relational tables - Multi-dialect output: PostgreSQL, MySQL, SQLite diff --git a/tests/smoke.test.js b/tests/smoke.test.js index eb5f5b1..e191acf 100644 --- a/tests/smoke.test.js +++ b/tests/smoke.test.js @@ -30,18 +30,58 @@ test("smoke: README documents supported install paths only", () => { assert.ok(fs.existsSync(readmePath), "README.md must exist"); const readme = fs.readFileSync(readmePath, "utf8"); + const lines = readme.split(/\r?\n/); - const installPaths = [ - ["pip install git+https://", "pip install from git"], + const installStart = lines.findIndex((line) => /^##\s+Install(?:ation)?\s*$/i.test(line)); + assert.notStrictEqual(installStart, -1, "README must have an Install section"); + const nextHeading = lines.findIndex( + (line, index) => index > installStart && /^##\s+/.test(line) + ); + const installSection = lines + .slice(installStart + 1, nextHeading === -1 ? undefined : nextHeading) + .join("\n"); + + assert.match( + installSection, + /pip install (?:json2sql-cli|git\+https:\/\/github\.com\/Coding-Dev-Tools\/json2sql(?:\.git)?)/, + "README Install section must document `pip install json2sql-cli` (or the documented git fallback)" + ); + assert.match( + installSection, + /\bjson2sql-cli\b/, + "README Install section must name the json2sql-cli package" + ); + + for (const [needle, label] of [ ["brew tap ", "Homebrew tap"], ["scoop bucket add ", "Scoop bucket"], - ]; - for (const [needle, label] of installPaths) { - assert.ok(readme.includes(needle), `README must document ${label}`); + ]) { + assert.ok(installSection.includes(needle), `README must document ${label}`); } - assert.ok( - !/npm\s+install\s+(?:-g|--global)\s+json2sql(?![\w-])/i.test(readme), - "README must not advertise `npm install -g json2sql`: npm `json2sql` is an unrelated third-party package" - ); + const fencedBlocks = [ + ...readme.matchAll(/^```[^\n]*\n([\s\S]*?)^```[ \t]*$/gm), + ].map((match) => match[1]); + + const forbiddenNpmUsage = [ + [/\bnpm\s+(?:install|i|add|exec|x|dlx)\b[^\n]*\bjson2sql(?:-cli)?(?![\w.-])/i, "npm"], + [/\bnpx\b[^\n]*\bjson2sql(?:-cli)?(?![\w.-])/i, "npx"], + [ + /\b(?:pnpm|yarn)\s+(?:add|global\s+add|dlx)\b[^\n]*\bjson2sql(?:-cli)?(?![\w.-])/i, + "pnpm/yarn", + ], + ]; + + const sources = [ + ["README.md", readme], + ...fencedBlocks.map((block, index) => [`README.md fenced code block ${index + 1}`, block]), + ]; + for (const [sourceName, source] of sources) { + for (const [pattern, runner] of forbiddenNpmUsage) { + assert.ok( + !pattern.test(source), + `${sourceName} must not use \`${runner}\` to install or run json2sql: npm \`json2sql\` is an unrelated third-party package and this project publishes no npm package` + ); + } + } });