diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f87aa29e4..5af4eb427 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,6 +3,7 @@ on: branches: - main pull_request: + merge_group: name: ci jobs: test: diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1c0bdd4c1..f1f01eaf9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "16.12.0" + ".": "16.12.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index bc6720e5b..39e32f9cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,19 @@ [1]: https://www.npmjs.com/package/release-please?activeTab=versions +## [16.12.1](https://github.com/googleapis/release-please/compare/v16.12.0...v16.12.1) (2024-09-11) + + +### Bug Fixes + +* add missing generic updaters in to release please config schema extraFiles ([#2344](https://github.com/googleapis/release-please/issues/2344)) ([050cf93](https://github.com/googleapis/release-please/commit/050cf93f272e76f0fc7a408fc9e85ab02321459c)) +* don't escape html tags inside of inline code in release notes ([#2367](https://github.com/googleapis/release-please/issues/2367)) ([a41d137](https://github.com/googleapis/release-please/commit/a41d13787b6676b73c87b9e03ff952289928c0fd)) +* fix comment at release pr is ugly ([#2348](https://github.com/googleapis/release-please/issues/2348)) ([e562ee2](https://github.com/googleapis/release-please/commit/e562ee21c8820d99007604cd930022816ce6c76c)) +* GenericJSON updater uses regex to find version in matching entry ([#2253](https://github.com/googleapis/release-please/issues/2253)) ([acc3242](https://github.com/googleapis/release-please/commit/acc3242b1e35349ada51e0d41a66e8fad29000f6)) +* prevent open release PRs from being mistaken as current releases ([#2323](https://github.com/googleapis/release-please/issues/2323)) ([3101ab3](https://github.com/googleapis/release-please/commit/3101ab32a1898d265277f543f1fca08793ec9a41)) +* respect `tagSeparator` and `includeVInTag` everywhere ([#2283](https://github.com/googleapis/release-please/issues/2283)) ([dad27e3](https://github.com/googleapis/release-please/commit/dad27e385e4cfdec18c84a1b48c3b45ab65abe5e)), closes [#2282](https://github.com/googleapis/release-please/issues/2282) +* respect signoff in manifest config ([#2334](https://github.com/googleapis/release-please/issues/2334)) ([eb968c8](https://github.com/googleapis/release-please/commit/eb968c8cbbf666355b87612e3bb704e1611e1747)) + ## [16.12.0](https://github.com/googleapis/release-please/compare/v16.11.0...v16.12.0) (2024-06-06) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2591549ef..d9e4be0fe 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,7 +62,7 @@ accept your pull requests. The below command should be run from the root of the source code: ``` - node build/src/bin/release-please.js release-pr \ + npm run compile && node build/src/bin/release-please.js release-pr \ --token=$GITHUB_TOKEN \ --repo-url=/ [extra options] ``` diff --git a/__snapshots__/default-changelog-notes.js b/__snapshots__/default-changelog-notes.js index 1116f347e..0ebca5644 100644 --- a/__snapshots__/default-changelog-notes.js +++ b/__snapshots__/default-changelog-notes.js @@ -153,6 +153,15 @@ exports['DefaultChangelogNotes buildNotes with commit parsing should handle html * render all imagesets as <picture> ([383fb14](https://github.com/googleapis/java-asset/commit/383fb14708ae91f7bb7e64bf0bacab38)) ` +exports['DefaultChangelogNotes buildNotes with commit parsing should handle html tags as inline code 1'] = ` +## [1.2.3](https://github.com/googleapis/java-asset/compare/v1.2.2...v1.2.3) (1983-10-10) + + +### Features + +* render all imagesets as <picture> \`\` \`\` \`\` \`\` ([82fcfaf](https://github.com/googleapis/java-asset/commit/82fcfaf039487566a6e2d49a215afe09)) +` + exports['DefaultChangelogNotes buildNotes with commit parsing should handle inline bug links 1'] = ` ## [1.2.3](https://github.com/googleapis/java-asset/compare/v1.2.2...v1.2.3) (1983-10-10) diff --git a/__snapshots__/generic-json.js b/__snapshots__/generic-json.js index 7bc725d39..78d6383ef 100644 --- a/__snapshots__/generic-json.js +++ b/__snapshots__/generic-json.js @@ -46,3 +46,14 @@ exports['GenericJson updateContent updates matching entry 1'] = ` } ` + +exports['GenericJson updateContent updates substring in matching entry 1'] = ` +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "github>abc/foo:xyz/sub#2.3.4", + "github>abc/bar:xyz/sub#2.3.4" + ] +} + +` diff --git a/__snapshots__/github.js b/__snapshots__/github.js index af1c14c8b..a7900800b 100644 --- a/__snapshots__/github.js +++ b/__snapshots__/github.js @@ -11,6 +11,7 @@ exports['GitHub commitsSince backfills commit files for pull requests rebased an "number": 7, "baseBranchName": "main", "headBranchName": "feature-branch-rebase-merge", + "mergeCommitOid": "b29149f890e6f76ee31ed128585744d4c598924c", "title": "feat: feature that will be rebase merged", "body": "", "labels": [], @@ -28,6 +29,7 @@ exports['GitHub commitsSince backfills commit files for pull requests rebased an "number": 7, "baseBranchName": "main", "headBranchName": "feature-branch-rebase-merge", + "mergeCommitOid": "b29149f890e6f76ee31ed128585744d4c598924c", "title": "feat: feature that will be rebase merged", "body": "", "labels": [], @@ -48,6 +50,7 @@ exports['GitHub commitsSince backfills commit files for pull requests with lots "number": 7, "baseBranchName": "main", "headBranchName": "feature-branch-plain-merge", + "mergeCommitOid": "e6daec403626c9987c7af0d97b34f324cd84320a", "title": "feat: feature that will be plain merged", "body": "", "labels": [], @@ -68,6 +71,7 @@ exports['GitHub commitsSince backfills commit files without pull requests 1'] = "number": 7, "baseBranchName": "main", "headBranchName": "feature-branch-plain-merge", + "mergeCommitOid": "e6daec403626c9987c7af0d97b34f324cd84320a", "title": "feat: feature that will be plain merged", "body": "", "labels": [], @@ -86,6 +90,7 @@ exports['GitHub commitsSince finds commits up until a condition 1'] = [ "number": 7, "baseBranchName": "main", "headBranchName": "feature-branch-plain-merge", + "mergeCommitOid": "e6daec403626c9987c7af0d97b34f324cd84320a", "title": "feat: feature that will be plain merged", "body": "", "labels": [], @@ -104,6 +109,7 @@ exports['GitHub commitsSince finds first commit of a multi-commit merge pull req "number": 7, "baseBranchName": "main", "headBranchName": "feature-branch-plain-merge", + "mergeCommitOid": "e6daec403626c9987c7af0d97b34f324cd84320a", "title": "feat: feature that will be plain merged", "body": "", "labels": [], @@ -119,6 +125,7 @@ exports['GitHub commitsSince finds first commit of a multi-commit merge pull req "number": 7, "baseBranchName": "main", "headBranchName": "feature-branch-plain-merge", + "mergeCommitOid": "b29149f890e6f76ee31ed128585744d4c598924c", "title": "feat: feature that will be plain merged", "body": "", "labels": [], @@ -134,6 +141,7 @@ exports['GitHub commitsSince finds first commit of a multi-commit merge pull req "number": 7, "baseBranchName": "main", "headBranchName": "feature-branch-plain-merge", + "mergeCommitOid": "27d7d7232e2e312d1380e906984f0823f5decf61", "title": "feat: feature that will be plain merged", "body": "", "labels": [], @@ -152,6 +160,7 @@ exports['GitHub commitsSince limits pagination 1'] = [ "number": 7, "baseBranchName": "main", "headBranchName": "feature-branch-plain-merge", + "mergeCommitOid": "e6daec403626c9987c7af0d97b34f324cd84320a", "title": "feat: feature that will be plain merged", "body": "", "labels": [], @@ -167,6 +176,7 @@ exports['GitHub commitsSince limits pagination 1'] = [ "number": 7, "baseBranchName": "main", "headBranchName": "feature-branch-plain-merge", + "mergeCommitOid": "b29149f890e6f76ee31ed128585744d4c598924c", "title": "feat: feature that will be plain merged", "body": "", "labels": [], @@ -182,6 +192,7 @@ exports['GitHub commitsSince limits pagination 1'] = [ "number": 7, "baseBranchName": "main", "headBranchName": "feature-branch-plain-merge", + "mergeCommitOid": "27d7d7232e2e312d1380e906984f0823f5decf61", "title": "feat: feature that will be plain merged", "body": "", "labels": [], @@ -197,6 +208,7 @@ exports['GitHub commitsSince limits pagination 1'] = [ "number": 6, "baseBranchName": "main", "headBranchName": "feature-branch-merge", + "mergeCommitOid": "2b4e0b3be2e231cd87cc44c411bd8f84b4587ab5", "title": "feat: feature that will be rebase merged", "body": "", "labels": [], @@ -212,6 +224,7 @@ exports['GitHub commitsSince limits pagination 1'] = [ "number": 6, "baseBranchName": "main", "headBranchName": "feature-branch-merge", + "mergeCommitOid": "a257514a541d483425118d973674b1ce006a5489", "title": "feat: feature that will be rebase merged", "body": "", "labels": [], @@ -227,6 +240,7 @@ exports['GitHub commitsSince limits pagination 1'] = [ "number": 6, "baseBranchName": "main", "headBranchName": "feature-branch-merge", + "mergeCommitOid": "b6a8ab1a50106cfb03f22c2cdaf7abfdcccce088", "title": "feat: feature that will be rebase merged", "body": "", "labels": [], @@ -242,6 +256,7 @@ exports['GitHub commitsSince limits pagination 1'] = [ "number": 6, "baseBranchName": "main", "headBranchName": "feature-branch-merge", + "mergeCommitOid": "520b6f42551c86002197d033564a76a3f99b0019", "title": "feat: feature that will be rebase merged", "body": "", "labels": [], @@ -257,6 +272,7 @@ exports['GitHub commitsSince limits pagination 1'] = [ "number": 3, "baseBranchName": "main", "headBranchName": "release-please/branches/main", + "mergeCommitOid": "9dda1a331d311d0a7643015cc9e6802548c8d943", "title": "chore(main): release 0.1.1-SNAPSHOT", "body": ":robot: I have created a release \\*beep\\* \\*boop\\* \n---\n### Updating meta-information for bleeding-edge SNAPSHOT release.\n---\n\n\nThis PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).", "labels": [ @@ -274,6 +290,7 @@ exports['GitHub commitsSince limits pagination 1'] = [ "number": 2, "baseBranchName": "main", "headBranchName": "feature-branch", + "mergeCommitOid": "e86984fb22ccc5eafb6c3d815851ade3463193da", "title": "feat: feature-branch that will be squash merged", "body": "", "labels": [], @@ -296,6 +313,7 @@ exports['GitHub commitsSince paginates through commits 1'] = [ "number": 7, "baseBranchName": "main", "headBranchName": "feature-branch-plain-merge", + "mergeCommitOid": "e6daec403626c9987c7af0d97b34f324cd84320a", "title": "feat: feature that will be plain merged", "body": "", "labels": [], @@ -311,6 +329,7 @@ exports['GitHub commitsSince paginates through commits 1'] = [ "number": 7, "baseBranchName": "main", "headBranchName": "feature-branch-plain-merge", + "mergeCommitOid": "b29149f890e6f76ee31ed128585744d4c598924c", "title": "feat: feature that will be plain merged", "body": "", "labels": [], @@ -326,6 +345,7 @@ exports['GitHub commitsSince paginates through commits 1'] = [ "number": 7, "baseBranchName": "main", "headBranchName": "feature-branch-plain-merge", + "mergeCommitOid": "27d7d7232e2e312d1380e906984f0823f5decf61", "title": "feat: feature that will be plain merged", "body": "", "labels": [], @@ -341,6 +361,7 @@ exports['GitHub commitsSince paginates through commits 1'] = [ "number": 6, "baseBranchName": "main", "headBranchName": "feature-branch-merge", + "mergeCommitOid": "2b4e0b3be2e231cd87cc44c411bd8f84b4587ab5", "title": "feat: feature that will be rebase merged", "body": "", "labels": [], @@ -356,6 +377,7 @@ exports['GitHub commitsSince paginates through commits 1'] = [ "number": 6, "baseBranchName": "main", "headBranchName": "feature-branch-merge", + "mergeCommitOid": "a257514a541d483425118d973674b1ce006a5489", "title": "feat: feature that will be rebase merged", "body": "", "labels": [], @@ -371,6 +393,7 @@ exports['GitHub commitsSince paginates through commits 1'] = [ "number": 6, "baseBranchName": "main", "headBranchName": "feature-branch-merge", + "mergeCommitOid": "b6a8ab1a50106cfb03f22c2cdaf7abfdcccce088", "title": "feat: feature that will be rebase merged", "body": "", "labels": [], @@ -386,6 +409,7 @@ exports['GitHub commitsSince paginates through commits 1'] = [ "number": 6, "baseBranchName": "main", "headBranchName": "feature-branch-merge", + "mergeCommitOid": "520b6f42551c86002197d033564a76a3f99b0019", "title": "feat: feature that will be rebase merged", "body": "", "labels": [], @@ -401,6 +425,7 @@ exports['GitHub commitsSince paginates through commits 1'] = [ "number": 3, "baseBranchName": "main", "headBranchName": "release-please/branches/main", + "mergeCommitOid": "9dda1a331d311d0a7643015cc9e6802548c8d943", "title": "chore(main): release 0.1.1-SNAPSHOT", "body": ":robot: I have created a release \\*beep\\* \\*boop\\* \n---\n### Updating meta-information for bleeding-edge SNAPSHOT release.\n---\n\n\nThis PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).", "labels": [ @@ -418,6 +443,7 @@ exports['GitHub commitsSince paginates through commits 1'] = [ "number": 2, "baseBranchName": "main", "headBranchName": "feature-branch", + "mergeCommitOid": "e86984fb22ccc5eafb6c3d815851ade3463193da", "title": "feat: feature-branch that will be squash merged", "body": "", "labels": [], @@ -437,6 +463,7 @@ exports['GitHub commitsSince paginates through commits 1'] = [ "number": 1, "baseBranchName": "main", "headBranchName": "release-release-please-test-v0.1.0", + "mergeCommitOid": "959ee48c95f254300eb040c46ebdc8248317efe4", "title": "Release release-please-test v0.1.0", "body": "This pull request was generated using releasetool.\n\n02-03-2021 11:56 PST\n\n### New Features\n- feat: initial commit\n\n### Internal / Testing Changes\n- build: add java structure", "labels": [ @@ -531,6 +558,7 @@ exports['GitHub mergeCommitIterator handles merged pull requests without files 1 "number": 7, "baseBranchName": "main", "headBranchName": "feature-branch-plain-merge", + "mergeCommitOid": "e6daec403626c9987c7af0d97b34f324cd84320a", "title": "feat: feature that will be plain merged", "body": "", "labels": [], @@ -546,6 +574,7 @@ exports['GitHub mergeCommitIterator handles merged pull requests without files 1 "number": 7, "baseBranchName": "main", "headBranchName": "feature-branch-plain-merge", + "mergeCommitOid": "b29149f890e6f76ee31ed128585744d4c598924c", "title": "feat: feature that will be plain merged", "body": "", "labels": [], diff --git a/__snapshots__/node-workspace.js b/__snapshots__/node-workspace.js index 56175e499..41cba5516 100644 --- a/__snapshots__/node-workspace.js +++ b/__snapshots__/node-workspace.js @@ -238,6 +238,61 @@ Release notes for path: node1, releaseType: node This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). ` +exports['NodeWorkspace plugin run walks dependency tree and updates previously untouched packages (prerelease) 1'] = ` +:robot: I have created a release *beep* *boop* +--- + + +
@here/pkgA: 3.3.4-beta + +Release notes for path: node1, releaseType: node +
+ +
pkgB: 2.2.3-beta + +## [2.2.3-beta](https://github.com/googleapis/node-test-repo/compare/pkgB-v2.2.2-beta...pkgB-v2.2.3-beta) (1983-10-10) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @here/pkgA bumped from 3.3.3 to 3.3.4-beta +
+ +
pkgC: 1.1.2-beta + +## 1.1.2-beta (1983-10-10) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @here/pkgB bumped from 2.2.2 to 2.2.3-beta +
+ +
@here/pkgD: 4.4.5-beta + +Release notes for path: node4, releaseType: node +
+ +
pkgE: 1.0.1-beta + +## 1.0.1-beta (1983-10-10) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @here/pkgA bumped to 3.3.4-beta +
+ +--- +This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). +` + exports['NodeWorkspace plugin run walks dependency tree and updates previously untouched packages 1'] = ` :robot: I have created a release *beep* *boop* --- diff --git a/docs/customizing.md b/docs/customizing.md index 0c5df16ea..3f290f5d1 100644 --- a/docs/customizing.md +++ b/docs/customizing.md @@ -199,7 +199,7 @@ force the [Generic](/src/updaters/generic.ts) updater, you must use type ## Updating arbitrary JSON files -For files with the `.xml` extension, the `version` property is updated. +For files with the `.json` extension, the `version` property is updated. For most release strategies, you can provide additional files to update using the [GenericJson](/src/updaters/generic-json.ts) updater. You can diff --git a/docs/manifest-releaser.md b/docs/manifest-releaser.md index cfc3e0248..92e24a273 100644 --- a/docs/manifest-releaser.md +++ b/docs/manifest-releaser.md @@ -47,7 +47,13 @@ Create a minimal `release-please-config.json`, e.g., for a single JS package: } ``` -Create an empty `.release-please-manifest.json` +> Note: `path/to/pkg` should be a directory and not a file. + +Create an empty `.release-please-manifest.json`. For example: +```shell +echo "{}" > .release-please-manifest.json +``` + Commit/push/merge these to your remote GitHub repo (using either the repo's default branch or a test branch in which case you'll use the `--target-branch` @@ -269,7 +275,7 @@ defaults (those are documented in comments) "exclude-paths": ["path/to/myPyPkgA"] }, - // path segment should be relative to repository root + // path segment should be a folder relative to repository root "path/to/myJSPkgA": { // overrides release-type for node "release-type": "node", diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index ae436d190..ed7d48665 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -107,3 +107,6 @@ more API calls (which is one reason a manifest config is preferred). 3. Iterate through the latest tags and compare against commit SHAs seen in the last 250 commits on the branch. This is to ensure that the tag happened on this target branch. + +### What if my release PR is merged with `autorelease:closed`? +The release PR will be tagged with `autorelease:closed` on closing of the PR, but it will not be tagged with `autorelease:pending` on re-opening of the PR. Hence if a release PR was accidentally closed and re-opened before merging to main, release-please wouldn't be triggred. In such case, please manually remove `autorelease:closed`, add `autorelease: pending` and `release-please:force-run` to the release PR to force re-trigger the release process. See https://github.com/googleapis/google-cloud-java/pull/10615 for example. diff --git a/package-lock.json b/package-lock.json index 9e7132c36..181ee2736 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "release-please", - "version": "16.12.0", + "version": "16.12.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "release-please", - "version": "16.12.0", + "version": "16.12.1", "license": "Apache-2.0", "dependencies": { "@conventional-commits/parser": "^0.4.1", @@ -24,7 +24,7 @@ "conventional-changelog-writer": "^6.0.0", "conventional-commits-filter": "^3.0.0", "detect-indent": "^6.1.0", - "diff": "^5.0.0", + "diff": "^7.0.0", "figures": "^3.0.0", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.0", @@ -62,14 +62,14 @@ "@types/yargs": "^17.0.0", "ajv": "^8.11.0", "ajv-formats": "^3.0.0", - "c8": "^9.0.0", + "c8": "^10.0.0", "chai": "^4.2.0", "config-chain": "^1.1.13", "cross-env": "^7.0.0", "gts": "^3.1.0", "mocha": "^9.2.2", "nock": "^13.0.0", - "sinon": "18.0.0", + "sinon": "18.0.1", "snap-shot-it": "^7.0.0" }, "engines": { @@ -357,6 +357,102 @@ "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-3.0.0.tgz", "integrity": "sha512-td6ZUkz2oS3VeleBcN+m//Q6HlCFCPrnI0FZhrt/h4XqLEdOyYp2u21nd8MdsR+WJy5r9PTDaHTDDfhf4H4l6Q==" }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", @@ -669,6 +765,16 @@ "@octokit/openapi-types": "^16.0.0" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@sinonjs/commons": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", @@ -1324,12 +1430,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -1366,9 +1472,9 @@ } }, "node_modules/c8": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/c8/-/c8-9.0.0.tgz", - "integrity": "sha512-nFJhU2Cz6Frh2awk3IW7wwk3wx27/U2v8ojQCHGc1GWTCHS6aMu4lal327/ZnnYj7oSThGF1X3qUP1yzAJBcOQ==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-10.0.0.tgz", + "integrity": "sha512-rdQecjxw16P8kwgMBjruaQyfF+R2o/mucCCK4VPktwq2HFMWLOHGyUasb46+WlUOVJX94d6dZolcJxzjCzWmXg==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", @@ -1378,7 +1484,7 @@ "istanbul-lib-coverage": "^3.2.0", "istanbul-lib-report": "^3.0.1", "istanbul-reports": "^3.1.6", - "test-exclude": "^6.0.0", + "test-exclude": "^7.0.1", "v8-to-istanbul": "^9.0.0", "yargs": "^17.7.2", "yargs-parser": "^21.1.1" @@ -1387,7 +1493,7 @@ "c8": "bin/c8.js" }, "engines": { - "node": ">=14.14.0" + "node": ">=18" } }, "node_modules/c8/node_modules/yargs-parser": { @@ -1594,6 +1700,14 @@ "wrap-ansi": "^7.0.0" } }, + "node_modules/code-suggester/node_modules/diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/code-suggester/node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -1853,9 +1967,9 @@ } }, "node_modules/diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", + "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", "engines": { "node": ">=0.3.1" } @@ -1971,6 +2085,12 @@ "node": ">=8" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -2739,9 +2859,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -2833,6 +2953,20 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -3486,6 +3620,24 @@ "node": ">=6" } }, + "node_modules/jackspeak": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3817,6 +3969,15 @@ "node": ">= 6" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -4371,6 +4532,31 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", + "dev": true, + "engines": { + "node": "14 || >=16.14" + } + }, "node_modules/path-to-regexp": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz", @@ -4993,13 +5179,13 @@ "dev": true }, "node_modules/sinon": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-18.0.0.tgz", - "integrity": "sha512-+dXDXzD1sBO6HlmZDd7mXZCR/y5ECiEiGCBSGuFD/kZ0bDTofPYc6JaeGmPSF+1j1MejGUWkORbYOLDyvqCWpA==", + "version": "18.0.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-18.0.1.tgz", + "integrity": "sha512-a2N2TDY1uGviajJ6r4D1CyRAkzE9NNVlYOV1wX5xQDuAk0ONgzgRl0EjCQuRCPxOwp13ghsMwt9Gdldujs39qw==", "dev": true, "dependencies": { "@sinonjs/commons": "^3.0.1", - "@sinonjs/fake-timers": "^11.2.2", + "@sinonjs/fake-timers": "11.2.2", "@sinonjs/samsam": "^8.0.0", "diff": "^5.2.0", "nise": "^6.0.0", @@ -5019,6 +5205,15 @@ "type-detect": "4.0.8" } }, + "node_modules/sinon/node_modules/diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -5267,6 +5462,21 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -5278,6 +5488,19 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -5349,39 +5572,54 @@ } }, "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", + "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", "dev": true, "dependencies": { "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" + "glob": "^10.4.1", + "minimatch": "^9.0.4" }, "engines": { - "node": ">=8" + "node": ">=18" } }, - "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/test-exclude/node_modules/glob": { + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", "dev": true, "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/test-exclude/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/text-table": { @@ -5740,6 +5978,24 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -6115,6 +6371,71 @@ "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-3.0.0.tgz", "integrity": "sha512-td6ZUkz2oS3VeleBcN+m//Q6HlCFCPrnI0FZhrt/h4XqLEdOyYp2u21nd8MdsR+WJy5r9PTDaHTDDfhf4H4l6Q==" }, + "@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "requires": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "requires": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + }, + "wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "requires": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + } + } + } + }, "@istanbuljs/schema": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", @@ -6391,6 +6712,13 @@ "@octokit/openapi-types": "^16.0.0" } }, + "@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true + }, "@sinonjs/commons": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", @@ -6889,12 +7217,12 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "browser-stdout": { @@ -6914,9 +7242,9 @@ } }, "c8": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/c8/-/c8-9.0.0.tgz", - "integrity": "sha512-nFJhU2Cz6Frh2awk3IW7wwk3wx27/U2v8ojQCHGc1GWTCHS6aMu4lal327/ZnnYj7oSThGF1X3qUP1yzAJBcOQ==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-10.0.0.tgz", + "integrity": "sha512-rdQecjxw16P8kwgMBjruaQyfF+R2o/mucCCK4VPktwq2HFMWLOHGyUasb46+WlUOVJX94d6dZolcJxzjCzWmXg==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", @@ -6926,7 +7254,7 @@ "istanbul-lib-coverage": "^3.2.0", "istanbul-lib-report": "^3.0.1", "istanbul-reports": "^3.1.6", - "test-exclude": "^6.0.0", + "test-exclude": "^7.0.1", "v8-to-istanbul": "^9.0.0", "yargs": "^17.7.2", "yargs-parser": "^21.1.1" @@ -7082,6 +7410,11 @@ "wrap-ansi": "^7.0.0" } }, + "diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==" + }, "yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -7274,9 +7607,9 @@ "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==" }, "diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", - "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==" + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", + "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==" }, "dir-glob": { "version": "3.0.1", @@ -7355,6 +7688,12 @@ "is-obj": "^2.0.0" } }, + "eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -7919,9 +8258,9 @@ } }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "requires": { "to-regex-range": "^5.0.1" @@ -7988,6 +8327,13 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, + "fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "optional": true + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -8453,6 +8799,16 @@ "integrity": "sha512-GYUWFxViqxDvGzsNEItTEuOqqAQVx29Xl9Lh5YUqyJd6gPHTCMiIbjqcjjyUzsBUqEcgwIdRoydwgfFw1oYbhg==", "dev": true }, + "jackspeak": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.0.tgz", + "integrity": "sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==", + "dev": true, + "requires": { + "@isaacs/cliui": "^8.0.2", + "@pkgjs/parseargs": "^0.11.0" + } + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -8702,6 +9058,12 @@ "kind-of": "^6.0.3" } }, + "minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true + }, "mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -9117,6 +9479,24 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "requires": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", + "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", + "dev": true + } + } + }, "path-to-regexp": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz", @@ -9548,13 +9928,13 @@ "dev": true }, "sinon": { - "version": "18.0.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-18.0.0.tgz", - "integrity": "sha512-+dXDXzD1sBO6HlmZDd7mXZCR/y5ECiEiGCBSGuFD/kZ0bDTofPYc6JaeGmPSF+1j1MejGUWkORbYOLDyvqCWpA==", + "version": "18.0.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-18.0.1.tgz", + "integrity": "sha512-a2N2TDY1uGviajJ6r4D1CyRAkzE9NNVlYOV1wX5xQDuAk0ONgzgRl0EjCQuRCPxOwp13ghsMwt9Gdldujs39qw==", "dev": true, "requires": { "@sinonjs/commons": "^3.0.1", - "@sinonjs/fake-timers": "^11.2.2", + "@sinonjs/fake-timers": "11.2.2", "@sinonjs/samsam": "^8.0.0", "diff": "^5.2.0", "nise": "^6.0.0", @@ -9569,6 +9949,12 @@ "requires": { "type-detect": "4.0.8" } + }, + "diff": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", + "dev": true } } }, @@ -9773,6 +10159,17 @@ "strip-ansi": "^6.0.1" } }, + "string-width-cjs": { + "version": "npm:string-width@4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -9781,6 +10178,15 @@ "ansi-regex": "^5.0.1" } }, + "strip-ansi-cjs": { + "version": "npm:strip-ansi@6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, "strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", @@ -9828,33 +10234,36 @@ } }, "test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.1.tgz", + "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", "dev": true, "requires": { "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" + "glob": "^10.4.1", + "minimatch": "^9.0.4" }, "dependencies": { - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "glob": { + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.1.tgz", + "integrity": "sha512-2jelhlq3E4ho74ZyVLN03oKdAZVUa6UDZzFLVH1H7dnoax+y9qyaq8zBkfDIggjniU19z0wU18y16jMB2eyVIw==", "dev": true, "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "path-scurry": "^1.11.1" } }, "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", "dev": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" } } } @@ -10132,6 +10541,17 @@ "strip-ansi": "^6.0.0" } }, + "wrap-ansi-cjs": { + "version": "npm:wrap-ansi@7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", diff --git a/package.json b/package.json index a7c3bc25d..540047120 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "release-please", - "version": "16.12.0", + "version": "16.12.1", "description": "generate release PRs based on the conventionalcommits.org spec", "main": "./build/src/index.js", "bin": "./build/src/bin/release-please.js", @@ -55,14 +55,14 @@ "@types/yargs": "^17.0.0", "ajv": "^8.11.0", "ajv-formats": "^3.0.0", - "c8": "^9.0.0", + "c8": "^10.0.0", "chai": "^4.2.0", "config-chain": "^1.1.13", "cross-env": "^7.0.0", "gts": "^3.1.0", "mocha": "^9.2.2", "nock": "^13.0.0", - "sinon": "18.0.0", + "sinon": "18.0.1", "snap-shot-it": "^7.0.0" }, "dependencies": { @@ -81,7 +81,7 @@ "conventional-changelog-writer": "^6.0.0", "conventional-commits-filter": "^3.0.0", "detect-indent": "^6.1.0", - "diff": "^5.0.0", + "diff": "^7.0.0", "figures": "^3.0.0", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.0", diff --git a/schemas/config.json b/schemas/config.json index 2477278a5..e47aae6df 100644 --- a/schemas/config.json +++ b/schemas/config.json @@ -188,6 +188,25 @@ } }, "required": ["type", "path"] + }, + { + "description": "An extra arbitrary file that includes release-please generic updater's annotation.", + "type": "object", + "properties": { + "type": { + "description": "The file format type.", + "enum": ["generic"] + }, + "path": { + "description": "The path to the file.", + "type": "string" + }, + "glob": { + "description": "Whether to treat the path as a glob. Defaults to `false`.", + "type": "boolean" + } + }, + "required": ["type", "path"] } ] } @@ -377,6 +396,10 @@ ] } }, + "signoff": { + "description": "Text to be used as Signed-off-by in the commit.", + "type": "string" + }, "group-pull-request-title-pattern": { "description": "When grouping multiple release pull requests use this pattern for the title.", "type": "string" @@ -412,6 +435,7 @@ "last-release-sha": true, "always-link-local": true, "plugins": true, + "signoff": true, "group-pull-request-title-pattern": true, "release-search-depth": true, "commit-search-depth": true, diff --git a/src/changelog-notes/default.ts b/src/changelog-notes/default.ts index 49405aa08..e3e47f6b6 100644 --- a/src/changelog-notes/default.ts +++ b/src/changelog-notes/default.ts @@ -123,5 +123,7 @@ function replaceIssueLink( } function htmlEscape(message: string): string { - return message.replace('<', '<').replace('>', '>'); + return message.replace(/``[^`].*[^`]``|`[^`]*`|<|>/g, match => + match.length > 1 ? match : match === '<' ? '<' : '>' + ); } diff --git a/src/commit.ts b/src/commit.ts index 6dffc4613..2bfd392c1 100644 --- a/src/commit.ts +++ b/src/commit.ts @@ -398,6 +398,7 @@ export function parseConventionalCommits( commit.message.split('\n')[0] }` ); + logger.debug(`error message: ${_err}`); } } } diff --git a/src/github.ts b/src/github.ts index 0b581b646..f36a98f15 100644 --- a/src/github.ts +++ b/src/github.ts @@ -510,6 +510,7 @@ export class GitHub { number: pullRequest.number, baseBranchName: pullRequest.baseRefName, headBranchName: pullRequest.headRefName, + mergeCommitOid: pullRequest.mergeCommit?.oid, title: pullRequest.title, body: pullRequest.body, labels: pullRequest.labels.nodes.map(node => node.name), diff --git a/src/index.ts b/src/index.ts index 2f7b71528..c0033a7f9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -63,5 +63,5 @@ export const configSchema = require('../../schemas/config.json'); export const manifestSchema = require('../../schemas/manifest.json'); // x-release-please-start-version -export const VERSION = '16.12.0'; +export const VERSION = '16.12.1'; // x-release-please-end diff --git a/src/manifest.ts b/src/manifest.ts index 95d067a91..0523e54fa 100644 --- a/src/manifest.ts +++ b/src/manifest.ts @@ -121,7 +121,6 @@ export interface ReleaserConfig { releaseLabels?: string[]; extraLabels?: string[]; initialVersion?: string; - signoff?: string; // Changelog options changelogSections?: ChangelogSection[]; @@ -161,7 +160,6 @@ interface ReleaserConfigJson { 'changelog-sections'?: ChangelogSection[]; 'release-as'?: string; 'skip-github-release'?: boolean; - signoff?: string; draft?: boolean; prerelease?: boolean; 'draft-pull-request'?: boolean; @@ -255,6 +253,7 @@ export interface ManifestConfig extends ReleaserConfigJson { 'last-release-sha'?: string; 'always-link-local'?: boolean; plugins?: PluginType[]; + signoff?: string; 'group-pull-request-title-pattern'?: string; 'release-search-depth'?: number; 'commit-search-depth'?: number; @@ -689,7 +688,12 @@ export class Manifest { `No latest release found for path: ${path}, component: ${component}, but a previous version (${version.toString()}) was specified in the manifest.` ); releasesByPath[path] = { - tag: new TagName(version, component), + tag: new TagName( + version, + component, + this.repositoryConfig[path].tagSeparator, + this.repositoryConfig[path].includeVInTag + ), sha: '', notes: '', }; @@ -1241,7 +1245,7 @@ export class Manifest { const releaseList = githubReleases .map(({tagName, url}) => `- [${tagName}](${url})`) .join('\n'); - const comment = `:robot: Created releases:\n${releaseList}\n:sunflower:`; + const comment = `🤖 Created releases:\n\n${releaseList}\n\n:sunflower:`; await this.github.commentOnIssue(comment, pullRequest.number); } @@ -1373,7 +1377,6 @@ function extractReleaserConfig( skipSnapshot: config['skip-snapshot'], initialVersion: config['initial-version'], excludePaths: config['exclude-paths'], - signoff: config['signoff'], }; } @@ -1418,6 +1421,7 @@ async function parseConfig( separatePullRequests: config['separate-pull-requests'], groupPullRequestTitlePattern: config['group-pull-request-title-pattern'], plugins: config['plugins'], + signoff: config['signoff'], labels: configLabel?.split(','), releaseLabels: configReleaseLabel?.split(','), snapshotLabels: configSnapshotLabel?.split(','), @@ -1572,7 +1576,7 @@ async function latestReleaseVersion( for await (const commitWithPullRequest of generator) { commitShas.add(commitWithPullRequest.sha); const mergedPullRequest = commitWithPullRequest.pullRequest; - if (!mergedPullRequest) { + if (!mergedPullRequest?.mergeCommitOid) { logger.trace( `skipping commit: ${commitWithPullRequest.sha} missing merged pull request` ); diff --git a/src/plugins/cargo-workspace.ts b/src/plugins/cargo-workspace.ts index aa3f65784..0a6efe6f2 100644 --- a/src/plugins/cargo-workspace.ts +++ b/src/plugins/cargo-workspace.ts @@ -38,6 +38,9 @@ import {BranchName} from '../util/branch-name'; import {PatchVersionUpdate} from '../versioning-strategy'; import {CargoLock} from '../updaters/rust/cargo-lock'; import {ConfigurationError} from '../errors'; +import {Strategy} from '../strategy'; +import {Commit} from '../commit'; +import {Release} from '../release'; interface CrateInfo { /** @@ -79,6 +82,9 @@ interface CrateInfo { * into a single rust package. */ export class CargoWorkspace extends WorkspacePlugin { + private strategiesByPath: Record = {}; + private releasesByPath: Record = {}; + protected async buildAllPackages( candidates: CandidateReleasePullRequest[] ): Promise<{ @@ -252,6 +258,34 @@ export class CargoWorkspace extends WorkspacePlugin { originalManifest, updatedManifest ); + + const updatedPackage = { + ...pkg, + version: version.toString(), + }; + + const strategy = this.strategiesByPath[updatedPackage.path]; + const latestRelease = this.releasesByPath[updatedPackage.path]; + const basePullRequest = strategy + ? await strategy.buildReleasePullRequest([], latestRelease, false, [], { + newVersion: version, + }) + : undefined; + + if (basePullRequest) { + return this.updateCandidate( + { + path: pkg.path, + pullRequest: basePullRequest, + config: { + releaseType: 'rust', + }, + }, + pkg, + updatedVersions + ); + } + const pullRequest: ReleasePullRequest = { title: PullRequestTitle.ofTargetBranch(this.targetBranch), body: new PullRequestBody([ @@ -367,6 +401,18 @@ export class CargoWorkspace extends WorkspacePlugin { protected pathFromPackage(pkg: CrateInfo): string { return pkg.path; } + + async preconfigure( + strategiesByPath: Record, + _commitsByPath: Record, + _releasesByPath: Record + ): Promise> { + // Using preconfigure to siphon releases and strategies. + this.strategiesByPath = strategiesByPath; + this.releasesByPath = _releasesByPath; + + return strategiesByPath; + } } function getChangelogDepsNotes( diff --git a/src/plugins/node-workspace.ts b/src/plugins/node-workspace.ts index 3e942899a..7424ab64d 100644 --- a/src/plugins/node-workspace.ts +++ b/src/plugins/node-workspace.ts @@ -29,13 +29,13 @@ import { appendDependenciesSectionToChangelog, addPath, } from './workspace'; -import {PatchVersionUpdate} from '../versioning-strategy'; import {Strategy} from '../strategy'; import {Commit} from '../commit'; import {Release} from '../release'; import {CompositeUpdater} from '../updaters/composite'; import {PackageJson, newVersionWithRange} from '../updaters/node/package-json'; import {Logger} from '../util/logger'; +import {PatchVersionUpdate} from '../versioning-strategy'; interface ParsedPackageJson { name: string; @@ -170,6 +170,9 @@ export class NodeWorkspace extends WorkspacePlugin { protected bumpVersion(pkg: Package): Version { const version = Version.parse(pkg.version); + const strategy = this.strategiesByPath[pkg.path]; + + if (strategy) return strategy.versioningStrategy.bump(version, []); return new PatchVersionUpdate().bump(version); } diff --git a/src/pull-request.ts b/src/pull-request.ts index a44feaee1..9176207d4 100644 --- a/src/pull-request.ts +++ b/src/pull-request.ts @@ -16,6 +16,7 @@ export interface PullRequest { readonly headBranchName: string; readonly baseBranchName: string; readonly number: number; + readonly mergeCommitOid?: string; readonly title: string; readonly body: string; readonly labels: string[]; diff --git a/src/strategies/php-yoshi.ts b/src/strategies/php-yoshi.ts index ed31687b9..8bd1bfde6 100644 --- a/src/strategies/php-yoshi.ts +++ b/src/strategies/php-yoshi.ts @@ -101,7 +101,12 @@ export class PHPYoshi extends BaseStrategy { const versionsMap: VersionsMap = new Map(); const directoryVersionContents: Record = {}; const component = await this.getComponent(); - const newVersionTag = new TagName(newVersion, component); + const newVersionTag = new TagName( + newVersion, + component, + this.tagSeparator, + this.includeVInTag + ); let releaseNotesBody = `## ${newVersion.toString()}`; for (const directory of topLevelDirectories) { try { diff --git a/src/updaters/generic-json.ts b/src/updaters/generic-json.ts index 64d7355c9..95e822b29 100644 --- a/src/updaters/generic-json.ts +++ b/src/updaters/generic-json.ts @@ -18,6 +18,9 @@ import * as jp from 'jsonpath'; import {jsonStringify} from '../util/json-stringify'; import {logger as defaultLogger, Logger} from '../util/logger'; +const VERSION_REGEX = + /(?\d+)\.(?\d+)\.(?\d+)(-(?[\w.]+))?(\+(?[-\w.]+))?/; + export class GenericJson implements Updater { readonly jsonpath: string; readonly version: Version; @@ -33,8 +36,16 @@ export class GenericJson implements Updater { */ updateContent(content: string, logger: Logger = defaultLogger): string { const data = JSON.parse(content); - const nodes = jp.apply(data, this.jsonpath, _val => { - return this.version.toString(); + const nodes = jp.apply(data, this.jsonpath, value => { + if (typeof value !== 'string') { + logger.warn(`No string in ${this.jsonpath}. Skipping.`); + return value; + } + if (!value.match(VERSION_REGEX)) { + logger.warn(`No version found in ${this.jsonpath}. Skipping.`); + return value; + } + return value.replace(VERSION_REGEX, this.version.toString()); }); if (!nodes) { logger.warn(`No entries modified in ${this.jsonpath}`); diff --git a/test/changelog-notes/default-changelog-notes.ts b/test/changelog-notes/default-changelog-notes.ts index e78e48d10..ffb9baa9d 100644 --- a/test/changelog-notes/default-changelog-notes.ts +++ b/test/changelog-notes/default-changelog-notes.ts @@ -276,6 +276,20 @@ describe('DefaultChangelogNotes', () => { expect(notes).to.is.string; safeSnapshot(notes); }); + it('should handle html tags as inline code', async () => { + const commits = [ + buildMockCommit( + 'feat: render all imagesets as `` `` `` ``' + ), + ]; + const changelogNotes = new DefaultChangelogNotes(); + const notes = await changelogNotes.buildNotes( + parseConventionalCommits(commits), + notesOptions + ); + expect(notes).to.is.string; + safeSnapshot(notes); + }); // it('ignores reverted commits', async () => { // const commits = [buildCommitFromFixture('multiple-messages')]; // const changelogNotes = new DefaultChangelogNotes(); diff --git a/test/manifest.ts b/test/manifest.ts index 7315dee0c..cbf259f02 100644 --- a/test/manifest.ts +++ b/test/manifest.ts @@ -1423,6 +1423,7 @@ describe('Manifest', () => { title: 'chore: release 1.2.3', headBranchName: 'release-please/branches/main', baseBranchName: 'main', + mergeCommitOid: 'abc123', number: 123, body: '', labels: [], diff --git a/test/plugins/node-workspace.ts b/test/plugins/node-workspace.ts index b9a186acf..2bff93f73 100644 --- a/test/plugins/node-workspace.ts +++ b/test/plugins/node-workspace.ts @@ -38,6 +38,7 @@ import {ReleasePleaseManifest} from '../../src/updaters/release-please-manifest' import {Node} from '../../src/strategies/node'; import {TagName} from '../../src/util/tag-name'; import {Generic} from '../../src/updaters/generic'; +import {PrereleaseVersioningStrategy} from '../../src/versioning-strategies/prerelease'; const sandbox = sinon.createSandbox(); const fixturesPath = './test/fixtures/plugins/node-workspace'; @@ -314,6 +315,122 @@ describe('NodeWorkspace plugin', () => { expect(updater.versionsMap?.get('node5')?.toString()).to.eql('1.0.1'); snapshot(dateSafe(nodeCandidate!.pullRequest.body.toString())); }); + it('walks dependency tree and updates previously untouched packages (prerelease)', async () => { + const candidates: CandidateReleasePullRequest[] = [ + buildMockCandidatePullRequest('node1', 'node', '3.3.4-beta', { + component: '@here/pkgA', + updates: [ + buildMockPackageUpdate('node1/package.json', 'node1/package.json'), + ], + }), + buildMockCandidatePullRequest('node4', 'node', '4.4.5-beta', { + component: '@here/pkgD', + updates: [ + buildMockPackageUpdate('node4/package.json', 'node4/package.json'), + ], + }), + ]; + stubFilesFromFixtures({ + sandbox, + github, + fixturePath: fixturesPath, + files: [ + 'node1/package.json', + 'node2/package.json', + 'node3/package.json', + 'node4/package.json', + 'node5/package.json', + ], + flatten: false, + targetBranch: 'main', + }); + + await plugin.preconfigure( + { + node1: new Node({ + github, + targetBranch: 'main', + path: 'node1', + packageName: '@here/pkgA', + versioningStrategy: new PrereleaseVersioningStrategy({ + prereleaseType: 'beta', + }), + }), + node2: new Node({ + github, + targetBranch: 'main', + path: 'node2', + packageName: '@here/pkgB', + versioningStrategy: new PrereleaseVersioningStrategy({ + prereleaseType: 'beta', + }), + }), + node3: new Node({ + github, + targetBranch: 'main', + path: 'node3', + packageName: '@here/pkgC', + versioningStrategy: new PrereleaseVersioningStrategy({ + prereleaseType: 'beta', + }), + }), + node4: new Node({ + github, + targetBranch: 'main', + path: 'node4', + packageName: '@here/pkgD', + versioningStrategy: new PrereleaseVersioningStrategy({ + prereleaseType: 'beta', + }), + }), + node5: new Node({ + github, + targetBranch: 'main', + path: 'node5', + packageName: '@here/pkgE', + versioningStrategy: new PrereleaseVersioningStrategy({ + prereleaseType: 'beta', + }), + }), + }, + {}, + { + node2: { + tag: new TagName(new Version(2, 2, 2, 'beta'), 'pkgB'), + sha: '', + notes: '', + }, + } + ); + + const newCandidates = await plugin.run(candidates); + expect(newCandidates).lengthOf(1); + const nodeCandidate = newCandidates.find( + candidate => candidate.config.releaseType === 'node' + ); + expect(nodeCandidate).to.not.be.undefined; + const updates = nodeCandidate!.pullRequest.updates; + assertHasVersionUpdate(updates, 'node1/package.json', '3.3.4-beta'); + assertHasVersionUpdate(updates, 'node2/package.json', '2.2.3-beta'); + assertHasVersionUpdate(updates, 'node3/package.json', '1.1.2-beta'); + assertHasVersionUpdate(updates, 'node4/package.json', '4.4.5-beta'); + assertHasVersionUpdate(updates, 'node5/package.json', '1.0.1-beta'); + const updater = assertHasUpdate( + updates, + '.release-please-manifest.json', + ReleasePleaseManifest + ).updater as ReleasePleaseManifest; + expect(updater.versionsMap?.get('node2')?.toString()).to.eql( + '2.2.3-beta' + ); + expect(updater.versionsMap?.get('node3')?.toString()).to.eql( + '1.1.2-beta' + ); + expect(updater.versionsMap?.get('node5')?.toString()).to.eql( + '1.0.1-beta' + ); + snapshot(dateSafe(nodeCandidate!.pullRequest.body.toString())); + }); it('appends dependency notes to an updated module', async () => { const existingNotes = '### Dependencies\n\n* update dependency foo/bar to 1.2.3'; diff --git a/test/updaters/fixtures/renovate-shared-preset.json b/test/updaters/fixtures/renovate-shared-preset.json new file mode 100644 index 000000000..1f0caca2d --- /dev/null +++ b/test/updaters/fixtures/renovate-shared-preset.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "github>abc/foo:xyz/sub#1.2.3", + "github>abc/bar:xyz/sub#1.2.3" + ] +} diff --git a/test/updaters/generic-json.ts b/test/updaters/generic-json.ts index 00431bc68..d25cf6d9e 100644 --- a/test/updaters/generic-json.ts +++ b/test/updaters/generic-json.ts @@ -45,6 +45,15 @@ describe('GenericJson', () => { const newContent = updater.updateContent(oldContent); snapshot(newContent); }); + it('updates substring in matching entry', async () => { + const oldContent = readFileSync( + resolve(fixturesPath, './renovate-shared-preset.json'), + 'utf8' + ).replace(/\r\n/g, '\n'); + const updater = new GenericJson('$.extends.*', Version.parse('v2.3.4')); + const newContent = updater.updateContent(oldContent); + snapshot(newContent); + }); it('ignores non-matching entry', async () => { const oldContent = readFileSync( resolve(fixturesPath, './esy.json'), @@ -54,6 +63,24 @@ describe('GenericJson', () => { const newContent = updater.updateContent(oldContent); expect(newContent).to.eql(oldContent); }); + it('ignore array entry', async () => { + const oldContent = readFileSync( + resolve(fixturesPath, './renovate-shared-preset.json'), + 'utf8' + ).replace(/\r\n/g, '\n'); + const updater = new GenericJson('$.extends', Version.parse('v2.3.4')); + const newContent = updater.updateContent(oldContent); + expect(newContent).to.eql(oldContent); + }); + it('ignore non-matching string', async () => { + const oldContent = readFileSync( + resolve(fixturesPath, './esy.json'), + 'utf8' + ).replace(/\r\n/g, '\n'); + const updater = new GenericJson('$.author', Version.parse('v2.3.4')); + const newContent = updater.updateContent(oldContent); + expect(newContent).to.eql(oldContent); + }); it('warns on invalid jsonpath', async () => { const oldContent = readFileSync( resolve(fixturesPath, './esy.json'),