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

Does not handle plugin arguments correctly #51

Closed
Lknechtli opened this issue Jun 30, 2020 · 3 comments
Closed

Does not handle plugin arguments correctly #51

Lknechtli opened this issue Jun 30, 2020 · 3 comments
Labels

Comments

@Lknechtli
Copy link

Lknechtli commented Jun 30, 2020

This is what I get when trying to run the tool on set of plugins which includes arguments for the plugins:

Plugin definition in package.json:

    "plugins": [
      "@semantic-release/commit-analyzer",
      "@semantic-release/release-notes-generator",
      "@semantic-release/changelog",
      ["@semantic-release/exec", {
        "prepareCmd": "./set-version.sh ${nextRelease.version}"
      }],
      "@semantic-release/git",
      "@semantic-release/github"
    ]

Logs:

[1:06:33 PM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "[Function: ]"
[1:06:33 PM] [semantic-release] [[Function: ]] › ℹ  Analyzing commit: Merge cfc8298efc373c8f5264adb44ee43851ecf6b227 into 3e9dd3f212760b87f4c27ff0735e6ab35b92a59c
[1:06:33 PM] [semantic-release] [[Function: ]] › ℹ  The commit should not trigger a release
... (omitted)
[1:06:33 PM] [semantic-release] [[Function: ]] › ℹ  Analysis of 9 commits complete: minor release
[1:06:33 PM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "[Function: ]"
[1:06:33 PM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "[Function: ]"
[1:06:33 PM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "[Function: ]"
[1:06:33 PM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "[Function: ]"
[1:06:33 PM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "[Function: ]"
[1:06:33 PM] [semantic-release] › ℹ  Start step "analyzeCommits" of plugin "[Function: ]"
[1:06:33 PM] [semantic-release] › ✖  Failed step "analyzeCommits" of plugin "[Function: ]"
[1:06:33 PM] [semantic-release] › ✖  An error occurred while running semantic-release: TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received an instance of Array
    at validateString (internal/validators.js:120:11)
    at Module.require (internal/modules/cjs/loader.js:1019:3)
    at require (internal/modules/cjs/helpers.js:72:18)
    at /home/vsts/work/1/s/node_modules/semantic-release-github-pr/src/index.js:86:24
    at validator (/home/vsts/work/1/s/node_modules/semantic-release/lib/plugins/normalize.js:34:30)
    at /home/vsts/work/1/s/node_modules/semantic-release/lib/plugins/pipeline.js:37:40
    at next (/home/vsts/work/1/s/node_modules/p-reduce/index.js:17:9)
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  code: 'ERR_INVALID_ARG_TYPE',
  pluginName: '[Function: ]'
}
TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received an instance of Array

As the error says, it's looking for a plugin ID and instead finds an array and doesn't know what to do with it.

@pmowrer
Copy link
Owner

pmowrer commented Jul 7, 2020

Thanks for the report @Lknechtli! I think I have a fix for this

pmowrer added a commit that referenced this issue Jul 7, 2020
pmowrer added a commit that referenced this issue Jul 7, 2020
@pmowrer pmowrer mentioned this issue Jul 7, 2020
pmowrer added a commit that referenced this issue Jul 7, 2020
@pmowrer pmowrer mentioned this issue Jul 8, 2020
@pmowrer pmowrer closed this as completed in 715bf6a Jul 8, 2020
@pmowrer
Copy link
Owner

pmowrer commented Jul 8, 2020

🎉 This issue has been resolved in version 6.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Lknechtli
Copy link
Author

Thanks for fixing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants