Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] semantic-release-monorepo ignores pkgRoot #121

Open
its-dibo opened this issue Apr 15, 2022 · 10 comments
Open

[bug] semantic-release-monorepo ignores pkgRoot #121

its-dibo opened this issue Apr 15, 2022 · 10 comments

Comments

@its-dibo
Copy link

its-dibo commented Apr 15, 2022

I created a minimal reproduction which is a monorepo that contains only one workspace in `./package' dir

both root and package (the workspace) have exactly the same release.config.js file except that package extends semantic-release-monorepo.

both of them uses the default configurations and only two plugins

module.exports = {
  plugins: [
    "@semantic-release/commit-analyzer",
    ["@semantic-release/npm", { pkgRoot: "dist" }],
  ],
  // extends: ["semantic-release-monorepo"],
};

the important part here is that @semantic-release/npm uses { pkgRoot: "dist" }

package contents are typically the same as the root including dist folder, except the package name.

if I run semantic-release from the root, i.e without semantic-release-monorepo it packs the package as expected, and puts the contents of pkgRoot dir in the top-level of the published package.

in contrast, when I run the same command from package, i.e with semantic-release-monorepo, it ignores the option pkgRoot and the packed packages contain the folder dist instead of its contents.

steps for reproduction
1- clone the repo and install dependencies
2- remove all local and remote tags if exist
3- switch to the branch next
4- modify root's and package's files and create feat/fix commits
5- run the script release from the root and package and see the tarball's contents in both cases

you will see different behavior.

@its-dibo
Copy link
Author

its-dibo commented May 8, 2022

anyone here?

@iknowcss
Copy link

iknowcss commented May 9, 2022

@eng-dibo I'm affected by this as well. Today I tried downgrading my @semantic-release/npm version down from 9.0.1 to 8.0.3 and that seemed to fix the problem. Does that fix the issue in your example repo?

@its-dibo
Copy link
Author

its-dibo commented May 9, 2022

@eng-dibo I'm affected by this as well. Today I tried downgrading my @semantic-release/npm version down from 9.0.1 to 8.0.3 and that seemed to fix the problem. Does that fix the issue in your example repo?

finally, someone came here!! it seems this repo is not maintained anymore and we need to migrate to another solution

@its-dibo
Copy link
Author

its-dibo commented May 9, 2022

confirmed as this issue only occurs in v9, v8 is more stable

@iknowcss
Copy link

iknowcss commented May 9, 2022

@eng-dibo I just started using this repo, damn I didn't realize there wasn't much (or any?) activity in the last year. @pmowrer are you still actively developing this or have you set it aside temporarily?

@pmowrer
Copy link
Owner

pmowrer commented May 23, 2022

@iknowcss This project is essentially in maintenance mode. The aim is to keep pace with changes to semantic-release, which seems to have slowed down significantly in recent years. Haven't had much time to commit to open source lately - kids 🤷

@iknowcss
Copy link

Yeah fair enough, thanks for your work on it so far anyway. We have a way forward now at least. Take care 🙏

@its-dibo
Copy link
Author

The aim is to keep pace with changes to semantic-release

we just need your help to fix this vital issue

@iknowcss
Copy link

@eng-dibo is it an issue with this project or with semantic-release? semantic-release did a major upgrade so I would guess they've changed some API. It might not be too difficult to fix. If someone like yourself put up a PR to fix it then maybe Patrick could review and merge in between juggling kids?

@greglbd
Copy link

greglbd commented May 6, 2023

This issue is actually from semantic-release/npm see semantic-release/npm#504

and this PR that fixes it semantic-release/npm#531 - the PR however is only for v10 so that will be an issue but the thread related to the issue does have a way to patch semantic-release/npm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants