diff options
| author | mo khan <mo.khan@gmail.com> | 2020-11-03 15:38:05 -0700 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-11-10 14:28:21 -0700 |
| commit | 6001e7586f04528067b16c08a6b046be5b5b62ec (patch) | |
| tree | 2bab9c7af37ede194edc8283405a07f59caea8d8 /lib/license/finder/ext/yarn.rb | |
| parent | 191185c4303768c6d9a1431c35143501c06ee4d7 (diff) | |
use recursive scan by defaultrecursive-default
docs: update CHANGELOG and version
feat: scan packages in parallel
fix: prevent infinite recursion
Diffstat (limited to 'lib/license/finder/ext/yarn.rb')
| -rw-r--r-- | lib/license/finder/ext/yarn.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/license/finder/ext/yarn.rb b/lib/license/finder/ext/yarn.rb index 7a18e35..eedf435 100644 --- a/lib/license/finder/ext/yarn.rb +++ b/lib/license/finder/ext/yarn.rb @@ -5,8 +5,10 @@ module LicenseFinder INCOMPATIBLE_PACKAGE_REGEX = /(?<name>[\w,\-]+)@(?<version>(\d+\.?)+)/.freeze PHANTOM_PACKAGE_REGEX = /workspace-aggregator-[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}/.freeze - def possible_package_paths - [project_path.join('yarn.lock')] + def active? + return if project_path.to_path.include?('/node_modules/') + + project_path.join('yarn.lock').exist? end def prepare |
