-
Notifications
You must be signed in to change notification settings - Fork 80
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
chore: Convert to esm #143
Conversation
this should not be a blocker. see semantic-release/semantic-release#3036 (comment) |
For testing purposes I ran a config file The fix proposed in semantic-release/semantic-release#3037 fixes that error. Here is the test pipeline running without errors with a yarn patch of semantic-release using the fix. https://github.com/bryanjtc/semantic-release-monorepo/actions/runs/6716255451/job/18252207700 |
since you called out that this PR is blocked by the potential update on the semantic-release side, my goal was to highlight that you could instead use an
appreciate the verification that the update works for this scenario, but since i dont maintain this project, be sure to mention things like this on the semantic-release threads since i'm far less likely to spot updates in this repo |
I see your point. I can't change it to a cjs file because imports are not supported in cjs file. I can try using a bundler to convert everything to cjs, including the esm-only dependencies. |
Just published semantic-release-monorepo-esm 1.0.10 that supports using semantic-release without the patch of semantic-release/semantic-release#3037 |
it actually not able to release any notes |
Can you share the error? Your semantic release config and semantic release package and plugin versions? I will try to reproduce the error to fix it. |
No error happen on github action.. just that no release notes or commit when patch / minor from commit-analyzer .releaserc.json {
"branches": [
"main",
{ "name": "release", "prerelease": false },
{ "name": "dev", "prerelease": true },
{ "name": "development", "prerelease": true }
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "angular",
"releaseRules": [{ "type": "enhancement", "release": "minor" }]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{ "type": "feat", "section": "Features", "hidden": false },
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
{
"type": "perf",
"section": "Performance Improvements",
"hidden": false
},
{
"type": "enhancement",
"section": "Enhancements",
"hidden": false
}
]
}
}
],
"@semantic-release/changelog",
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
[
"@semantic-release/git",
{
"assets": [
"package.json",
"pnpm-lock.yaml",
"pnpm-workspace.yaml",
"CHANGELOG.md"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
]
}
packages manager: pnpm workspace monorepo |
@bryanjtc I believe in your test github action also facing same problem: |
I'm running into similar issue - the tool correctly identifies commits that should trigger a patch release, but nothing happens aferwards. node: v20.7.0 package.json: {
"name": "XXXXXX",
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"semantic-release": "^22.0.8",
"semantic-release-monorepo-esm": "^1.0.10",
"semantic-release-replace-plugin": "^1.2.7",
"semantic-release-slack-bot": "^4.0.2"
}
} .releaserc.yaml: ---
branches:
- master
- feature-branch
plugins:
- '@semantic-release/commit-analyzer'
- - semantic-release-replace-plugin
...ELIDED...
- '@semantic-release/release-notes-generator'
- - '@semantic-release/changelog'
- changelogTitle: "# Changelog"
- - '@semantic-release/git'
- assets:
- CHANGELOG.md
message: "chore(release): XXXX-${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
- '@semantic-release/github'
- - semantic-release-slack-bot
- notifyOnSuccess: true
markdownReleaseNotes: true
packageName: XXXXX
I observe the same behavior in CI. The confusing thing is the |
@bryanjtc tried latest fix.. still same result |
It seems like steps after analyzeCommits are not running |
@bryanjtc Tried your ESM package, but it's not working. As others reported, nothing happens after |
For what it's worth, ended up using https://github.com/Lomray-Software/semantic-release-monorepo, works as expected. |
Thanks, I'll give it a go! I would be nice to have a status from the original owner of this repo though, @pmowrer do you still plan to maintain this project? I fully understand that sometimes it's complicated, but if you're not willing to maintain it anymore or need help I'm sure there will be volunteers (me included) to help, so don't hesitate. |
@jtatarik @vis97c @vis97c NPM package: https://www.npmjs.com/package/@rimac-technology/semantic-release-monorepo |
@sinedied Yes, planning on sorting this out finally. Sorry everyone for the delays and thanks for the contributions. |
BREAKING CHANGE: Requires semantic-release 20 or above. Thanks to @bryanjtc for doing all the work to get this done. Much appreciated! Co-Authored-By: Bryan Thomas <[email protected]>
Co-Authored-By: Tobias Bocanegra <[email protected]>
7b4b791
to
9a6e08b
Compare
🎉 This PR is included in version 8.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@bryanjtc I saw it mentioned but didn't explicitly address it yet. Would like to better understand what changed to break it. |
Upgrades yarn to v4 and converts projects to esm.
The package still supports cjs by using bundled code.
Drops support for older node and semantic release versions.
Changes jest with vitest. Vitest has better esm support.
Added tsup to bundle the code and output esm and cjs code.
Blocked by: semantic-release/semantic-release#3037Closes: #138
Closes: #136
Closes: #137
Closes: #140
Closes: #134
Closes: #133
Closes: #128
Closes: #135