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

No longer compatible with current versions of release tools (ESM) #386

Open
kf6kjg opened this issue Feb 26, 2024 · 3 comments
Open

No longer compatible with current versions of release tools (ESM) #386

kf6kjg opened this issue Feb 26, 2024 · 3 comments

Comments

@kf6kjg
Copy link

kf6kjg commented Feb 26, 2024

Semantic release tools are all converting to ESM packages, causing breakage: first the versions being referenced are using old libraries, causing problems with making them work right all the time, secondly using overrides causes deeper breakage in SRP. I've tried patching SRP to attempt to use dynamic async imports, but it then fails to validate the plugins - looks like isPlainObject returns false, implying that the plugin interface has changed.

Here's where I got to: semantic-release-plus+20.0.0.patch with

    "overrides": {
        "semantic-release-plus": {
            "@semantic-release/commit-analyzer": "^11",
            "@semantic-release/error": "^4.0.0",
            "@semantic-release/github": "^9.0.0",
            "@semantic-release/npm": "^11.0.0",
            "@semantic-release/release-notes-generator": "^12.0.0"
        }
    }

Which gave errors like

config: [7:38:26 PM] [semantic-release] › ✖  EPLUGINSCONF The `plugins` configuration is invalid.
config: The plugins (https://github.com/semantic-release-plus/semantic-release/blob/master/docs/usage/configuration.md#plugins) option must be an array of plugin definions. A plugin definition is an npm module name, optionally wrapped in an array with an object.
config: The invalid configuration is [Module: null prototype] { default: { verifyConditions: [AsyncFunction: verifyConditions], prepare: [AsyncFunction: prepare] }, prepare: [AsyncFunction: prepare], verifyConditions: [AsyncFunction: verifyConditions] }.

Anyways, how can I help get this project rolling forward? Or is there now a better option that's caused work here to stall?

@JoA-MoS
Copy link
Contributor

JoA-MoS commented Feb 27, 2024

Thanks, for the issue, I will need to take a look and see how hard it will be to make the change. Last I left this project I was in the process of converting this to TypeScript, but I want to maintain compatibility with @semantic-release based packages if possible.

@JoA-MoS
Copy link
Contributor

JoA-MoS commented Mar 14, 2024

@kf6kjg I am working on a fix but I believe the core of the issues that @semantic-release/commit-analyzer has a peerDependency of semantic-release >=18.0.0-beta.1 which resolves to the latest version of semantic-release which has dependencies on the v11 of commit-analyzer.

try this as your overrides

 "overrides": {
    "@semantic-release/commit-analyzer": {
      "semantic-release": "^19.0.0"
    }
  },

you can troubleshoot this with the npm list @semantic-release/commit-analyzer or npm list semantic-release command to see what you get. My recommendations if you are going the overrides route is to stick to the versions before the esm update.

I will see if I can get this bundled into a build soon.

@alanfitzpatrick
Copy link

To get this working had to add the following overrides

"overrides": {
    "semantic-release": "19.0.5",
    "@semantic-release/commit-analyzer": "^8.0.1",
    "@semantic-release/release-notes-generator": "^10.0.3",
    "@semantic-release/error": "^3.0.0",
    "@semantic-release/github": "^8.0.0",
    "@semantic-release/npm": "^9.0.0"
  },

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

No branches or pull requests

3 participants