Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions dep_checker/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,7 @@ def get_cpe(self, repo_path: Path) -> Optional[str]:
npm_name="corepack",
),
"CJS Module Lexer": Dependency(
version_parser=lambda repo_path: (
vp.get_cjs_lexer_version(repo_path)
if int(vp.get_node_version(repo_path).split(".")[0]) > 20
else vp.get_cjs_lexer_version_old(repo_path)
),
version_parser=vp.get_cjs_lexer_version,
cpe=None,
keyword="cjs-module-lexer",
npm_name="cjs-module-lexer",
Expand Down
2 changes: 0 additions & 2 deletions dep_checker/versions_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ def get_c_ares_version(repo_path: Path) -> str:
raise RuntimeError("Error extracting version number for c-ares")
return matches.groupdict()["version"]

def get_cjs_lexer_version_old(repo_path: Path) -> str:
return get_package_json_version(repo_path / "deps/cjs-module-lexer/package.json")

def get_cjs_lexer_version(repo_path: Path) -> str:
return get_package_json_version(repo_path / "deps/cjs-module-lexer/src/package.json")
Expand Down