googleapis / release-please

generate release PRs based on the conventionalcommits.org spec
https://www.conventionalcommits.org
Apache License 2.0
4.87k stars 366 forks source link

Not updating `.release-please-manifest.json` #2172

Open Lightning00Blade opened 10 months ago

Lightning00Blade commented 10 months ago

We use release-please to create releases for the Puppeteer project. The current structure is a mono repo so we use a configuration file to express this. This works well for the 3 packages that depend on each other puppeteer, puppeteer-core, and @puppeteer/browsers. But for the last one @puppeteer/ng-schematics we are seeing issue that the release does not update .release-please-manifest.json.

This can be observed on the latest PR - https://github.com/puppeteer/puppeteer/pull/11543. If we do merge this PR without updating the manifest manually release-please will open a new one as the version differs with the manifest file. Observed: Initial - https://github.com/puppeteer/puppeteer/pull/11496 A second one - https://github.com/puppeteer/puppeteer/pull/11508

The issue is not consistent. It doesn't fail all the time as you can see from https://github.com/puppeteer/puppeteer/pull/11488

Environment details

Steps to reproduce

  1. Have not reproduced locally, but happy to follow up if instruction are provided.
rowanmanning commented 9 months ago

I'm also seeing this issue and managed to reproduce locally with the CLI. If it'd be useful then I can try and push a reduced test case somewhere. I'm seeing it in both a brand new project and an existing one that I tried migrating to the latest version of Release Please.

Lightning00Blade commented 9 months ago

@rowanmanning please do, I would be happy to take a look myself if I have a repo.

01Joseph-Hwang10 commented 5 months ago

I'm also having the same issue with this. So I did some experiment and debugging on it.

I reproduced this problem with several repos linked below.

Turned out this problem happened on 01Joseph-Hwang10/release-please-standalone-example#1 and 01Joseph-Hwang10/release-please-monorepo-without-root-example#1.

Debugging on 01Joseph-Hwang10/release-please-standalone-example#1

As I first faced this issue in standalone node project environment, I did some debugging in my local machine with release-please CLI. I added some more console.logs in the source of release-please to figure out what's happening and what's wrong.

What I ran:

release-please release-pr --token="$GITHUB_TOKEN" --repo-url="https://github.com/01Joseph-Hwang10/release-please-standalone-example" --trace --dry-run

The below was the output. Note that there exist several >>>>>>>>>>>> START LOGS @ <class & method names> >>>>>>>>>>>> lines to express that this is console.log lines I added for debugging purposes.

