- Notifications
You must be signed in to change notification settings - Fork81
feat: add support for ESM presets#537
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
37e290a tod88beb8Compared88beb8 to5f6ac30CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Looks like the tests are broken on Windows. I'll investigate and come back to you when I have fixed the issue. Thanks for the follow-up and enthusiasm on this! 🎉 |
9ee34c4 to3d51397CompareThe dynamic Both PRs have been rebased against |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
thanks a bunch for working through these and for your patience for me to get a chance to review
happy to contribute! |
🎉 This PR is included in version 11.1.0 🎉 The release is available on: Yoursemantic-release bot 📦🚀 |
if you'd like to help us out on a more official basis, i'd be happy to invite you to the org and grant you triage rights to start with. let me know if that is something you'd be interested in, but no pressure if you arent interested |
Sure, I'll give it my best shot, thank you for the invite! |
mcmiddle592 commentedNov 7, 2023
@sheerlox@travi I just pulled this change into my project and am facing an issue in my Windows Jenkins environment while running "npm run semantic-release":
I wasn't expecting a breaking change, is there something that needs to be done in my project to handle this? |
sheerlox commentedNov 7, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Hello@mcmiddle592, I'm sorry you're encountering an error because of that PR. Could you pleaseopen an issue and share more details about the configuration you're using so I can better understand where the issue is coming from? Note: I would expect |
sheerlox commentedNov 7, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
That's definitely an issue with |
@mcmiddle592 the fixhas been released, please run |
Sincesemantic-release/semantic-release#3037 was also released on Friday, I'm curious if that change is involved as well. |
Yeah, that's definitely possible since |
dominykas commentedNov 8, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Yes, it could be related, sorry - I do not have Windows to test this myself either. Would the fix to prepend Then again - the only code paths that were changed were when the |
sheerlox commentedNov 8, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
That should solve the issue but feels a bit hackier than directly using
I'm not sure I understand what you mean, but the issue seems to arise because the user specifies an absolute path in its "extends" configuration/CLI option. EDIT: JSON modules support released in |
mcmiddle592 commentedNov 8, 2023
@sheerlox@travi thanks for all the help here and the quick responses. I pinned my Semantic-Release in the short term to 22.0.6 to workaround this issue. I won't be able to get to testing this until next week, but when I do I plan to ensure I am using the latest version of import-from-esm (instead of import-from) and see if my issue on Windows is resolved. If there is anything else I need to check then let me know. |
dominykas commentedNov 9, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Sorry, I might not be following things in full - I responded because there was a change in |
sheerlox commentedNov 9, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
We think it might be both yes. As of now, the issue in Since I added JSON module support yesterday, I just triedfixing the issue in Unfortunately, I won't be available in the next few days so I won't be able to work on that issue. Maybe it would be worth prepending |
sorry for the slow response from me. the last couple days have been pretty busy for me. thank you for keeping the conversation moving forward. since it sounds like any issue here is likely resolved, lets move the conversation about extending a config back to the other issue. @mcmiddle592 we appreciate you remaining engaged and are interested in the results of your test with the import-from-esm update. as you can tell from the conversation, we suspect that there is also an update needed in core semantic-release for the other recent change related to esm loading. still interested in your results, but don't be surprised if you still encounter a problem until we make the other update. |
seebeen commentedNov 10, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@dominykas I'm on Windows. What needs doing? :) |
mcmiddle592 commentedNov 14, 2023
@sheerlox@travi@dominykas just wanted to confirm that I did test replacing "import-from" with "import-from-esm" in my projects package-lock.json (by reinstalling my semantic release dependencies). This however did not resolve the issue (which I believe was expected), I still have the same problem:
|
Thanks for confirming the issue@mcmiddle592, we're now tracking this insemantic-release/semantic-release#3037. We'll let you know when the issue is resolved. |
kerasing commentedMar 15, 2024
@travi - hey this was a breaking change for me, because I was using |
Hi@kerasing, as you can see onthis line of the PR diff, the function signature of The packagewas converted to ESM in v10 on June 2nd, 2023. Is there something I'm missing about my PR changes that caused you to run into an issue? |
Uh oh!
There was an error while loading.Please reload this page.
This PR adds support for loading pure ESM presets. This was not previously possible because
import-fromusescreateRequireunder the hood.In order to replace it, I've created anESM module loader that abstracts the preset loading logic for
semantic-releaserepos (first tries to hitnode_modules, then if not found tries to hit the relative path from the current working directory).I've tested these changes locally on thehttps://github.com/insurgent-lab/conventional-changelog-preset repo (which is a preset but also uses its current version for releasing with
semantic-release), both with the current latest version and the ESM version (which you can find in therefactor/esmbranch since it's probably the only conventional-changelog ESM preset at this time).Related
cc@travi 😉