Skip to content

Commit

Permalink
Merge pull request #9482 from ember-cli/update-blueprint-devs-script
Browse files Browse the repository at this point in the history
Fix support for filtering in internal `dev/update-blueprint-dependencies.js` script
  • Loading branch information
rwjblue committed Mar 9, 2021
2 parents c7cb580 + 9f811ab commit 1b5a1a3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions dev/update-blueprint-dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ let filter = {

if (OPTIONS.filter) {
if (OPTIONS.filter.startsWith('/')) {
filter.nameRegexp = new RegExp(OPTIONS.filter);
filter.nameRegexp = new RegExp(OPTIONS.filter.substring(1, OPTIONS.filter.length - 1));
// can only use latest when using a regexp style
filter.fetchSpec = 'latest';
} else {
Expand All @@ -71,10 +71,8 @@ if (OPTIONS.filter) {
}

function shouldCheckDependency(dependency) {
if (OPTIONS.filter) {
if (OPTIONS.filter.startsWith('/')) {
return OPTIONS.filter.test(dependency);
}
if (filter.nameRegexp) {
return filter.nameRegexp.test(dependency);
}

return true;
Expand Down

0 comments on commit 1b5a1a3

Please sign in to comment.