## Output ```bash ❯ Fetching release-please-config.json from branch main ❯ Fetching .release-please-manifest.json from branch main ✔ Building pull requests ✔ Building strategies by path ❯ .: node ❯ Fetching package.json from branch main ✔ Collecting release commit SHAs ❯ release search depth: 400 ❯ Fetching releases with cursor undefined ⚠ Could not find releases. ⚠ Expected 1 releases, only found 0 ⚠ Missing 1 paths: . ❯ looking for tagName: release-please-standalone-example-v0.1.0 ⚠ Expected 1 releases, only found 0 ✔ Collecting commits since all latest releases ❯ commit search depth: 500 ❯ Set(0) {} ❯ Fetching merge commits on branch main with cursor: undefined ❯ Backfilling file list for commit: f4983bea3735836778edba610ef5f22645c10690 ❯ Found 1 files ❯ Backfilling file list for commit: 37cfb3e5b46bd539ea9531906beff30af21e6212 ❯ Found 5 files ✔ Splitting 2 commits by path ✔ No latest release found for path: ., component: release-please-standalone-example, but a previous version (0.1.0) was specified in the manifest. ✔ Building candidate release pull request for path: . ❯ type: node ❯ targetBranch: main ❯ commits: 2 ⚠ No latest release pull request found. ✔ Considering: 2 commits ❯ component: release-please-standalone-example ❯ pull request title pattern: undefined ❯ running plugin: NodeWorkspace ✔ Running workspace plugin ✔ Found 1 in-scope releases ✔ Building list of all packages ❯ Found candidate pull request for path: . ❯ Fetching package.json from branch main ✔ Building dependency graph for 1 packages ✔ building graph order, existing package names: release-please-standalone-example ❯ visiting release-please-standalone-example, path: ❯ marking release-please-standalone-example as visited and adding release-please-standalone-example to order ✔ Updating 1 packages ❯ package: release-please-standalone-example ❯ version: 0.2.0 from release-please ✔ Updating existing candidate pull request for release-please-standalone-example, path: . ✔ Merging 1 in-scope candidates ✔ Merging 1 pull requests >>>>>>>>>>>>>>>>>>>> START LOGS @ class Merge.run @ const updates >>>>>>>>>>>>>>>>>>>> updates - merged: [ { path: 'package-lock.json', createIfMissing: false, updater: PackageLockJson { version: [Version], versionsMap: [Map] } }, { path: 'npm-shrinkwrap.json', createIfMissing: false, updater: PackageLockJson { version: [Version], versionsMap: Map(0) {} } }, { path: 'samples/package.json', createIfMissing: false, updater: SamplesPackageJson { version: [Version], versionsMap: undefined, packageName: 'release-please-standalone-example' } }, { path: 'CHANGELOG.md', createIfMissing: true, updater: Changelog { version: [Version], versionsMap: undefined, changelogEntry: '## [0.2.0](https://github.com/01Joseph-Hwang10/release-please-standalone-example/compare/release-please-standalone-example-v0.1.0...release-please-standalone-example-v0.2.0) (2024-05-15)\n' + '\n' + '\n' + '### Features\n' + '\n' + '* some change ([f4983be](https://github.com/01Joseph-Hwang10/release-please-standalone-example/commit/f4983bea3735836778edba610ef5f22645c10690))', versionHeaderRegex: /\n###? v?[0-9[]/s } }, { path: 'package.json', createIfMissing: false, updater: CompositeUpdater { updaters: [Array] } }, { path: 'changelog.json', createIfMissing: false, updater: ChangelogJson { version: [Version], versionsMap: undefined, language: 'JAVASCRIPT', artifactName: 'release-please-standalone-example', commits: [Array] } }, { path: '.release-please-manifest.json', createIfMissing: false, updater: ReleasePleaseManifest { version: [Version], versionsMap: [Map] } } ] updates - merged - release-please-manifest: [ { path: '.release-please-manifest.json', createIfMissing: false, updater: ReleasePleaseManifest { version: [Version], versionsMap: [Map] } } ] updates - merged - release-please-manifest - updater: [ ReleasePleaseManifest { version: Version { major: 0, minor: 2, patch: 0, preRelease: undefined, build: undefined }, versionsMap: Map(1) { '.' => [Version] } } ] <<<<<<<<<<<<<<<<<<<< END LOGS @ class Merge.run @ const updates <<<<<<<<<<<<<<<<<<<< ⚠ pullRequestTitlePattern miss the part of '${scope}' ⚠ pullRequestTitlePattern miss the part of '${component}' ⚠ pullRequestTitlePattern miss the part of '${version}' >>>>>>>>>>>>>>>>>>>> START LOGS @ class WorkspacePlugin.run @ const newUpdates >>>>>>>>>>>>>>>>>>>> newCandidates: [ { path: '.', pullRequest: { title: [PullRequestTitle], body: [PullRequestBody], updates: [Array], labels: [Array], headRefName: 'release-please--branches--main', draft: false }, config: { releaseType: 'node' } } ] newUpdates: [ { path: 'package-lock.json', createIfMissing: false, updater: PackageLockJson { version: [Version], versionsMap: [Map] } }, { path: 'npm-shrinkwrap.json', createIfMissing: false, updater: PackageLockJson { version: [Version], versionsMap: Map(0) {} } }, { path: 'samples/package.json', createIfMissing: false, updater: SamplesPackageJson { version: [Version], versionsMap: undefined, packageName: 'release-please-standalone-example' } }, { path: 'CHANGELOG.md', createIfMissing: true, updater: Changelog { version: [Version], versionsMap: undefined, changelogEntry: '## [0.2.0](https://github.com/01Joseph-Hwang10/release-please-standalone-example/compare/release-please-standalone-example-v0.1.0...release-please-standalone-example-v0.2.0) (2024-05-15)\n' + '\n' + '\n' + '### Features\n' + '\n' + '* some change ([f4983be](https://github.com/01Joseph-Hwang10/release-please-standalone-example/commit/f4983bea3735836778edba610ef5f22645c10690))', versionHeaderRegex: /\n###? v?[0-9[]/s } }, { path: 'package.json', createIfMissing: false, updater: CompositeUpdater { updaters: [Array] } }, { path: 'changelog.json', createIfMissing: false, updater: ChangelogJson { version: [Version], versionsMap: undefined, language: 'JAVASCRIPT', artifactName: 'release-please-standalone-example', commits: [Array] } }, { path: '.release-please-manifest.json', createIfMissing: false, updater: ReleasePleaseManifest { version: [Version], versionsMap: [Map] } } ] newUpdates - release-please-manifest: [ { path: '.release-please-manifest.json', createIfMissing: false, updater: ReleasePleaseManifest { version: [Version], versionsMap: [Map] } } ] newUpdates - release-please-manifest - updater: [ ReleasePleaseManifest { version: Version { major: 0, minor: 2, patch: 0, preRelease: undefined, build: undefined }, versionsMap: Map(1) { '.' => [Version] } } ] newCandidates[0].pullRequest.version: undefined updatedPathVersions: Map(0) {} ✔ Post-processing 1 in-scope candidates newUpdates - release-please-manifest: [ { path: '.release-please-manifest.json', createIfMissing: false, updater: ReleasePleaseManifest { version: [Version], versionsMap: [Map] } }, { path: '.release-please-manifest.json', createIfMissing: false, updater: ReleasePleaseManifest { version: undefined, versionsMap: Map(0) {} } } ] newUpdates - release-please-manifest - updater [ ReleasePleaseManifest { version: Version { major: 0, minor: 2, patch: 0, preRelease: undefined, build: undefined }, versionsMap: Map(1) { '.' => [Version] } }, ReleasePleaseManifest { version: undefined, versionsMap: Map(0) {} } ] <<<<<<<<<<<<<<<<<<<< END LOGS @ class WorkspacePlugin.run @ const newUpdates <<<<<<<<<<<<<<<<<<<< Would open 1 pull requests fork: false title: chore: release main branch: release-please--branches--main draft: false body: :robot: I have created a release *beep* *boop* ---
release-please-standalone-example: 0.2.0 ## [0.2.0](https://github.com/01Joseph-Hwang10/release-please-standalone-example/compare/release-please-standalone-example-v0.1.0...release-please-standalone-example-v0.2.0) (2024-05-15) ### Features * some change ([f4983be](https://github.com/01Joseph-Hwang10/release-please-standalone-example/commit/f4983bea3735836778edba610ef5f22645c10690))
--- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). updates: 8 ❯ Fetching package-lock.json from branch main ⚠ file package-lock.json did not exist ❯ Fetching npm-shrinkwrap.json from branch main ⚠ file npm-shrinkwrap.json did not exist ❯ Fetching samples/package.json from branch main ⚠ file samples/package.json did not exist ❯ Fetching CHANGELOG.md from branch main >>>>>>>>>>>>>>>>>>>> START LOGS @ class Github.buildChangeSet @ const contentText >>>>>>>>>>>>>>>>>>>> content: undefined contextText: undefined <<<<<<<<<<<<<<<<<<<< END LOGS @ class Github.buildChangeSet @ const contentText <<<<<<<<<<<<<<<<<<<< ❯ Fetching package.json from branch main >>>>>>>>>>>>>>>>>>>> START LOGS @ class Github.buildChangeSet @ const contentText >>>>>>>>>>>>>>>>>>>> content: { sha: '2d7bafc1d00594641d278152b5c619722da758d2', mode: '100644', content: 'ewogICJuYW1lIjogInJlbGVhc2UtcGxlYXNlLXN0YW5kYWxvbmUtZXhhbXBs\n' + 'ZSIsCiAgInZlcnNpb24iOiAiMC4xLjAiLAogICJkZXNjcmlwdGlvbiI6ICIi\n' + 'LAogICJsaWNlbnNlIjogIklTQyIKfQ==\n', parsedContent: '{\n' + ' "name": "release-please-standalone-example",\n' + ' "version": "0.1.0",\n' + ' "description": "",\n' + ' "license": "ISC"\n' + '}' } contextText: { "name": "release-please-standalone-example", "version": "0.1.0", "description": "", "license": "ISC" } <<<<<<<<<<<<<<<<<<<< END LOGS @ class Github.buildChangeSet @ const contentText <<<<<<<<<<<<<<<<<<<< ✔ updating from 0.1.0 to 0.2.0 ✔ updating from 0.2.0 to 0.2.0 ❯ Fetching changelog.json from branch main ⚠ file changelog.json did not exist ❯ Fetching .release-please-manifest.json from branch main >>>>>>>>>>>>>>>>>>>> START LOGS @ class Github.buildChangeSet @ const contentText >>>>>>>>>>>>>>>>>>>> content: { sha: '3d2ac0bdd2ec1cd2d5891da48ae2a84ed7ebc9fe', mode: '100644', content: 'ewogICIuIjogIjAuMS4wIgp9\n', parsedContent: '{\n ".": "0.1.0"\n}' } contextText: { ".": "0.1.0" } <<<<<<<<<<<<<<<<<<<< END LOGS @ class Github.buildChangeSet @ const contentText <<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>> START LOGS @ class ReleasePleaseManifest.updateContent >>>>>>>>>>>>>>>>>>>> content: { ".": "0.1.0" } this.versionsMap: Map(1) { '.' => Version { major: 0, minor: 2, patch: 0, preRelease: undefined, build: undefined } } parsed - updated: { '.': '0.2.0' } <<<<<<<<<<<<<<<<<<<< END LOGS @ class ReleasePleaseManifest.updateContent <<<<<<<<<<<<<<<<<<<< ❯ Fetching .release-please-manifest.json from branch main >>>>>>>>>>>>>>>>>>>> START LOGS @ class Github.buildChangeSet @ const contentText >>>>>>>>>>>>>>>>>>>> content: { sha: '3d2ac0bdd2ec1cd2d5891da48ae2a84ed7ebc9fe', mode: '100644', content: 'ewogICIuIjogIjAuMS4wIgp9\n', parsedContent: '{\n ".": "0.1.0"\n}' } contextText: { ".": "0.1.0" } <<<<<<<<<<<<<<<<<<<< END LOGS @ class Github.buildChangeSet @ const contentText <<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>> START LOGS @ class ReleasePleaseManifest.updateContent >>>>>>>>>>>>>>>>>>>> content: { ".": "0.1.0" } this.versionsMap: Map(0) {} parsed - updated: { '.': '0.1.0' } <<<<<<<<<<<<<<<<<<<< END LOGS @ class ReleasePleaseManifest.updateContent <<<<<<<<<<<<<<<<<<<< package-lock.json: [class PackageLockJson] no change found for package-lock.json npm-shrinkwrap.json: [class PackageLockJson] no change found for npm-shrinkwrap.json samples/package.json: [class SamplesPackageJson extends DefaultUpdater] no change found for samples/package.json CHANGELOG.md: [class Changelog extends DefaultUpdater] Index: CHANGELOG.md =================================================================== --- CHANGELOG.md +++ CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog + +## [0.2.0](https://github.com/01Joseph-Hwang10/release-please-standalone-example/compare/release-please-standalone-example-v0.1.0...release-please-standalone-example-v0.2.0) (2024-05-15) + + +### Features + +* some change ([f4983be](https://github.com/01Joseph-Hwang10/release-please-standalone-example/commit/f4983bea3735836778edba610ef5f22645c10690)) package.json: [class CompositeUpdater] Index: package.json =================================================================== --- package.json +++ package.json @@ -1,6 +1,6 @@ { "name": "release-please-standalone-example", - "version": "0.1.0", + "version": "0.2.0", "description": "", "license": "ISC" } \ No newline at end of file changelog.json: [class ChangelogJson extends DefaultUpdater] no change found for changelog.json .release-please-manifest.json: [class ReleasePleaseManifest extends DefaultUpdater] Index: .release-please-manifest.json =================================================================== --- .release-please-manifest.json +++ .release-please-manifest.json .release-please-manifest.json: [class ReleasePleaseManifest extends DefaultUpdater] Index: .release-please-manifest.json =================================================================== --- .release-please-manifest.json +++ .release-please-manifest.json ```

