Skip to content

TypeError: Method Date.prototype.toString called on incompatible receiver [object Date] #657

Closed
remcolakens/next-boilerplate
#171
@Th3S4mur41

Description

@Th3S4mur41

After updating semantic-release to version 24.0.0, running semantic-release fails in multiple repositories with the following error:

[8:14:13 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  The commit should not trigger a release
[8:14:13 AM] [semantic-release] [@semantic-release/commit-analyzer] › ℹ  Analysis of 2 commits complete: patch release
[8:14:13 AM] [semantic-release] › ✔  Completed step "analyzeCommits" of plugin "@semantic-release/commit-analyzer"
[8:14:13 AM] [semantic-release] › ℹ  The next release version is 1.3.3
[8:14:13 AM] [semantic-release] › ℹ  Start step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[8:14:13 AM] [semantic-release] › ✘  Failed step "generateNotes" of plugin "@semantic-release/release-notes-generator"
[8:14:13 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/clean-self-hosted-runner/clean-self-hosted-runner/node_modules/conventional-changelog-writer/dist/utils.js:8:12)
    at defaultCommitTransform (file:///home/runner/work/clean-self-hosted-runner/clean-self-hosted-runner/node_modules/conventional-changelog-writer/dist/options.js:23:23)
    at transformCommit (file:///home/runner/work/clean-self-hosted-runner/clean-self-hosted-runner/node_modules/conventional-changelog-writer/dist/commit.js:29:23)
    at write (file:///home/runner/work/clean-self-hosted-runner/clean-self-hosted-runner/node_modules/conventional-changelog-writer/dist/writers.js:39:28)
    at async nextAsync (node:internal/streams/from:1[82](https://github.com/eviden-actions/clean-self-hosted-runner/actions/runs/9346616920/job/25721881145#step:5:83):33) {
  pluginName: '@semantic-release/release-notes-generator'
}
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/clean-self-hosted-runner/clean-self-hosted-runner/node_modules/conventional-changelog-writer/dist/utils.js:8:12)
    at defaultCommitTransform (file:///home/runner/work/clean-self-hosted-runner/clean-self-hosted-runner/node_modules/conventional-changelog-writer/dist/options.js:23:23)
    at transformCommit (file:///home/runner/work/clean-self-hosted-runner/clean-self-hosted-runner/node_modules/conventional-changelog-writer/dist/commit.js:29:23)
    at write (file:///home/runner/work/clean-self-hosted-runner/clean-self-hosted-runner/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: Process completed with exit code 1.

This is happening with @semantic-release/release-notes-generator 14.0.0

I also tried to remove node_modules and package-lock.json and run a clean npm i, but the problem remains

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions