mirror of
https://github.com/actions/labeler.git
synced 2025-12-11 03:58:05 +00:00
Rebuild minimatch (#522)
* Rebuild minimatch and adapt changed interface * Apply formatting * Update minimatch license
This commit is contained in:
2
.licenses/npm/minimatch.dep.yml
generated
2
.licenses/npm/minimatch.dep.yml
generated
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: minimatch
|
name: minimatch
|
||||||
version: 5.1.2
|
version: 7.4.2
|
||||||
type: npm
|
type: npm
|
||||||
summary: a glob matcher in javascript
|
summary: a glob matcher in javascript
|
||||||
homepage:
|
homepage:
|
||||||
|
|||||||
2471
dist/index.js
vendored
2471
dist/index.js
vendored
File diff suppressed because it is too large
Load Diff
17
package-lock.json
generated
17
package-lock.json
generated
@@ -12,7 +12,7 @@
|
|||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/github": "^5.1.1",
|
"@actions/github": "^5.1.1",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"minimatch": "^5.1.2"
|
"minimatch": "^7.4.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^27.4.1",
|
"@types/jest": "^27.4.1",
|
||||||
@@ -4446,14 +4446,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/minimatch": {
|
"node_modules/minimatch": {
|
||||||
"version": "5.1.2",
|
"version": "7.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.2.tgz",
|
||||||
"integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==",
|
"integrity": "sha512-xy4q7wou3vUoC9k1xGTXc+awNdGaGVHtFUaey8tiX4H1QRc04DZ/rmDFwNm2EBsuYEhAZ6SgMmYf3InGY6OauA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"brace-expansion": "^2.0.1"
|
"brace-expansion": "^2.0.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10"
|
"node": ">=10"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/isaacs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ms": {
|
"node_modules/ms": {
|
||||||
@@ -9134,9 +9137,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"minimatch": {
|
"minimatch": {
|
||||||
"version": "5.1.2",
|
"version": "7.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.2.tgz",
|
||||||
"integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==",
|
"integrity": "sha512-xy4q7wou3vUoC9k1xGTXc+awNdGaGVHtFUaey8tiX4H1QRc04DZ/rmDFwNm2EBsuYEhAZ6SgMmYf3InGY6OauA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"brace-expansion": "^2.0.1"
|
"brace-expansion": "^2.0.1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/github": "^5.1.1",
|
"@actions/github": "^5.1.1",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"minimatch": "^5.1.2"
|
"minimatch": "^7.4.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^27.4.1",
|
"@types/jest": "^27.4.1",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as github from '@actions/github';
|
import * as github from '@actions/github';
|
||||||
import * as yaml from 'js-yaml';
|
import * as yaml from 'js-yaml';
|
||||||
import {Minimatch, IMinimatch} from 'minimatch';
|
import {Minimatch} from 'minimatch';
|
||||||
|
|
||||||
interface MatchConfig {
|
interface MatchConfig {
|
||||||
all?: string[];
|
all?: string[];
|
||||||
@@ -151,7 +151,7 @@ function toMatchConfig(config: StringOrMatchConfig): MatchConfig {
|
|||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
function printPattern(matcher: IMinimatch): string {
|
function printPattern(matcher: Minimatch): string {
|
||||||
return (matcher.negate ? '!' : '') + matcher.pattern;
|
return (matcher.negate ? '!' : '') + matcher.pattern;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ export function checkGlobs(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function isMatch(changedFile: string, matchers: IMinimatch[]): boolean {
|
function isMatch(changedFile: string, matchers: Minimatch[]): boolean {
|
||||||
core.debug(` matching patterns against file ${changedFile}`);
|
core.debug(` matching patterns against file ${changedFile}`);
|
||||||
for (const matcher of matchers) {
|
for (const matcher of matchers) {
|
||||||
core.debug(` - ${printPattern(matcher)}`);
|
core.debug(` - ${printPattern(matcher)}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user