I found out @ class ReleasePleaseManifest.updateContent part, which appears 2 times among the output, and found out each of those are

  1. from releasePullRequest.updates.push(...) at class Manifest.buildPullRequests and
  2. from newUpdates.push(...) at abstract class WorkspacePlugin.run.

Those updates are pushed in order I enumerated above. So the firstly pushed release please manifest update corresponds with the logs:

>>>>>>>>>>>>>>>>>>>> START LOGS @ class ReleasePleaseManifest.updateContent >>>>>>>>>>>>>>>>>>>>
content:  {
  ".": "0.1.0"
}
this.versionsMap:  Map(1) {
  '.' => Version {
    major: 0,
    minor: 2,
    patch: 0,
    preRelease: undefined,
    build: undefined
  }
}
parsed - updated:  { '.': '0.2.0' }
<<<<<<<<<<<<<<<<<<<< END LOGS @ class ReleasePleaseManifest.updateContent <<<<<<<<<<<<<<<<<<<<

and the secondly pushed release please manifest update corresponds with the logs:

>>>>>>>>>>>>>>>>>>>> START LOGS @ class ReleasePleaseManifest.updateContent >>>>>>>>>>>>>>>>>>>>
content:  {
  ".": "0.1.0"
}
this.versionsMap:  Map(0) {}
parsed - updated:  { '.': '0.1.0' }
<<<<<<<<<<<<<<<<<<<< END LOGS @ class ReleasePleaseManifest.updateContent <<<<<<<<<<<<<<<<<<<<

And seems like those updates are performed independently. This means that each updater modifies original source file at the remote repository, not modifies whatever it is modified by the previous updater. We can notice, in the end, 2 updaters exist at the end of the entire class Manifest.buildPullRequests run.

# ...
newUpdates - release-please-manifest:  [
  {
    path: '.release-please-manifest.json',
    createIfMissing: false,
    updater: ReleasePleaseManifest { version: [Version], versionsMap: [Map] }
  },
  {
    path: '.release-please-manifest.json',
    createIfMissing: false,
    updater: ReleasePleaseManifest {
      version: undefined,
      versionsMap: Map(0) {}
    }
  }
]
newUpdates - release-please-manifest - updater [
  ReleasePleaseManifest {
    version: Version {
      major: 0,
      minor: 2,
      patch: 0,
      preRelease: undefined,
      build: undefined
    },
    versionsMap: Map(1) { '.' => [Version] }
  },
  ReleasePleaseManifest { version: undefined, versionsMap: Map(0) {} }
]
<<<<<<<<<<<<<<<<<<<< END LOGS @ class WorkspacePlugin.run @ const newUpdates <<<<<<<<<<<<<<<<<<<<

