Skip to content

Commit 7bb7213

Browse files
authored
fix: CJS Module Lexer detection for Node.js 20
Node.js 20.19.5 updated CJS Module Lexer so it is now in the same layout on the filesystem as in later versions.
1 parent b3fa346 commit 7bb7213

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

dep_checker/dependencies.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,7 @@ def get_cpe(self, repo_path: Path) -> Optional[str]:
137137
npm_name="corepack",
138138
),
139139
"CJS Module Lexer": Dependency(
140-
version_parser=lambda repo_path: (
141-
vp.get_cjs_lexer_version(repo_path)
142-
if int(vp.get_node_version(repo_path).split(".")[0]) > 20
143-
else vp.get_cjs_lexer_version_old(repo_path)
144-
),
140+
version_parser=vp.get_cjs_lexer_version,
145141
cpe=None,
146142
keyword="cjs-module-lexer",
147143
npm_name="cjs-module-lexer",

0 commit comments

Comments
 (0)