Skip to content

Commit af590a2

Browse files
committed
fix version output
1 parent 6bc15ab commit af590a2

File tree

3 files changed

+140
-188
lines changed

3 files changed

+140
-188
lines changed

dist/cache-save/index.js

Lines changed: 69 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -45312,10 +45312,10 @@ function populateMaps (extensions, types) {
4531245312
module.exports = minimatch
4531345313
minimatch.Minimatch = Minimatch
4531445314

45315-
var path = (function () { try { return __nccwpck_require__(1017) } catch (e) {}}()) || {
45316-
sep: '/'
45317-
}
45318-
minimatch.sep = path.sep
45315+
var path = { sep: '/' }
45316+
try {
45317+
path = __nccwpck_require__(1017)
45318+
} catch (er) {}
4531945319

4532045320
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
4532145321
var expand = __nccwpck_require__(3717)
@@ -45367,64 +45367,43 @@ function filter (pattern, options) {
4536745367
}
4536845368

4536945369
function ext (a, b) {
45370+
a = a || {}
4537045371
b = b || {}
4537145372
var t = {}
45372-
Object.keys(a).forEach(function (k) {
45373-
t[k] = a[k]
45374-
})
4537545373
Object.keys(b).forEach(function (k) {
4537645374
t[k] = b[k]
4537745375
})
45376+
Object.keys(a).forEach(function (k) {
45377+
t[k] = a[k]
45378+
})
4537845379
return t
4537945380
}
4538045381

4538145382
minimatch.defaults = function (def) {
45382-
if (!def || typeof def !== 'object' || !Object.keys(def).length) {
45383-
return minimatch
45384-
}
45383+
if (!def || !Object.keys(def).length) return minimatch
4538545384

4538645385
var orig = minimatch
4538745386

4538845387
var m = function minimatch (p, pattern, options) {
45389-
return orig(p, pattern, ext(def, options))
45388+
return orig.minimatch(p, pattern, ext(def, options))
4539045389
}
4539145390

4539245391
m.Minimatch = function Minimatch (pattern, options) {
4539345392
return new orig.Minimatch(pattern, ext(def, options))
4539445393
}
45395-
m.Minimatch.defaults = function defaults (options) {
45396-
return orig.defaults(ext(def, options)).Minimatch
45397-
}
45398-
45399-
m.filter = function filter (pattern, options) {
45400-
return orig.filter(pattern, ext(def, options))
45401-
}
45402-
45403-
m.defaults = function defaults (options) {
45404-
return orig.defaults(ext(def, options))
45405-
}
45406-
45407-
m.makeRe = function makeRe (pattern, options) {
45408-
return orig.makeRe(pattern, ext(def, options))
45409-
}
45410-
45411-
m.braceExpand = function braceExpand (pattern, options) {
45412-
return orig.braceExpand(pattern, ext(def, options))
45413-
}
45414-
45415-
m.match = function (list, pattern, options) {
45416-
return orig.match(list, pattern, ext(def, options))
45417-
}
4541845394

4541945395
return m
4542045396
}
4542145397

4542245398
Minimatch.defaults = function (def) {
45399+
if (!def || !Object.keys(def).length) return Minimatch
4542345400
return minimatch.defaults(def).Minimatch
4542445401
}
4542545402

4542645403
function minimatch (p, pattern, options) {
45427-
assertValidPattern(pattern)
45404+
if (typeof pattern !== 'string') {
45405+
throw new TypeError('glob pattern string required')
45406+
}
4542845407

4542945408
if (!options) options = {}
4543045409

@@ -45433,6 +45412,9 @@ function minimatch (p, pattern, options) {
4543345412
return false
4543445413
}
4543545414

45415+
// "" only matches ""
45416+
if (pattern.trim() === '') return p === ''
45417+
4543645418
return new Minimatch(pattern, options).match(p)
4543745419
}
4543845420

@@ -45441,14 +45423,15 @@ function Minimatch (pattern, options) {
4544145423
return new Minimatch(pattern, options)
4544245424
}
4544345425

45444-
assertValidPattern(pattern)
45426+
if (typeof pattern !== 'string') {
45427+
throw new TypeError('glob pattern string required')
45428+
}
4544545429

4544645430
if (!options) options = {}
45447-
4544845431
pattern = pattern.trim()
4544945432

4545045433
// windows support: need to use /, not \
45451-
if (!options.allowWindowsEscape && path.sep !== '/') {
45434+
if (path.sep !== '/') {
4545245435
pattern = pattern.split(path.sep).join('/')
4545345436
}
4545445437

@@ -45459,7 +45442,6 @@ function Minimatch (pattern, options) {
4545945442
this.negate = false
4546045443
this.comment = false
4546145444
this.empty = false
45462-
this.partial = !!options.partial
4546345445

4546445446
// make the set of regexps etc.
4546545447
this.make()
@@ -45469,6 +45451,9 @@ Minimatch.prototype.debug = function () {}
4546945451

4547045452
Minimatch.prototype.make = make
4547145453
function make () {
45454+
// don't do it more than once.
45455+
if (this._made) return
45456+
4547245457
var pattern = this.pattern
4547345458
var options = this.options
4547445459

@@ -45488,7 +45473,7 @@ function make () {
4548845473
// step 2: expand braces
4548945474
var set = this.globSet = this.braceExpand()
4549045475

45491-
if (options.debug) this.debug = function debug() { console.error.apply(console, arguments) }
45476+
if (options.debug) this.debug = console.error
4549245477

4549345478
this.debug(this.pattern, set)
4549445479

@@ -45568,29 +45553,19 @@ function braceExpand (pattern, options) {
4556845553
pattern = typeof pattern === 'undefined'
4556945554
? this.pattern : pattern
4557045555

45571-
assertValidPattern(pattern)
45556+
if (typeof pattern === 'undefined') {
45557+
throw new TypeError('undefined pattern')
45558+
}
4557245559

45573-
// Thanks to Yeting Li <https://github.com/yetingli> for
45574-
// improving this regexp to avoid a ReDOS vulnerability.
45575-
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
45560+
if (options.nobrace ||
45561+
!pattern.match(/\{.*\}/)) {
4557645562
// shortcut. no need to expand.
4557745563
return [pattern]
4557845564
}
4557945565

4558045566
return expand(pattern)
4558145567
}
4558245568

45583-
var MAX_PATTERN_LENGTH = 1024 * 64
45584-
var assertValidPattern = function (pattern) {
45585-
if (typeof pattern !== 'string') {
45586-
throw new TypeError('invalid pattern')
45587-
}
45588-
45589-
if (pattern.length > MAX_PATTERN_LENGTH) {
45590-
throw new TypeError('pattern is too long')
45591-
}
45592-
}
45593-
4559445569
// parse a component of the expanded set.
4559545570
// At this point, no pattern may contain "/" in it
4559645571
// so we're going to return a 2d array, where each entry is the full
@@ -45605,17 +45580,14 @@ var assertValidPattern = function (pattern) {
4560545580
Minimatch.prototype.parse = parse
4560645581
var SUBPARSE = {}
4560745582
function parse (pattern, isSub) {
45608-
assertValidPattern(pattern)
45583+
if (pattern.length > 1024 * 64) {
45584+
throw new TypeError('pattern is too long')
45585+
}
4560945586

4561045587
var options = this.options
4561145588

4561245589
// shortcuts
45613-
if (pattern === '**') {
45614-
if (!options.noglobstar)
45615-
return GLOBSTAR
45616-
else
45617-
pattern = '*'
45618-
}
45590+
if (!options.noglobstar && pattern === '**') return GLOBSTAR
4561945591
if (pattern === '') return ''
4562045592

4562145593
var re = ''
@@ -45671,12 +45643,10 @@ function parse (pattern, isSub) {
4567145643
}
4567245644

4567345645
switch (c) {
45674-
/* istanbul ignore next */
45675-
case '/': {
45646+
case '/':
4567645647
// completely not allowed, even escaped.
4567745648
// Should already be path-split by now.
4567845649
return false
45679-
}
4568045650

4568145651
case '\\':
4568245652
clearStateChar()
@@ -45795,23 +45765,25 @@ function parse (pattern, isSub) {
4579545765

4579645766
// handle the case where we left a class open.
4579745767
// "[z-a]" is valid, equivalent to "\[z-a\]"
45798-
// split where the last [ was, make sure we don't have
45799-
// an invalid re. if so, re-walk the contents of the
45800-
// would-be class to re-translate any characters that
45801-
// were passed through as-is
45802-
// TODO: It would probably be faster to determine this
45803-
// without a try/catch and a new RegExp, but it's tricky
45804-
// to do safely. For now, this is safe and works.
45805-
var cs = pattern.substring(classStart + 1, i)
45806-
try {
45807-
RegExp('[' + cs + ']')
45808-
} catch (er) {
45809-
// not a valid class!
45810-
var sp = this.parse(cs, SUBPARSE)
45811-
re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
45812-
hasMagic = hasMagic || sp[1]
45813-
inClass = false
45814-
continue
45768+
if (inClass) {
45769+
// split where the last [ was, make sure we don't have
45770+
// an invalid re. if so, re-walk the contents of the
45771+
// would-be class to re-translate any characters that
45772+
// were passed through as-is
45773+
// TODO: It would probably be faster to determine this
45774+
// without a try/catch and a new RegExp, but it's tricky
45775+
// to do safely. For now, this is safe and works.
45776+
var cs = pattern.substring(classStart + 1, i)
45777+
try {
45778+
RegExp('[' + cs + ']')
45779+
} catch (er) {
45780+
// not a valid class!
45781+
var sp = this.parse(cs, SUBPARSE)
45782+
re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
45783+
hasMagic = hasMagic || sp[1]
45784+
inClass = false
45785+
continue
45786+
}
4581545787
}
4581645788

4581745789
// finish up the class.
@@ -45895,7 +45867,9 @@ function parse (pattern, isSub) {
4589545867
// something that could conceivably capture a dot
4589645868
var addPatternStart = false
4589745869
switch (re.charAt(0)) {
45898-
case '[': case '.': case '(': addPatternStart = true
45870+
case '.':
45871+
case '[':
45872+
case '(': addPatternStart = true
4589945873
}
4590045874

4590145875
// Hack to work around lack of negative lookbehind in JS
@@ -45957,7 +45931,7 @@ function parse (pattern, isSub) {
4595745931
var flags = options.nocase ? 'i' : ''
4595845932
try {
4595945933
var regExp = new RegExp('^' + re + '$', flags)
45960-
} catch (er) /* istanbul ignore next - should be impossible */ {
45934+
} catch (er) {
4596145935
// If it was an invalid regular expression, then it can't match
4596245936
// anything. This trick looks for a character after the end of
4596345937
// the string, which is of course impossible, except in multi-line
@@ -46015,7 +45989,7 @@ function makeRe () {
4601545989

4601645990
try {
4601745991
this.regexp = new RegExp(re, flags)
46018-
} catch (ex) /* istanbul ignore next - should be impossible */ {
45992+
} catch (ex) {
4601945993
this.regexp = false
4602045994
}
4602145995
return this.regexp
@@ -46033,8 +46007,8 @@ minimatch.match = function (list, pattern, options) {
4603346007
return list
4603446008
}
4603546009

46036-
Minimatch.prototype.match = function match (f, partial) {
46037-
if (typeof partial === 'undefined') partial = this.partial
46010+
Minimatch.prototype.match = match
46011+
function match (f, partial) {
4603846012
this.debug('match', f, this.pattern)
4603946013
// short-circuit in the case of busted things.
4604046014
// comments, etc.
@@ -46116,7 +46090,6 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) {
4611646090

4611746091
// should be impossible.
4611846092
// some invalid regexp stuff in the set.
46119-
/* istanbul ignore if */
4612046093
if (p === false) return false
4612146094

4612246095
if (p === GLOBSTAR) {
@@ -46190,7 +46163,6 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) {
4619046163
// no match was found.
4619146164
// However, in partial mode, we can't say this is necessarily over.
4619246165
// If there's more *pattern* left, then
46193-
/* istanbul ignore if */
4619446166
if (partial) {
4619546167
// ran out of file
4619646168
this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
@@ -46204,7 +46176,11 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) {
4620446176
// patterns with magic have been turned into regexps.
4620546177
var hit
4620646178
if (typeof p === 'string') {
46207-
hit = f === p
46179+
if (options.nocase) {
46180+
hit = f.toLowerCase() === p.toLowerCase()
46181+
} else {
46182+
hit = f === p
46183+
}
4620846184
this.debug('string match', p, f, hit)
4620946185
} else {
4621046186
hit = f.match(p)
@@ -46235,16 +46211,16 @@ Minimatch.prototype.matchOne = function (file, pattern, partial) {
4623546211
// this is ok if we're doing the match as part of
4623646212
// a glob fs traversal.
4623746213
return partial
46238-
} else /* istanbul ignore else */ if (pi === pl) {
46214+
} else if (pi === pl) {
4623946215
// ran out of pattern, still have file left.
4624046216
// this is only acceptable if we're on the very last
4624146217
// empty segment of a file with a trailing slash.
4624246218
// a/* should match a/b/
46243-
return (fi === fl - 1) && (file[fi] === '')
46219+
var emptyFileEnd = (fi === fl - 1) && (file[fi] === '')
46220+
return emptyFileEnd
4624446221
}
4624546222

4624646223
// should be unreachable.
46247-
/* istanbul ignore next */
4624846224
throw new Error('wtf?')
4624946225
}
4625046226

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy