mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-18 14:32:53 +08:00
updated bundled cordova-common to 1.4.1
This commit is contained in:
parent
6c80f58e2a
commit
2664180b32
8
node_modules/cordova-common/RELEASENOTES.md
generated
vendored
8
node_modules/cordova-common/RELEASENOTES.md
generated
vendored
@ -20,8 +20,12 @@
|
|||||||
-->
|
-->
|
||||||
# Cordova-common Release Notes
|
# Cordova-common Release Notes
|
||||||
|
|
||||||
### 1.4.0 (Jul 12, 2016)
|
### 1.4.1 (Aug 09, 2016)
|
||||||
* [CB-11023](https://issues.apache.org/jira/browse/CB-11023) Add edit-config functionality
|
* Add general purpose `ConfigParser.getAttribute` API
|
||||||
|
* [CB-11653](https://issues.apache.org/jira/browse/CB-11653) moved `findProjectRoot` from `cordova-lib` to `cordova-common`
|
||||||
|
* [CB-11636](https://issues.apache.org/jira/browse/CB-11636) Handle attributes with quotes correctly
|
||||||
|
* [CB-11645](https://issues.apache.org/jira/browse/CB-11645) added check to see if `getEditConfig` exists before trying to use it
|
||||||
|
* [CB-9825](https://issues.apache.org/jira/browse/CB-9825) framework tag spec parsing
|
||||||
|
|
||||||
### 1.3.0 (May 12, 2016)
|
### 1.3.0 (May 12, 2016)
|
||||||
* [CB-11259](https://issues.apache.org/jira/browse/CB-11259): Improving prepare and build logging
|
* [CB-11259](https://issues.apache.org/jira/browse/CB-11259): Improving prepare and build logging
|
||||||
|
1
node_modules/cordova-common/cordova-common.js
generated
vendored
1
node_modules/cordova-common/cordova-common.js
generated
vendored
@ -27,6 +27,7 @@ addProperty(module, 'superspawn', './src/superspawn');
|
|||||||
addProperty(module, 'ActionStack', './src/ActionStack');
|
addProperty(module, 'ActionStack', './src/ActionStack');
|
||||||
addProperty(module, 'CordovaError', './src/CordovaError/CordovaError');
|
addProperty(module, 'CordovaError', './src/CordovaError/CordovaError');
|
||||||
addProperty(module, 'CordovaLogger', './src/CordovaLogger');
|
addProperty(module, 'CordovaLogger', './src/CordovaLogger');
|
||||||
|
addProperty(module, 'CordovaCheck', './src/CordovaCheck');
|
||||||
addProperty(module, 'CordovaExternalToolErrorContext', './src/CordovaError/CordovaExternalToolErrorContext');
|
addProperty(module, 'CordovaExternalToolErrorContext', './src/CordovaError/CordovaExternalToolErrorContext');
|
||||||
addProperty(module, 'PlatformJson', './src/PlatformJson');
|
addProperty(module, 'PlatformJson', './src/PlatformJson');
|
||||||
addProperty(module, 'ConfigParser', './src/ConfigParser/ConfigParser');
|
addProperty(module, 'ConfigParser', './src/ConfigParser/ConfigParser');
|
||||||
|
22
node_modules/cordova-common/package.json
generated
vendored
22
node_modules/cordova-common/package.json
generated
vendored
@ -14,20 +14,20 @@
|
|||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "cordova-common@>=1.4.0 <2.0.0",
|
"_from": "cordova-common@>=1.4.0 <2.0.0",
|
||||||
"_id": "cordova-common@1.4.0",
|
"_id": "cordova-common@1.4.1",
|
||||||
"_inCache": true,
|
"_inCache": true,
|
||||||
"_installable": true,
|
"_installable": true,
|
||||||
"_location": "/cordova-common",
|
"_location": "/cordova-common",
|
||||||
"_nodeVersion": "6.3.0",
|
"_nodeVersion": "6.2.2",
|
||||||
"_npmOperationalInternal": {
|
"_npmOperationalInternal": {
|
||||||
"host": "packages-16-east.internal.npmjs.com",
|
"host": "packages-16-east.internal.npmjs.com",
|
||||||
"tmp": "tmp/cordova-common-1.4.0.tgz_1469092638680_0.9961137105710804"
|
"tmp": "tmp/cordova-common-1.4.1.tgz_1471306335501_0.6723270947113633"
|
||||||
},
|
},
|
||||||
"_npmUser": {
|
"_npmUser": {
|
||||||
"name": "kotikov.vladimir",
|
"name": "stevegill",
|
||||||
"email": "kotikov.vladimir@gmail.com"
|
"email": "stevengill97@gmail.com"
|
||||||
},
|
},
|
||||||
"_npmVersion": "3.10.5",
|
"_npmVersion": "3.9.5",
|
||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
"raw": "cordova-common@^1.4.0",
|
"raw": "cordova-common@^1.4.0",
|
||||||
@ -41,8 +41,8 @@
|
|||||||
"_requiredBy": [
|
"_requiredBy": [
|
||||||
"/"
|
"/"
|
||||||
],
|
],
|
||||||
"_resolved": "http://registry.npmjs.org/cordova-common/-/cordova-common-1.4.0.tgz",
|
"_resolved": "file:cordova-dist-dev/CB-11690/cordova-common-1.4.1.tgz",
|
||||||
"_shasum": "b3ba73595caa34fe8250ac11f20a4ed44e7c84e4",
|
"_shasum": "8b4f07b3199b398fff553b32bff66676ecd30ab9",
|
||||||
"_shrinkwrap": null,
|
"_shrinkwrap": null,
|
||||||
"_spec": "cordova-common@^1.4.0",
|
"_spec": "cordova-common@^1.4.0",
|
||||||
"_where": "/Users/steveng/repo/cordova/cordova-android",
|
"_where": "/Users/steveng/repo/cordova/cordova-android",
|
||||||
@ -79,8 +79,8 @@
|
|||||||
},
|
},
|
||||||
"directories": {},
|
"directories": {},
|
||||||
"dist": {
|
"dist": {
|
||||||
"shasum": "b3ba73595caa34fe8250ac11f20a4ed44e7c84e4",
|
"shasum": "8b4f07b3199b398fff553b32bff66676ecd30ab9",
|
||||||
"tarball": "https://registry.npmjs.org/cordova-common/-/cordova-common-1.4.0.tgz"
|
"tarball": "https://registry.npmjs.org/cordova-common/-/cordova-common-1.4.1.tgz"
|
||||||
},
|
},
|
||||||
"engineStrict": true,
|
"engineStrict": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
@ -127,5 +127,5 @@
|
|||||||
"jshint": "node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint spec",
|
"jshint": "node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint spec",
|
||||||
"test": "npm run jshint && npm run jasmine"
|
"test": "npm run jshint && npm run jasmine"
|
||||||
},
|
},
|
||||||
"version": "1.4.0"
|
"version": "1.4.1"
|
||||||
}
|
}
|
||||||
|
12
node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js
generated
vendored
12
node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js
generated
vendored
@ -97,7 +97,10 @@ function remove_plugin_changes(pluginInfo, is_top_level) {
|
|||||||
var plugin_vars = is_top_level ?
|
var plugin_vars = is_top_level ?
|
||||||
platform_config.installed_plugins[pluginInfo.id] :
|
platform_config.installed_plugins[pluginInfo.id] :
|
||||||
platform_config.dependent_plugins[pluginInfo.id];
|
platform_config.dependent_plugins[pluginInfo.id];
|
||||||
var edit_config_changes = pluginInfo.getEditConfigs(self.platform);
|
var edit_config_changes = null;
|
||||||
|
if(pluginInfo.getEditConfigs) {
|
||||||
|
edit_config_changes = pluginInfo.getEditConfigs(self.platform);
|
||||||
|
}
|
||||||
|
|
||||||
// get config munge, aka how did this plugin change various config files
|
// get config munge, aka how did this plugin change various config files
|
||||||
var config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars, edit_config_changes);
|
var config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars, edit_config_changes);
|
||||||
@ -131,7 +134,12 @@ PlatformMunger.prototype.add_plugin_changes = add_plugin_changes;
|
|||||||
function add_plugin_changes(pluginInfo, plugin_vars, is_top_level, should_increment, plugin_force) {
|
function add_plugin_changes(pluginInfo, plugin_vars, is_top_level, should_increment, plugin_force) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var platform_config = self.platformJson.root;
|
var platform_config = self.platformJson.root;
|
||||||
var edit_config_changes = pluginInfo.getEditConfigs(self.platform);
|
|
||||||
|
var edit_config_changes = null;
|
||||||
|
if(pluginInfo.getEditConfigs) {
|
||||||
|
edit_config_changes = pluginInfo.getEditConfigs(self.platform);
|
||||||
|
}
|
||||||
|
|
||||||
var config_munge;
|
var config_munge;
|
||||||
|
|
||||||
if (!edit_config_changes || edit_config_changes.length === 0) {
|
if (!edit_config_changes || edit_config_changes.length === 0) {
|
||||||
|
20
node_modules/cordova-common/src/ConfigParser/ConfigParser.js
generated
vendored
20
node_modules/cordova-common/src/ConfigParser/ConfigParser.js
generated
vendored
@ -90,20 +90,24 @@ function findElementAttributeValue(attributeName, elems) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ConfigParser.prototype = {
|
ConfigParser.prototype = {
|
||||||
|
getAttribute: function(attr) {
|
||||||
|
return this.doc.getroot().attrib[attr];
|
||||||
|
},
|
||||||
|
|
||||||
packageName: function(id) {
|
packageName: function(id) {
|
||||||
return this.doc.getroot().attrib['id'];
|
return this.getAttribute('id');
|
||||||
},
|
},
|
||||||
setPackageName: function(id) {
|
setPackageName: function(id) {
|
||||||
this.doc.getroot().attrib['id'] = id;
|
this.doc.getroot().attrib['id'] = id;
|
||||||
},
|
},
|
||||||
android_packageName: function() {
|
android_packageName: function() {
|
||||||
return this.doc.getroot().attrib['android-packageName'];
|
return this.getAttribute('android-packageName');
|
||||||
},
|
},
|
||||||
android_activityName: function() {
|
android_activityName: function() {
|
||||||
return this.doc.getroot().attrib['android-activityName'];
|
return this.getAttribute('android-activityName');
|
||||||
},
|
},
|
||||||
ios_CFBundleIdentifier: function() {
|
ios_CFBundleIdentifier: function() {
|
||||||
return this.doc.getroot().attrib['ios-CFBundleIdentifier'];
|
return this.getAttribute('ios-CFBundleIdentifier');
|
||||||
},
|
},
|
||||||
name: function() {
|
name: function() {
|
||||||
return getNodeTextSafe(this.doc.find('name'));
|
return getNodeTextSafe(this.doc.find('name'));
|
||||||
@ -120,16 +124,16 @@ ConfigParser.prototype = {
|
|||||||
el.text = text;
|
el.text = text;
|
||||||
},
|
},
|
||||||
version: function() {
|
version: function() {
|
||||||
return this.doc.getroot().attrib['version'];
|
return this.getAttribute('version');
|
||||||
},
|
},
|
||||||
windows_packageVersion: function() {
|
windows_packageVersion: function() {
|
||||||
return this.doc.getroot().attrib('windows-packageVersion');
|
return this.getAttribute('windows-packageVersion');
|
||||||
},
|
},
|
||||||
android_versionCode: function() {
|
android_versionCode: function() {
|
||||||
return this.doc.getroot().attrib['android-versionCode'];
|
return this.getAttribute('android-versionCode');
|
||||||
},
|
},
|
||||||
ios_CFBundleVersion: function() {
|
ios_CFBundleVersion: function() {
|
||||||
return this.doc.getroot().attrib['ios-CFBundleVersion'];
|
return this.getAttribute('ios-CFBundleVersion');
|
||||||
},
|
},
|
||||||
setVersion: function(value) {
|
setVersion: function(value) {
|
||||||
this.doc.getroot().attrib['version'] = value;
|
this.doc.getroot().attrib['version'] = value;
|
||||||
|
76
node_modules/cordova-common/src/CordovaCheck.js
generated
vendored
Normal file
76
node_modules/cordova-common/src/CordovaCheck.js
generated
vendored
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
/**
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
var fs = require('fs'),
|
||||||
|
path = require('path');
|
||||||
|
|
||||||
|
function isRootDir(dir) {
|
||||||
|
if (fs.existsSync(path.join(dir, 'www'))) {
|
||||||
|
if (fs.existsSync(path.join(dir, 'config.xml'))) {
|
||||||
|
// For sure is.
|
||||||
|
if (fs.existsSync(path.join(dir, 'platforms'))) {
|
||||||
|
return 2;
|
||||||
|
} else {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Might be (or may be under platforms/).
|
||||||
|
if (fs.existsSync(path.join(dir, 'www', 'config.xml'))) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Runs up the directory chain looking for a .cordova directory.
|
||||||
|
// IF it is found we are in a Cordova project.
|
||||||
|
// Omit argument to use CWD.
|
||||||
|
function isCordova(dir) {
|
||||||
|
if (!dir) {
|
||||||
|
// Prefer PWD over cwd so that symlinked dirs within your PWD work correctly (CB-5687).
|
||||||
|
var pwd = process.env.PWD;
|
||||||
|
var cwd = process.cwd();
|
||||||
|
if (pwd && pwd != cwd && pwd != 'undefined') {
|
||||||
|
return isCordova(pwd) || isCordova(cwd);
|
||||||
|
}
|
||||||
|
return isCordova(cwd);
|
||||||
|
}
|
||||||
|
var bestReturnValueSoFar = false;
|
||||||
|
for (var i = 0; i < 1000; ++i) {
|
||||||
|
var result = isRootDir(dir);
|
||||||
|
if (result === 2) {
|
||||||
|
return dir;
|
||||||
|
}
|
||||||
|
if (result === 1) {
|
||||||
|
bestReturnValueSoFar = dir;
|
||||||
|
}
|
||||||
|
var parentDir = path.normalize(path.join(dir, '..'));
|
||||||
|
// Detect fs root.
|
||||||
|
if (parentDir == dir) {
|
||||||
|
return bestReturnValueSoFar;
|
||||||
|
}
|
||||||
|
dir = parentDir;
|
||||||
|
}
|
||||||
|
console.error('Hit an unhandled case in CordovaCheck.isCordova');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
findProjectRoot : isCordova
|
||||||
|
};
|
1
node_modules/cordova-common/src/PluginInfo/PluginInfo.js
generated
vendored
1
node_modules/cordova-common/src/PluginInfo/PluginInfo.js
generated
vendored
@ -318,6 +318,7 @@ function PluginInfo(dirname) {
|
|||||||
parent: el.attrib.parent,
|
parent: el.attrib.parent,
|
||||||
custom: isStrTrue(el.attrib.custom),
|
custom: isStrTrue(el.attrib.custom),
|
||||||
src: el.attrib.src,
|
src: el.attrib.src,
|
||||||
|
spec: el.attrib.spec,
|
||||||
weak: isStrTrue(el.attrib.weak),
|
weak: isStrTrue(el.attrib.weak),
|
||||||
versions: el.attrib.versions,
|
versions: el.attrib.versions,
|
||||||
targetDir: el.attrib['target-dir'],
|
targetDir: el.attrib['target-dir'],
|
||||||
|
84
node_modules/cordova-common/src/util/xml-helpers.js
generated
vendored
84
node_modules/cordova-common/src/util/xml-helpers.js
generated
vendored
@ -44,23 +44,9 @@ module.exports = {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var oneAttribKeys = Object.keys(one.attrib),
|
if (!attribMatch(one, two)) return false;
|
||||||
twoAttribKeys = Object.keys(two.attrib),
|
|
||||||
i = 0, attribName;
|
|
||||||
|
|
||||||
if (oneAttribKeys.length != twoAttribKeys.length) {
|
for (var i = 0; i < one._children.length; i++) {
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i; i < oneAttribKeys.length; i++) {
|
|
||||||
attribName = oneAttribKeys[i];
|
|
||||||
|
|
||||||
if (one.attrib[attribName] != two.attrib[attribName]) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i; i < one._children.length; i++) {
|
|
||||||
if (!module.exports.equalNodes(one._children[i], two._children[i])) {
|
if (!module.exports.equalNodes(one._children[i], two._children[i])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -287,33 +273,30 @@ function mergeXml(src, dest, platform, clobber) {
|
|||||||
query = srcTag + '',
|
query = srcTag + '',
|
||||||
shouldMerge = true;
|
shouldMerge = true;
|
||||||
|
|
||||||
if (BLACKLIST.indexOf(srcTag) === -1) {
|
if (BLACKLIST.indexOf(srcTag) !== -1) return;
|
||||||
if (SINGLETONS.indexOf(srcTag) !== -1) {
|
|
||||||
foundChild = dest.find(query);
|
|
||||||
if (foundChild) {
|
|
||||||
destChild = foundChild;
|
|
||||||
dest.remove(destChild);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
//Check for an exact match and if you find one don't add
|
|
||||||
Object.getOwnPropertyNames(srcChild.attrib).forEach(function (attribute) {
|
|
||||||
query += '[@' + attribute + '="' + srcChild.attrib[attribute] + '"]';
|
|
||||||
});
|
|
||||||
var foundChildren = dest.findall(query);
|
|
||||||
for(var i = 0; i < foundChildren.length; i++) {
|
|
||||||
foundChild = foundChildren[i];
|
|
||||||
if (foundChild && textMatch(srcChild, foundChild) && (Object.keys(srcChild.attrib).length==Object.keys(foundChild.attrib).length)) {
|
|
||||||
destChild = foundChild;
|
|
||||||
dest.remove(destChild);
|
|
||||||
shouldMerge = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mergeXml(srcChild, destChild, platform, clobber && shouldMerge);
|
if (SINGLETONS.indexOf(srcTag) !== -1) {
|
||||||
dest.append(destChild);
|
foundChild = dest.find(query);
|
||||||
|
if (foundChild) {
|
||||||
|
destChild = foundChild;
|
||||||
|
dest.remove(destChild);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//Check for an exact match and if you find one don't add
|
||||||
|
var mergeCandidates = dest.findall(query)
|
||||||
|
.filter(function (foundChild) {
|
||||||
|
return foundChild && textMatch(srcChild, foundChild) && attribMatch(srcChild, foundChild);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (mergeCandidates.length > 0) {
|
||||||
|
destChild = mergeCandidates[0];
|
||||||
|
dest.remove(destChild);
|
||||||
|
shouldMerge = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mergeXml(srcChild, destChild, platform, clobber && shouldMerge);
|
||||||
|
dest.append(destChild);
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeDuplicatePreferences(xml) {
|
function removeDuplicatePreferences(xml) {
|
||||||
@ -345,3 +328,22 @@ function textMatch(elm1, elm2) {
|
|||||||
text2 = elm2.text ? elm2.text.replace(/\s+/, '') : '';
|
text2 = elm2.text ? elm2.text.replace(/\s+/, '') : '';
|
||||||
return (text1 === '' || text1 === text2);
|
return (text1 === '' || text1 === text2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function attribMatch(one, two) {
|
||||||
|
var oneAttribKeys = Object.keys(one.attrib);
|
||||||
|
var twoAttribKeys = Object.keys(two.attrib);
|
||||||
|
|
||||||
|
if (oneAttribKeys.length != twoAttribKeys.length) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var i = 0; i < oneAttribKeys.length; i++) {
|
||||||
|
var attribName = oneAttribKeys[i];
|
||||||
|
|
||||||
|
if (one.attrib[attribName] != two.attrib[attribName]) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
39
node_modules/minimatch/minimatch.js
generated
vendored
39
node_modules/minimatch/minimatch.js
generated
vendored
@ -9,6 +9,14 @@ try {
|
|||||||
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
|
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}
|
||||||
var expand = require('brace-expansion')
|
var expand = require('brace-expansion')
|
||||||
|
|
||||||
|
var plTypes = {
|
||||||
|
'!': { open: '(?:(?!(?:', close: '))[^/]*?)'},
|
||||||
|
'?': { open: '(?:', close: ')?' },
|
||||||
|
'+': { open: '(?:', close: ')+' },
|
||||||
|
'*': { open: '(?:', close: ')*' },
|
||||||
|
'@': { open: '(?:', close: ')' }
|
||||||
|
}
|
||||||
|
|
||||||
// any single thing other than /
|
// any single thing other than /
|
||||||
// don't need to escape / when using new RegExp()
|
// don't need to escape / when using new RegExp()
|
||||||
var qmark = '[^/]'
|
var qmark = '[^/]'
|
||||||
@ -277,7 +285,6 @@ function parse (pattern, isSub) {
|
|||||||
// ? => one single character
|
// ? => one single character
|
||||||
var patternListStack = []
|
var patternListStack = []
|
||||||
var negativeLists = []
|
var negativeLists = []
|
||||||
var plType
|
|
||||||
var stateChar
|
var stateChar
|
||||||
var inClass = false
|
var inClass = false
|
||||||
var reClassStart = -1
|
var reClassStart = -1
|
||||||
@ -376,11 +383,12 @@ function parse (pattern, isSub) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
plType = stateChar
|
|
||||||
patternListStack.push({
|
patternListStack.push({
|
||||||
type: plType,
|
type: stateChar,
|
||||||
start: i - 1,
|
start: i - 1,
|
||||||
reStart: re.length
|
reStart: re.length,
|
||||||
|
open: plTypes[stateChar].open,
|
||||||
|
close: plTypes[stateChar].close
|
||||||
})
|
})
|
||||||
// negation is (?:(?!js)[^/]*)
|
// negation is (?:(?!js)[^/]*)
|
||||||
re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
|
re += stateChar === '!' ? '(?:(?!(?:' : '(?:'
|
||||||
@ -396,24 +404,14 @@ function parse (pattern, isSub) {
|
|||||||
|
|
||||||
clearStateChar()
|
clearStateChar()
|
||||||
hasMagic = true
|
hasMagic = true
|
||||||
re += ')'
|
|
||||||
var pl = patternListStack.pop()
|
var pl = patternListStack.pop()
|
||||||
plType = pl.type
|
|
||||||
// negation is (?:(?!js)[^/]*)
|
// negation is (?:(?!js)[^/]*)
|
||||||
// The others are (?:<pattern>)<type>
|
// The others are (?:<pattern>)<type>
|
||||||
switch (plType) {
|
re += pl.close
|
||||||
case '!':
|
if (pl.type === '!') {
|
||||||
negativeLists.push(pl)
|
negativeLists.push(pl)
|
||||||
re += ')[^/]*?)'
|
|
||||||
pl.reEnd = re.length
|
|
||||||
break
|
|
||||||
case '?':
|
|
||||||
case '+':
|
|
||||||
case '*':
|
|
||||||
re += plType
|
|
||||||
break
|
|
||||||
case '@': break // the default anyway
|
|
||||||
}
|
}
|
||||||
|
pl.reEnd = re.length
|
||||||
continue
|
continue
|
||||||
|
|
||||||
case '|':
|
case '|':
|
||||||
@ -520,7 +518,8 @@ function parse (pattern, isSub) {
|
|||||||
// Go through and escape them, taking care not to double-escape any
|
// Go through and escape them, taking care not to double-escape any
|
||||||
// | chars that were already escaped.
|
// | chars that were already escaped.
|
||||||
for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
|
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 |
|
// maybe some even number of \, then maybe 1 \, followed by a |
|
||||||
tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
|
tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) {
|
||||||
if (!$2) {
|
if (!$2) {
|
||||||
@ -537,7 +536,7 @@ function parse (pattern, isSub) {
|
|||||||
return $1 + $1 + $2 + '|'
|
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
|
var t = pl.type === '*' ? star
|
||||||
: pl.type === '?' ? qmark
|
: pl.type === '?' ? qmark
|
||||||
: '\\' + pl.type
|
: '\\' + pl.type
|
||||||
|
20
node_modules/minimatch/package.json
generated
vendored
20
node_modules/minimatch/package.json
generated
vendored
@ -14,20 +14,20 @@
|
|||||||
]
|
]
|
||||||
],
|
],
|
||||||
"_from": "minimatch@>=3.0.0 <4.0.0",
|
"_from": "minimatch@>=3.0.0 <4.0.0",
|
||||||
"_id": "minimatch@3.0.2",
|
"_id": "minimatch@3.0.3",
|
||||||
"_inCache": true,
|
"_inCache": true,
|
||||||
"_installable": true,
|
"_installable": true,
|
||||||
"_location": "/minimatch",
|
"_location": "/minimatch",
|
||||||
"_nodeVersion": "4.4.4",
|
"_nodeVersion": "4.4.4",
|
||||||
"_npmOperationalInternal": {
|
"_npmOperationalInternal": {
|
||||||
"host": "packages-16-east.internal.npmjs.com",
|
"host": "packages-12-west.internal.npmjs.com",
|
||||||
"tmp": "tmp/minimatch-3.0.2.tgz_1466194379770_0.11417287751100957"
|
"tmp": "tmp/minimatch-3.0.3.tgz_1470678322731_0.1892083385027945"
|
||||||
},
|
},
|
||||||
"_npmUser": {
|
"_npmUser": {
|
||||||
"name": "isaacs",
|
"name": "isaacs",
|
||||||
"email": "i@izs.me"
|
"email": "i@izs.me"
|
||||||
},
|
},
|
||||||
"_npmVersion": "3.9.1",
|
"_npmVersion": "3.10.6",
|
||||||
"_phantomChildren": {},
|
"_phantomChildren": {},
|
||||||
"_requested": {
|
"_requested": {
|
||||||
"raw": "minimatch@^3.0.0",
|
"raw": "minimatch@^3.0.0",
|
||||||
@ -42,8 +42,8 @@
|
|||||||
"/cordova-common",
|
"/cordova-common",
|
||||||
"/glob"
|
"/glob"
|
||||||
],
|
],
|
||||||
"_resolved": "http://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz",
|
"_resolved": "http://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz",
|
||||||
"_shasum": "0f398a7300ea441e9c348c83d98ab8c9dbf9c40a",
|
"_shasum": "2a4e4090b96b2db06a9d7df01055a62a77c9b774",
|
||||||
"_shrinkwrap": null,
|
"_shrinkwrap": null,
|
||||||
"_spec": "minimatch@^3.0.0",
|
"_spec": "minimatch@^3.0.0",
|
||||||
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common",
|
"_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common",
|
||||||
@ -65,8 +65,8 @@
|
|||||||
},
|
},
|
||||||
"directories": {},
|
"directories": {},
|
||||||
"dist": {
|
"dist": {
|
||||||
"shasum": "0f398a7300ea441e9c348c83d98ab8c9dbf9c40a",
|
"shasum": "2a4e4090b96b2db06a9d7df01055a62a77c9b774",
|
||||||
"tarball": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.2.tgz"
|
"tarball": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.3.tgz"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "*"
|
"node": "*"
|
||||||
@ -74,7 +74,7 @@
|
|||||||
"files": [
|
"files": [
|
||||||
"minimatch.js"
|
"minimatch.js"
|
||||||
],
|
],
|
||||||
"gitHead": "81edb7c763abd31ba981c87ec5e835f178786be0",
|
"gitHead": "eed89491bd4a4e6bc463aac0dfb5c29ef0d1dc13",
|
||||||
"homepage": "https://github.com/isaacs/minimatch#readme",
|
"homepage": "https://github.com/isaacs/minimatch#readme",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"main": "minimatch.js",
|
"main": "minimatch.js",
|
||||||
@ -95,5 +95,5 @@
|
|||||||
"posttest": "standard minimatch.js test/*.js",
|
"posttest": "standard minimatch.js test/*.js",
|
||||||
"test": "tap test/*.js"
|
"test": "tap test/*.js"
|
||||||
},
|
},
|
||||||
"version": "3.0.2"
|
"version": "3.0.3"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user