Skip to content

Commit d90f96f

Browse files
committed
Add yarn to -m option
1 parent 3d86f7a commit d90f96f

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/fosslight_dependency/_analyze_dependency.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def analyze_dependency(package_manager_name, input_dir, output_dir, pip_activate
3535

3636
if package_manager_name == const.PYPI:
3737
package_manager = Pypi(input_dir, output_dir, pip_activate_cmd, pip_deactivate_cmd)
38-
elif package_manager_name == const.NPM:
38+
elif package_manager_name == const.NPM or package_manager_name == const.YARN:
3939
package_manager = Npm(input_dir, output_dir)
4040
elif package_manager_name == const.MAVEN:
4141
package_manager = Maven(input_dir, output_dir, output_custom_dir)

src/fosslight_dependency/_help.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
-v\t\t\t\t Print the version of the script.
3535
-m <package_manager>\t Enter the package manager.
3636
\t(npm, maven, gradle, pypi, pub, cocoapods, android, swift, carthage,
37-
\t go, nuget, helm, unity, cargo, pnpm)
37+
\t go, nuget, helm, unity, cargo, pnpm, yarn)
3838
-p <input_path>\t\t Enter the path where the script will be run.
3939
-e <exclude_path>\t\t Enter the path where the analysis will not be performed.
4040
-o <output_path>\t\t Output path

src/fosslight_dependency/constant.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@
2525
UNITY = 'unity'
2626
CARGO = 'cargo'
2727
PNPM = 'pnpm'
28+
YARN = 'yarn'
2829

2930
# Supported package name and manifest file
3031
SUPPORT_PACKAE = {
3132
PYPI: ['requirements.txt', 'setup.py', 'pyproject.toml'],
33+
YARN: 'package.json',
3234
PNPM: 'pnpm-lock.yaml',
3335
NPM: 'package.json',
3436
MAVEN: 'pom.xml',

0 commit comments

Comments
 (0)