"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PathsMatcher = void 0;
const tslib_1 = require("tslib");
const is_1 = tslib_1.__importDefault(require("@sindresorhus/is"));
const minimatch_1 = tslib_1.__importDefault(require("minimatch"));
const base_1 = require("./base");
class PathsMatcher extends base_1.Matcher {
    matches({ packageFile }, { matchPaths }) {
        if (is_1.default.undefined(matchPaths)) {
            return null;
        }
        if (is_1.default.undefined(packageFile)) {
            return false;
        }
        return matchPaths.some((rulePath) => packageFile.includes(rulePath) ||
            (0, minimatch_1.default)(packageFile, rulePath, { dot: true }));
    }
}
exports.PathsMatcher = PathsMatcher;
//# sourceMappingURL=paths.js.map