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

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

Closed
Th3S4mur41 opened this issue Jun 3, 2024 · 1 comment

Comments

@Th3S4mur41
Copy link

Th3S4mur41 commented Jun 3, 2024

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

@Th3S4mur41
Copy link
Author

Th3S4mur41 commented Jun 3, 2024

Duplicate of #655

Issue solved by overriding conventional-changelog-conventionalcommits to v8 or higher

"overrides": {
  "conventional-changelog-conventionalcommits": ">= 8.0.0"
}

This should be solved automatically when the dependency is updated in @commitlint/config-conventional

Th3S4mur41 added a commit to eviden-actions/actions that referenced this issue Jun 3, 2024
kumy added a commit to geokrety/geokrety-gha-workflows that referenced this issue Jun 16, 2024
jdbruijn added a commit to vidavidorra/create-project that referenced this issue Jun 17, 2024
dhensby added a commit to dhensby/setup-sqlserver that referenced this issue Jun 18, 2024
Fix to release process via temporary override of changelog lib (as per
semantic-release/release-notes-generator#657 (comment))
jdbruijn added a commit to vidavidorra/bunyan-pretty-stream that referenced this issue Jul 16, 2024
jdbruijn added a commit to vidavidorra/bunyan-pretty-stream that referenced this issue Jul 16, 2024
jdbruijn added a commit to vidavidorra/.github that referenced this issue Jul 16, 2024
jdbruijn added a commit to vidavidorra/renovate that referenced this issue Jul 16, 2024
DelanoWAF added a commit to Sudwest-Fryslan/WebformulierenVerwerker that referenced this issue Aug 1, 2024
Th3S4mur41 added a commit to Th3S4mur41/hw2energyid that referenced this issue Sep 2, 2024
feslima added a commit to feslima/scale-alchemy that referenced this issue Sep 4, 2024
H0R5E added a commit to Data-Only-Greater/sveltekit-adapter-aws-pulumi that referenced this issue Sep 9, 2024
H0R5E added a commit to Data-Only-Greater/sveltekit-adapter-aws-base that referenced this issue Sep 9, 2024
JoshTheWanderer added a commit to etchteam/mobius-tokens that referenced this issue Sep 18, 2024
JoshTheWanderer pushed a commit to etchteam/mobius-tokens that referenced this issue Sep 18, 2024
## 1.0.0 (2024-09-18)

### Features

* add license file ([cc0c844](cc0c844))
* add tokens ([51fea49](51fea49))

### Bug Fixes

* override dep to workaround bug ([15a9ca1](15a9ca1)), closes [semantic-release/release-notes-generator#657](semantic-release/release-notes-generator#657)
jdbruijn added a commit to vidavidorra/dotfiles that referenced this issue Sep 25, 2024
jdbruijn added a commit to vidavidorra/dotfiles that referenced this issue Sep 25, 2024
vaerh added a commit to terraform-routeros/terraform-provider-routeros that referenced this issue Sep 26, 2024
Error: TypeError: Method Date.prototype.toString called on incompatible receiver [object Date]
semantic-release/release-notes-generator#657
jdbruijn added a commit to vidavidorra/commitlint-config that referenced this issue Oct 1, 2024
KaiVolland added a commit to geostyler/geostyler that referenced this issue Oct 11, 2024
inlcudes an override for conventional-changelog-conventionalcommits to fix
semantic-release/release-notes-generator#657
kleinfreund added a commit to kleinfreund/vue-accessible-color-picker that referenced this issue Oct 20, 2024
Override the `conventional-changelog-conventionalcommits` dependency to be at least version 8 to work around semantic-release/release-notes-generator#655 and semantic-release/release-notes-generator#657. This workaround will be necessary until conventional-changelog/commitlint#4063 is resolved.
kleinfreund added a commit to kleinfreund/yet-another-color-picker that referenced this issue Oct 20, 2024
Override the `conventional-changelog-conventionalcommits` dependency to be at least version 8 to work around semantic-release/release-notes-generator#655 and semantic-release/release-notes-generator#657. This workaround will be necessary until conventional-changelog/commitlint#4063 is resolved.
kleinfreund added a commit to kleinfreund/retrieve that referenced this issue Oct 20, 2024
Override the `conventional-changelog-conventionalcommits` dependency to be at least version 8 to work around semantic-release/release-notes-generator#655 and semantic-release/release-notes-generator#657. This workaround will be necessary until conventional-changelog/commitlint#4063 is resolved.
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

1 participant