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

fix: cannot find module with package exports and support previous non-function configurations #588

Closed
wants to merge 1 commit into from

Conversation

1aron
Copy link

@1aron 1aron commented Jan 26, 2024

Since upgrading to v11 we have lost these features:

  • Force the configuration type to be a function
  • conventional-changelog-* packages configured via objects are no longer supported

This is the version that Semantic Releases v23 has a mandatory dependency on. The side effects of supporting ESM presets outweigh the benefits.

Reproduction: https://github.com/1aron/techor/actions/runs/7667827891/job/20898475834

@travi
Copy link
Member

travi commented Jan 26, 2024

as highlighted in our release notes for v11 the format expected by the conventional-changelog presets has changed. as long as you update to the latest versions of the preset you are using, you should get back to working just fine. if you have a custom preset, you will need to update it to match the new expectations of the conventional-changelog project

@travi travi closed this Jan 26, 2024
@1aron
Copy link
Author

1aron commented Jan 26, 2024

@travi For this package, compatibility with older versions only requires:

if (typeof loadedConfig === "function") {
     loadedConfig = await loadedConfig(presetConfig);
}

Is the incompatibility motivated by more than just the cases in the test?

In addition, changing import-from to import-from-esm in v11 seems to have caused many side effects and issues, which does need to be weighed.

@travi
Copy link
Member

travi commented Jan 26, 2024

compatibility with older versions only requires

a major goal of the signature expectation update by conventional-changelog and how the presets are handled is to remove the need for conditional logic like this. all of the official presets now use the modern signature. if you are using a preset that does not align to the new expectations from conventional-changelog, the proper path forward is to fix that. either fork that project or contribute there. we will not accept updates here to support legacy presets.

Is the incompatibility motivated by more than just the cases in the test?

the change was made by the conventional-changelog project. we use those packages as dependencies of this project. aligning to their updated path simplifies our project, so we see it as a good thing

In addition, changing import-from to import-from-esm in v11 seems to have caused many side effects and issues, which does need to be weighed.

unless i completely misunderstand the problem, this is not an issue with import-from vs import-from-esm, but entirely related to the documented breaking change related to the conventional-changelog changes and our alignment to those changes

@1aron
Copy link
Author

1aron commented Jan 26, 2024

@travi I think conventional-changelog changed to use asynchronous function configuration maybe because I added asynchronous function to it. 😂 conventional-changelog/conventional-changelog#1065

I'll open another issue for import-from-esm.

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

Successfully merging this pull request may close these issues.

2 participants