diff --git a/dist/index.js b/dist/index.js index e2b861e..11f5f50 100644 --- a/dist/index.js +++ b/dist/index.js @@ -32082,7 +32082,9 @@ function expand_(str, max, isTop) { const x = numeric(n[0]); const y = numeric(n[1]); const width = Math.max(n[0].length, n[1].length); - let incr = n.length === 3 && n[2] !== undefined ? Math.abs(numeric(n[2])) : 1; + let incr = n.length === 3 && n[2] !== undefined ? + Math.max(Math.abs(numeric(n[2])), 1) + : 1; let test = lte; const reverse = y < x; if (reverse) { @@ -32313,16 +32315,16 @@ const parseClass = (glob, position) => { const unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true, } = {}) => { if (magicalBraces) { return windowsPathsNoEscape ? - s.replace(/\[([^\/\\])\]/g, '$1') + s.replace(/\[([^/\\])\]/g, '$1') : s - .replace(/((?!\\).|^)\[([^\/\\])\]/g, '$1$2') - .replace(/\\([^\/])/g, '$1'); + .replace(/((?!\\).|^)\[([^/\\])\]/g, '$1$2') + .replace(/\\([^/])/g, '$1'); } return windowsPathsNoEscape ? - s.replace(/\[([^\/\\{}])\]/g, '$1') + s.replace(/\[([^/\\{}])\]/g, '$1') : s - .replace(/((?!\\).|^)\[([^\/\\{}])\]/g, '$1$2') - .replace(/\\([^\/{}])/g, '$1'); + .replace(/((?!\\).|^)\[([^/\\{}])\]/g, '$1$2') + .replace(/\\([^/{}])/g, '$1'); }; // parse a single path portion @@ -32514,15 +32516,14 @@ class AST { } // reconstructs the pattern toString() { - if (this.#toString !== undefined) - return this.#toString; - if (!this.type) { - return (this.#toString = this.#parts.map(p => String(p)).join('')); - } - else { - return (this.#toString = - this.type + '(' + this.#parts.map(p => String(p)).join('|') + ')'); - } + return (this.#toString !== undefined ? this.#toString + : !this.type ? + (this.#toString = this.#parts.map(p => String(p)).join('')) + : (this.#toString = + this.type + + '(' + + this.#parts.map(p => String(p)).join('|') + + ')')); } #fillNegs() { /* c8 ignore start */ @@ -32802,7 +32803,7 @@ class AST { } #canUsurpType(c) { const m = usurpMap.get(this.type); - return !!(m?.has(c)); + return !!m?.has(c); } #canUsurp(child) { if (!child || @@ -33200,7 +33201,7 @@ const minimatch = (p, pattern, options = {}) => { return new Minimatch(pattern, options).match(p); }; // Optimized checking for the most common glob patterns. -const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/; +const starDotExtRE = /^\*+([^+@!?*[(]*)$/; const starDotExtTest = (ext) => (f) => !f.startsWith('.') && f.endsWith(ext); const starDotExtTestDot = (ext) => (f) => f.endsWith(ext); const starDotExtTestNocase = (ext) => { @@ -33219,7 +33220,7 @@ const dotStarTest = (f) => f !== '.' && f !== '..' && f.startsWith('.'); const starRE = /^\*+$/; const starTest = (f) => f.length !== 0 && !f.startsWith('.'); const starTestDot = (f) => f.length !== 0 && f !== '.' && f !== '..'; -const qmarksRE = /^\?+([^+@!?\*\[\(]*)?$/; +const qmarksRE = /^\?+([^+@!?*[(]*)?$/; const qmarksTestNocase = ([$0, ext = '']) => { const noext = qmarksTestNoExt([$0]); if (!ext) @@ -33446,6 +33447,7 @@ class Minimatch { // step 2: expand braces this.globSet = [...new Set(this.braceExpand())]; if (options.debug) { + //oxlint-disable-next-line no-console this.debug = (...args) => console.error(...args); } this.debug(this.pattern, this.globSet); @@ -33508,10 +33510,10 @@ class Minimatch { preprocess(globParts) { // if we're not in globstar mode, then turn ** into * if (this.options.noglobstar) { - for (let i = 0; i < globParts.length; i++) { - for (let j = 0; j < globParts[i].length; j++) { - if (globParts[i][j] === '**') { - globParts[i][j] = '*'; + for (const partset of globParts) { + for (let j = 0; j < partset.length; j++) { + if (partset[j] === '**') { + partset[j] = '*'; } } } @@ -33599,7 +33601,11 @@ class Minimatch { let dd = 0; while (-1 !== (dd = parts.indexOf('..', dd + 1))) { const p = parts[dd - 1]; - if (p && p !== '.' && p !== '..' && p !== '**') { + if (p && + p !== '.' && + p !== '..' && + p !== '**' && + !(this.isWindows && /^[a-z]:$/i.test(p))) { didSomething = true; parts.splice(dd - 1, 2); dd -= 2; @@ -33848,15 +33854,17 @@ class Minimatch { // split the pattern up into globstar-delimited sections // the tail has to be at the end, and the others just have // to be found in order from the head. - const [head, body, tail] = partial ? [ - pattern.slice(patternIndex, firstgs), - pattern.slice(firstgs + 1), - [], - ] : [ - pattern.slice(patternIndex, firstgs), - pattern.slice(firstgs + 1, lastgs), - pattern.slice(lastgs + 1), - ]; + const [head, body, tail] = partial ? + [ + pattern.slice(patternIndex, firstgs), + pattern.slice(firstgs + 1), + [], + ] + : [ + pattern.slice(patternIndex, firstgs), + pattern.slice(firstgs + 1, lastgs), + pattern.slice(lastgs + 1), + ]; // check the head, from the current file/pattern index. if (head.length) { const fileHead = file.slice(fileIndex, fileIndex + head.length); @@ -34202,7 +34210,7 @@ class Minimatch { this.regexp = new RegExp(re, [...flags].join('')); /* c8 ignore start */ } - catch (ex) { + catch { // should be impossible this.regexp = false; } @@ -34217,7 +34225,7 @@ class Minimatch { if (this.preserveMultipleSlashes) { return p.split('/'); } - else if (this.isWindows && /^\/\/[^\/]+/.test(p)) { + else if (this.isWindows && /^\/\/[^/]+/.test(p)) { // add an extra '' for the one we lose return ['', ...p.split(/\/+/)]; } @@ -34259,8 +34267,7 @@ class Minimatch { filename = ff[i]; } } - for (let i = 0; i < set.length; i++) { - const pattern = set[i]; + for (const pattern of set) { let file = ff; if (options.matchBase && pattern.length === 1) { file = [filename]; diff --git a/package-lock.json b/package-lock.json index a0d6016..1bd87cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@actions/core": "^3.0.0", "@actions/github": "^9.0.0", "@octokit/rest": "^22.0.1", - "minimatch": "^10.2.4" + "minimatch": "^10.2.5" }, "devDependencies": { "@eslint/compat": "^2.0.5", @@ -12896,12 +12896,12 @@ } }, "node_modules/minimatch": { - "version": "10.2.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", - "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", + "version": "10.2.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", + "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^5.0.2" + "brace-expansion": "^5.0.5" }, "engines": { "node": "18 || 20 || >=22" @@ -12920,9 +12920,9 @@ } }, "node_modules/minimatch/node_modules/brace-expansion": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz", - "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", + "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", "license": "MIT", "dependencies": { "balanced-match": "^4.0.2" diff --git a/package.json b/package.json index 9d4d940..f4b9c3a 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "@actions/core": "^3.0.0", "@actions/github": "^9.0.0", "@octokit/rest": "^22.0.1", - "minimatch": "^10.2.4" + "minimatch": "^10.2.5" }, "devDependencies": { "@eslint/compat": "^2.0.5",