From 99e977d8d895bbed67189681f8ae33ecff4ed5de Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 24 Aug 2021 22:08:30 +0000 Subject: [PATCH] chore: release v21.8.7 @kherock/yarn-plugin-release: v1.6.2 --- CHANGELOG.md | 7 +++++++ package.json | 2 +- packages/plugin-release/CHANGELOG.md | 7 +++++++ packages/plugin-release/bundles/@yarnpkg/plugin-release.js | 4 +++- packages/plugin-release/package.json | 2 +- 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 834cefc..e766763 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [21.8.7](https://github.com/kherock/yarn-plugins/compare/v21.8.6...v21.8.7) (2021-08-24) + + +### Bug Fixes + +* **plugin-release:** remove hyperlink from annotated tag message ([6c9beaa](https://github.com/kherock/yarn-plugins/commit/6c9beaa535d04a11d0a90d3d07ce279d7e96f814)) + ## [21.8.6](https://github.com/kherock/yarn-plugins/compare/v21.8.5...v21.8.6) (2021-08-23) diff --git a/package.json b/package.json index 5d5f4b4..8ec8d33 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kherock/yarn-plugins", - "version": "21.8.6", + "version": "21.8.7", "private": true, "license": "BSD-2-Clause", "workspaces": [ diff --git a/packages/plugin-release/CHANGELOG.md b/packages/plugin-release/CHANGELOG.md index 0b9b149..0f0c7e7 100644 --- a/packages/plugin-release/CHANGELOG.md +++ b/packages/plugin-release/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.6.2](https://github.com/kherock/yarn-plugins/compare/@kherock/yarn-plugin-release@1.6.1...@kherock/yarn-plugin-release@1.6.2) (2021-08-24) + + +### Bug Fixes + +* **plugin-release:** remove hyperlink from annotated tag message ([6c9beaa](https://github.com/kherock/yarn-plugins/commit/6c9beaa535d04a11d0a90d3d07ce279d7e96f814)) + ## [1.6.1](https://github.com/kherock/yarn-plugins/compare/@kherock/yarn-plugin-release@1.6.0...@kherock/yarn-plugin-release@1.6.1) (2021-08-23) diff --git a/packages/plugin-release/bundles/@yarnpkg/plugin-release.js b/packages/plugin-release/bundles/@yarnpkg/plugin-release.js index 798080d..863408b 100644 --- a/packages/plugin-release/bundles/@yarnpkg/plugin-release.js +++ b/packages/plugin-release/bundles/@yarnpkg/plugin-release.js @@ -84,7 +84,9 @@ GFS4: `),console.error(e)});ft[mr]||(iS=global[mr]||[],nS(ft,iS),ft.close=functi $|&><\`"'`.split("").some(r=>e.includes(r))?`'${e.replace(/'/g,"\\'")}'`:e,ao=class extends rx.BaseCommand{constructor(){super(...arguments);this.json=Vr.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.dryRun=Vr.Option.Boolean("--dry-run",!1,{description:"Prints the recommended version bump to stdout"});this.amend=Vr.Option.Boolean("--amend",!1,{description:"Amend the previous commit instead of creating a new one"});this.tagHead=Vr.Option.String("--tag-head","HEAD",{description:"Specify an alternative commit-ish to tag"})}async execute(){let t=await et.Configuration.find(this.context.cwd,this.context.plugins),{project:r}=await et.Project.find(t,this.context.cwd),{stdout:i}=await et.execUtils.execvp("git",["tag","--list"],{cwd:r.cwd,strict:!0}),o=new Set(i.trim().split(/\s+/)),u=`v${r.topLevelWorkspace.locator.reference}`;if(o.has(u))throw new Vr.UsageError(`${u} has already been released`);let l=nx.default.prerelease(r.topLevelWorkspace.locator.reference);return(await et.StreamReport.start({configuration:t,stdout:this.context.stdout,json:this.json},async d=>{let p=r.topLevelWorkspace.getRecursiveWorkspaceChildren().filter(T=>!T.manifest.private&&!o.has(et.structUtils.stringifyLocator(T.locator)));if(!p.length){d.reportWarning(et.MessageName.UNNAMED,"There are no workspaces to tag");return}let g=p.map(({locator:T,manifest:I})=>`${et.structUtils.stringifyIdent(T)}: v${I.version}`).join(` `),h=`chore: release ${u} -${g}`,_=["commit","-m",h];this.amend&&_.push("--amend"),d.reportJson({gitOpt:"commit",commitMessage:h}),this.dryRun?d.reportInfo(et.MessageName.UNNAMED,`git ${_.map(Pp).join(" ")}`):await et.execUtils.execvp("git",_,{cwd:r.cwd,strict:!0});for(let{locator:T}of p){let I=et.structUtils.stringifyLocator(T),j=["tag",I,this.tagHead];d.reportJson({gitOp:"tag",tagName:I}),this.dryRun?d.reportInfo(et.MessageName.UNNAMED,`git ${j.map(Pp).join(" ")}`):await et.execUtils.execvp("git",j,{cwd:r.cwd,strict:!0})}let w="",S=new Du.Transform({transform(T,I,j){w+=T.toString(),j(null,T)}});await(0,ix.promisify)(Du.pipeline)([await oo(r.topLevelWorkspace,{releaseCount:1,skipUnstable:!l}),S]);let A=["tag","-a","-m",`${u} +${g}`,_=["commit","-m",h];this.amend&&_.push("--amend"),d.reportJson({gitOpt:"commit",commitMessage:h}),this.dryRun?d.reportInfo(et.MessageName.UNNAMED,`git ${_.map(Pp).join(" ")}`):await et.execUtils.execvp("git",_,{cwd:r.cwd,strict:!0});for(let{locator:T}of p){let I=et.structUtils.stringifyLocator(T),j=["tag",I,this.tagHead];d.reportJson({gitOp:"tag",tagName:I}),this.dryRun?d.reportInfo(et.MessageName.UNNAMED,`git ${j.map(Pp).join(" ")}`):await et.execUtils.execvp("git",j,{cwd:r.cwd,strict:!0})}let w="",S=new Du.Transform({transform(T,I,j){w+=T.toString(),j(null,T)}});await(0,ix.promisify)(Du.pipeline)([await oo(r.topLevelWorkspace,{releaseCount:1,skipUnstable:!l}),S]),w=w.split(` +`).slice(2).join(` +`);let A=["tag","-a","-m",`${u} ${w}`,"--cleanup=verbatim",u,this.tagHead];d.reportJson({tagName:u,tagMessage:w}),this.dryRun?d.reportInfo(et.MessageName.UNNAMED,`git ${A.map(Pp).join(" ")}`):await et.execUtils.execvp("git",A,{cwd:r.cwd,strict:!0})})).exitCode()}};ao.usage=Vr.Command.Usage({category:"Release-related commands",description:"Commits and tags releases",details:` This command will create a release for the current git project. `,examples:[["Commits and tags a release for this project's workspaces","yarn release-commit"]]}),ao.paths=[["release-commit"]];var sx=ao;var Fu=De(K("@yarnpkg/cli")),tt=De(K("@yarnpkg/core")),Ar=De(K("@yarnpkg/fslib")),zr=De(K("clipanion")),mx=De(gx()),Bu=De(K("semver")),Jr=De(K("stream")),Uu=De(K("util"));var Ap="CHANGELOG.md",uo=class extends Fu.BaseCommand{constructor(){super(...arguments);this.json=zr.Option.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.dryRun=zr.Option.Boolean("--dry-run",!1,{description:"Prints the recommended version bump to stdout"});this.firstRelease=zr.Option.Boolean("--first-release",!1,{description:"Skips bumping the version and regenerates the changelog from scratch"});this.date=zr.Option.String("--date",{description:"Override the release date in the changelog with the provided string"});this.prerelease=zr.Option.String("--prerelease",!1,{description:"Add a prerelease identifier to new versions",tolerateBoolean:!0});this.includeUnstable=zr.Option.Boolean("--include-unstable",!1,{description:"Create sections for unstable tags in the generated changelog. Implied by the --prerelease option"})}async execute(){this.includeUnstable||(this.includeUnstable=this.prerelease!==!1);let t=await tt.Configuration.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await tt.Project.find(t,this.context.cwd);if(!i)throw new Fu.WorkspaceRequiredError(r.cwd,this.context.cwd);let o=tt.structUtils.stringifyIdent(i.locator);return(await tt.StreamReport.start({configuration:t,stdout:this.context.stdout,json:this.json},async l=>{let f=i===r.topLevelWorkspace||!i.manifest.private,d=typeof this.prerelease=="string"?this.prerelease:void 0;if(f&&!this.firstRelease){let S=await Ep(i,{prerelease:this.prerelease!==!1,preid:d});if(!S){l.reportWarning(tt.MessageName.UNNAMED,"No code changes since last release");return}let A=new Bu.SemVer(i.locator.reference);Bu.default.valid(S)?(i.manifest.version=S,l.reportJson({ident:o,newVersion:i.manifest.version})):(A.inc(S,d),A.format(),i.manifest.version=A.format(),l.reportJson({ident:o,strategy:S,newVersion:i.manifest.version})),l.reportInfo(tt.MessageName.UNNAMED,`Recommended version bump: ${S}`),this.dryRun||await i.persistManifest()}let p=Ar.ppath.join(i.cwd,Ap),g="",h=new Jr.Transform({transform(S,A,T){g+=S.toString(),T(null,S)}}),w=[await oo(i,{releaseCount:this.firstRelease?0:1,skipUnstable:!this.includeUnstable},this.date==null?void 0:{date:this.date}),h];if(this.dryRun)w.push(l.createStreamReporter()),await(0,Uu.promisify)(Jr.pipeline)(w);else{let S=Ar.ppath.join(await Ar.xfs.mktempPromise(),Ap),A=new Jr.PassThrough;f&&!this.firstRelease?Ar.xfs.createReadStream(p).on("error",function(I){if(I.code!=="ENOENT")throw I;this.unpipe(A),A.push(null)}).pipe(A):A.push(null);let T=new Jr.PassThrough;w.push(T),await Promise.all([(0,Uu.promisify)(Jr.pipeline)(new mx.default([T,A]),Ar.xfs.createWriteStream(S)),(0,Uu.promisify)(Jr.pipeline)(w)]),await Ar.xfs.copyFilePromise(S,p)}l.reportJson({ident:o,changelogPath:p,changelog:g}),this.dryRun||(await tt.execUtils.execvp("git",["add",Ar.Filename.manifest,Ap],{cwd:i.cwd,strict:!0}),await r.install({cache:await tt.Cache.find(t),report:new tt.ThrowReport,persistProject:!1}),await tt.scriptUtils.maybeExecuteWorkspaceLifecycleScript(i,"postrelease",{report:l})),f&&l.reportInfo(tt.MessageName.UNNAMED,`Released v${i.manifest.version}`)})).exitCode()}};uo.usage=zr.Command.Usage({category:"Release-related commands",description:"Bumps version and generates a changelog for the active workspace",details:` diff --git a/packages/plugin-release/package.json b/packages/plugin-release/package.json index 777dbba..27941da 100644 --- a/packages/plugin-release/package.json +++ b/packages/plugin-release/package.json @@ -1,6 +1,6 @@ { "name": "@kherock/yarn-plugin-release", - "version": "1.6.1", + "version": "1.6.2", "license": "BSD-2-Clause", "main": "./sources/index.ts", "author": "Kyle Herock ",