diff --git a/dist/index.js b/dist/index.js index 7fd5b4f9..57e3d997 100644 --- a/dist/index.js +++ b/dist/index.js @@ -43060,7 +43060,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) { @@ -43291,16 +43293,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 @@ -43492,15 +43494,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 */ @@ -43780,7 +43781,7 @@ class AST { } #canUsurpType(c) { const m = usurpMap.get(this.type); - return !!(m?.has(c)); + return !!m?.has(c); } #canUsurp(child) { if (!child || @@ -44178,7 +44179,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) => { @@ -44197,7 +44198,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) @@ -44424,6 +44425,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); @@ -44486,10 +44488,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] = '*'; } } } @@ -44577,7 +44579,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; @@ -44826,15 +44832,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); @@ -45180,7 +45188,7 @@ class Minimatch { this.regexp = new RegExp(re, [...flags].join('')); /* c8 ignore start */ } - catch (ex) { + catch { // should be impossible this.regexp = false; } @@ -45195,7 +45203,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(/\/+/)]; } @@ -45237,8 +45245,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/dist/licenses.txt b/dist/licenses.txt index ced6415a..e6c35aaf 100644 --- a/dist/licenses.txt +++ b/dist/licenses.txt @@ -1228,7 +1228,7 @@ SOFTWARE. --- Name: brace-expansion -Version: 5.0.4 +Version: 5.0.5 License: MIT Private: false Description: Brace expansion as known from sh/bash @@ -1263,7 +1263,7 @@ SOFTWARE. --- Name: minimatch -Version: 10.2.4 +Version: 10.2.5 License: BlueOak-1.0.0 Private: false Description: a glob matcher in javascript diff --git a/package.json b/package.json index df092b44..fe0d7bbd 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@octokit/plugin-rest-endpoint-methods": "^17.0.0", "@octokit/plugin-throttling": "^11.0.3", "generic-type-guard": "^5.1.0", - "minimatch": "^10.2.4", + "minimatch": "^10.2.5", "parse-diff": "^0.11.1", "yaml": "^2.8.3" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0b320a34..cd4e24a0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,8 +27,8 @@ importers: specifier: ^5.1.0 version: 5.1.0 minimatch: - specifier: ^10.2.4 - version: 10.2.4 + specifier: ^10.2.5 + version: 10.2.5 parse-diff: specifier: ^0.11.1 version: 0.11.1 @@ -1653,8 +1653,8 @@ packages: brace-expansion@2.0.2: resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==} - brace-expansion@5.0.4: - resolution: {integrity: sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==} + brace-expansion@5.0.5: + resolution: {integrity: sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==} engines: {node: 18 || 20 || >=22} braces@3.0.3: @@ -2946,8 +2946,8 @@ packages: resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} engines: {node: '>=18'} - minimatch@10.2.4: - resolution: {integrity: sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==} + minimatch@10.2.5: + resolution: {integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==} engines: {node: 18 || 20 || >=22} minimatch@3.1.5: @@ -5283,7 +5283,7 @@ snapshots: '@typescript-eslint/types': 8.57.2 '@typescript-eslint/visitor-keys': 8.57.2 debug: 4.4.3 - minimatch: 10.2.4 + minimatch: 10.2.5 semver: 7.7.4 tinyglobby: 0.2.15 ts-api-utils: 2.5.0(typescript@6.0.2) @@ -5599,7 +5599,7 @@ snapshots: dependencies: balanced-match: 1.0.2 - brace-expansion@5.0.4: + brace-expansion@5.0.5: dependencies: balanced-match: 4.0.4 @@ -6420,7 +6420,7 @@ snapshots: cosmiconfig: 8.3.6(typescript@6.0.2) graphql: 16.12.0 jiti: 2.6.1 - minimatch: 10.2.4 + minimatch: 10.2.5 string-env-interpolation: 1.0.1 tslib: 2.8.1 transitivePeerDependencies: @@ -7196,9 +7196,9 @@ snapshots: mimic-function@5.0.1: {} - minimatch@10.2.4: + minimatch@10.2.5: dependencies: - brace-expansion: 5.0.4 + brace-expansion: 5.0.5 minimatch@3.1.5: dependencies: