update lodash

This commit is contained in:
Joao Moreno 2016-09-19 12:25:48 +02:00
parent 0ab19dd838
commit 15ec864027
10 changed files with 18574 additions and 8686 deletions

View file

@ -1,4 +1,10 @@
// Place your settings in this file to overwrite default and user settings.
{
"editor.insertSpaces": false
"editor.insertSpaces": false,
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"out": true,
"typings": true
}
}

View file

@ -33,7 +33,7 @@
"commander": "^2.8.1",
"denodeify": "^1.2.1",
"glob": "^7.0.6",
"lodash": "^3.10.1",
"lodash": "^4.15.0",
"mime": "^1.3.4",
"minimatch": "^3.0.3",
"osenv": "^0.1.3",

View file

@ -454,7 +454,7 @@ const defaultExtensions = {
};
export function toContentTypes(files: IFile[]): Promise<string> {
const extensions = Object.keys(_.indexBy(files, f => path.extname(f.path).toLowerCase()))
const extensions = Object.keys(_.keyBy(files, f => path.extname(f.path).toLowerCase()))
.filter(e => !!e)
.reduce((r, e) => _.assign(r, { [e]: mime.lookup(e) }), {});
@ -497,7 +497,8 @@ function collectFiles(cwd: string, manifest: Manifest): Promise<string[]> {
.then(rawIgnore => rawIgnore.split(/[\n\r]/).map(s => s.trim()).filter(s => !!s))
.then(ignore => defaultIgnore.concat(ignore))
.then(ignore => ignore.filter(i => !/^\s*#/.test(i)))
.then<{ ignore: string[]; negate: string[]; }>(ignore => <any> _.indexBy(_.partition(ignore, i => !/^\s*!/.test(i)), (o, i) => i ? 'negate' : 'ignore'))
.then(ignore => _.partition(ignore, i => !/^\s*!/.test(i)))
.then(r => ({ ignore: r[0], negate: r[1] }))
.then(({ ignore, negate }) => files.filter(f => !ignore.some(i => minimatch(f, i, MinimatchOptions)) || negate.some(i => minimatch(f, i.substr(1), MinimatchOptions))));
});
}

View file

@ -736,7 +736,7 @@ describe('toVsixManifest', () => {
assert(tags.some(tag => tag === 'c++'), 'detect c++');
assert(tags.some(tag => tag === 'ftp'), 'detect ftp');
assert(tags.some(tag => tag === 'javascript'), 'detect javascript');
assert(!_.contains(tags, 'java'), "don't detect java");
assert(!_.includes(tags, 'java'), "don't detect java");
});
});

5
typings.json Normal file
View file

@ -0,0 +1,5 @@
{
"dependencies": {
"lodash": "registry:npm/lodash#4.0.0+20160723033700"
}
}

1
typings/index.d.ts vendored Normal file
View file

@ -0,0 +1 @@
/// <reference path="modules/lodash/index.d.ts" />

File diff suppressed because it is too large Load diff

18545
typings/modules/lodash/index.d.ts vendored Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,11 @@
{
"resolution": "main",
"tree": {
"src": "https://raw.githubusercontent.com/types/npm-lodash/9b83559bbd3454f0cd9e4020c920e36eee80d5a3/typings.json",
"raw": "registry:npm/lodash#4.0.0+20160723033700",
"main": "index.d.ts",
"version": "4.0.0",
"name": "lodash",
"type": "typings"
}
}

1
typings/tsd.d.ts vendored
View file

@ -1,5 +1,4 @@
/// <reference path="node/node.d.ts" />
/// <reference path="lodash/lodash.d.ts" />
/// <reference path="glob/glob.d.ts" />
/// <reference path="minimatch/minimatch.d.ts" />
/// <reference path="q/Q.d.ts" />