- Notifications
You must be signed in to change notification settings - Fork1.8k
Support extending ESM based configurations#3037
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
i started down this path as part of the esm conversion, butbacked away from it because of json based configs. i'm not sure that i fully explored that need at the time and, without some further consideration, i'm not even sure i proved that it was a valid use case to account for. i would want to at least dig deep enough to prove whether that is a valid case since i dont recall the full context right now. if it is, that is the one additional use case i'd want to make sure is considered. the fact that it wasnt handled at the time of the esm conversion was simply a matter of deferring the change in order to get the rest of the conversion out the door. we always intended for this to be a follow up, so appreciate the help to get this moving,@dominykas (and@bryanjtc)! |
dominykas commentedNov 1, 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.
From the linked comment:
Yeah, that's what I did - I detect JSON based on the Did I miss anything? This is all that I saw covered by tests... Happy to add whatever is missing. |
i think this exercises enough for me to feel good about this change since the imports are actually happening within the scope of these unit tests. we have a couple of cases in our integration test, but i dont think additional tests there would add more regression protection in this case. i cant think of anything outside of what you've handled, so this looks great to me |
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.
great contribution. thanks a ton for getting us past this detail!
🎉 This PR is included in version 22.0.7 🎉 The release is available on: Yoursemantic-release bot 📦🚀 |
Thanks! |
@dominykas couldthis error be related to this change? i forgot to consider the windows case that requires a proper url and we dont have the windows pipeline working for this repo yet to help catch issues like that. since you are most familiar with your change, i'm curious what insight you could provide for this one. thanks! |
fromsemantic-release/commit-analyzer#537 (comment):
i'm ok with either approach. if import-from-esm will work well in this situation, i see benefit in the consistency. if that delays things, the alternative approach makes sense to me. we can always follow up to make them consistent as a follow up once getting the situation fixed.
@sheerlox i could use help understanding this.the only test that i find mentioning an semantic-release/test/get-config.test.js Lines 323 to 347 in02f2cb1
|
fromsemantic-release/commit-analyzer#537 (comment)
understood and not a problem. it really comes down to the lack of a windows pipeline for the project, which is on us. we'dstarted an effort to get that back in place, but i failed to see it through fully. this can be motivation to revisit. |
@seebeen the remaining windows compatibility details would be related to this PR. if you want to test out the current state to confirm the problem and maybe try out the proposed options for fixing, that could be really helpful. we should also work toward getting the windows workflow that i mentioned above into the mix so that we can avoid this sort of situation going forward. |
Sorry for the delay. Indeed the test I was referring to has a package.json: the complexity is that the |
sheerlox commentedNov 16, 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.
Forgot to mention that I fixed the underlying issue in |
@mcmiddle592 the issue you reported insemantic-release/commit-analyzer#537 (comment) should be resolved byhttps://github.com/semantic-release/semantic-release/releases/tag/v22.0.8 since it was most likely introduced by an oversight in this change. would really appreciate it if you could confirm if this new version resolves the issue for you. thanks again for reporting! |
mcmiddle592 commentedNov 17, 2023
Supporting ESM required the following fix released in `semantic-release` 22.0.7:semantic-release/semantic-release#3037
Uh oh!
There was an error while loading.Please reload this page.
Closes#3036
Ithink that's all this takes, right?
requirefor it? Node.js docs say that it's in "Active development" and the standard changed from "assertions" to "attributes" in v21... But it works (i.e. tests are passing) now?*.js+"type": "module"inpackage.json... should I?