@visulima/vis 6.4.4 → 6.5.1
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 +21 -0
- package/LICENSE.md +0 -51
- package/README.md +27 -25
- package/dist/bin.js +1 -1
- package/dist/binx.js +1 -1
- package/dist/packem_chunks/bloom-sync.js +1 -1
- package/dist/packem_chunks/cargo-plan.js +1 -1
- package/dist/packem_chunks/catalog-detector.js +1 -1
- package/dist/packem_chunks/catalog.js +11 -1
- package/dist/packem_chunks/cli-exec.js +1 -1
- package/dist/packem_chunks/cli-main.js +130 -131
- package/dist/packem_chunks/context.js +4 -4
- package/dist/packem_chunks/fix.js +1 -1
- package/dist/packem_chunks/handler10.js +1 -1
- package/dist/packem_chunks/handler12.js +1 -1
- package/dist/packem_chunks/handler13.js +1 -1
- package/dist/packem_chunks/handler14.js +1 -1
- package/dist/packem_chunks/handler15.js +1 -1
- package/dist/packem_chunks/handler19.js +1 -1
- package/dist/packem_chunks/handler2.js +1 -1
- package/dist/packem_chunks/handler20.js +1 -1
- package/dist/packem_chunks/handler21.js +1 -1
- package/dist/packem_chunks/handler23.js +1 -1
- package/dist/packem_chunks/handler24.js +1 -1
- package/dist/packem_chunks/handler25.js +1 -1
- package/dist/packem_chunks/handler26.js +1 -1
- package/dist/packem_chunks/handler28.js +1 -1
- package/dist/packem_chunks/handler3.js +1 -1
- package/dist/packem_chunks/handler32.js +1 -1
- package/dist/packem_chunks/handler39.js +5 -5
- package/dist/packem_chunks/handler4.js +1 -1
- package/dist/packem_chunks/handler46.js +1 -1
- package/dist/packem_chunks/handler49.js +1 -1
- package/dist/packem_chunks/handler5.js +1 -1
- package/dist/packem_chunks/handler50.js +1 -1
- package/dist/packem_chunks/handler51.js +1 -1
- package/dist/packem_chunks/handler52.js +1 -1
- package/dist/packem_chunks/handler54.js +1 -1
- package/dist/packem_chunks/handler55.js +1 -1
- package/dist/packem_chunks/handler56.js +5 -5
- package/dist/packem_chunks/handler58.js +1 -1
- package/dist/packem_chunks/handler59.js +1 -1
- package/dist/packem_chunks/handler6.js +1 -1
- package/dist/packem_chunks/handler60.js +1 -1
- package/dist/packem_chunks/handler61.js +1 -1
- package/dist/packem_chunks/handler62.js +1 -1
- package/dist/packem_chunks/handler63.js +1 -1
- package/dist/packem_chunks/handler64.js +1 -1
- package/dist/packem_chunks/handler65.js +1 -1
- package/dist/packem_chunks/handler66.js +1 -1
- package/dist/packem_chunks/handler67.js +1 -1
- package/dist/packem_chunks/handler68.js +12 -28
- package/dist/packem_chunks/handler69.js +37 -12
- package/dist/packem_chunks/handler7.js +1 -1
- package/dist/packem_chunks/handler70.js +1 -1
- package/dist/packem_chunks/handler71.js +1 -1
- package/dist/packem_chunks/handler72.js +311 -10
- package/dist/packem_chunks/handler73.js +10 -133
- package/dist/packem_chunks/handler74.js +133 -23
- package/dist/packem_chunks/handler75.js +23 -323
- package/dist/packem_chunks/handler76.js +1 -1
- package/dist/packem_chunks/handler77.js +1 -1
- package/dist/packem_chunks/handler78.js +1 -1
- package/dist/packem_chunks/handler79.js +1 -1
- package/dist/packem_chunks/handler8.js +1 -1
- package/dist/packem_chunks/heal.js +1 -1
- package/dist/packem_chunks/help-command.js +1 -1
- package/dist/packem_chunks/index3.js +28 -35
- package/dist/packem_chunks/index5.js +140 -801
- package/dist/packem_chunks/index6.js +801 -140
- package/dist/packem_chunks/index7.js +1 -1
- package/dist/packem_chunks/keys-refresh.js +1 -1
- package/dist/packem_chunks/list.js +1 -1
- package/dist/packem_chunks/native-addon.js +12 -0
- package/dist/packem_chunks/prune.js +1 -1
- package/dist/packem_chunks/python-plan.js +1 -1
- package/dist/packem_chunks/python-projects.js +1 -1
- package/dist/packem_chunks/python.js +1 -1
- package/dist/packem_chunks/snapshot.js +2 -2
- package/dist/packem_chunks/status.js +1 -1
- package/dist/packem_chunks/sync.js +1 -1
- package/dist/packem_chunks/sync2.js +1 -1
- package/dist/packem_chunks/tripwire.js +1 -1
- package/dist/packem_chunks/verify-lockfile.js +1 -1
- package/dist/packem_chunks/version-resolver.js +1 -1
- package/dist/packem_chunks/workspace.js +1 -1
- package/dist/packem_shared/{ReleaseClient-DaoIXjdn.js → ReleaseClient-CQaGkUHL.js} +1 -1
- package/dist/packem_shared/{advisories-CePsyvwG.js → advisories-DzWrfMwP.js} +1 -1
- package/dist/packem_shared/{affected-selection-CeiYNePc.js → affected-selection-mQmHyn-j.js} +1 -1
- package/dist/packem_shared/{ai-analysis-BA0POlbg.js → ai-analysis-CIN__RZj.js} +1 -1
- package/dist/packem_shared/{ai-cache-DPBsl-hV.js → ai-cache-BgoifbUT.js} +1 -1
- package/dist/packem_shared/{ai-fix-B77m7n2b.js → ai-fix-BG2olCnp.js} +1 -1
- package/dist/packem_shared/apply-BrRx__KL.js +8 -0
- package/dist/packem_shared/apply-release-plan-Cf6TJxK2.js +15 -0
- package/dist/packem_shared/{bin-D3ykhfdS.js → bin-DcZlUzKR.js} +1 -1
- package/dist/packem_shared/{build-scripts-DroekY_B.js → build-scripts-BtdNDGRO.js} +1 -1
- package/dist/packem_shared/createVersionActions-GD1Y4pNe.js +1 -0
- package/dist/packem_shared/{dependency-scan-DRFM_81X.js → dependency-scan-BmnwM6FX.js} +1 -1
- package/dist/packem_shared/{detect-BcgSLkMm.js → detect-DwXq9NzG.js} +1 -1
- package/dist/packem_shared/{docker-BvjXmtDx.js → docker-CN9h1ZAl.js} +1 -1
- package/dist/packem_shared/{ecosystem-gate-cnVeegV2.js → ecosystem-gate-DX0ZULH7.js} +1 -1
- package/dist/packem_shared/{env-Aebh_7xU.js → env-BUf_aJzW.js} +1 -1
- package/dist/packem_shared/{env-consistency-CsRtFVjG.js → env-consistency-B69mYzeD.js} +1 -1
- package/dist/packem_shared/{failure-log-Busa1iE8.js → failure-log-DiIZhhLI.js} +1 -1
- package/dist/packem_shared/glob-Cyk1H9ZL-CoX0RPCo.js +1 -0
- package/dist/packem_shared/{index-CiJWXOfI.js → index-CBn2VY5B.js} +1 -1
- package/dist/packem_shared/{index-BGIPGEa6.js → index-DhxUCW8T.js} +1 -1
- package/dist/packem_shared/junit-audit-CuJShWCH.js +13 -0
- package/dist/packem_shared/{lifecycle-C9PINrzB.js → lifecycle-GbShWxRp.js} +1 -1
- package/dist/packem_shared/{manifests-CGl2k8eD.js → manifests-dmM8N980.js} +1 -1
- package/dist/packem_shared/{min-release-age-Bm6IFgxW.js → min-release-age-PO0aM3R7.js} +1 -1
- package/dist/packem_shared/{missing-package-json-CNN9E7An.js → missing-package-json-BhiqxoDg.js} +1 -1
- package/dist/packem_shared/{multi-eco-lockfiles-DrgeQKa3.js → multi-eco-lockfiles-BK7QtgHY.js} +1 -1
- package/dist/packem_shared/{native-config-sync-CKePir7A.js → native-config-sync-B0GvRp9j.js} +1 -1
- package/dist/packem_shared/{osv-CtKBUlaU.js → osv-J53omdC9.js} +1 -1
- package/dist/packem_shared/{package-version-ChA7gKlB.js → package-version-C6xroAcI.js} +1 -1
- package/dist/packem_shared/{packument-DV0k4rzI.js → packument-DZRLzoJA.js} +1 -1
- package/dist/packem_shared/{project-name-filter-BnHcuGOv.js → project-name-filter-DHT0wEZm.js} +1 -1
- package/dist/packem_shared/{provenance-hAvGHOgZ.js → provenance-Cv6Fj_BX.js} +1 -1
- package/dist/packem_shared/{publish-missing-Df39xUBX.js → publish-missing-CfwPeX1q.js} +1 -1
- package/dist/packem_shared/{registry-D8odQGcR.js → registry-B5KGXKED.js} +1 -1
- package/dist/packem_shared/{registry-keys-BLiJKMuS.js → registry-keys-BXUXfg-B.js} +1 -1
- package/dist/packem_shared/{renderToString-DR0zDUjh-lzGitq_6.js → renderToString-DR0zDUjh-BY4_eILr.js} +1 -1
- package/dist/packem_shared/{resolve-explicit-CODAmTx4.js → resolve-explicit-Sfza3_kc.js} +1 -1
- package/dist/packem_shared/{run-summary-utils-CINjiLBE.js → run-summary-utils-CQjbLnkh.js} +1 -1
- package/dist/packem_shared/{runtime-check-BMDR1_bb.js → runtime-check-BTZdc1k2.js} +1 -1
- package/dist/packem_shared/{s1ngularity-RvRfoneb.js → s1ngularity-BrjAz--X.js} +1 -1
- package/dist/packem_shared/{scaffold-files-BdvNqI-N.js → scaffold-files-B77HPWjE.js} +1 -1
- package/dist/packem_shared/{scan-progress-aGfhWB5U.js → scan-progress-D5c-HQ_W.js} +1 -1
- package/dist/packem_shared/{selectors-CB84rN3y.js → selectors-l6BxIFLB.js} +1 -1
- package/dist/packem_shared/{signatures-yyWil8DY.js → signatures-C4MN75Bv.js} +1 -1
- package/dist/packem_shared/{spinner-DeG1597-.js → spinner-BryD7iJl.js} +1 -1
- package/dist/packem_shared/{table-B80pPNSi.js → table-BzBEMntH.js} +1 -1
- package/dist/packem_shared/{tabs-BAZbyp4k.js → tabs-DL_c_u-P.js} +1 -1
- package/dist/packem_shared/{toolchain-BPOxrpDU.js → toolchain-CbsBoqgN.js} +1 -1
- package/dist/packem_shared/{typosquats-Ch-a1qTB.js → typosquats-DRl1AA90.js} +1 -1
- package/dist/packem_shared/{use-measured-height-DVKGDAAE.js → use-measured-height-DobMKRXG.js} +1 -1
- package/dist/packem_shared/{vis-update-app-u5igJf_k.js → vis-update-app-CyCv-5iU.js} +1 -1
- package/dist/packem_shared/{vis-user-error-cD2VO4b_.js → vis-user-error-DjdeJsEK.js} +1 -1
- package/dist/packem_shared/{watch-loop-dAIFTLTH.js → watch-loop-D2QKvSts.js} +1 -1
- package/dist/release/index.js +1 -1
- package/index.js +26 -26
- package/package.json +10 -10
- package/dist/packem_chunks/cargo-lock.js +0 -5
- package/dist/packem_chunks/catalog2.js +0 -11
- package/dist/packem_shared/apply-DA-Dv8Pq.js +0 -8
- package/dist/packem_shared/apply-release-plan-BZ_E8GXQ.js +0 -15
- package/dist/packem_shared/clean-package-json-rutwkKl-.js +0 -1
- package/dist/packem_shared/createVersionActions-DXo4z8VN.js +0 -1
- package/dist/packem_shared/glob-Cyk1H9ZL-z7dfCruF.js +0 -1
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{createRequire as L}from"node:module";import{DEFAULT_CHANGES_DIR as I}from"../packem_chunks/DEFAULT_CLEAN_KEEP.js";import{VisReleaseError as b}from"./VisReleaseError-DZtgcKf8.js";import{a as T}from"./apply-release-plan-BZ_E8GXQ.js";import{createShellRunner as F}from"../packem_chunks/shell-runner.js";import{R as H}from"../packem_chunks/context.js";let D;const G=e=>(D??=L(import.meta.url))(e),C=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,j=e=>{if(typeof C<"u"&&C.versions&&C.versions.node){const[i,t]=C.versions.node.split(".").map(Number);if(i>22||i===22&&t>=3||i===20&&t>=16)return C.getBuiltinModule(e)}return G(e)},{writeFile:A,unlink:N}=j("node:fs/promises"),{resolve:O}=j("node:path"),q=e=>{const i=e.channel?.tag??e.branch??"main",{releases:t}=e.plan,l=t.length<=3?t.map(r=>`${r.name}@${r.newVersion}`).join(", "):`version ${t.length} packages`,f=t.map(r=>`- ${r.name}: ${r.oldVersion} → ${r.newVersion}`).join(`
|
|
2
|
-
`);return`release(${i}): ${l} [skip ci]
|
|
3
|
-
|
|
4
|
-
${f}`},U=async(e,i,t,l)=>{const f=await import("node:fs/promises"),{getCurrentSha:r,LOCKFILE_NAMES:w,RELEASE_SOURCE_TRAILER:p,stageAndCommit:o}=await import("../packem_chunks/git.js"),d=F(),s=await import("node:path"),a=[];for(const c of w)try{await f.access(s.join(e.cwd,c)),a.push(s.join(e.cwd,c))}catch{}const n=e.config.tagTarget==="source"?l??await r({cwd:e.cwd,runner:d}):void 0,m=n===void 0?"":`
|
|
5
|
-
|
|
6
|
-
${p}: ${n}`,g=e.config.aggregateRelease===!0||typeof e.config.aggregateRelease=="object"&&e.config.aggregateRelease.enabled;let h;if(e.config.oneCommitPerPackage===!0&&!g&&e.plan.releases.length>0){const c=e.channel?.tag??e.branch??"main",y=i.writes.map(k=>k.path),u=new Set,{releases:v}=e.plan;for(let k=0;k<v.length;k+=1){const P=v[k],V=e.depGraph.getPackage(P.name),E=V?`${V.dir}${s.sep}`:void 0,S=E?y.filter(R=>R.startsWith(E)):[];for(const R of S)u.add(R);const M=k===v.length-1?[...y.filter(R=>!u.has(R)),...i.deletions,...a]:[],_=[...S,...M];_.length!==0&&(h=await o({cwd:e.cwd,runner:d},_,`release(${c}): ${P.name}@${P.newVersion} [skip ci]${m}`,{author:e.config.gitUser}))}}else{const c=t??q(e),y=[...i.writes.map(u=>u.path),...i.deletions,...a];h=await o({cwd:e.cwd,runner:d},y,`${c}${m}`,{author:e.config.gitUser})}return h},W=async(e,i)=>{const t=[],{applyExtraFilesForRelease:l}=await import("../packem_chunks/extra-files.js"),{applyVersionFilesForRelease:f}=await import("../packem_chunks/cargo-lock.js").then(a=>a.v),{cargoManifestPaths:r}=await import("../packem_chunks/cargo-lock.js").then(a=>a.g),w=await Promise.all(e.plan.releases.map(async a=>{const n=e.depGraph.getPackage(a.name);if(!n)return{warnings:[],writes:[]};const m=e.perPackageConfig.get(a.name)?.extraFiles??[],g=e.config.publish?.extraFiles??[],h=e.perPackageConfig.get(a.name)?.versionFiles??[],y=m.length>0||g.length>0?await l(e.cwd,n.dir,a.newVersion,a.name,g,m):{warnings:[],writes:[]},u=h.length>0?await f(n.dir,h,a.newVersion,a.name,new Map(y.writes.map(v=>[v.path,v.content]))):{writes:[]};return{warnings:y.warnings,writes:[...y.writes,...u.writes]}})),p=new Map,o=new Set;for(const a of w){for(const n of a.writes)p.set(n.path,n.content),o.add(n.path);t.push(...a.warnings)}const d=e.packages.filter(a=>a.ecosystem==="cargo"),s=e.plan.releases.flatMap(a=>{const n=e.depGraph.getPackage(a.name);if(!n||n.ecosystem!==void 0&&n.ecosystem!=="cargo")return[];const m=n.ecosystem==="cargo"?[n.manifestPath]:r(n.dir,e.perPackageConfig.get(a.name)??{});return m.length>0||n.ecosystem==="cargo"?[{ecosystem:n.ecosystem,manifestPaths:m,name:a.name,newVersion:a.newVersion}]:[]});if(s.length>0){const a=new Set(d.map(g=>g.manifestPath));d.length>0&&a.add(O(e.cwd,"Cargo.toml"));for(const g of e.packages)if(g.ecosystem===void 0)for(const h of r(g.dir,e.perPackageConfig.get(g.name)??{}))a.add(h);const{planCargoWorkspace:n}=await import("../packem_chunks/cargo-plan.js"),m=await n({crateManifests:d.map(g=>g.manifestPath),cwd:e.cwd,pending:p,releases:s,rewriteDependents:e.config.cargo?.discover===!0,scanManifests:[...a]});for(const g of m.touched)o.add(g);t.push(...m.warnings)}for(const a of H){const n=e.plan.releases.flatMap(g=>e.depGraph.getPackage(g.name)?.ecosystem===a.id?[{name:g.name,newVersion:g.newVersion}]:[]);if(n.length===0||a.plan===void 0)continue;const m=await a.plan({context:e,pending:p,projects:e.projectsByEcosystem?.get(a.id)??[],releases:n});for(const g of m.touched)o.add(g);t.push(...m.warnings)}for(const a of o)i.writes.push({content:p.get(a),path:a});t.length>0&&e.plan.warnings.push(...t)},B=async(e,i)=>{if(e.length===0)return;const{join:t}=await import("node:path");let l;try{const{createRequire:r}=await import("node:module"),{pathToFileURL:w}=await import("node:url"),p=r(t(i,"package.json"));l=await import(w(p.resolve("prettier")).href)}catch{return}const f=await import("node:fs/promises");for(const r of e)try{const w=await l.getFileInfo(r);if(w.ignored||!w.inferredParser)continue;const p=await f.readFile(r,"utf8"),o=await l.resolveConfig(r),d=await l.format(p,{...o,filepath:r});d!==p&&await f.writeFile(r,d)}catch{}},$=async(e,i,t)=>{if(!i||i.trim()==="")return;const l=F(),f=process.platform==="win32",r=f?"cmd":"sh",w=f?["/c",i]:["-c",i],p=await l.run(r,w,{cwd:e,silent:!1});if(p.exitCode!==0)throw new Error(`${t} failed (exit ${p.exitCode}): ${i}`)},K=async(e,i)=>{const{normaliseGroup:t}=await import("../release/types.js"),l=[...e.config.fixed??[],...e.config.linked??[]].map(r=>t(r)),{default:f}=await import("../packem_chunks/index.js");for(const[r,w]of Object.entries(i)){const p=Number.parseInt(r.replace(/^group-/,""),10),o=l[p];!o||!e.plan.releases.some(s=>o.packages.some(a=>s.name===a||f(a,s.name)))||await $(e.cwd,w,`groupPreVersionCommand[${r}]`)}},z=async e=>{const i=e.config.verifyLockfile;if(i===!0&&!e.pm.verifyLockfile)throw new b({code:"CONFIG_INVALID",message:`release.verifyLockfile is not supported for ${e.pm.id} (only pnpm); remove it or set it to false.`});const t=i!==!1&&e.pm.verifyLockfile!==void 0;try{await e.pm.installLockfileOnly({cwd:e.cwd,silent:!0})}catch(l){if(!t||(await e.pm.runner.run(e.pm.id,["--version"],{cwd:e.cwd,silent:!0})).exitCode!==0)return;throw l}t&&await e.pm.verifyLockfile?.({cwd:e.cwd})},J=async(e,i,t,l={})=>{const{findConflictingPendingStages:f,readStagedRegistry:r,removePendingStages:w,writeStagedRegistry:p}=await import("../packem_chunks/staged-registry.js"),o=e.config.changesDir??I;let d=t??await r(e.cwd,o);if(d.pending.length===0)return;const s=new Map(e.plan.releases.map(c=>[c.name,c.newVersion])),a=[...s.keys()];let n=f(d,a).filter(c=>s.get(c.name)!==c.version);if(n.length===0)return;let m=[];if(!l.skipSelfHeal){const c=l.runner??F();m=(await Promise.all(n.map(async u=>{const v=await c.run("npm",["view",`${u.name}@${u.version}`,"dist.tarball","--silent"],{cwd:e.cwd,silent:!0});return v.exitCode===0&&v.stdout.trim().length>0?u.id:void 0}))).filter(u=>u!==void 0)}if(m.length>0){if(d=w(d,m),l.persistSelfHeal!==!1)try{await p(e.cwd,o,d)}catch{}if(n=f(d,a).filter(c=>s.get(c.name)!==c.version),n.length===0)return}const g=n.map(c=>` • ${c.name}@${c.version} — stage ${c.id} (${c.reason}, recorded ${c.stagedAt})`).join(`
|
|
7
|
-
`),h=i==="version"?"version":"publish";throw new b({code:"STAGE_PENDING",hint:"Resolve via `vis release stage approve <id>` / `--all` or `vis release stage reject <id>`, commit the updated staged.json, then retry.",message:`Refusing to ${h} — ${n.length} package(s) have a pending stage from a prior wave:
|
|
8
|
-
${g}`})},ae=async(e,i={})=>{if(e.plan.releases.length===0)return{changedFiles:[],deletedFiles:[],plan:e.plan};await J(e,"version",void 0,{persistSelfHeal:!1}),!i.dryRun&&e.config.preVersionCommand&&await $(e.cwd,e.config.preVersionCommand,"preVersionCommand"),!i.dryRun&&e.config.groupPreVersionCommands&&await K(e,e.config.groupPreVersionCommands);const{readFileSync:t}=await import("node:fs"),{resolveFormatter:l}=await import("../packem_chunks/resolveFormatter.js"),{resolveGroupChangelogRouting:f}=await import("../packem_chunks/workspace.js"),r=await l(e.config.changelog,e.cwd),w=new Date().toISOString().slice(0,10),p=f(e.config,e.packages,e.cwd),o=await T(e.plan,e.depGraph,{changelogPath:s=>p.get(s.name)??`${s.dir}/CHANGELOG.md`,internalDependencyRanges:e.config.internalDependencyRanges,readChangelog:s=>{try{return t(s,"utf8")}catch{return}},readManifest:s=>{try{return t(s,"utf8")}catch{return}},renderChangelogEntry:s=>r({changeFiles:s.changeFiles,date:w,release:s,target:"changelog"})});if(await W(e,o),i.dryRun)return{changedFiles:o.writes.map(s=>s.path),deletedFiles:o.deletions,plan:e.plan};if(await Promise.all([...o.writes.map(s=>A(s.path,s.content)),...o.deletions.map(async s=>{try{await N(s)}catch{}})]),!i.dryRun&&e.config.formatChangedFiles&&await B(o.writes.map(s=>s.path),e.cwd),e.config.plugins?.length){const{runApplyDraftHooks:s}=await import("../packem_chunks/defineReleasePlugin.js");await s({config:e.config,cwd:e.cwd},e.plan)}await z(e);const d=i.commit?await U(e,o,i.commitMessage,i.releaseSource):void 0;if(!i.dryRun&&e.config.postVersionCommand&&await $(e.cwd,e.config.postVersionCommand,"postVersionCommand"),!i.dryRun&&e.preMode?.mode==="exit-pending"){const{deletePreMode:s,preModeFilePath:a}=await import("../packem_chunks/pre-mode.js"),n=e.config.changesDir??".vis/release";await s(e.cwd,n)&&e.plan.warnings.push(`Pre-mode exited: \`${a(e.cwd,n)}\` was deleted. Commit the deletion so the registry stays consistent across CI runs.`)}return{changedFiles:o.writes.map(s=>s.path),commitSha:d,deletedFiles:o.deletions,plan:e.plan}};export{ae as a,J as b,$ as r,z as s};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import{s as h}from"./index--eV4qIz5.js";import{VisReleaseError as E}from"./VisReleaseError-DZtgcKf8.js";import{c as $}from"../packem_chunks/cargo-lock.js";const w=["dependencies","devDependencies","peerDependencies","optionalDependencies"],y=(e,t)=>{if(e.startsWith("catalog:")||e==="*"||e==="workspace:*"||e==="workspace:^"||e==="workspace:~")return e;if(e.startsWith("workspace:")){const n=e.slice(10);return`workspace:${m(n)}${t}`}if(e.startsWith("npm:")){const n=e.lastIndexOf("@");if(n<=4)return e;const i=e.slice(4,n),r=e.slice(n+1),c=m(r);return`npm:${i}@${c}${t}`}return`${m(e)}${t}`},P=/^([\^~=]|>=?|<=?)/,m=e=>{const t=P.exec(e);return t?t[1]??"^":"^"},D=/^[\^~=]?\s*v?\d+\.\d+\.\d+(?:-[\w.-]+)?(?:\+[\w.-]+)?$/,C=(e,t,s="rewrite",n={})=>{const i=s==="preserve-satisfying"?$(e):null;if(i===null||D.test(i.trim())||h.validRange(i)===null)return y(e,t);if(h.satisfies(t,i))return e;const r=i.split("||").map(a=>a.trim()),c=r.findIndex(a=>h.satisfies(t,a,{includePrerelease:!0}));if(c===-1){const a=n.dependent?` in ${n.dependent}'s ${n.kind??"dependencies"}`:"";throw new E({code:"DEPENDENCY_RANGE_EXCEEDED",hint:'Widen the range by hand (or set `internalDependencyRanges: "rewrite"`), then re-run the release.',message:`${n.depName??"dependency"}@${t} is outside "${e}"${a}; refusing to rewrite the range.`,packageName:n.dependent})}const p=(new h.Range(r[c]).set[0]??[]).filter(a=>a.operator.startsWith("<")).map(a=>a.value);return r[c]=[`>=${t}`,...p].join(" "),`${e.slice(0,e.length-i.length)}${r.join(" || ")}`},A=async(e,t,s={})=>{const n=s.serializeManifest??_,i=s.changelogPath??M,r=s.renderChangelogEntry??S,c=new Map(e.releases.map(o=>[o.name,o.newVersion])),p=await Promise.all(e.releases.map(async o=>{const l=t.getPackage(o.name);if(!l)return;const d=k(l.manifest,o.newVersion,c,s.internalDependencyRanges),g=s.readManifest?.(l.manifestPath),u=i(l);return{changelogEntry:await r(o),changelogPath:u,manifestWrite:l.ecosystem===void 0?{content:n(d,g),path:l.manifestPath}:void 0}})),a=[],f=new Map;for(const o of p){if(!o)continue;o.manifestWrite&&a.push(o.manifestWrite);const l=f.get(o.changelogPath);l?l.push(o.changelogEntry):f.set(o.changelogPath,[o.changelogEntry])}for(const[o,l]of f){const d=l.join(`
|
|
2
|
-
|
|
3
|
-
`),g=s.readChangelog?.(o);a.push({content:W(d,g),path:o})}return{deletions:e.consumedChangeFiles.map(o=>o.path),writes:a}},k=(e,t,s,n)=>{const i={...e,version:t};for(const r of w){const c=e[r];if(!c||typeof c!="object")continue;const p={...c};let a=!1;for(const[f,o]of Object.entries(c)){const l=s.get(f);if(l===void 0)continue;const d=C(o,l,n,{dependent:e.name,depName:f,kind:r});d!==o&&(p[f]=d,a=!0)}a&&(i[r]=p)}return i},v=/^# .+/,N=/^## /m,W=(e,t)=>{const s=e.trim();if(!t||t.trim()==="")return`# Changelog
|
|
4
|
-
|
|
5
|
-
${s}
|
|
6
|
-
`;const n=t.split(/\r?\n/);if(n[0]&&v.test(n[0])){let i=1;for(;i<n.length&&!(n[i]??"").startsWith("## ");)i+=1;const r=n.slice(0,i),c=n.slice(i);return r.length>0&&r[r.length-1]!==""&&r.push(""),[...r,s,"",...c].join(`
|
|
7
|
-
`).replaceAll(/\n{3,}/g,`
|
|
8
|
-
|
|
9
|
-
`)}return N.test(t)?`${s}
|
|
10
|
-
|
|
11
|
-
${t.trimStart()}`:`${s}
|
|
12
|
-
|
|
13
|
-
${t.trimStart()}`},_=(e,t)=>{const s=b(t);return`${JSON.stringify(e,null,s)}
|
|
14
|
-
`},b=e=>{if(!e)return 4;const t=/\n(\s+)"/.exec(e);if(!t)return 4;const s=(t[1]??"").length;return s===2||s===4?s:4},M=e=>`${e.dir}/CHANGELOG.md`,S=e=>{const t=new Date().toISOString().slice(0,10),s=[`## ${e.newVersion}`,`<sub>${t}</sub>`,""];if(e.isCascadeBump||e.isGroupBump)for(const n of e.sources)s.push(`- Version bump from ${n.name}@${n.newVersion}`);else if(e.isDependencyBump&&e.changeFiles.length===0)for(const n of e.sources)n.newVersion===""?s.push(`- Removed dependency ${n.name}`):s.push(`- Updated dependency ${n.name}@${n.newVersion}`);else for(const n of e.changeFiles)for(const i of n.body.split(/\r?\n/)){if(i.trim()===""){s.push("");continue}s.push(i.startsWith("-")||i.startsWith("*")?i:`- ${i}`)}return s.join(`
|
|
15
|
-
`)};export{A as a,W as p,y as r,C as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{resolveCleanStripList as i}from"../packem_chunks/DEFAULT_CLEAN_KEEP.js";const a=(e,o)=>{if(o===!1)return{...e};const t=new Set(i(o)),r={name:e.name,version:e.version};for(const[n,s]of Object.entries(e))t.has(n)||(r[n]=s);return r};export{a as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as t}from"../packem_chunks/index3.js";import"../packem_chunks/python.js";export{t as createVersionActions};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as t}from"./registry-D8odQGcR.js";const s=async(a,o)=>await t(a,o);export{s as l};
|