question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

require('@commitlint/load') does not work properly anymore

See original GitHub issue

Since @commitlint/load release v9, this line of code is not working anymore and as a result, no config could be downloaded

https://github.com/commitizen/cz-conventional-changelog/blob/master/index.js#L32

The reason is require('@commitlint/load') now returns {default: func} but not function itself.

Here is my package.json:

{
  "scripts": {
    "commit": "git-cz"
  },
  "devDependencies": {
    "@commitlint/cli": "^9.1.1",
    "@commitlint/config-conventional": "^9.1.1",
    "commitizen": "^4.1.2",
    "conventional-github-releaser": "^3.1.3",
    "cz-conventional-changelog": "^3.2.0",
    "husky": "^4.2.5",
    "lint-staged": "^10.2.2",
    "typescript": "^3.9.2",
  },
  "config": {
    "commitizen": {
      "path": "./node_modules/cz-conventional-changelog"
    }
  },
  "husky": {
    "hooks": {
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
    "src/**/*.ts": [
      "eslint --fix"
    ]
  }
}

It didnt work even if you specify @commitlint packages versions as 8.3.5, or specify @commitilint/load directly to deps with version 8.3.5. It looks like cz-conventional-changelog installs latest version by itself

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
ThisIsMissEmcommented, Jul 29, 2020

I might fix this in a commit on #126, as on that branch we can actually properly test config loading.

0reactions
na-jicommented, Mar 10, 2021

The issue still exists today as you can see in issue #129. Tried with version 8.3, 9.1 and version 12.0 of commitlint, the config is not loaded correctly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

lua-libloader - npm Package Health Analysis - Snyk
The npm package lua-libloader was scanned for known vulnerabilities and missing license, and no issues were found. Thus the package was deemed ...
Read more >
mozilla-central: changeset 603618 ...
1. Commit and push your changes and open a pull request. The commit message must contain the version in `Chromium <version> (<revision>)` format...
Read more >
Licenses mobile - MATTR Learn
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,...
Read more >
7zip-bin-osx 5.1.1 : MIT License @auth0/auth0-react 1.2.0
Modified Version complies with the requirements of this license. (12) This license does not grant you the right to use any trademark,.
Read more >
Open Source Declaration for: Extreme Universal Compute ...
Warranty Regarding Use of Open Source Software ... create-require ... No right is granted to the trademarks of Licensor even if such marks....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found