@buddysh/buddy 0.11.1 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +106 -0
- package/README.md +54 -43
- package/bin/cli.ts +282 -135
- package/dist/bin/cli.d.ts +5 -1
- package/dist/bin/cli.js +84 -91
- package/dist/chunk-05me15qw.js +2 -0
- package/dist/{chunk-bxfc4g2x.js → chunk-08x5b93v.js} +2 -13
- package/dist/chunk-0eg3kxb5.js +5 -0
- package/dist/chunk-0hc97k0t.js +44 -0
- package/dist/chunk-0paakbpj.js +2 -0
- package/dist/{chunk-hfvezfxh.js → chunk-0scz1dv5.js} +1 -1
- package/dist/{chunk-sp818c27.js → chunk-0w695m54.js} +5 -5
- package/dist/{chunk-vyapg8ca.js → chunk-11hdrnf6.js} +3 -3
- package/dist/{chunk-1stt2whn.js → chunk-15r904nz.js} +2 -2
- package/dist/{chunk-5k40mwd4.js → chunk-193abzy6.js} +1 -1
- package/dist/chunk-19zyq15p.js +2 -0
- package/dist/chunk-1c4690h9.js +79 -0
- package/dist/{chunk-q9n79dd3.js → chunk-1cpdz49v.js} +1 -1
- package/dist/{chunk-thaxgm5p.js → chunk-1qgr52wx.js} +1 -1
- package/dist/chunk-24c2ab29.js +2 -0
- package/dist/chunk-25sz1y7j.js +16 -0
- package/dist/chunk-2et8yavs.js +3 -0
- package/dist/chunk-2wj5xtdn.js +2 -0
- package/dist/{chunk-7mgec8kb.js → chunk-3901s7h9.js} +1 -1
- package/dist/{chunk-xvptf9jy.js → chunk-3cvng2nz.js} +2 -2
- package/dist/chunk-3fzbvs2p.js +2 -0
- package/dist/chunk-3pqra420.js +2 -0
- package/dist/{chunk-yk23nc4t.js → chunk-40znfg3x.js} +1 -1
- package/dist/chunk-428c5652.js +2 -0
- package/dist/chunk-49znmbh8.js +2 -0
- package/dist/chunk-5044y9en.js +5 -0
- package/dist/chunk-5yfaptmp.js +7 -0
- package/dist/{chunk-h7hs95wn.js → chunk-61xecp1z.js} +2 -2
- package/dist/{chunk-x0ya2r4r.js → chunk-657nbbp7.js} +2 -2
- package/dist/chunk-68fw3ma0.js +2 -0
- package/dist/{chunk-9h04nskh.js → chunk-69qyr9ef.js} +1 -1
- package/dist/chunk-6bd8ghkz.js +27 -0
- package/dist/{chunk-vh504tcv.js → chunk-6p4qz8qv.js} +2 -2
- package/dist/chunk-847g7jde.js +2 -0
- package/dist/{chunk-r3zyw8x0.js → chunk-8fw0v7bv.js} +2 -2
- package/dist/chunk-8hjvthz4.js +92 -0
- package/dist/chunk-90zmqn5k.js +2 -0
- package/dist/{chunk-3zdcekfj.js → chunk-929h6hhp.js} +2 -2
- package/dist/chunk-96ht6hwd.js +4 -0
- package/dist/chunk-97qf7mdt.js +2 -0
- package/dist/chunk-a4hzzn28.js +2 -0
- package/dist/chunk-aa277p5r.js +2 -0
- package/dist/chunk-b357cgb0.js +2 -0
- package/dist/chunk-b9escac0.js +4 -0
- package/dist/{chunk-56q4pwb5.js → chunk-be629jhq.js} +2 -2
- package/dist/chunk-bffxf4xy.js +2 -0
- package/dist/chunk-brfyymhf.js +2 -0
- package/dist/{chunk-zs3jaj0g.js → chunk-bymwaezh.js} +165 -119
- package/dist/chunk-c3es7pgf.js +2 -0
- package/dist/{chunk-9750tenz.js → chunk-c8rzx3a1.js} +1 -1
- package/dist/{chunk-tzs22es2.js → chunk-cgvt98pd.js} +1 -1
- package/dist/chunk-cwfkm7h9.js +3 -0
- package/dist/chunk-cwqhxqv7.js +2 -0
- package/dist/chunk-dgfb8k0h.js +2 -0
- package/dist/chunk-dqbk3kcj.js +104 -0
- package/dist/chunk-ds4stft2.js +2 -0
- package/dist/{chunk-1h3ey7k5.js → chunk-e68nf7cm.js} +1 -1
- package/dist/chunk-emyvrx5t.js +2 -0
- package/dist/{chunk-16yqbccr.js → chunk-eseshkd0.js} +1 -1
- package/dist/chunk-f53y8ans.js +3 -0
- package/dist/chunk-fjp3a7hp.js +26 -0
- package/dist/chunk-fpnjpgrb.js +2 -0
- package/dist/chunk-fr5c326k.js +2 -0
- package/dist/chunk-g24hav8e.js +370 -0
- package/dist/{chunk-6md7qf2g.js → chunk-g30dr44w.js} +2 -2
- package/dist/chunk-gkpd5nw2.js +2 -0
- package/dist/chunk-hbhmns7s.js +2 -0
- package/dist/chunk-hd5j9e3c.js +2 -0
- package/dist/{chunk-akffynkc.js → chunk-hfjywbbc.js} +1 -1
- package/dist/chunk-hmskwy76.js +2 -0
- package/dist/chunk-hns85dqw.js +2 -0
- package/dist/{chunk-wtjhehz9.js → chunk-hptfq3rg.js} +1 -1
- package/dist/{chunk-54sc18p8.js → chunk-hsa07n7c.js} +1 -1
- package/dist/chunk-hwxmhkxp.js +2 -0
- package/dist/{chunk-52x8mvh4.js → chunk-jnb80k2x.js} +2 -2
- package/dist/chunk-jtxcr5yw.js +4 -0
- package/dist/{chunk-tn8prpny.js → chunk-k26wnmzk.js} +7 -7
- package/dist/{chunk-2bp7tqca.js → chunk-kprtsn8c.js} +1 -1
- package/dist/chunk-m4p7cnvk.js +2 -0
- package/dist/chunk-mcwxpdg9.js +2 -0
- package/dist/chunk-mkzmjg3f.js +4 -0
- package/dist/chunk-ncrq3fvv.js +2 -0
- package/dist/chunk-ng7px8gx.js +2 -0
- package/dist/{chunk-vagxqhef.js → chunk-nrr8z2z7.js} +2 -2
- package/dist/{chunk-g0w8n555.js → chunk-p6qbqsyp.js} +2 -2
- package/dist/chunk-p8tmms5h.js +3 -0
- package/dist/{chunk-hw70wbzg.js → chunk-phfmnnne.js} +2 -2
- package/dist/{chunk-tb5y0350.js → chunk-pkr6905p.js} +1 -1
- package/dist/chunk-ppmabn5h.js +2 -0
- package/dist/chunk-pskqrv5r.js +2 -0
- package/dist/{chunk-4xsq18p3.js → chunk-q2tjkhez.js} +1 -1
- package/dist/{chunk-6g1y9yqh.js → chunk-q4t568hv.js} +1 -1
- package/dist/chunk-qd2s51gc.js +2 -0
- package/dist/chunk-r763e19p.js +6 -0
- package/dist/{chunk-74pxb991.js → chunk-rc2mk5x6.js} +2 -2
- package/dist/{chunk-zb62jhwm.js → chunk-s4zb0fcj.js} +13 -9
- package/dist/chunk-s6z3gm2s.js +5 -0
- package/dist/chunk-sc7emb71.js +2 -0
- package/dist/chunk-sw2538r0.js +49 -0
- package/dist/chunk-t25apff9.js +2 -0
- package/dist/{chunk-p4zwy518.js → chunk-tjc2vgwn.js} +2 -2
- package/dist/{chunk-gngwjf70.js → chunk-tw047td6.js} +2 -2
- package/dist/chunk-tws3npt7.js +38 -0
- package/dist/{chunk-6d9hmjt8.js → chunk-txtrpypt.js} +2 -2
- package/dist/chunk-v1wfa758.js +2 -0
- package/dist/{chunk-dfesffnr.js → chunk-vckhctmr.js} +1 -1
- package/dist/chunk-vdd1cghr.js +2 -0
- package/dist/{chunk-fvpr07dn.js → chunk-vgtmrd4c.js} +1 -1
- package/dist/chunk-vj1sdxpp.js +2 -0
- package/dist/{chunk-fm8ckj9b.js → chunk-vqa6vte3.js} +1 -1
- package/dist/{chunk-82dv4p13.js → chunk-wn6pbyzn.js} +1 -1
- package/dist/chunk-x23a6szw.js +2 -0
- package/dist/{chunk-xqx460y2.js → chunk-xs12dtf1.js} +1 -1
- package/dist/chunk-xznnmhyt.js +2 -0
- package/dist/chunk-y3dd8v85.js +2 -0
- package/dist/chunk-yk183r6z.js +2 -0
- package/dist/{chunk-1c1gznm9.js → chunk-yngahb11.js} +2 -2
- package/dist/{chunk-qyf90zz3.js → chunk-yp1tgdh3.js} +1 -1
- package/dist/chunk-ys1qqcpp.js +2 -0
- package/dist/{chunk-8rc6042h.js → chunk-ytmxd5fk.js} +2 -2
- package/dist/chunk-zgkrhymn.js +2 -0
- package/dist/chunk-zxgkp71x.js +2 -0
- package/dist/src/agent/index.d.ts +6 -1
- package/dist/src/agent/modes.d.ts +0 -8
- package/dist/src/agent/plan.d.ts +28 -0
- package/dist/src/agent/tasks.d.ts +20 -0
- package/dist/src/agent/tools/issue.d.ts +19 -0
- package/dist/src/ci/attempts.d.ts +36 -0
- package/dist/src/ci/base.d.ts +55 -0
- package/dist/src/ci/fix.d.ts +27 -18
- package/dist/src/ci/index.d.ts +5 -1
- package/dist/src/ci/run.d.ts +28 -0
- package/dist/src/commands/handlers.d.ts +3 -0
- package/dist/src/dashboard/dashboard-generator.d.ts +4 -0
- package/dist/src/events/index.d.ts +12 -0
- package/dist/src/gates/checks.d.ts +10 -0
- package/dist/src/gates/index.d.ts +1 -0
- package/dist/src/gates/post-merge.d.ts +13 -1
- package/dist/src/git/github-provider.d.ts +5 -1
- package/dist/src/git/gitlab-provider.d.ts +5 -1
- package/dist/src/git/provider.d.ts +40 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +1 -1
- package/dist/src/registry/registry-client.d.ts +1 -1
- package/dist/src/reports/index.d.ts +1 -0
- package/dist/src/reports/publish-gate.d.ts +22 -0
- package/dist/src/review/filters.d.ts +36 -0
- package/dist/src/review/index.d.ts +4 -1
- package/dist/src/review/marker.d.ts +18 -0
- package/dist/src/review/poster.d.ts +11 -1
- package/dist/src/review/resolve.d.ts +20 -0
- package/dist/src/review/run.d.ts +35 -0
- package/dist/src/rules/engine.d.ts +19 -0
- package/dist/src/scanner/package-json-extras.d.ts +34 -1
- package/dist/src/setup.d.ts +49 -17
- package/dist/src/setup.js +1 -1
- package/dist/src/templates/github-actions.d.ts +2 -0
- package/dist/src/types.d.ts +4 -1
- package/dist/src/upgrades/migrate.d.ts +3 -0
- package/dist/src/upgrades/report.d.ts +1 -0
- package/dist/src/utils/dockerfile-parser.d.ts +2 -2
- package/dist/src/utils/helpers.d.ts +10 -1
- package/dist/src/version/version-resolver.d.ts +1 -0
- package/package.json +12 -10
- package/dist/chunk-0j7z87kh.js +0 -3
- package/dist/chunk-0r8zt3d7.js +0 -2
- package/dist/chunk-1a53wj0h.js +0 -1
- package/dist/chunk-1wjnd24b.js +0 -24
- package/dist/chunk-1xe07hzm.js +0 -2
- package/dist/chunk-2dbkpfy9.js +0 -2
- package/dist/chunk-3q6czqs4.js +0 -6
- package/dist/chunk-49ey79p0.js +0 -5
- package/dist/chunk-4c9m61yd.js +0 -5
- package/dist/chunk-4efbxdjr.js +0 -4
- package/dist/chunk-4f7panqj.js +0 -21
- package/dist/chunk-4hd3rre0.js +0 -2
- package/dist/chunk-5c3qf34r.js +0 -2
- package/dist/chunk-5kt03hx5.js +0 -2
- package/dist/chunk-63ept76v.js +0 -2
- package/dist/chunk-65b3vq52.js +0 -2
- package/dist/chunk-6k653r8w.js +0 -2
- package/dist/chunk-6patq6bw.js +0 -2
- package/dist/chunk-6sgh49z1.js +0 -2
- package/dist/chunk-7tfrww3v.js +0 -2
- package/dist/chunk-7xk28xrv.js +0 -2
- package/dist/chunk-8661pvb8.js +0 -3
- package/dist/chunk-887s0w81.js +0 -2
- package/dist/chunk-978wtejw.js +0 -44
- package/dist/chunk-9eqpaxfz.js +0 -2
- package/dist/chunk-9p1xkmjy.js +0 -2
- package/dist/chunk-agdesgzv.js +0 -2
- package/dist/chunk-ar01x04a.js +0 -2
- package/dist/chunk-ay43f085.js +0 -2
- package/dist/chunk-bk9bqd5j.js +0 -2
- package/dist/chunk-bm8d40j0.js +0 -69
- package/dist/chunk-c3fczawt.js +0 -2
- package/dist/chunk-c9r9nd4t.js +0 -1
- package/dist/chunk-ctsz0ynx.js +0 -3
- package/dist/chunk-czremqk7.js +0 -2
- package/dist/chunk-da3wbh04.js +0 -2
- package/dist/chunk-dat582cg.js +0 -2
- package/dist/chunk-djntbp7a.js +0 -105
- package/dist/chunk-eagjp0dh.js +0 -3
- package/dist/chunk-eht72nnj.js +0 -2
- package/dist/chunk-f4nv5x3z.js +0 -2
- package/dist/chunk-fdfk918n.js +0 -2
- package/dist/chunk-fdj0tewy.js +0 -20
- package/dist/chunk-fqj7e6xa.js +0 -2
- package/dist/chunk-frm8zz31.js +0 -2
- package/dist/chunk-g0nv8psv.js +0 -2
- package/dist/chunk-gkmvxjbe.js +0 -2
- package/dist/chunk-j8asz4hb.js +0 -15
- package/dist/chunk-k62w2v03.js +0 -2
- package/dist/chunk-mcrfxphm.js +0 -5
- package/dist/chunk-mh3x7j6h.js +0 -2
- package/dist/chunk-naq32yx3.js +0 -86
- package/dist/chunk-nsmcjkas.js +0 -2
- package/dist/chunk-p1xm1jvz.js +0 -2
- package/dist/chunk-p3wsm8kz.js +0 -2
- package/dist/chunk-p7zgy37f.js +0 -2
- package/dist/chunk-ph1b3vbp.js +0 -315
- package/dist/chunk-pkjm2r0a.js +0 -2
- package/dist/chunk-pkkwb0n0.js +0 -4
- package/dist/chunk-pnpx1kqn.js +0 -6
- package/dist/chunk-qpz9k66h.js +0 -2
- package/dist/chunk-qvn1rtgp.js +0 -2
- package/dist/chunk-r06ce5g6.js +0 -2
- package/dist/chunk-r2sbprdb.js +0 -49
- package/dist/chunk-rqdep14r.js +0 -2
- package/dist/chunk-s1km8cyq.js +0 -2
- package/dist/chunk-s4ms8zag.js +0 -2
- package/dist/chunk-ts35hc5t.js +0 -3
- package/dist/chunk-vkctfqpm.js +0 -3
- package/dist/chunk-wdwvt7gb.js +0 -43
- package/dist/chunk-x3kragh9.js +0 -12
- package/dist/chunk-x9ctz1qc.js +0 -1
- package/dist/chunk-xakpdqaq.js +0 -3
- package/dist/chunk-yncea6ty.js +0 -2
- package/dist/chunk-yq0gxtzv.js +0 -2
- package/dist/chunk-yqhs08ky.js +0 -2
- package/dist/chunk-zve5d96e.js +0 -2
package/dist/chunk-naq32yx3.js
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{pi as M}from"./chunk-bxfc4g2x.js";import{Hi as N}from"./chunk-g0w8n555.js";import{Xi as v}from"./chunk-7mgec8kb.js";import{Rj as I}from"./chunk-akffynkc.js";var R={type:"object",properties:{changes:{type:"array",items:{type:"object",properties:{description:{type:"string",description:"What upstream changed"},version:{type:"string",description:"Version the change landed in"},affectedFiles:{type:"array",items:{type:"string"}},action:{type:"string",description:"What must be done in this repository"},automatable:{type:"boolean",description:"Whether the fix is mechanical"}},required:["description","affectedFiles","action","automatable"],additionalProperties:!1}},codemod:{type:"object",properties:{command:{type:"string",description:"Command that applies the official codemod"},source:{type:"string",description:"Where the codemod is documented"}},required:["command","source"],additionalProperties:!1},confidence:{type:"string",enum:["high","medium","low"]},effort:{type:"integer",description:"1 (trivial) to 5 (demanding)"},risks:{type:"array",items:{type:"string"}}},required:["changes","confidence","effort","risks"],additionalProperties:!1},k=[/^(?:bunx|npx|pnpm dlx|yarn dlx)\s+[\w@/.-]+(?:\s+[\w@/.:=-]+)*$/];function f(J){let Y=J.trim();if(/[;&|`$><\n]/.test(Y))return!1;return k.some((Q)=>Q.test(Y))}function T(J){let Y=J.usage.slice(0,100).map((Q)=>`${Q.path}:${Q.line} (${Q.kind}) ${Q.text}`).join(`
|
|
3
|
-
`);return[`Analyse upgrading \`${J.packageName}\` from ${J.fromVersion} to ${J.toVersion}.`,"","Report only breaking changes that affect THIS repository, judged against the","usage sites below. A breaking change in a feature this repository does not use","is not worth reporting, and listing it makes the real ones harder to find.","","Mark a change automatable only when the fix is a mechanical edit you could write","exactly. Anything needing judgement is not automatable.","","If the package publishes an official codemod for this upgrade, report the command.","","Set confidence honestly: high when every change is understood and mechanical,","low when the notes are unclear or the change touches something subtle. A low","confidence plan is more useful than a wrong high confidence one.","","--- Release notes across the version span ---",J.releaseNotes||"(none available)","",`--- Usage in this repository (${J.usage.length} site(s)) ---`,Y||"(no direct usage found)"].join(`
|
|
4
|
-
`)}function C(J,Y){let Q=J??{},Z=new Set(Y.knownFiles),K=(Array.isArray(Q.changes)?Q.changes:[]).filter(($)=>Boolean($&&typeof $.description==="string"&&typeof $.action==="string")).map(($)=>({description:$.description,...$.version?{version:$.version}:{},affectedFiles:(Array.isArray($.affectedFiles)?$.affectedFiles:[]).filter((W)=>Z.has(W)),action:$.action,automatable:$.automatable===!0})),H=Q.codemod&&f(Q.codemod.command)?Q.codemod:void 0;return{packageName:Y.packageName,fromVersion:Y.fromVersion,toVersion:Y.toVersion,changes:K,...H?{codemod:H}:{},confidence:b(Q.confidence,K),effort:y(Q.effort),risks:(Array.isArray(Q.risks)?Q.risks:[]).filter(($)=>typeof $==="string")}}function A(J,Y="high"){let Q={low:0,medium:1,high:2};return Q[J.confidence]<Q[Y]}function b(J,Y){let Q=J==="high"||J==="medium"||J==="low"?J:"low";if(Q==="high"&&Y.some((Z)=>!Z.automatable))return"medium";return Q}function y(J){let Y=Number(J);if(!Number.isFinite(Y))return 3;return Math.min(5,Math.max(1,Math.round(Y)))}import{resolve as h}from"path";var m=/\.(?:[cm]?[jt]sx?|vue|svelte)$/,g=/(?:^|\/)(?:[\w.-]*\.config\.[cm]?[jt]s|\.?[\w-]*rc(?:\.\w+)?|tsconfig\.json|vite\.config\.[cm]?[jt]s)$/;async function E(J,Y,Q){let Z=J.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),K=`${Z}(?:/[^'"\`]*)?`,H=new RegExp(`(?:^|\\s)import\\s[^'"\`]*['"\`]${K}['"\`]|from\\s*['"\`]${K}['"\`]`),$=new RegExp(`require\\s*\\(\\s*['"\`]${K}['"\`]\\s*\\)`),W=new RegExp(`import\\s*\\(\\s*['"\`]${K}['"\`]\\s*\\)`),j=new RegExp(`(?:^|[^\\w@/.-])${Z}(?![\\w/.-])`),z=[];for(let X of Y){let B=m.test(X),O=g.test(X);if(!B&&!O)continue;let D;try{let _=Bun.file(h(Q,X));if(!await _.exists())continue;D=await _.text()}catch{continue}if(!D.includes(J))continue;for(let[_,U]of D.split(`
|
|
5
|
-
`).entries()){let P=null;if(H.test(U)||W.test(U))P="import";else if($.test(U))P="require";else if(O&&j.test(U))P="config";if(P)z.push({path:X,line:_+1,text:U.trim().slice(0,200),kind:P})}}return z}function x(J){let Y=new Map;for(let Q of J)Y.set(Q.path,(Y.get(Q.path)??0)+1);return[...Y.entries()].map(([Q,Z])=>({path:Q,count:Z})).sort((Q,Z)=>Z.count-Q.count)}var u={high:"\uD83D\uDFE2 high",medium:"\uD83D\uDFE1 medium",low:"\uD83D\uDD34 low"};function G(J,Y,Q=[]){let Z=`## \uD83D\uDD27 Migration report
|
|
6
|
-
|
|
7
|
-
`;if(Z+=`Upgrading \`${J.packageName}\` from \`${J.fromVersion}\` to \`${J.toVersion}\`.
|
|
8
|
-
|
|
9
|
-
`,Z+=`**Confidence:** ${u[J.confidence]} \xB7 **Effort:** ${"\u25CF".repeat(J.effort)}${"\u25CB".repeat(5-J.effort)} (${J.effort}/5)
|
|
10
|
-
|
|
11
|
-
`,J.changes.length===0)Z+=`No breaking changes in this span affect how this repository uses the package.
|
|
12
|
-
|
|
13
|
-
`;else{Z+=`### Breaking changes affecting this repository
|
|
14
|
-
|
|
15
|
-
`;for(let H of J.changes){let $=H.version?` _(${H.version})_`:"",W=H.automatable?"\uD83D\uDD27":"\u270B";if(Z+=`- ${W} **${F(H.description)}**${$}
|
|
16
|
-
`,Z+=` - ${F(H.action)}
|
|
17
|
-
`,H.affectedFiles.length>0)Z+=` - Affects: ${H.affectedFiles.map((j)=>`\`${j}\``).join(", ")}
|
|
18
|
-
`}Z+=`
|
|
19
|
-
\uD83D\uDD27 applied automatically \xB7 \u270B needs a person
|
|
20
|
-
|
|
21
|
-
`}if(J.codemod)Z+=`### Codemod
|
|
22
|
-
|
|
23
|
-
Ran \`${F(J.codemod.command)}\` (${F(J.codemod.source)}).
|
|
24
|
-
|
|
25
|
-
`;if(Y){if(Z+=`### What was done
|
|
26
|
-
|
|
27
|
-
`,!Y.applied)Z+=`No code changes were made \u2014 this is analysis only.
|
|
28
|
-
|
|
29
|
-
`;else if(Z+=`Changed ${Y.changedFiles.length} file(s):
|
|
30
|
-
|
|
31
|
-
`,Z+=`${Y.changedFiles.map((H)=>`- \`${H}\``).join(`
|
|
32
|
-
`)}
|
|
33
|
-
|
|
34
|
-
`,Z+=Y.verified?`\u2705 The repository's own tests pass with these changes.
|
|
35
|
-
|
|
36
|
-
`:`\u274C Verification did **not** pass. Treat these changes as a starting point, not a finished migration.
|
|
37
|
-
|
|
38
|
-
`,Y.verificationOutput&&!Y.verified)Z+=`<details><summary>Verification output</summary>
|
|
39
|
-
|
|
40
|
-
\`\`\`
|
|
41
|
-
${Y.verificationOutput.slice(0,3000)}
|
|
42
|
-
\`\`\`
|
|
43
|
-
|
|
44
|
-
</details>
|
|
45
|
-
|
|
46
|
-
`;if(Y.unresolved.length>0)Z+=`### Still to do
|
|
47
|
-
|
|
48
|
-
`,Z+=`${Y.unresolved.map((H)=>`- [ ] ${F(H)}`).join(`
|
|
49
|
-
`)}
|
|
50
|
-
|
|
51
|
-
`}if(J.risks.length>0)Z+=`### Risks
|
|
52
|
-
|
|
53
|
-
${J.risks.map((H)=>`- ${F(H)}`).join(`
|
|
54
|
-
`)}
|
|
55
|
-
|
|
56
|
-
`;let K=x(Q);if(K.length>0)Z+=`<details><summary>Where this package is used (${Q.length} site(s))</summary>
|
|
57
|
-
|
|
58
|
-
`,Z+=`${K.slice(0,40).map((H)=>`- \`${H.path}\` \u2014 ${H.count} reference(s)`).join(`
|
|
59
|
-
`)}
|
|
60
|
-
|
|
61
|
-
`,Z+=`</details>
|
|
62
|
-
|
|
63
|
-
`;return Z}function F(J){return J.replace(/\|/g,"\\|").replace(/\n/g," ").replace(/#(\d)/g,"#\u200B$1")}async function V(J){let Y=J.logger??I(),{update:Q}=J;if(!J.ai)return Y.debug("\uD83D\uDD27 Major upgrade analysis skipped: no AI provider configured"),{plan:null,report:"",draft:!1,status:"skipped"};let Z=await E(Q.name,J.files,J.workspace);Y.info(`\uD83D\uDD27 Analysing ${Q.name} ${Q.currentVersion} \u2192 ${Q.newVersion} (${Z.length} usage site(s))`);let K=[...new Set(Z.map((B)=>B.path))],H=await J.ai.complete({system:"You analyse major dependency upgrades. Report only what affects the repository "+"you are shown, and state confidence honestly \u2014 a low-confidence plan is more useful "+"than a wrong high-confidence one.",messages:[{role:"user",content:T({packageName:Q.name,fromVersion:Q.currentVersion,toVersion:Q.newVersion,releaseNotes:J.releaseNotes,usage:Z})}],jsonSchema:R}),$=C(H.json,{packageName:Q.name,fromVersion:Q.currentVersion,toVersion:Q.newVersion,knownFiles:K}),W=A($,J.draftBelowConfidence??"high");if(J.autoMigrate!==!0)return{plan:$,report:G($,void 0,Z),draft:W,status:"analysis-only"};if($.changes.length===0)return Y.info("\uD83D\uDD27 No breaking changes affect this repository; nothing to migrate"),{plan:$,report:G($,void 0,Z),draft:!1,status:"analysis-only"};let j=await N(J.ai,{mode:M,task:c($),context:{workspace:J.workspace,baseBranch:J.baseBranch,...J.branch?{branch:J.branch}:{}},logger:Y}),z=j.stopReason==="completed",X={applied:j.toolCalls>0,verified:z,changedFiles:K,unresolved:z?[]:$.changes.filter((B)=>!B.automatable).map((B)=>B.action),...z?{}:{verificationOutput:j.output}};return{plan:$,outcome:X,report:G($,X,Z),draft:W||!z,status:z?"migrated":"migration-failed"}}function c(J){let Y=J.changes.map((Q,Z)=>`${Z+1}. ${Q.description}
|
|
64
|
-
Action: ${Q.action}
|
|
65
|
-
Files: ${Q.affectedFiles.join(", ")||"(none identified)"}`);return[`Migrate this repository for the ${J.packageName} upgrade from ${J.fromVersion} to ${J.toVersion}.`,"",J.codemod?`An official codemod exists. Run it first:
|
|
66
|
-
${J.codemod.command}
|
|
67
|
-
`:"","Breaking changes to address:","",Y.join(`
|
|
68
|
-
|
|
69
|
-
`),"","Change only what these require. A migration commit that also refactors","surrounding code is one a reviewer has to disentangle.","","Run the repository's tests when you are done. If they fail and you cannot fix it,","stop and report what failed \u2014 do not report success you have not verified."].filter(Boolean).join(`
|
|
70
|
-
`)}var WJ=24000,d=/^v?(\d+)\.(\d+)\.(\d+)/;function q(J){let Y=d.exec(J.trim());return Y?[Number(Y[1]),Number(Y[2]),Number(Y[3])]:null}function L(J,Y){return J[0]-Y[0]||J[1]-Y[1]||J[2]-Y[2]}function l(J,Y,Q){let[Z,K,H]=[q(J),q(Y),q(Q)];if(!Z||!K||!H)return!1;return L(Z,K)>0&&L(Z,H)<=0}function i(J){return q(J)?.[2]===0}function S(J,Y,Q,Z=24000){let K=J.filter((X)=>!X.isPrerelease&&l(X.version,Y,Q)),H=[],$=[];for(let X of K){let B=q(X.version)!==null&&q(Q)!==null&&L(q(X.version),q(Q))===0;if(i(X.version)||B)$.push(X);else H.push({version:X.version,reason:"patch-release"})}$.sort((X,B)=>L(q(B.version)??[0,0,0],q(X.version)??[0,0,0]));let W=[],j=[],z=0;for(let X of $){let B=r(X);if(z+B.length>Z){H.push({version:X.version,reason:"budget"});continue}W.push(B),j.push(X.version),z+=B.length}return{notes:W.join(`
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
`),included:j,omitted:H,truncated:K.length===0&&Y!==Q}}function r(J){return`${J.htmlUrl?`## [${J.version}](${J.htmlUrl})`:`## ${J.version}`}
|
|
75
|
-
|
|
76
|
-
${J.body.trim()}`.trim()}function w(J){if(J.truncated)return"\u26A0\uFE0F No release notes were found for this version span; the analysis below is based on usage sites alone.";let Y=J.omitted.filter((Q)=>Q.reason==="budget");if(Y.length===0)return"";return`\u26A0\uFE0F ${Y.length} release(s) in this span were omitted for length: ${Y.map((Q)=>Q.version).join(", ")}.`}function p(J,Y){if(!Y?.length)return!0;return Y.some((Q)=>{let Z=Q.split("*").map((K)=>K.replace(/[.+?^${}()|[\]\\]/g,"\\$&")).join(".*");return new RegExp(`^${Z}$`).test(J)})}async function FJ(J){let Y=J.logger??I(),Q=J.config.ai?.majorUpgrades,Z={report:"",draft:!1,results:[],skipped:[]};if(!Q?.enabled||!J.ai)return Z;let K=J.updates.filter((W)=>W.updateType==="major");if(K.length===0)return Z;let H=[],$=[];for(let W of K){if(!p(W.name,Q.packages)){$.push({name:W.name,reason:"not matched by ai.majorUpgrades.packages"});continue}try{let j=await J.fetchReleases(W.name,W.currentVersion,W.newVersion),z=S(j,W.currentVersion,W.newVersion),X=w(z),B=await V({update:W,releaseNotes:z.notes,files:J.files,workspace:J.workspace,baseBranch:J.baseBranch,ai:J.ai,...Q.autoMigrate!==void 0?{autoMigrate:Q.autoMigrate}:{},...Q.draftBelowConfidence?{draftBelowConfidence:Q.draftBelowConfidence}:{},logger:Y});H.push({update:W,result:X?{...B,report:`${X}
|
|
77
|
-
|
|
78
|
-
${B.report}`}:B})}catch(j){Y.warn(`\u26A0\uFE0F Could not analyse the ${W.name} major upgrade: ${j}`),$.push({name:W.name,reason:"analysis failed"})}}return{report:s(H,$),draft:H.some((W)=>W.result.draft),results:H,skipped:$}}function s(J,Y){let Q=J.filter((K)=>K.result.report).map((K)=>`### ${K.update.name} ${K.update.currentVersion} \u2192 ${K.update.newVersion}
|
|
79
|
-
|
|
80
|
-
${K.result.report}`);if(Q.length===0&&Y.length===0)return"";let Z=["## Major upgrade analysis","",...Q];if(Y.length>0)Z.push("",`Not analysed: ${Y.map((K)=>`\`${K.name}\` (${K.reason})`).join(", ")}.`);return Z.join(`
|
|
81
|
-
`)}function UJ(J,Y){if(!Y.trim())return J;let Q=v(J),Z=J.slice(Q.length);return`${Q}
|
|
82
|
-
|
|
83
|
-
---
|
|
84
|
-
|
|
85
|
-
${Y}${Z}`}
|
|
86
|
-
export{R as $h,f as ai,T as bi,C as ci,A as di,E as ei,x as fi,G as gi,V as hi,WJ as ii,S as ji,w as ki,p as li,FJ as mi,UJ as ni};
|
package/dist/chunk-nsmcjkas.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-1a53wj0h.js";import{$a as b,_a as a,ab as c,bb as d}from"./chunk-fdj0tewy.js";import"./chunk-bxfc4g2x.js";import"./chunk-g0w8n555.js";import"./chunk-tzs22es2.js";import"./chunk-9750tenz.js";import"./chunk-akffynkc.js";import"./chunk-6g1y9yqh.js";export{b as extractErrorLines,c as describeFailure,a as classifyFailure,d as attemptFix};
|
package/dist/chunk-p1xm1jvz.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ja as a,Ka as b,La as c,Ma as d,Na as e,Oa as f}from"./chunk-xvptf9jy.js";import"./chunk-1h3ey7k5.js";import"./chunk-akffynkc.js";import"./chunk-6g1y9yqh.js";export{b as productFor,f as describeEol,c as cycleFor,d as checkEol,e as EOL_WARNING_DAYS,a as EOL_PRODUCTS};
|
package/dist/chunk-p3wsm8kz.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-x9ctz1qc.js";import{cb as d,db as e,eb as f,fb as g,gb as h,hb as i,ib as j,jb as k,kb as l,lb as q,mb as r,nb as s,ob as t,pb as u,qb as v,rb as w}from"./chunk-bm8d40j0.js";import{sb as a,tb as b,ub as c}from"./chunk-4xsq18p3.js";import{Ab as n,Bb as o,Cb as p,zb as m}from"./chunk-49ey79p0.js";import"./chunk-74pxb991.js";import"./chunk-p4zwy518.js";import"./chunk-vagxqhef.js";import"./chunk-xqx460y2.js";import"./chunk-ts35hc5t.js";import{Rd as x,Sd as y,Td as z,Ud as A,Vd as B,Wd as C,Xd as D,Yd as E,Zd as F,_d as G}from"./chunk-fvpr07dn.js";import"./chunk-q9n79dd3.js";import"./chunk-tzs22es2.js";import"./chunk-1h3ey7k5.js";import"./chunk-akffynkc.js";import"./chunk-6g1y9yqh.js";export{g as validateFindings,G as shouldFail,n as serializeReviewState,w as runReviewForPR,j as reviewDiff,u as renderFinding,b as renderDiffForReview,v as prepareReview,a as parseUnifiedDiff,o as parseReviewState,p as needsReview,s as loadGuidelines,E as formatReview,A as formatPretty,B as formatGithub,C as formatAgent,f as fingerprint,y as diffArgsFor,l as defaultIncludePath,h as dedupeFindings,D as countBySeverity,t as composeInstructions,z as collectLocalDiff,c as collectGitDiff,F as applySuggestion,k as anchorMap,d as SEVERITY_ORDER,m as REVIEW_STATE_VERSION,e as REVIEW_SCHEMA,x as REVIEW_FORMATS,r as MAX_GUIDELINE_CHARS,q as DEFAULT_GUIDELINE_FILES,i as DEFAULT_EXCLUDED_PATHS};
|
package/dist/chunk-p7zgy37f.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{$c as e,Xc as a,Yc as b,Zc as c,_c as d,ad as f}from"./chunk-1c1gznm9.js";import"./chunk-q9n79dd3.js";import"./chunk-978wtejw.js";import"./chunk-pkkwb0n0.js";import"./chunk-ph1b3vbp.js";import"./chunk-0j7z87kh.js";import"./chunk-7mgec8kb.js";import"./chunk-5k40mwd4.js";import"./chunk-1h3ey7k5.js";import"./chunk-akffynkc.js";import"./chunk-x3kragh9.js";import"./chunk-wdwvt7gb.js";import"./chunk-8661pvb8.js";import"./chunk-ctsz0ynx.js";import"./chunk-vkctfqpm.js";import"./chunk-6g1y9yqh.js";export{b as ruleMatches,c as resolveRuleEffects,e as mergeGroupEffects,f as groupsToRules,a as ecosystemOf,d as applyRules};
|