In sum, it appears that secondly pushed release please manifest update by abstract class WorkspacePlugin overrides the firstly pushed update which correctly bumps the version.

Possible Solution I found

Possible solution I found after the digging process above, I successfully bumped the version by changing:

// https://github1s.com/googleapis/release-please/blob/main/src/plugins/workspace.ts
export abstract class WorkspacePlugin<T> extends ManifestPlugin {
  /* ... */
  async run(/* ... */): /* ... */ {
    /* ... */
    const newUpdates = newCandidates[0].pullRequest.updates;
    newUpdates.push({
      path: this.manifestPath,
      createIfMissing: false,
      updater: new ReleasePleaseManifest({
        version: newCandidates[0].pullRequest.version!,
        versionsMap: updatedPathVersions,
      }),
    });
    /* ... */
  }
  /* ... */
}

to:

// https://github1s.com/googleapis/release-please/blob/main/src/plugins/workspace.ts
export abstract class WorkspacePlugin<T> extends ManifestPlugin {
  /* ... */
  async run(/* ... */): /* ... */ {
    /* ... */
    const newUpdates = newCandidates[0].pullRequest.updates;
    const releasePleaseManifestUpdates = newUpdates.filter(
      (update) => update.path === this.manifestPath
    );
    if (releasePleaseManifestUpdates.length === 0) { 
      newUpdates.push({
        path: this.manifestPath,
        createIfMissing: false,
        updater: new ReleasePleaseManifest({
          version: newCandidates[0].pullRequest.version!,
          versionsMap: updatedPathVersions,
        }),
      });
    }
    /* ... */
  }
  /* ... */
}

which correctly updates .release-please-manifest.json and yields:

## Output ```bash ❯ Fetching release-please-config.json from branch main ❯ Fetching .release-please-manifest.json from branch main ✔ Building pull requests ✔ Building strategies by path ❯ .: node ❯ Fetching package.json from branch main ✔ Collecting release commit SHAs ❯ release search depth: 400 ❯ Fetching releases with cursor undefined ⚠ Could not find releases. ⚠ Expected 1 releases, only found 0 ⚠ Missing 1 paths: . ❯ looking for tagName: release-please-standalone-example-v0.1.0 ⚠ Expected 1 releases, only found 0 ✔ Collecting commits since all latest releases ❯ commit search depth: 500 ❯ Set(0) {} ❯ Fetching merge commits on branch main with cursor: undefined ❯ Backfilling file list for commit: f4983bea3735836778edba610ef5f22645c10690 ❯ Found 1 files ❯ Backfilling file list for commit: 37cfb3e5b46bd539ea9531906beff30af21e6212 ❯ Found 5 files ✔ Splitting 2 commits by path ✔ No latest release found for path: ., component: release-please-standalone-example, but a previous version (0.1.0) was specified in the manifest. ✔ Building candidate release pull request for path: . ❯ type: node ❯ targetBranch: main ❯ commits: 2 ⚠ No latest release pull request found. ✔ Considering: 2 commits ❯ component: release-please-standalone-example ❯ pull request title pattern: undefined ❯ running plugin: NodeWorkspace ✔ Running workspace plugin ✔ Found 1 in-scope releases ✔ Building list of all packages ❯ Found candidate pull request for path: . ❯ Fetching package.json from branch main ✔ Building dependency graph for 1 packages ✔ building graph order, existing package names: release-please-standalone-example ❯ visiting release-please-standalone-example, path: ❯ marking release-please-standalone-example as visited and adding release-please-standalone-example to order ✔ Updating 1 packages ❯ package: release-please-standalone-example ❯ version: 0.2.0 from release-please ✔ Updating existing candidate pull request for release-please-standalone-example, path: . ✔ Merging 1 in-scope candidates ✔ Merging 1 pull requests ⚠ pullRequestTitlePattern miss the part of '${scope}' ⚠ pullRequestTitlePattern miss the part of '${component}' ⚠ pullRequestTitlePattern miss the part of '${version}' ✔ Post-processing 1 in-scope candidates Would open 1 pull requests fork: false title: chore: release main branch: release-please--branches--main draft: false body: :robot: I have created a release *beep* *boop* ---
release-please-standalone-example: 0.2.0 ## [0.2.0](https://github.com/01Joseph-Hwang10/release-please-standalone-example/compare/release-please-standalone-example-v0.1.0...release-please-standalone-example-v0.2.0) (2024-05-15) ### Features * some change ([f4983be](https://github.com/01Joseph-Hwang10/release-please-standalone-example/commit/f4983bea3735836778edba610ef5f22645c10690))
--- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). updates: 7 ❯ Fetching package-lock.json from branch main ⚠ file package-lock.json did not exist ❯ Fetching npm-shrinkwrap.json from branch main ⚠ file npm-shrinkwrap.json did not exist ❯ Fetching samples/package.json from branch main ⚠ file samples/package.json did not exist ❯ Fetching CHANGELOG.md from branch main ❯ Fetching package.json from branch main ✔ updating from 0.1.0 to 0.2.0 ✔ updating from 0.2.0 to 0.2.0 ❯ Fetching changelog.json from branch main ⚠ file changelog.json did not exist ❯ Fetching .release-please-manifest.json from branch main package-lock.json: [class PackageLockJson] no change found for package-lock.json npm-shrinkwrap.json: [class PackageLockJson] no change found for npm-shrinkwrap.json samples/package.json: [class SamplesPackageJson extends DefaultUpdater] no change found for samples/package.json CHANGELOG.md: [class Changelog extends DefaultUpdater] Index: CHANGELOG.md =================================================================== --- CHANGELOG.md +++ CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog + +## [0.2.0](https://github.com/01Joseph-Hwang10/release-please-standalone-example/compare/release-please-standalone-example-v0.1.0...release-please-standalone-example-v0.2.0) (2024-05-15) + + +### Features + +* some change ([f4983be](https://github.com/01Joseph-Hwang10/release-please-standalone-example/commit/f4983bea3735836778edba610ef5f22645c10690)) package.json: [class CompositeUpdater] Index: package.json =================================================================== --- package.json +++ package.json @@ -1,6 +1,6 @@ { "name": "release-please-standalone-example", - "version": "0.1.0", + "version": "0.2.0", "description": "", "license": "ISC" } \ No newline at end of file changelog.json: [class ChangelogJson extends DefaultUpdater] no change found for changelog.json .release-please-manifest.json: [class ReleasePleaseManifest extends DefaultUpdater] Index: .release-please-manifest.json =================================================================== --- .release-please-manifest.json +++ .release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0" + ".": "0.2.0" } \ No newline at end of file ```

