Rebuild minimatch (#522)

* Rebuild minimatch and adapt changed interface

* Apply formatting

* Update minimatch license
This commit is contained in:
Milos Pantic
2023-03-23 10:45:05 +01:00
committed by GitHub
parent 72bf170dc0
commit 468a5e0250
5 changed files with 1560 additions and 938 deletions

View File

@@ -1,6 +1,6 @@
---
name: minimatch
version: 5.1.2
version: 7.4.2
type: npm
summary: a glob matcher in javascript
homepage:

2471
dist/index.js vendored

File diff suppressed because it is too large Load Diff

17
package-lock.json generated
View File

@@ -12,7 +12,7 @@
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
"js-yaml": "^4.1.0",
"minimatch": "^5.1.2"
"minimatch": "^7.4.2"
},
"devDependencies": {
"@types/jest": "^27.4.1",
@@ -4446,14 +4446,17 @@
}
},
"node_modules/minimatch": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz",
"integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==",
"version": "7.4.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.2.tgz",
"integrity": "sha512-xy4q7wou3vUoC9k1xGTXc+awNdGaGVHtFUaey8tiX4H1QRc04DZ/rmDFwNm2EBsuYEhAZ6SgMmYf3InGY6OauA==",
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/ms": {
@@ -9134,9 +9137,9 @@
"dev": true
},
"minimatch": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz",
"integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==",
"version": "7.4.2",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.2.tgz",
"integrity": "sha512-xy4q7wou3vUoC9k1xGTXc+awNdGaGVHtFUaey8tiX4H1QRc04DZ/rmDFwNm2EBsuYEhAZ6SgMmYf3InGY6OauA==",
"requires": {
"brace-expansion": "^2.0.1"
}

View File

@@ -27,7 +27,7 @@
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
"js-yaml": "^4.1.0",
"minimatch": "^5.1.2"
"minimatch": "^7.4.2"
},
"devDependencies": {
"@types/jest": "^27.4.1",

View File

@@ -1,7 +1,7 @@
import * as core from '@actions/core';
import * as github from '@actions/github';
import * as yaml from 'js-yaml';
import {Minimatch, IMinimatch} from 'minimatch';
import {Minimatch} from 'minimatch';
interface MatchConfig {
all?: string[];
@@ -151,7 +151,7 @@ function toMatchConfig(config: StringOrMatchConfig): MatchConfig {
return config;
}
function printPattern(matcher: IMinimatch): string {
function printPattern(matcher: Minimatch): string {
return (matcher.negate ? '!' : '') + matcher.pattern;
}
@@ -169,7 +169,7 @@ export function checkGlobs(
return false;
}
function isMatch(changedFile: string, matchers: IMinimatch[]): boolean {
function isMatch(changedFile: string, matchers: Minimatch[]): boolean {
core.debug(` matching patterns against file ${changedFile}`);
for (const matcher of matchers) {
core.debug(` - ${printPattern(matcher)}`);