Open
Description
Describe the bug
This was a known issue in semantic-release
it self (semantic-release/semantic-release#3571), but this github action, at least as of 0a51e81 (tag v4.2.0) still depends on [email protected]
due to the package-lock.json:
semantic-release-action/package-lock.json
Lines 1118 to 1120 in 0a51e81
Error:
[10:03:39 AM] [semantic-release] › ℹ Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[10:03:39 AM] [semantic-release] › ✘ Failed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[10:03:39 AM] [semantic-release] › ✘ An error occurred while running semantic-release: TypeError: Method Date.prototype.toString called on incompatible receiver [object Date]
at Proxy.toString (<anonymous>)
at [Symbol.toPrimitive] (<anonymous>)
at new Date (<anonymous>)
at Object.formatDate (file:///home/runner/work/_actions/cycjimmy/semantic-release-action/0a51e81a6baff2acad3ee88f4121c589c73d0f0e/node_modules/conventional-changelog-writer/dist/utils.js:8:12)
at defaultCommitTransform (file:///home/runner/work/_actions/cycjimmy/semantic-release-action/0a51e81a6baff2acad3ee88f4121c589c73d0f0e/node_modules/conventional-changelog-writer/dist/options.js:23:23)
at transformCommit (file:///home/runner/work/_actions/cycjimmy/semantic-release-action/0a51e81a6baff2acad3ee88f4121c589c73d0f0e/node_modules/conventional-changelog-writer/dist/commit.js:29:23)
at write (file:///home/runner/work/_actions/cycjimmy/semantic-release-action/0a51e81a6baff2acad3ee88f4121c589c73d0f0e/node_modules/conventional-changelog-writer/dist/writers.js:39:28)
at async nextAsync (node:internal/streams/from:182:33) {
pluginName: '@semantic-release/release-notes-generator'
}
Error: TypeError: Method Date.prototype.toString called on incompatible receiver [object Date]
Workflow
- name: Semantic Release
uses: cycjimmy/semantic-release-action@0a51e81a6baff2acad3ee88f4121c589c73d0f0e # v4.2.0
with:
# dry_run: true
# plugins included in semantic-release by default:
# @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/npm @semantic-release/github
extra_plugins: |
@semantic-release/[email protected]
@semantic-release/[email protected]
@commitlint/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
As a workaround, [email protected]
can be explicitly installed:
extra_plugins: |
@semantic-release/[email protected]
@semantic-release/[email protected]
@commitlint/[email protected]
[email protected]
Expected behavior
No Error to happen.
Additional context
This could be solved by either:
- not shipping a package-lock.json in the action
- updating
conventional-changelog-writer
in the lockfile to8.0.1
(or explicitly depending on it) - waiting for
semantic-release
to update the dependency requirement
Metadata
Metadata
Assignees
Labels
No labels