syncpack 6.0.0 → 6.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,10 +10,8 @@ exports.__esModule = true;
10
10
  exports.fixMismatches = void 0;
11
11
  var chalk_1 = __importDefault(require("chalk"));
12
12
  var list_version_groups_1 = require("../bin-list/list-version-groups");
13
- var matches_filter_1 = require("../lib/matches-filter");
14
13
  var write_if_changed_1 = require("../lib/write-if-changed");
15
- var get_highest_version_1 = require("./get-highest-version");
16
- var get_workspace_version_1 = require("./get-workspace-version");
14
+ var get_expected_version_1 = require("./get-expected-version");
17
15
  function fixMismatches(input, disk) {
18
16
  /**
19
17
  * Reverse the list so the default/ungrouped version group is rendered first
@@ -22,19 +20,14 @@ function fixMismatches(input, disk) {
22
20
  */
23
21
  input.instances.versionGroups.reverse().forEach(function (versionGroup, i) {
24
22
  var isVersionGroup = i > 0;
25
- var filtered = versionGroup.instances.filter((0, matches_filter_1.matchesFilter)(input));
26
- var groups = (0, list_version_groups_1.listVersionGroups)(filtered);
23
+ var groups = (0, list_version_groups_1.listVersionGroups)(versionGroup);
27
24
  if (isVersionGroup) {
28
25
  console.log((0, chalk_1["default"])(templateObject_1 || (templateObject_1 = __makeTemplateObject(["{dim = Version Group ", " ", "}"], ["{dim = Version Group ", " ", "}"])), i, '='.repeat(63)));
29
26
  }
30
27
  groups.forEach(function (_a) {
31
28
  var hasMismatches = _a.hasMismatches, instances = _a.instances, name = _a.name;
32
29
  if (hasMismatches) {
33
- var nextVersion_1 = (0, get_workspace_version_1.getWorkspaceVersion)(name, input.wrappers) ||
34
- (0, get_highest_version_1.getHighestVersion)(instances.map(function (_a) {
35
- var version = _a.version;
36
- return version;
37
- }));
30
+ var nextVersion_1 = (0, get_expected_version_1.getExpectedVersion)(name, versionGroup, input);
38
31
  instances.forEach(function (_a) {
39
32
  var dependencyType = _a.dependencyType, version = _a.version, wrapper = _a.wrapper;
40
33
  var root = wrapper.contents;
@@ -1 +1 @@
1
- export declare function getHighestVersion(versions: string[]): string | null;
1
+ export declare function getHighestVersion(versions: string[]): string;
@@ -2,13 +2,28 @@
2
2
  exports.__esModule = true;
3
3
  exports.getHighestVersion = void 0;
4
4
  var semver_1 = require("semver");
5
- var constants_1 = require("../constants");
6
- var is_semver_1 = require("../lib/is-semver");
7
- function getRange(version) {
8
- return version.slice(0, version.search(/[0-9]/));
5
+ var constants_1 = require("../../constants");
6
+ var is_semver_1 = require("../../lib/is-semver");
7
+ function getHighestVersion(versions) {
8
+ return versions.reduce(function (rawHighest, raw) {
9
+ var version = (0, semver_1.valid)((0, semver_1.coerce)(raw)) || '';
10
+ var highest = (0, semver_1.valid)((0, semver_1.coerce)(rawHighest)) || '';
11
+ if (raw === '*' || rawHighest === '*')
12
+ return '*';
13
+ if (!(0, is_semver_1.isSemver)(raw) || version === '')
14
+ return rawHighest;
15
+ if (highest === '')
16
+ return raw;
17
+ if ((0, semver_1.gt)(version, highest))
18
+ return raw;
19
+ if ((0, semver_1.eq)(version, highest) && getRangeScore(raw) > getRangeScore(rawHighest))
20
+ return raw;
21
+ return rawHighest;
22
+ }, '');
9
23
  }
24
+ exports.getHighestVersion = getHighestVersion;
10
25
  function getRangeScore(version) {
11
- if (version === null)
26
+ if (version === '')
12
27
  return 0;
13
28
  if (version === constants_1.RANGE_ANY)
14
29
  return 8;
@@ -31,21 +46,6 @@ function getRangeScore(version) {
31
46
  return 0;
32
47
  return 0;
33
48
  }
34
- function getHighestVersion(versions) {
35
- return versions.reduce(function (rawHighest, raw) {
36
- var version = (0, semver_1.valid)((0, semver_1.coerce)(raw));
37
- var highest = (0, semver_1.valid)((0, semver_1.coerce)(rawHighest));
38
- if (raw === '*' || rawHighest === '*')
39
- return '*';
40
- if (!(0, is_semver_1.isSemver)(raw) || version === null)
41
- return rawHighest;
42
- if (highest === null)
43
- return raw;
44
- if ((0, semver_1.gt)(version, highest))
45
- return raw;
46
- if ((0, semver_1.eq)(version, highest) && getRangeScore(raw) > getRangeScore(rawHighest))
47
- return raw;
48
- return rawHighest;
49
- }, null);
49
+ function getRange(version) {
50
+ return version.slice(0, version.search(/[0-9]/));
50
51
  }
51
- exports.getHighestVersion = getHighestVersion;
@@ -0,0 +1,2 @@
1
+ import type { IndexedVersionGroup } from '../../lib/get-input/get-instances';
2
+ export declare function getPinnedVersion(versionGroup: Pick<IndexedVersionGroup, 'pinVersion'>): string;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.getPinnedVersion = void 0;
4
+ function getPinnedVersion(versionGroup) {
5
+ return versionGroup.pinVersion || '';
6
+ }
7
+ exports.getPinnedVersion = getPinnedVersion;
@@ -1,4 +1,4 @@
1
- import type { SourceWrapper } from '../lib/get-input/get-wrappers';
1
+ import type { SourceWrapper } from '../../lib/get-input/get-wrappers';
2
2
  /**
3
3
  * If the dependency `name` is a package developed locally in this monorepo, we
4
4
  * should use its version as the source of truth.
@@ -0,0 +1,3 @@
1
+ import type { ProgramInput } from '../../lib/get-input';
2
+ import type { IndexedVersionGroup } from '../../lib/get-input/get-instances';
3
+ export declare function getExpectedVersion(name: string, versionGroup: Pick<IndexedVersionGroup, 'instances' | 'pinVersion'>, input: Pick<ProgramInput, 'wrappers'>): string;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.getExpectedVersion = void 0;
4
+ var get_highest_version_1 = require("./get-highest-version");
5
+ var get_pinned_version_1 = require("./get-pinned-version");
6
+ var get_workspace_version_1 = require("./get-workspace-version");
7
+ function getExpectedVersion(name, versionGroup, input) {
8
+ return ((0, get_pinned_version_1.getPinnedVersion)(versionGroup) ||
9
+ (0, get_workspace_version_1.getWorkspaceVersion)(name, input.wrappers) ||
10
+ (0, get_highest_version_1.getHighestVersion)(versionGroup.instances
11
+ .filter(function (instance) { return instance.name === name; })
12
+ .map(function (_a) {
13
+ var version = _a.version;
14
+ return version;
15
+ })));
16
+ }
17
+ exports.getExpectedVersion = getExpectedVersion;
@@ -3,24 +3,12 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
3
3
  if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
4
  return cooked;
5
5
  };
6
- var __assign = (this && this.__assign) || function () {
7
- __assign = Object.assign || function(t) {
8
- for (var s, i = 1, n = arguments.length; i < n; i++) {
9
- s = arguments[i];
10
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
- t[p] = s[p];
12
- }
13
- return t;
14
- };
15
- return __assign.apply(this, arguments);
16
- };
17
6
  var __importDefault = (this && this.__importDefault) || function (mod) {
18
7
  return (mod && mod.__esModule) ? mod : { "default": mod };
19
8
  };
20
9
  exports.__esModule = true;
21
10
  exports.lintSemverRanges = void 0;
22
11
  var chalk_1 = __importDefault(require("chalk"));
23
- var matches_filter_1 = require("../lib/matches-filter");
24
12
  var set_semver_range_1 = require("../lib/set-semver-range");
25
13
  var list_semver_group_mismatches_1 = require("./list-semver-group-mismatches");
26
14
  function lintSemverRanges(input) {
@@ -32,7 +20,7 @@ function lintSemverRanges(input) {
32
20
  */
33
21
  input.instances.semverGroups.reverse().forEach(function (semverGroup, i) {
34
22
  var isSemverGroup = i > 0;
35
- var mismatches = (0, list_semver_group_mismatches_1.listSemverGroupMismatches)(__assign(__assign({}, semverGroup), { instances: semverGroup.instances.filter((0, matches_filter_1.matchesFilter)(input)) }));
23
+ var mismatches = (0, list_semver_group_mismatches_1.listSemverGroupMismatches)(semverGroup);
36
24
  if (isSemverGroup) {
37
25
  console.log((0, chalk_1["default"])(templateObject_1 || (templateObject_1 = __makeTemplateObject(["{dim = Semver Group ", " ", "}"], ["{dim = Semver Group ", " ", "}"])), i, '='.repeat(63)));
38
26
  }
@@ -1,3 +1,9 @@
1
- import type { Instance } from '../lib/get-input/get-instances';
2
- import type { ListItem } from './list';
3
- export declare function listVersionGroups(instances: Instance[]): ListItem[];
1
+ import type { IndexedVersionGroup, Instance } from '../lib/get-input/get-instances';
2
+ interface ListItem {
3
+ hasMismatches: boolean;
4
+ instances: Instance[];
5
+ name: string;
6
+ uniques: string[];
7
+ }
8
+ export declare function listVersionGroups(versionGroup: IndexedVersionGroup): ListItem[];
9
+ export {};
@@ -17,18 +17,24 @@ var __read = (this && this.__read) || function (o, n) {
17
17
  };
18
18
  exports.__esModule = true;
19
19
  exports.listVersionGroups = void 0;
20
+ var expect_more_1 = require("expect-more");
20
21
  var group_by_1 = require("../lib/group-by");
21
22
  var sort_by_name_1 = require("../lib/sort-by-name");
22
- function listVersionGroups(instances) {
23
- var instancesByName = (0, group_by_1.groupBy)('name', instances.sort(sort_by_name_1.sortByName));
23
+ function listVersionGroups(versionGroup) {
24
+ var instancesByName = (0, group_by_1.groupBy)('name', versionGroup.instances.sort(sort_by_name_1.sortByName));
24
25
  return Object.entries(instancesByName).map(function (_a) {
25
26
  var _b = __read(_a, 2), name = _b[0], instances = _b[1];
27
+ var pinnedVersion = versionGroup.pinVersion;
28
+ var hasPinnedVersion = (0, expect_more_1.isNonEmptyString)(pinnedVersion);
26
29
  var versions = instances.map(function (_a) {
27
30
  var version = _a.version;
28
31
  return version;
29
32
  });
30
33
  var uniques = Array.from(new Set(versions));
31
- var hasMismatches = uniques.length > 1;
34
+ var hasMismatches = versions.some(function (version, i) {
35
+ return (hasPinnedVersion && version !== pinnedVersion) ||
36
+ (i > 0 && version !== versions[i - 1]);
37
+ });
32
38
  return {
33
39
  hasMismatches: hasMismatches,
34
40
  instances: instances,
@@ -1,9 +1,2 @@
1
1
  import type { ProgramInput } from '../lib/get-input';
2
- import type { Instance } from '../lib/get-input/get-instances';
3
- export interface ListItem {
4
- hasMismatches: boolean;
5
- instances: Instance[];
6
- name: string;
7
- uniques: string[];
8
- }
9
2
  export declare function list(input: ProgramInput): void;
@@ -9,7 +9,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
9
9
  exports.__esModule = true;
10
10
  exports.list = void 0;
11
11
  var chalk_1 = __importDefault(require("chalk"));
12
- var matches_filter_1 = require("../lib/matches-filter");
13
12
  var list_version_groups_1 = require("./list-version-groups");
14
13
  function list(input) {
15
14
  var isInvalid = false;
@@ -20,18 +19,17 @@ function list(input) {
20
19
  */
21
20
  input.instances.versionGroups.reverse().forEach(function (versionGroup, i) {
22
21
  var isVersionGroup = i > 0;
23
- var filtered = versionGroup.instances.filter((0, matches_filter_1.matchesFilter)(input));
24
- var ungrouped = (0, list_version_groups_1.listVersionGroups)(filtered);
22
+ var groups = (0, list_version_groups_1.listVersionGroups)(versionGroup);
25
23
  if (isVersionGroup) {
26
24
  console.log((0, chalk_1["default"])(templateObject_1 || (templateObject_1 = __makeTemplateObject(["{dim = Version Group ", " ", "}"], ["{dim = Version Group ", " ", "}"])), i, '='.repeat(63)));
27
25
  }
28
- ungrouped.forEach(function (_a) {
26
+ groups.forEach(function (_a) {
29
27
  var hasMismatches = _a.hasMismatches, name = _a.name, uniques = _a.uniques;
30
28
  var versionList = uniques.sort().join(', ');
31
29
  console.log(hasMismatches
32
30
  ? (0, chalk_1["default"])(templateObject_2 || (templateObject_2 = __makeTemplateObject(["{red \u2715 ", "} {dim.red ", "}"], ["{red \u2715 ", "} {dim.red ", "}"])), name, versionList) : (0, chalk_1["default"])(templateObject_3 || (templateObject_3 = __makeTemplateObject(["{dim -} {white ", "} {dim ", "}"], ["{dim -} {white ", "} {dim ", "}"])), name, versionList));
33
31
  });
34
- if (ungrouped.some(function (_a) {
32
+ if (groups.some(function (_a) {
35
33
  var hasMismatches = _a.hasMismatches;
36
34
  return hasMismatches;
37
35
  })) {
@@ -9,8 +9,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
9
9
  exports.__esModule = true;
10
10
  exports.listMismatches = void 0;
11
11
  var chalk_1 = __importDefault(require("chalk"));
12
+ var get_expected_version_1 = require("../bin-fix-mismatches/get-expected-version");
12
13
  var list_version_groups_1 = require("../bin-list/list-version-groups");
13
- var matches_filter_1 = require("../lib/matches-filter");
14
14
  function listMismatches(input) {
15
15
  var isInvalid = false;
16
16
  /**
@@ -20,20 +20,24 @@ function listMismatches(input) {
20
20
  */
21
21
  input.instances.versionGroups.reverse().forEach(function (versionGroup, i) {
22
22
  var isVersionGroup = i > 0;
23
- var filtered = versionGroup.instances.filter((0, matches_filter_1.matchesFilter)(input));
24
- var ungrouped = (0, list_version_groups_1.listVersionGroups)(filtered);
25
- if (isVersionGroup) {
26
- console.log((0, chalk_1["default"])(templateObject_1 || (templateObject_1 = __makeTemplateObject(["{dim = Version Group ", " ", "}"], ["{dim = Version Group ", " ", "}"])), i, '='.repeat(63)));
27
- }
28
- ungrouped.forEach(function (_a) {
29
- var hasMismatches = _a.hasMismatches, instances = _a.instances, name = _a.name;
30
- if (hasMismatches) {
31
- console.log((0, chalk_1["default"])(templateObject_2 || (templateObject_2 = __makeTemplateObject(["{red \u2715 ", "}"], ["{red \u2715 ", "}"])), name));
32
- instances.forEach(function (_a) {
33
- var dependencyType = _a.dependencyType, version = _a.version, wrapper = _a.wrapper;
34
- console.log((0, chalk_1["default"])(templateObject_3 || (templateObject_3 = __makeTemplateObject(["{dim -} ", " {dim in ", " of} ", ""], ["{dim -} ", " {dim in ", " of} ", ""])), version, dependencyType, wrapper.contents.name));
35
- });
23
+ var groups = (0, list_version_groups_1.listVersionGroups)(versionGroup).filter(function (_a) {
24
+ var hasMismatches = _a.hasMismatches;
25
+ return hasMismatches;
26
+ });
27
+ if (groups.length > 0) {
28
+ isInvalid = true;
29
+ if (isVersionGroup) {
30
+ console.log((0, chalk_1["default"])(templateObject_1 || (templateObject_1 = __makeTemplateObject(["{dim = Version Group ", " ", "}"], ["{dim = Version Group ", " ", "}"])), i, '='.repeat(63)));
36
31
  }
32
+ }
33
+ groups.forEach(function (_a) {
34
+ var instances = _a.instances, name = _a.name;
35
+ var expectedVersion = (0, get_expected_version_1.getExpectedVersion)(name, versionGroup, input);
36
+ console.log((0, chalk_1["default"])(templateObject_2 || (templateObject_2 = __makeTemplateObject(["{dim -} ", " {green.dim ", "}"], ["{dim -} ", " {green.dim ", "}"])), name, expectedVersion));
37
+ instances.forEach(function (_a) {
38
+ var dependencyType = _a.dependencyType, version = _a.version, wrapper = _a.wrapper;
39
+ console.log((0, chalk_1["default"])(templateObject_3 || (templateObject_3 = __makeTemplateObject(["{red ", " {dim in ", " of ", "}}"], ["{red ", " {dim in ", " of ", "}}"])), version, dependencyType, wrapper.contents.name));
40
+ });
37
41
  });
38
42
  });
39
43
  if (isInvalid) {
@@ -1,24 +1,12 @@
1
1
  "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
2
  exports.__esModule = true;
14
3
  exports.setSemverRanges = void 0;
15
4
  var list_semver_group_mismatches_1 = require("../bin-lint-semver-ranges/list-semver-group-mismatches");
16
- var matches_filter_1 = require("../lib/matches-filter");
17
5
  var set_semver_range_1 = require("../lib/set-semver-range");
18
6
  var write_if_changed_1 = require("../lib/write-if-changed");
19
7
  var setSemverRanges = function (input, disk) {
20
8
  input.instances.semverGroups.reverse().forEach(function (semverGroup) {
21
- var mismatches = (0, list_semver_group_mismatches_1.listSemverGroupMismatches)(__assign(__assign({}, semverGroup), { instances: semverGroup.instances.filter((0, matches_filter_1.matchesFilter)(input)) }));
9
+ var mismatches = (0, list_semver_group_mismatches_1.listSemverGroupMismatches)(semverGroup);
22
10
  mismatches.forEach(function (_a) {
23
11
  var dependencyType = _a.dependencyType, name = _a.name, version = _a.version, wrapper = _a.wrapper;
24
12
  var root = wrapper.contents;
@@ -15,6 +15,10 @@ export interface SemverGroup {
15
15
  * the semver range which dependencies in this group should use
16
16
  */
17
17
  range: ValidRange;
18
+ /**
19
+ * optionally only apply this group to dependencies of the provided types
20
+ */
21
+ dependencyTypes?: DependencyType[];
18
22
  }
19
23
  export interface VersionGroup {
20
24
  /**
@@ -26,6 +30,14 @@ export interface VersionGroup {
26
30
  * the names of the dependencies (eg. "lodash") which belong to this group
27
31
  */
28
32
  dependencies: string[];
33
+ /**
34
+ * optionally force all dependencies in this group to have this version
35
+ */
36
+ pinVersion?: string;
37
+ /**
38
+ * optionally only apply this group to dependencies of the provided types
39
+ */
40
+ dependencyTypes?: DependencyType[];
29
41
  }
30
42
  export declare type SyncpackConfig = Readonly<{
31
43
  /**
package/dist/lib/disk.js CHANGED
@@ -9,7 +9,7 @@ var read_yaml_file_1 = require("read-yaml-file");
9
9
  var constants_1 = require("../constants");
10
10
  exports.disk = {
11
11
  globSync: function (pattern) {
12
- return (0, glob_1.sync)(pattern, { absolute: true, cwd: constants_1.CWD });
12
+ return (0, glob_1.sync)(pattern, { ignore: '**/node_modules/**', absolute: true, cwd: constants_1.CWD });
13
13
  },
14
14
  readConfigFileSync: function () {
15
15
  var rcSearch = (0, cosmiconfig_1.cosmiconfigSync)('syncpack').search();
@@ -68,12 +68,14 @@ function getInstances(options, wrappers) {
68
68
  var _g = __read(pkgs_1_1.value, 2), name = _g[0], version = _g[1];
69
69
  if (!(0, expect_more_1.isNonEmptyString)(name))
70
70
  continue;
71
+ if (name.search(new RegExp(options.filter)) === -1)
72
+ continue;
71
73
  if (!(0, expect_more_1.isNonEmptyString)(version))
72
74
  continue;
73
75
  var instance = { dependencyType: dependencyType, name: name, version: version, wrapper: wrapper };
74
76
  allInstances.all.push(instance);
75
- groupInstancesBy('semverGroups', pkgName, instance);
76
- groupInstancesBy('versionGroups', pkgName, instance);
77
+ groupInstancesBy('semverGroups', dependencyType, pkgName, instance);
78
+ groupInstancesBy('versionGroups', dependencyType, pkgName, instance);
77
79
  }
78
80
  }
79
81
  catch (e_3_1) { e_3 = { error: e_3_1 }; }
@@ -107,14 +109,14 @@ function getInstances(options, wrappers) {
107
109
  var instancesByName = {};
108
110
  return __assign(__assign({}, group), { instances: instances, instancesByName: instancesByName });
109
111
  }
110
- function groupInstancesBy(groupName, pkgName, instance) {
112
+ function groupInstancesBy(groupName, dependencyType, pkgName, instance) {
111
113
  var name = instance.name;
112
114
  var groups = allInstances[groupName];
113
115
  if (!groups.length)
114
116
  return;
115
117
  for (var i in groups) {
116
118
  var group = groups[i];
117
- if (matchesGroup(pkgName, name, group)) {
119
+ if (matchesGroup(dependencyType, pkgName, name, group)) {
118
120
  if (!group.instancesByName[name]) {
119
121
  group.instancesByName[name] = [];
120
122
  }
@@ -125,8 +127,10 @@ function getInstances(options, wrappers) {
125
127
  }
126
128
  throw new Error("".concat(name, " in ").concat(pkgName, " did not match any ").concat(groupName));
127
129
  }
128
- function matchesGroup(pkgName, dependencyName, group) {
129
- return (group.packages.some(function (pattern) { return (0, minimatch_1["default"])(pkgName, pattern); }) &&
130
+ function matchesGroup(dependencyType, pkgName, dependencyName, group) {
131
+ return ((!(0, expect_more_1.isNonEmptyArray)(group.dependencyTypes) ||
132
+ group.dependencyTypes.includes(dependencyType)) &&
133
+ group.packages.some(function (pattern) { return (0, minimatch_1["default"])(pkgName, pattern); }) &&
130
134
  group.dependencies.some(function (pattern) { return (0, minimatch_1["default"])(dependencyName, pattern); }));
131
135
  }
132
136
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "syncpack",
3
3
  "description": "Manage multiple package.json files, such as in Lerna Monorepos and Yarn/Pnpm Workspaces",
4
- "version": "6.0.0",
4
+ "version": "6.2.1",
5
5
  "author": "Jamie Mason <jamie@foldleft.io> (https://github.com/JamieMason)",
6
6
  "bin": {
7
7
  "syncpack": "dist/bin.js",
@@ -20,7 +20,8 @@
20
20
  "Jamie Mason (https://github.com/JamieMason)",
21
21
  "Luis Vieira (https://github.com/luisvieiragmr)",
22
22
  "Marais Rossouw (https://github.com/maraisr)",
23
- "Matt Sprague (https://github.com/uforic)"
23
+ "Matt Sprague (https://github.com/uforic)",
24
+ "Tom Fletcher (https://github.com/tom-fletcher)"
24
25
  ],
25
26
  "dependencies": {
26
27
  "chalk": "4.1.2",
@@ -1,3 +0,0 @@
1
- import type { ProgramInput } from '../lib/get-input';
2
- import type { Instance } from '../lib/get-input/get-instances';
3
- export declare function matchesFilter(input: ProgramInput): ({ name }: Instance) => boolean;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- exports.matchesFilter = void 0;
4
- function matchesFilter(input) {
5
- return function hasNameMatchingFilter(_a) {
6
- var name = _a.name;
7
- return name.search(new RegExp(input.filter)) !== -1;
8
- };
9
- }
10
- exports.matchesFilter = matchesFilter;