Skip to content

Commit

Permalink
fix: wrong regex for a licence exact version
Browse files Browse the repository at this point in the history
  • Loading branch information
splix committed Feb 11, 2024
1 parent 6bedc88 commit 1da4158
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export class LicenseChecker extends EventEmitter {
if (this.failedPackages.has(spec)) return;

// remove tilde/caret to check for an exact version, ^0.5.0-rc.0 becomes 0.5.0-rc.0
const version = versionSpec.replace(/^[^~]/, '');
const version = versionSpec.replace(/^[~^]/, '');
// if the dependency is a local package then skip verification at this step. will be checked independently
if (this.localPackages.has(`${packageName}@${version}`)) return;

Expand Down

0 comments on commit 1da4158

Please sign in to comment.