But I don't sure if this change stands against to the original intention of code authors, if there exists. Please let me know if that update push made in abstract class WorkspacePlugin.run cannot be omitted conditionally and should always be pushed.

Compare Case: Debugging on 01Joseph-Hwang10/release-please-monorepo-with-root-example#1

As a compare case, where the updates of .release-please-manifest.json correctly happened, I also delved into the case of [01Joseph-Hwang10/release-please-with-root-example#1].

I ran:

release-please release-pr --token="$GITHUB_TOKEN" --repo-url="https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example" --trace --dry-run

which yielded:

## Output ```bash ❯ Fetching release-please-config.json from branch main ❯ Fetching .release-please-manifest.json from branch main ✔ Building pull requests ✔ Building strategies by path ❯ .: node ❯ packages/a: node ❯ Fetching package.json from branch main ❯ Fetching packages/a/package.json from branch main ✔ Collecting release commit SHAs ❯ release search depth: 400 ❯ Fetching releases with cursor undefined ⚠ Could not find releases. ⚠ Expected 2 releases, only found 0 ⚠ Missing 2 paths: .,packages/a ❯ looking for tagName: release-please-monorepo-with-root-example-v0.1.0 ❯ looking for tagName: a-v0.0.1 ⚠ Expected 2 releases, only found 0 ✔ Collecting commits since all latest releases ❯ commit search depth: 500 ❯ Set(0) {} ❯ Fetching merge commits on branch main with cursor: undefined ❯ Backfilling file list for commit: ef77e163205409883c8fd87f2d3e456d43dc3f99 ❯ Found 1 files ❯ Backfilling file list for commit: 00abf7d7d524a75d7a52c08f72aa3eec4851074b ❯ Found 1 files ❯ Backfilling file list for commit: 9766cf3b69775c6eddf29f647e439c254723aaf6 ❯ Found 7 files ✔ Splitting 3 commits by path ✔ No latest release found for path: ., component: release-please-monorepo-with-root-example, but a previous version (0.1.0) was specified in the manifest. ✔ No latest release found for path: packages/a, component: a, but a previous version (0.0.1) was specified in the manifest. ✔ Building candidate release pull request for path: . ❯ type: node ❯ targetBranch: main ❯ commits: 2 ⚠ No latest release pull request found. ✔ Considering: 2 commits ❯ component: release-please-monorepo-with-root-example ❯ pull request title pattern: undefined ✔ Building candidate release pull request for path: packages/a ❯ type: node ❯ targetBranch: main ❯ commits: 2 ⚠ No latest release pull request found. ✔ Considering: 2 commits ❯ component: a ❯ pull request title pattern: undefined ❯ running plugin: NodeWorkspace ✔ Running workspace plugin ✔ Found 2 in-scope releases ✔ Building list of all packages ❯ Found candidate pull request for path: . ❯ Fetching package.json from branch main ❯ Found candidate pull request for path: packages/a ❯ Fetching packages/a/package.json from branch main ✔ Building dependency graph for 2 packages ✔ building graph order, existing package names: release-please-monorepo-with-root-example,a ❯ visiting release-please-monorepo-with-root-example, path: ❯ marking release-please-monorepo-with-root-example as visited and adding release-please-monorepo-with-root-example to order ❯ visiting a, path: ❯ marking a as visited and adding a to order ✔ Updating 2 packages ❯ package: a ❯ version: 0.1.0 from release-please ❯ package: release-please-monorepo-with-root-example ❯ version: 0.2.0 from release-please ✔ Updating existing candidate pull request for a, path: packages/a ✔ Updating existing candidate pull request for release-please-monorepo-with-root-example, path: . ✔ Merging 2 in-scope candidates ✔ Merging 2 pull requests >>>>>>>>>>>>>>>>>>>> START LOGS @ class Merge.run @ const updates >>>>>>>>>>>>>>>>>>>> updates - merged: [ { path: 'packages/a/package-lock.json', createIfMissing: false, updater: PackageLockJson { version: [Version], versionsMap: [Map] } }, { path: 'packages/a/npm-shrinkwrap.json', createIfMissing: false, updater: PackageLockJson { version: [Version], versionsMap: Map(0) {} } }, { path: 'packages/a/samples/package.json', createIfMissing: false, updater: SamplesPackageJson { version: [Version], versionsMap: undefined, packageName: 'a' } }, { path: 'packages/a/CHANGELOG.md', createIfMissing: true, updater: Changelog { version: [Version], versionsMap: undefined, changelogEntry: '## [0.1.0](https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example/compare/a-v0.0.1...a-v0.1.0) (2024-05-15)\n' + '\n' + '\n' + '### Features\n' + '\n' + '* **a:** some change ([00abf7d](https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example/commit/00abf7d7d524a75d7a52c08f72aa3eec4851074b))', versionHeaderRegex: /\n###? v?[0-9[]/s } }, { path: 'packages/a/package.json', createIfMissing: false, updater: CompositeUpdater { updaters: [Array] } }, { path: 'changelog.json', createIfMissing: false, updater: CompositeUpdater { updaters: [Array] } }, { path: '.release-please-manifest.json', createIfMissing: false, updater: CompositeUpdater { updaters: [Array] } }, { path: 'package-lock.json', createIfMissing: false, updater: PackageLockJson { version: [Version], versionsMap: [Map] } }, { path: 'npm-shrinkwrap.json', createIfMissing: false, updater: PackageLockJson { version: [Version], versionsMap: Map(0) {} } }, { path: 'samples/package.json', createIfMissing: false, updater: SamplesPackageJson { version: [Version], versionsMap: undefined, packageName: 'release-please-monorepo-with-root-example' } }, { path: 'CHANGELOG.md', createIfMissing: true, updater: Changelog { version: [Version], versionsMap: undefined, changelogEntry: '## [0.2.0](https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example/compare/release-please-monorepo-with-root-example-v0.1.0...release-please-monorepo-with-root-example-v0.2.0) (2024-05-15)\n' + '\n' + '\n' + '### Features\n' + '\n' + '* some change ([ef77e16](https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example/commit/ef77e163205409883c8fd87f2d3e456d43dc3f99))', versionHeaderRegex: /\n###? v?[0-9[]/s } }, { path: 'package.json', createIfMissing: false, updater: CompositeUpdater { updaters: [Array] } } ] updates - merged - release-please-manifest: [ { path: '.release-please-manifest.json', createIfMissing: false, updater: CompositeUpdater { updaters: [Array] } } ] updates - merged - release-please-manifest - updater: [ CompositeUpdater { updaters: [ [ReleasePleaseManifest], [ReleasePleaseManifest] ] } ] <<<<<<<<<<<<<<<<<<<< END LOGS @ class Merge.run @ const updates <<<<<<<<<<<<<<<<<<<< ⚠ pullRequestTitlePattern miss the part of '${scope}' ⚠ pullRequestTitlePattern miss the part of '${component}' ⚠ pullRequestTitlePattern miss the part of '${version}' >>>>>>>>>>>>>>>>>>>> START LOGS @ class WorkspacePlugin.run @ const newUpdates >>>>>>>>>>>>>>>>>>>> newCandidates: [ { path: '.', pullRequest: { title: [PullRequestTitle], body: [PullRequestBody], updates: [Array], labels: [Array], headRefName: 'release-please--branches--main', draft: false }, config: { releaseType: 'node' } } ] newUpdates: [ { path: 'packages/a/package-lock.json', createIfMissing: false, updater: PackageLockJson { version: [Version], versionsMap: [Map] } }, { path: 'packages/a/npm-shrinkwrap.json', createIfMissing: false, updater: PackageLockJson { version: [Version], versionsMap: Map(0) {} } }, { path: 'packages/a/samples/package.json', createIfMissing: false, updater: SamplesPackageJson { version: [Version], versionsMap: undefined, packageName: 'a' } }, { path: 'packages/a/CHANGELOG.md', createIfMissing: true, updater: Changelog { version: [Version], versionsMap: undefined, changelogEntry: '## [0.1.0](https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example/compare/a-v0.0.1...a-v0.1.0) (2024-05-15)\n' + '\n' + '\n' + '### Features\n' + '\n' + '* **a:** some change ([00abf7d](https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example/commit/00abf7d7d524a75d7a52c08f72aa3eec4851074b))', versionHeaderRegex: /\n###? v?[0-9[]/s } }, { path: 'packages/a/package.json', createIfMissing: false, updater: CompositeUpdater { updaters: [Array] } }, { path: 'changelog.json', createIfMissing: false, updater: CompositeUpdater { updaters: [Array] } }, { path: '.release-please-manifest.json', createIfMissing: false, updater: CompositeUpdater { updaters: [Array] } }, { path: 'package-lock.json', createIfMissing: false, updater: PackageLockJson { version: [Version], versionsMap: [Map] } }, { path: 'npm-shrinkwrap.json', createIfMissing: false, updater: PackageLockJson { version: [Version], versionsMap: Map(0) {} } }, { path: 'samples/package.json', createIfMissing: false, updater: SamplesPackageJson { version: [Version], versionsMap: undefined, packageName: 'release-please-monorepo-with-root-example' } }, { path: 'CHANGELOG.md', createIfMissing: true, updater: Changelog { version: [Version], versionsMap: undefined, changelogEntry: '## [0.2.0](https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example/compare/release-please-monorepo-with-root-example-v0.1.0...release-please-monorepo-with-root-example-v0.2.0) (2024-05-15)\n' + '\n' + '\n' + '### Features\n' + '\n' + '* some change ([ef77e16](https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example/commit/ef77e163205409883c8fd87f2d3e456d43dc3f99))', versionHeaderRegex: /\n###? v?[0-9[]/s } }, { path: 'package.json', createIfMissing: false, updater: CompositeUpdater { updaters: [Array] } } ] newUpdates - release-please-manifest: [ { path: '.release-please-manifest.json', createIfMissing: false, updater: CompositeUpdater { updaters: [Array] } } ] newUpdates - release-please-manifest - updater: [ CompositeUpdater { updaters: [ [ReleasePleaseManifest], [ReleasePleaseManifest] ] } ] newCandidates[0].pullRequest.version: undefined updatedPathVersions: Map(0) {} ✔ Post-processing 1 in-scope candidates newUpdates - release-please-manifest: [ { path: '.release-please-manifest.json', createIfMissing: false, updater: CompositeUpdater { updaters: [Array] } }, { path: '.release-please-manifest.json', createIfMissing: false, updater: ReleasePleaseManifest { version: undefined, versionsMap: Map(0) {} } } ] newUpdates - release-please-manifest - updater [ CompositeUpdater { updaters: [ [ReleasePleaseManifest], [ReleasePleaseManifest] ] }, ReleasePleaseManifest { version: undefined, versionsMap: Map(0) {} } ] <<<<<<<<<<<<<<<<<<<< END LOGS @ class WorkspacePlugin.run @ const newUpdates <<<<<<<<<<<<<<<<<<<< ❯ running plugin: Merge ✔ Merging 1 pull requests >>>>>>>>>>>>>>>>>>>> START LOGS @ class Merge.run @ const updates >>>>>>>>>>>>>>>>>>>> updates - merged: [ { path: 'packages/a/package-lock.json', createIfMissing: false, updater: PackageLockJson { version: [Version], versionsMap: [Map] } }, { path: 'packages/a/npm-shrinkwrap.json', createIfMissing: false, updater: PackageLockJson { version: [Version], versionsMap: Map(0) {} } }, { path: 'packages/a/samples/package.json', createIfMissing: false, updater: SamplesPackageJson { version: [Version], versionsMap: undefined, packageName: 'a' } }, { path: 'packages/a/CHANGELOG.md', createIfMissing: true, updater: Changelog { version: [Version], versionsMap: undefined, changelogEntry: '## [0.1.0](https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example/compare/a-v0.0.1...a-v0.1.0) (2024-05-15)\n' + '\n' + '\n' + '### Features\n' + '\n' + '* **a:** some change ([00abf7d](https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example/commit/00abf7d7d524a75d7a52c08f72aa3eec4851074b))', versionHeaderRegex: /\n###? v?[0-9[]/s } }, { path: 'packages/a/package.json', createIfMissing: false, updater: CompositeUpdater { updaters: [Array] } }, { path: 'changelog.json', createIfMissing: false, updater: CompositeUpdater { updaters: [Array] } }, { path: '.release-please-manifest.json', createIfMissing: false, updater: CompositeUpdater { updaters: [Array] } }, { path: 'package-lock.json', createIfMissing: false, updater: PackageLockJson { version: [Version], versionsMap: [Map] } }, { path: 'npm-shrinkwrap.json', createIfMissing: false, updater: PackageLockJson { version: [Version], versionsMap: Map(0) {} } }, { path: 'samples/package.json', createIfMissing: false, updater: SamplesPackageJson { version: [Version], versionsMap: undefined, packageName: 'release-please-monorepo-with-root-example' } }, { path: 'CHANGELOG.md', createIfMissing: true, updater: Changelog { version: [Version], versionsMap: undefined, changelogEntry: '## [0.2.0](https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example/compare/release-please-monorepo-with-root-example-v0.1.0...release-please-monorepo-with-root-example-v0.2.0) (2024-05-15)\n' + '\n' + '\n' + '### Features\n' + '\n' + '* some change ([ef77e16](https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example/commit/ef77e163205409883c8fd87f2d3e456d43dc3f99))', versionHeaderRegex: /\n###? v?[0-9[]/s } }, { path: 'package.json', createIfMissing: false, updater: CompositeUpdater { updaters: [Array] } } ] updates - merged - release-please-manifest: [ { path: '.release-please-manifest.json', createIfMissing: false, updater: CompositeUpdater { updaters: [Array] } } ] updates - merged - release-please-manifest - updater: [ CompositeUpdater { updaters: [ [CompositeUpdater], [ReleasePleaseManifest] ] } ] <<<<<<<<<<<<<<<<<<<< END LOGS @ class Merge.run @ const updates <<<<<<<<<<<<<<<<<<<< ⚠ pullRequestTitlePattern miss the part of '${scope}' ⚠ pullRequestTitlePattern miss the part of '${component}' ⚠ pullRequestTitlePattern miss the part of '${version}' Would open 1 pull requests fork: false title: chore: release main branch: release-please--branches--main draft: false body: :robot: I have created a release *beep* *boop* ---
a: 0.1.0 ## [0.1.0](https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example/compare/a-v0.0.1...a-v0.1.0) (2024-05-15) ### Features * **a:** some change ([00abf7d](https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example/commit/00abf7d7d524a75d7a52c08f72aa3eec4851074b))
release-please-monorepo-with-root-example: 0.2.0 ## [0.2.0](https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example/compare/release-please-monorepo-with-root-example-v0.1.0...release-please-monorepo-with-root-example-v0.2.0) (2024-05-15) ### Features * some change ([ef77e16](https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example/commit/ef77e163205409883c8fd87f2d3e456d43dc3f99))
--- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). updates: 12 ❯ Fetching packages/a/package-lock.json from branch main ⚠ file packages/a/package-lock.json did not exist ❯ Fetching packages/a/npm-shrinkwrap.json from branch main ⚠ file packages/a/npm-shrinkwrap.json did not exist ❯ Fetching packages/a/samples/package.json from branch main ⚠ file packages/a/samples/package.json did not exist ❯ Fetching packages/a/CHANGELOG.md from branch main >>>>>>>>>>>>>>>>>>>> START LOGS @ class Github.buildChangeSet @ const contentText >>>>>>>>>>>>>>>>>>>> content: undefined contextText: undefined <<<<<<<<<<<<<<<<<<<< END LOGS @ class Github.buildChangeSet @ const contentText <<<<<<<<<<<<<<<<<<<< ❯ Fetching packages/a/package.json from branch main >>>>>>>>>>>>>>>>>>>> START LOGS @ class Github.buildChangeSet @ const contentText >>>>>>>>>>>>>>>>>>>> content: { sha: '705144843f18e496e71e4fb37e84b92947055238', mode: '100644', content: 'ewogICJuYW1lIjogImEiLAogICJ2ZXJzaW9uIjogIjAuMC4xIiwKICAiZGVz\n' + 'Y3JpcHRpb24iOiAiIiwKICAibGljZW5zZSI6ICJJU0MiCn0=\n', parsedContent: '{\n' + ' "name": "a",\n' + ' "version": "0.0.1",\n' + ' "description": "",\n' + ' "license": "ISC"\n' + '}' } contextText: { "name": "a", "version": "0.0.1", "description": "", "license": "ISC" } <<<<<<<<<<<<<<<<<<<< END LOGS @ class Github.buildChangeSet @ const contentText <<<<<<<<<<<<<<<<<<<< ✔ updating from 0.0.1 to 0.1.0 ✔ updating from 0.1.0 to 0.1.0 ❯ Fetching changelog.json from branch main ⚠ file changelog.json did not exist ❯ Fetching .release-please-manifest.json from branch main >>>>>>>>>>>>>>>>>>>> START LOGS @ class Github.buildChangeSet @ const contentText >>>>>>>>>>>>>>>>>>>> content: { sha: '82e5f33da7194d8fd2a5f3380986b58996b37232', mode: '100644', content: 'ewogICIuIjogIjAuMS4wIiwKICAicGFja2FnZXMvYSI6ICIwLjAuMSIKfQ==\n', parsedContent: '{\n ".": "0.1.0",\n "packages/a": "0.0.1"\n}' } contextText: { ".": "0.1.0", "packages/a": "0.0.1" } <<<<<<<<<<<<<<<<<<<< END LOGS @ class Github.buildChangeSet @ const contentText <<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>> START LOGS @ class ReleasePleaseManifest.updateContent >>>>>>>>>>>>>>>>>>>> content: { ".": "0.1.0", "packages/a": "0.0.1" } this.versionsMap: Map(1) { 'packages/a' => Version { major: 0, minor: 1, patch: 0, preRelease: undefined, build: undefined } } parsed - updated: { '.': '0.1.0', 'packages/a': '0.1.0' } <<<<<<<<<<<<<<<<<<<< END LOGS @ class ReleasePleaseManifest.updateContent <<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>> START LOGS @ class ReleasePleaseManifest.updateContent >>>>>>>>>>>>>>>>>>>> content: { ".": "0.1.0", "packages/a": "0.1.0" } this.versionsMap: Map(1) { '.' => Version { major: 0, minor: 2, patch: 0, preRelease: undefined, build: undefined } } parsed - updated: { '.': '0.2.0', 'packages/a': '0.1.0' } <<<<<<<<<<<<<<<<<<<< END LOGS @ class ReleasePleaseManifest.updateContent <<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>> START LOGS @ class ReleasePleaseManifest.updateContent >>>>>>>>>>>>>>>>>>>> content: { ".": "0.2.0", "packages/a": "0.1.0" } this.versionsMap: Map(0) {} parsed - updated: { '.': '0.2.0', 'packages/a': '0.1.0' } <<<<<<<<<<<<<<<<<<<< END LOGS @ class ReleasePleaseManifest.updateContent <<<<<<<<<<<<<<<<<<<< ❯ Fetching package-lock.json from branch main ⚠ file package-lock.json did not exist ❯ Fetching npm-shrinkwrap.json from branch main ⚠ file npm-shrinkwrap.json did not exist ❯ Fetching samples/package.json from branch main ⚠ file samples/package.json did not exist ❯ Fetching CHANGELOG.md from branch main >>>>>>>>>>>>>>>>>>>> START LOGS @ class Github.buildChangeSet @ const contentText >>>>>>>>>>>>>>>>>>>> content: undefined contextText: undefined <<<<<<<<<<<<<<<<<<<< END LOGS @ class Github.buildChangeSet @ const contentText <<<<<<<<<<<<<<<<<<<< ❯ Fetching package.json from branch main >>>>>>>>>>>>>>>>>>>> START LOGS @ class Github.buildChangeSet @ const contentText >>>>>>>>>>>>>>>>>>>> content: { sha: 'c0e05987be5b4b714cee7869ac3bfe465b68dfe1', mode: '100644', content: 'ewogICJuYW1lIjogInJlbGVhc2UtcGxlYXNlLW1vbm9yZXBvLXdpdGgtcm9v\n' + 'dC1leGFtcGxlIiwKICAidmVyc2lvbiI6ICIwLjEuMCIsCiAgImRlc2NyaXB0\n' + 'aW9uIjogIiIsCiAgImxpY2Vuc2UiOiAiSVNDIgp9\n', parsedContent: '{\n' + ' "name": "release-please-monorepo-with-root-example",\n' + ' "version": "0.1.0",\n' + ' "description": "",\n' + ' "license": "ISC"\n' + '}' } contextText: { "name": "release-please-monorepo-with-root-example", "version": "0.1.0", "description": "", "license": "ISC" } <<<<<<<<<<<<<<<<<<<< END LOGS @ class Github.buildChangeSet @ const contentText <<<<<<<<<<<<<<<<<<<< ✔ updating from 0.1.0 to 0.2.0 ✔ updating from 0.2.0 to 0.2.0 packages/a/package-lock.json: [class PackageLockJson] no change found for packages/a/package-lock.json packages/a/npm-shrinkwrap.json: [class PackageLockJson] no change found for packages/a/npm-shrinkwrap.json packages/a/samples/package.json: [class SamplesPackageJson extends DefaultUpdater] no change found for packages/a/samples/package.json packages/a/CHANGELOG.md: [class Changelog extends DefaultUpdater] Index: packages/a/CHANGELOG.md =================================================================== --- packages/a/CHANGELOG.md +++ packages/a/CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog + +## [0.1.0](https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example/compare/a-v0.0.1...a-v0.1.0) (2024-05-15) + + +### Features + +* **a:** some change ([00abf7d](https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example/commit/00abf7d7d524a75d7a52c08f72aa3eec4851074b)) packages/a/package.json: [class CompositeUpdater] Index: packages/a/package.json =================================================================== --- packages/a/package.json +++ packages/a/package.json @@ -1,6 +1,6 @@ { "name": "a", - "version": "0.0.1", + "version": "0.1.0", "description": "", "license": "ISC" } \ No newline at end of file changelog.json: [class CompositeUpdater] no change found for changelog.json .release-please-manifest.json: [class CompositeUpdater] Index: .release-please-manifest.json =================================================================== --- .release-please-manifest.json +++ .release-please-manifest.json @@ -1,4 +1,4 @@ { - ".": "0.1.0", - "packages/a": "0.0.1" + ".": "0.2.0", + "packages/a": "0.1.0" } \ No newline at end of file package-lock.json: [class PackageLockJson] no change found for package-lock.json npm-shrinkwrap.json: [class PackageLockJson] no change found for npm-shrinkwrap.json samples/package.json: [class SamplesPackageJson extends DefaultUpdater] no change found for samples/package.json CHANGELOG.md: [class Changelog extends DefaultUpdater] Index: CHANGELOG.md =================================================================== --- CHANGELOG.md +++ CHANGELOG.md @@ -0,0 +1,8 @@ +# Changelog + +## [0.2.0](https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example/compare/release-please-monorepo-with-root-example-v0.1.0...release-please-monorepo-with-root-example-v0.2.0) (2024-05-15) + + +### Features + +* some change ([ef77e16](https://github.com/01Joseph-Hwang10/release-please-monorepo-with-root-example/commit/ef77e163205409883c8fd87f2d3e456d43dc3f99)) package.json: [class CompositeUpdater] Index: package.json =================================================================== --- package.json +++ package.json @@ -1,6 +1,6 @@ { "name": "release-please-monorepo-with-root-example", - "version": "0.1.0", + "version": "0.2.0", "description": "", "license": "ISC" } \ No newline at end of file ```

