mirror of
https://github.com/apache/cordova-android.git
synced 2026-05-30 00:00:04 +08:00
updated bundled cordova-common to 1.4.1
This commit is contained in:
+19
-20
@@ -9,6 +9,14 @@ try {
|
||||
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
|
||||
var expand = require('brace-expansion')
|
||||
|
||||
var plTypes = {
|
||||
'!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
|
||||
'?': { open: '(?:', close: ')?' },
|
||||
'+': { open: '(?:', close: ')+' },
|
||||
'*': { open: '(?:', close: ')*' },
|
||||
'@': { open: '(?:', close: ')' }
|
||||
}
|
||||
|
||||
// any single thing other than /
|
||||
// don't need to escape / when using new RegExp()
|
||||
var qmark = '[^/]'
|
||||
@@ -277,7 +285,6 @@ function parse (pattern, isSub) {
|
||||
// ? => one single character
|
||||
var patternListStack = []
|
||||
var negativeLists = []
|
||||
var plType
|
||||
var stateChar
|
||||
var inClass = false
|
||||
var reClassStart = -1
|
||||
@@ -376,11 +383,12 @@ function parse (pattern, isSub) {
|
||||
continue
|
||||
}
|
||||
|
||||
plType = stateChar
|
||||
patternListStack.push({
|
||||
type: plType,
|
||||
type: stateChar,
|
||||
start: i - 1,
|
||||
reStart: re.length
|
||||
reStart: re.length,
|
||||
open: plTypes[stateChar].open,
|
||||
close: plTypes[stateChar].close
|
||||
})
|
||||
// negation is (?:(?!js)[^/]*)
|
||||
re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
|
||||
@@ -396,24 +404,14 @@ function parse (pattern, isSub) {
|
||||
|
||||
clearStateChar()
|
||||
hasMagic = true
|
||||
re += ')'
|
||||
var pl = patternListStack.pop()
|
||||
plType = pl.type
|
||||
// negation is (?:(?!js)[^/]*)
|
||||
// The others are (?:<pattern>)<type>
|
||||
switch (plType) {
|
||||
case '!':
|
||||
negativeLists.push(pl)
|
||||
re += ')[^/]*?)'
|
||||
pl.reEnd = re.length
|
||||
break
|
||||
case '?':
|
||||
case '+':
|
||||
case '*':
|
||||
re += plType
|
||||
break
|
||||
case '@': break // the default anyway
|
||||
re += pl.close
|
||||
if (pl.type === '!') {
|
||||
negativeLists.push(pl)
|
||||
}
|
||||
pl.reEnd = re.length
|
||||
continue
|
||||
|
||||
case '|':
|
||||
@@ -520,7 +518,8 @@ function parse (pattern, isSub) {
|
||||
// Go through and escape them, taking care not to double-escape any
|
||||
// | chars that were already escaped.
|
||||
for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
|
||||
var tail = re.slice(pl.reStart + 3)
|
||||
var tail = re.slice(pl.reStart + pl.open.length)
|
||||
this.debug('setting tail', re, pl)
|
||||
// maybe some even number of \, then maybe 1 \, followed by a |
|
||||
tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
|
||||
if (!$2) {
|
||||
@@ -537,7 +536,7 @@ function parse (pattern, isSub) {
|
||||
return $1 + $1 + $2 + '|'
|
||||
})
|
||||
|
||||
this.debug('tail=%j\n %s', tail, tail)
|
||||
this.debug('tail=%j\n %s', tail, tail, pl, re)
|
||||
var t = pl.type === '*' ? star
|
||||
: pl.type === '?' ? qmark
|
||||
: '\\' + pl.type
|
||||
|
||||
+10
-10
@@ -14,20 +14,20 @@
|
||||
]
|
||||
],
|
||||
"_from": "minimatch@>=3.0.0 <4.0.0",
|
||||
"_id": "minimatch@3.0.2",
|
||||
"_id": "minimatch@3.0.3",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/minimatch",
|
||||
"_nodeVersion": "4.4.4",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-16-east.internal.npmjs.com",
|
||||
"tmp": "tmp/minimatch-3.0.2.tgz_1466194379770_0.11417287751100957"
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/minimatch-3.0.3.tgz_1470678322731_0.1892083385027945"
|
||||
},
|
||||
"_npmUser": {
|
||||
"name": "isaacs",
|
||||
"email": "i@izs.me"
|
||||
},
|
||||
"_npmVersion": "3.9.1",
|
||||
"_npmVersion": "3.10.6",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "minimatch@^3.0.0",
|
||||
@@ -42,8 +42,8 @@
|
||||
"/cordova-common",
|
||||
"/glob"
|
||||
],
|
||||
"_resolved": "http://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz",
|
||||
"_shasum": "0f398a7300ea441e9c348c83d98ab8c9dbf9c40a",
|
||||
"_resolved": "http://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz",
|
||||
"_shasum": "2a4e4090b96b2db06a9d7df01055a62a77c9b774",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "minimatch@^3.0.0",
|
||||
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common",
|
||||
@@ -65,8 +65,8 @@
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "0f398a7300ea441e9c348c83d98ab8c9dbf9c40a",
|
||||
"tarball": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz"
|
||||
"shasum": "2a4e4090b96b2db06a9d7df01055a62a77c9b774",
|
||||
"tarball": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
@@ -74,7 +74,7 @@
|
||||
"files": [
|
||||
"minimatch.js"
|
||||
],
|
||||
"gitHead": "81edb7c763abd31ba981c87ec5e835f178786be0",
|
||||
"gitHead": "eed89491bd4a4e6bc463aac0dfb5c29ef0d1dc13",
|
||||
"homepage": "https://github.com/isaacs/minimatch#readme",
|
||||
"license": "ISC",
|
||||
"main": "minimatch.js",
|
||||
@@ -95,5 +95,5 @@
|
||||
"posttest": "standard minimatch.js test/*.js",
|
||||
"test": "tap test/*.js"
|
||||
},
|
||||
"version": "3.0.2"
|
||||
"version": "3.0.3"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user