question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[bug] semantic-release-monorepo ignores pkgRoot

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
pmowrercommented, 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 🤷

1reaction
iknowcsscommented, 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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

semantic-release-monorepo ignores pkgRoot - Stack Overflow
I created a minimal reproduction which is a monorepo contains only one workspace in `./package' dir. both root and package (the workspace) ...
Read more >
Issues · pmowrer/semantic-release-monorepo - GitHub
Apply semantic-release's automatic publishing to a monorepo. ... [bug] semantic-release-monorepo ignores pkgRoot. #121 opened on Apr 15 by eng-dibo.
Read more >
The chronicles of semantic-release and monorepos
semantic -release tries to resolve a new version by making a cut of commits from the previous release tag in repo, but has...
Read more >
Simple index - piwheels
... odoo8-addon-runbot-skip-tests rtrsub metabasic django-quantity-field intelligent-plant kt jabstract endecrypt semantic-release-naas-test theta ...
Read more >
Troubleshooting - semantic-release
Troubleshooting · You do not have permission to publish 'package-name' · Squashed commits are ignored by semantic-release · reference already exists error when ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found