In this case, it appears that, in the end, only one class CompositeUpdater for .release-please-manifest.json exists. So each update is applied sequentially, preserving every update pushed during the execution.

This seems to be happening because class Merge plugin merges every update pushed by previously executed functions and methods, which is, AFAIK, only used when there are multiple packages to release. (Correct me if I'm wrong)

# ...
updates - merged - release-please-manifest:  [
  {
    path: '.release-please-manifest.json',
    createIfMissing: false,
    updater: CompositeUpdater { updaters: [Array] }
  }
]
updates - merged - release-please-manifest - updater:  [
  CompositeUpdater {
    updaters: [ [CompositeUpdater], [ReleasePleaseManifest] ]
  }
]
<<<<<<<<<<<<<<<<<<<< END LOGS @ class Merge.run @ const updates <<<<<<<<<<<<<<<<<<<<
bukowa commented 4 months ago

Happens to me too with node-workspace plugin when root package.json has more than 2 workspaces and one is not defined in packages section of release-please-config.json (dependency bump).

After debugging I can confirm it overwrites first update like @01Joseph-Hwang10 found out.

bukowa commented 4 months ago

I fixed this in above commit, take a look at config key separate-pull-requests - schema says it's false by default - I wonder why when I explicitly set this to false it starts to work all of a sudden? ^^ No idea but trying to find out.

Djiit commented 3 months ago

Hey team, happening to us as well on a bare nodejs mono repo. Anything we can do on our side to help repro or fix the issue? Thanks

wheresrhys commented 3 months ago

This worked for me https://github.com/wheresrhys/fetch-mock/pull/706