+2
-2
@@ -39,4 +39,4 @@ #!/usr/bin/env node | ||
| function usage() { | ||
| console.error('Usage: node app/llmfix.js --from-report <impact.json> [--repo <path>] [--max N] [--out-dir <dir>] [--list]'); | ||
| console.error('Requires MENDAPI_LLM_* config (BYO compute; see app/llmprovider.js). Emits DRAFT patches only; never modifies the repo.'); | ||
| console.error('Usage: mendapi llmfix --from-report <impact.json> [--repo <path>] [--max N] [--out-dir <dir>] [--list]'); | ||
| console.error('Requires MENDAPI_LLM_* config (BYO compute; see the BYO LLM docs at https://mendapi.com/docs/byo-llm.html). Emits DRAFT patches only; never modifies the repo.'); | ||
| process.exit(2); | ||
@@ -43,0 +43,0 @@ } |
+1
-1
@@ -371,5 +371,5 @@ #!/usr/bin/env node | ||
| } else { | ||
| console.error('Usage: node app/llmprovider.js --self-test | --show-config'); | ||
| console.error('Usage: node llmprovider.js --self-test | --show-config'); | ||
| process.exit(2); | ||
| } | ||
| } |
+1
-1
@@ -207,3 +207,3 @@ #!/usr/bin/env node | ||
| } else { | ||
| console.error('Usage: node app/llmtransport.js --self-test'); | ||
| console.error('Usage: node llmtransport.js --self-test'); | ||
| console.error('This module is loaded dynamically by --llm gated commands only.'); | ||
@@ -210,0 +210,0 @@ process.exit(2); |
+1
-1
@@ -357,3 +357,3 @@ #!/usr/bin/env node | ||
| if (argv.includes('--help') || argv.includes('-h')) { | ||
| console.log('Usage: node mcp.js'); | ||
| console.log('Usage: mendapi mcp'); | ||
| console.log(''); | ||
@@ -360,0 +360,0 @@ console.log('Starts a Model Context Protocol server on stdio (JSON-RPC 2.0, newline-delimited).'); |
+2
-2
| { | ||
| "name": "mendapi", | ||
| "version": "0.5.1", | ||
| "version": "0.5.2", | ||
| "license": "AGPL-3.0-only", | ||
@@ -57,2 +57,2 @@ "type": "module", | ||
| } | ||
| } | ||
| } |
+1
-1
@@ -356,3 +356,3 @@ #!/usr/bin/env node | ||
| } else { | ||
| console.log('Usage: node app/payload.js --self-test | <impact-report.json>'); | ||
| console.log('Usage: node payload.js --self-test | <impact-report.json>'); | ||
| process.exit(arg === '--help' ? 0 : 1); | ||
@@ -359,0 +359,0 @@ } |
+1
-1
@@ -47,3 +47,3 @@ #!/usr/bin/env node | ||
| const repo = args.repo; | ||
| if (!repo) fail('Usage: node pr.js --repo <git-repo> (--migration <name> | --from-report <impact.json>) [--out-dir <dir>] [--run-checks] [--push]'); | ||
| if (!repo) fail('Usage: mendapi pr --repo <git-repo> (--migration <name> | --from-report <impact.json>) [--out-dir <dir>] [--run-checks] [--push]'); | ||
| if (!existsSync(join(repo, '.git'))) fail(`Not a git repository: ${repo}`); | ||
@@ -50,0 +50,0 @@ |
+58
-1
@@ -71,2 +71,48 @@ # mendapi | ||
| ## What a fix looks like | ||
| This is real output — the exact diff our test suite pins, byte for byte, for the `openai-node` v3 → v4 migration pack. Note the two lines that *mention* the legacy calls inside a string and a template literal: the codemod leaves both untouched, because rules anchor on call positions in the syntax tree, not on text patterns. | ||
| ```diff | ||
| --- a/lib/ai.js | ||
| +++ b/lib/ai.js | ||
| @@ -1,28 +1,27 @@ | ||
| // Demo service using the legacy openai-node v3 SDK (pre-v4 breaking change). | ||
| // Docs note: openai.createChatCompletion({...}) was the v3 entry point. | ||
| -const { Configuration, OpenAIApi } = require('openai'); | ||
| +const OpenAI = require('openai'); | ||
| // This string mentions the legacy call and must never be rewritten by the fixer: | ||
| const LEGACY_HINT = 'if you still call openai.createChatCompletion( upgrade to v4'; | ||
| const AUDIT_LOG_LINE = `migrating away from .createEmbedding( for tenant`; | ||
| -const configuration = new Configuration({ apiKey: process.env.OPENAI_API_KEY }); | ||
| -const openai = new OpenAIApi(configuration); | ||
| +const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY }); | ||
| async function summarize(text) { | ||
| - const response = await openai.createChatCompletion({ | ||
| + const response = await openai.chat.completions.create({ | ||
| model: 'gpt-4', | ||
| messages: [{ role: 'user', content: `Summarize: ${text}` }], | ||
| }); | ||
| - return response.data.choices[0].message.content; | ||
| + return response.choices[0].message.content; | ||
| } | ||
| async function embed(text) { | ||
| - const response = await openai.createEmbedding({ | ||
| + const response = await openai.embeddings.create({ | ||
| model: 'text-embedding-ada-002', | ||
| input: text, | ||
| }); | ||
| - return response.data.data[0].embedding; | ||
| + return response.data[0].embedding; | ||
| } | ||
| module.exports = { summarize, embed }; | ||
| ``` | ||
| Every migration pack ships with a pinned diff like this one; the build fails if a pack's output drifts from its gold evidence. Six more, embedded with the same byte-match guarantee, are on the provider guides: [OpenAI](https://mendapi.com/guides/openai-node-v3-to-v4-migration.html), [AWS](https://mendapi.com/guides/aws-sdk-v2-to-v3-migration.html), [Cloudflare](https://mendapi.com/guides/cloudflare-typescript-v6-to-v7-migration.html), [PayPal](https://mendapi.com/guides/paypal-server-sdk-migration.html), [Vercel](https://mendapi.com/guides/vercel-sdk-migration.html), [Stripe](https://mendapi.com/guides/stripe-payment-records-migration.html), [Shopify](https://mendapi.com/guides/shopify-graphql-api-migration.html). | ||
| ## Use it from your AI coding agent (MCP) | ||
@@ -105,5 +151,16 @@ | ||
| ## Measured in public | ||
| We benchmark the change database against real provider spec corpora and publish the full accounting — every headline number is recomputed from archived evidence by the site's build gates, so the reports cannot drift from the data: | ||
| - [What 47 Stripe API versions taught us about breaking-change detection](https://mendapi.com/blog/stripe-parity-47-pair-capstone.html) — 47 consecutive spec pairs, head-to-head with oasdiff, zero unexplained gaps. | ||
| - [Three more providers, 49 spec pairs, zero unexplained gaps](https://mendapi.com/blog/tvp-parity-49-pair-capstone.html) — the same audit across Twilio, PayPal, and Vercel. | ||
| - [20 Twilio spec pairs: 358 findings from one engine, 142 from ours, and every disagreement named](https://mendapi.com/blog/twilio-parity-20-pair-capstone.html) — why two engines disagree by 2.5x, with every divergence accounted for. | ||
| - [11 Vercel spec pairs: a real 12-endpoint removal, and the release notes that cried breaking](https://mendapi.com/blog/vercel-parity-11-pair-capstone.html) — the changelog got it wrong in both directions; the wire did not. | ||
| - [136 raw removals, 17 real ones: what a spec diff over-reports](https://mendapi.com/blog/cloudflare-curation-136-to-17.html) — the curation rules that keep alert fatigue out of the feed. | ||
| - [821 OpenAI spec changes, 3 that can break a client: the honest negative](https://mendapi.com/blog/openai-corridor-821-to-3-capstone.html) — the value of a tool that tells you when you are fine. | ||
| ## Status | ||
| Published on npm as [`mendapi`](https://www.npmjs.com/package/mendapi) (v0.5.0). Early release — the change database and migration pack registry grow daily; interfaces may still shift before 1.0. | ||
| Published on npm as [`mendapi`](https://www.npmjs.com/package/mendapi) (v0.5.1). Early release — the change database and migration pack registry grow daily; interfaces may still shift before 1.0. | ||
@@ -110,0 +167,0 @@ ## License |
+2
-2
@@ -9,3 +9,3 @@ #!/usr/bin/env node | ||
| // | ||
| // Usage: node app/reclassify.js <classifications.json> [--dry-run] | ||
| // Usage: node reclassify.js <classifications.json> [--dry-run] | ||
@@ -25,3 +25,3 @@ import { DatabaseSync } from 'node:sqlite'; | ||
| if (!file) { | ||
| console.error('Usage: node app/reclassify.js <classifications.json> [--dry-run]'); | ||
| console.error('Usage: node reclassify.js <classifications.json> [--dry-run]'); | ||
| process.exit(1); | ||
@@ -28,0 +28,0 @@ } |
+1
-1
@@ -191,3 +191,3 @@ #!/usr/bin/env node | ||
| if (args.includes('--help')) { | ||
| console.error('Usage: node revalidate.js [--json] [--db <path>]'); | ||
| console.error('Usage: mendapi revalidate [--json] [--db <path>]'); | ||
| process.exit(2); | ||
@@ -194,0 +194,0 @@ } |
+3
-3
@@ -49,5 +49,5 @@ #!/usr/bin/env node | ||
| function usage() { | ||
| console.error('Usage: node app/review.js <impact.json> --pending'); | ||
| console.error(' node app/review.js <impact.json> --verdicts <verdicts.json> [--out reviewed.json] [--dry-run]'); | ||
| console.error(' node app/review.js <impact.json> --llm [--out reviewed.json] [--dry-run] [--max N] (BYO LLM; requires MENDAPI_LLM_* config)'); | ||
| console.error('Usage: mendapi review <impact.json> --pending'); | ||
| console.error(' mendapi review <impact.json> --verdicts <verdicts.json> [--out reviewed.json] [--dry-run]'); | ||
| console.error(' mendapi review <impact.json> --llm [--out reviewed.json] [--dry-run] [--max N] (BYO LLM; requires MENDAPI_LLM_* config)'); | ||
| process.exit(1); | ||
@@ -54,0 +54,0 @@ } |
+6
-6
@@ -729,4 +729,4 @@ #!/usr/bin/env node | ||
| } | ||
| out.push(dim('Next: node app/review.js --pending <report> (semantic review of medium hits)')); | ||
| out.push(dim(' node app/fixer.js --from-report <report> (preview the fix as a local diff)')); | ||
| out.push(dim('Next: mendapi review <report> --pending (semantic review of medium hits)')); | ||
| out.push(dim(' mendapi fix --from-report <report> (preview the fix as a local diff)')); | ||
| out.push(''); | ||
@@ -740,5 +740,5 @@ console.log(out.join('\n')); | ||
| const lines = [ | ||
| dim('Tip: this scan is a snapshot. mendapi cloud watches these providers'), | ||
| dim('continuously and alerts you the moment a breaking change lands.'), | ||
| dim('-> https://mendapi.com (free for 1 repo)'), | ||
| dim('Tip: this scan is a snapshot. Hosted monitoring — continuous watch on'), | ||
| dim('these providers with alerts the moment a breaking change lands — is in'), | ||
| dim('the works. Join the waitlist -> https://mendapi.com'), | ||
| '', | ||
@@ -754,3 +754,3 @@ ]; | ||
| if (args.help) { | ||
| console.error('Usage: node scanner.js [--repo <path>] [--provider <name>] [--change-id <id>] [--out <file.json>] [--json] [--quiet] [--include-prereleases]'); | ||
| console.error('Usage: mendapi scan [--repo <path>] [--provider <name>] [--change-id <id>] [--out <file.json>] [--json] [--quiet] [--include-prereleases]'); | ||
| process.exit(2); | ||
@@ -757,0 +757,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
894921
1.4%14351
0.94%168
51.35%