@baic/yolk-cli 2.1.0-alpha.92 → 2.1.0-alpha.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"name":"commander","version":"6.2.1","author":"TJ Holowaychuk <tj@vision-media.ca>","license":"MIT","_lastModified":"2023-01-30T02:45:03.248Z"}
1
+ {"name":"commander","version":"6.2.1","author":"TJ Holowaychuk <tj@vision-media.ca>","license":"MIT","_lastModified":"2023-02-09T06:25:34.587Z"}
@@ -646,6 +646,12 @@ function setopts (self, pattern, options) {
646
646
  pattern = "**/" + pattern
647
647
  }
648
648
 
649
+ self.windowsPathsNoEscape = !!options.windowsPathsNoEscape ||
650
+ options.allowWindowsEscape === false
651
+ if (self.windowsPathsNoEscape) {
652
+ pattern = pattern.replace(/\\/g, '/')
653
+ }
654
+
649
655
  self.silent = !!options.silent
650
656
  self.pattern = pattern
651
657
  self.strict = options.strict !== false
@@ -701,8 +707,6 @@ function setopts (self, pattern, options) {
701
707
  // Note that they are not supported in Glob itself anyway.
702
708
  options.nonegate = true
703
709
  options.nocomment = true
704
- // always treat \ in patterns as escapes, not path separators
705
- options.allowWindowsEscape = true
706
710
 
707
711
  self.minimatch = new Minimatch(pattern, options)
708
712
  self.options = self.minimatch.options
@@ -1 +1 @@
1
- {"name":"glob","version":"8.0.3","author":"Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)","license":"ISC","_lastModified":"2023-01-30T02:45:03.380Z"}
1
+ {"name":"glob","version":"8.1.0","author":"Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)","license":"ISC","_lastModified":"2023-02-09T06:25:34.716Z"}
@@ -724,7 +724,7 @@ class Minimatch {
724
724
  if (pattern === '') return ''
725
725
 
726
726
  let re = ''
727
- let hasMagic = !!options.nocase
727
+ let hasMagic = false
728
728
  let escaping = false
729
729
  // ? => one single character
730
730
  const patternListStack = []
@@ -737,11 +737,23 @@ class Minimatch {
737
737
  let pl
738
738
  let sp
739
739
  // . and .. never match anything that doesn't start with .,
740
- // even when options.dot is set.
741
- const patternStart = pattern.charAt(0) === '.' ? '' // anything
742
- // not (start or / followed by . or .. followed by / or end)
743
- : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
744
- : '(?!\\.)'
740
+ // even when options.dot is set. However, if the pattern
741
+ // starts with ., then traversal patterns can match.
742
+ let dotTravAllowed = pattern.charAt(0) === '.'
743
+ let dotFileAllowed = options.dot || dotTravAllowed
744
+ const patternStart = () =>
745
+ dotTravAllowed
746
+ ? ''
747
+ : dotFileAllowed
748
+ ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))'
749
+ : '(?!\\.)'
750
+ const subPatternStart = (p) =>
751
+ p.charAt(0) === '.'
752
+ ? ''
753
+ : options.dot
754
+ ? '(?!(?:^|\\/)\\.{1,2}(?:$|\\/))'
755
+ : '(?!\\.)'
756
+
745
757
 
746
758
  const clearStateChar = () => {
747
759
  if (stateChar) {
@@ -830,7 +842,7 @@ class Minimatch {
830
842
  if (options.noext) clearStateChar()
831
843
  continue
832
844
 
833
- case '(':
845
+ case '(': {
834
846
  if (inClass) {
835
847
  re += '('
836
848
  continue
@@ -841,46 +853,64 @@ class Minimatch {
841
853
  continue
842
854
  }
843
855
 
844
- patternListStack.push({
856
+ const plEntry = {
845
857
  type: stateChar,
846
858
  start: i - 1,
847
859
  reStart: re.length,
848
860
  open: plTypes[stateChar].open,
849
- close: plTypes[stateChar].close
850
- })
851
- // negation is (?:(?!js)[^/]*)
852
- re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
861
+ close: plTypes[stateChar].close,
862
+ }
863
+ this.debug(this.pattern, '\t', plEntry)
864
+ patternListStack.push(plEntry)
865
+ // negation is (?:(?!(?:js)(?:<rest>))[^/]*)
866
+ re += plEntry.open
867
+ // next entry starts with a dot maybe?
868
+ if (plEntry.start === 0 && plEntry.type !== '!') {
869
+ dotTravAllowed = true
870
+ re += subPatternStart(pattern.slice(i + 1))
871
+ }
853
872
  this.debug('plType %j %j', stateChar, re)
854
873
  stateChar = false
855
- continue
874
+ continue
875
+ }
856
876
 
857
- case ')':
858
- if (inClass || !patternListStack.length) {
877
+ case ')': {
878
+ const plEntry = patternListStack[patternListStack.length - 1]
879
+ if (inClass || !plEntry) {
859
880
  re += '\\)'
860
881
  continue
861
882
  }
883
+ patternListStack.pop()
862
884
 
885
+ // closing an extglob
863
886
  clearStateChar()
864
887
  hasMagic = true
865
- pl = patternListStack.pop()
888
+ pl = plEntry
866
889
  // negation is (?:(?!js)[^/]*)
867
890
  // The others are (?:<pattern>)<type>
868
891
  re += pl.close
869
892
  if (pl.type === '!') {
870
- negativeLists.push(pl)
893
+ negativeLists.push(Object.assign(pl, { reEnd: re.length }))
871
894
  }
872
- pl.reEnd = re.length
873
- continue
895
+ continue
896
+ }
874
897
 
875
- case '|':
876
- if (inClass || !patternListStack.length) {
898
+ case '|': {
899
+ const plEntry = patternListStack[patternListStack.length - 1]
900
+ if (inClass || !plEntry) {
877
901
  re += '\\|'
878
902
  continue
879
903
  }
880
904
 
881
905
  clearStateChar()
882
906
  re += '|'
883
- continue
907
+ // next subpattern can start with a dot?
908
+ if (plEntry.start === 0 && plEntry.type !== '!') {
909
+ dotTravAllowed = true
910
+ re += subPatternStart(pattern.slice(i + 1))
911
+ }
912
+ continue
913
+ }
884
914
 
885
915
  // these are mostly the same in regexp and glob
886
916
  case '[':
@@ -1019,14 +1049,16 @@ class Minimatch {
1019
1049
  // Handle nested stuff like *(*.js|!(*.json)), where open parens
1020
1050
  // mean that we should *not* include the ) in the bit that is considered
1021
1051
  // "after" the negated section.
1022
- const openParensBefore = nlBefore.split('(').length - 1
1052
+ const closeParensBefore = nlBefore.split(')').length
1053
+ const openParensBefore = nlBefore.split('(').length - closeParensBefore
1023
1054
  let cleanAfter = nlAfter
1024
1055
  for (let i = 0; i < openParensBefore; i++) {
1025
1056
  cleanAfter = cleanAfter.replace(/\)[+*?]?/, '')
1026
1057
  }
1027
1058
  nlAfter = cleanAfter
1028
1059
 
1029
- const dollar = nlAfter === '' && isSub !== SUBPARSE ? '$' : ''
1060
+ const dollar = nlAfter === '' && isSub !== SUBPARSE ? '(?:$|\\/)' : ''
1061
+
1030
1062
  re = nlBefore + nlFirst + nlAfter + dollar + nlLast
1031
1063
  }
1032
1064
 
@@ -1038,7 +1070,7 @@ class Minimatch {
1038
1070
  }
1039
1071
 
1040
1072
  if (addPatternStart) {
1041
- re = patternStart + re
1073
+ re = patternStart() + re
1042
1074
  }
1043
1075
 
1044
1076
  // parsing just a piece of a larger pattern.
@@ -1046,6 +1078,11 @@ class Minimatch {
1046
1078
  return [re, hasMagic]
1047
1079
  }
1048
1080
 
1081
+ // if it's nocase, and the lcase/uppercase don't match, it's magic
1082
+ if (options.nocase && !hasMagic) {
1083
+ hasMagic = pattern.toUpperCase() !== pattern.toLowerCase()
1084
+ }
1085
+
1049
1086
  // skip the regexp for non-magical patterns
1050
1087
  // unescape anything in it, though, so that it'll be
1051
1088
  // an exact match against a file etc.
@@ -1 +1 @@
1
- {"name":"minimatch","version":"5.1.2","author":"Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)","license":"ISC","_lastModified":"2023-01-30T02:45:03.459Z"}
1
+ {"name":"minimatch","version":"5.1.6","author":"Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)","license":"ISC","_lastModified":"2023-02-09T06:25:34.790Z"}
@@ -1 +1 @@
1
- {"name":"mkdirp","version":"1.0.4","license":"MIT","_lastModified":"2023-01-30T02:45:03.536Z"}
1
+ {"name":"mkdirp","version":"1.0.4","license":"MIT","_lastModified":"2023-02-09T06:25:34.844Z"}
@@ -1 +1 @@
1
- {"name":"mustache","version":"4.2.0","author":"mustache.js Authors <http://github.com/janl/mustache.js>","license":"MIT","_lastModified":"2023-01-30T02:45:03.600Z"}
1
+ {"name":"mustache","version":"4.2.0","author":"mustache.js Authors <http://github.com/janl/mustache.js>","license":"MIT","_lastModified":"2023-02-09T06:25:34.905Z"}