protobufjs 6.11.4 → 6.11.6
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.
- package/cli/node_modules/.package-lock.json +86 -32
- package/cli/node_modules/@babel/parser/package.json +66 -30
- package/cli/node_modules/@types/linkify-it/package.json +65 -36
- package/cli/node_modules/@types/markdown-it/package.json +67 -39
- package/cli/node_modules/@types/mdurl/package.json +53 -21
- package/cli/node_modules/acorn/package.json +48 -17
- package/cli/node_modules/acorn-jsx/package.json +42 -11
- package/cli/node_modules/argparse/package.json +52 -17
- package/cli/node_modules/bluebird/package.json +65 -38
- package/cli/node_modules/brace-expansion/index.js +14 -12
- package/cli/node_modules/brace-expansion/package.json +4 -1
- package/cli/node_modules/catharsis/package.json +44 -10
- package/cli/node_modules/deep-is/.travis.yml +5 -0
- package/cli/node_modules/deep-is/LICENSE +22 -0
- package/cli/node_modules/deep-is/README.markdown +70 -0
- package/cli/node_modules/deep-is/example/cmp.js +11 -0
- package/cli/node_modules/deep-is/index.js +102 -0
- package/cli/node_modules/deep-is/package.json +58 -0
- package/cli/node_modules/deep-is/test/NaN.js +16 -0
- package/cli/node_modules/deep-is/test/cmp.js +23 -0
- package/cli/node_modules/deep-is/test/neg-vs-pos-0.js +15 -0
- package/cli/node_modules/entities/package.json +95 -60
- package/cli/node_modules/escape-string-regexp/package.json +84 -41
- package/cli/node_modules/escodegen/escodegen.js +25 -66
- package/cli/node_modules/escodegen/package.json +11 -13
- package/cli/node_modules/esprima/package.json +82 -54
- package/cli/node_modules/estraverse/estraverse.js +1 -24
- package/cli/node_modules/estraverse/package.json +1 -1
- package/cli/node_modules/esutils/package.json +52 -21
- package/cli/node_modules/fast-levenshtein/LICENSE.md +25 -0
- package/cli/node_modules/fast-levenshtein/README.md +104 -0
- package/cli/node_modules/fast-levenshtein/levenshtein.js +136 -0
- package/cli/node_modules/fast-levenshtein/package.json +39 -0
- package/cli/node_modules/fs.realpath/package.json +52 -16
- package/cli/node_modules/graceful-fs/package.json +57 -25
- package/cli/node_modules/inflight/package.json +44 -15
- package/cli/node_modules/inherits/package.json +44 -12
- package/cli/node_modules/js2xmlparser/package.json +94 -62
- package/cli/node_modules/klaw/package.json +53 -23
- package/cli/node_modules/levn/LICENSE +22 -0
- package/cli/node_modules/levn/README.md +196 -0
- package/cli/node_modules/levn/lib/cast.js +298 -0
- package/cli/node_modules/levn/lib/coerce.js +285 -0
- package/cli/node_modules/levn/lib/index.js +22 -0
- package/cli/node_modules/levn/lib/parse-string.js +113 -0
- package/cli/node_modules/levn/lib/parse.js +102 -0
- package/cli/node_modules/levn/package.json +47 -0
- package/cli/node_modules/linkify-it/package.json +58 -23
- package/cli/node_modules/lodash/package.json +61 -10
- package/cli/node_modules/markdown-it/package.json +68 -33
- package/cli/node_modules/markdown-it-anchor/package.json +72 -30
- package/cli/node_modules/marked/package.json +87 -52
- package/cli/node_modules/mdurl/package.json +44 -9
- package/cli/node_modules/minimatch/README.md +37 -0
- package/cli/node_modules/minimatch/minimatch.js +160 -102
- package/cli/node_modules/minimatch/package.json +2 -2
- package/cli/node_modules/mkdirp/package.json +56 -22
- package/cli/node_modules/once/package.json +48 -14
- package/cli/node_modules/optionator/CHANGELOG.md +56 -0
- package/cli/node_modules/optionator/LICENSE +22 -0
- package/cli/node_modules/optionator/README.md +238 -0
- package/cli/node_modules/optionator/lib/help.js +260 -0
- package/cli/node_modules/optionator/lib/index.js +465 -0
- package/cli/node_modules/optionator/lib/util.js +54 -0
- package/cli/node_modules/optionator/package.json +44 -0
- package/cli/node_modules/prelude-ls/CHANGELOG.md +99 -0
- package/cli/node_modules/prelude-ls/LICENSE +22 -0
- package/cli/node_modules/prelude-ls/README.md +15 -0
- package/cli/node_modules/prelude-ls/lib/Func.js +65 -0
- package/cli/node_modules/prelude-ls/lib/List.js +686 -0
- package/cli/node_modules/prelude-ls/lib/Num.js +130 -0
- package/cli/node_modules/prelude-ls/lib/Obj.js +154 -0
- package/cli/node_modules/prelude-ls/lib/Str.js +92 -0
- package/cli/node_modules/prelude-ls/lib/index.js +178 -0
- package/cli/node_modules/prelude-ls/package.json +52 -0
- package/cli/node_modules/requizzle/package.json +52 -21
- package/cli/node_modules/source-map/package.json +197 -54
- package/cli/node_modules/strip-json-comments/package.json +80 -45
- package/cli/node_modules/tmp/README.md +47 -21
- package/cli/node_modules/tmp/lib/tmp.js +209 -147
- package/cli/node_modules/tmp/package.json +73 -37
- package/cli/node_modules/type-check/LICENSE +22 -0
- package/cli/node_modules/type-check/README.md +210 -0
- package/cli/node_modules/type-check/lib/check.js +126 -0
- package/cli/node_modules/type-check/lib/index.js +16 -0
- package/cli/node_modules/type-check/lib/parse-type.js +196 -0
- package/cli/node_modules/type-check/package.json +40 -0
- package/cli/node_modules/uc.micro/package.json +45 -9
- package/cli/node_modules/underscore/package.json +95 -61
- package/cli/node_modules/word-wrap/LICENSE +21 -0
- package/cli/node_modules/word-wrap/README.md +201 -0
- package/cli/node_modules/word-wrap/index.d.ts +50 -0
- package/cli/node_modules/word-wrap/index.js +61 -0
- package/cli/node_modules/word-wrap/package.json +77 -0
- package/cli/node_modules/wrappy/package.json +46 -16
- package/cli/node_modules/xmlcreate/package.json +87 -55
- package/cli/package-lock.json +842 -0
- package/cli/package.json +1 -1
- package/dist/light/protobuf.js +3 -2
- package/dist/light/protobuf.js.map +1 -1
- package/dist/light/protobuf.min.js +3 -3
- package/dist/light/protobuf.min.js.map +1 -1
- package/dist/minimal/protobuf.js +2 -2
- package/dist/minimal/protobuf.min.js +3 -3
- package/dist/minimal/protobuf.min.js.map +1 -1
- package/dist/protobuf.js +3 -2
- package/dist/protobuf.js.map +1 -1
- package/dist/protobuf.min.js +3 -3
- package/dist/protobuf.min.js.map +1 -1
- package/package.json +1 -1
- package/src/type.js +1 -0
- package/cli/node_modules/rimraf/CHANGELOG.md +0 -65
- package/cli/node_modules/rimraf/LICENSE +0 -15
- package/cli/node_modules/rimraf/README.md +0 -101
- package/cli/node_modules/rimraf/bin.js +0 -68
- package/cli/node_modules/rimraf/package.json +0 -32
- package/cli/node_modules/rimraf/rimraf.js +0 -360
- package/cli/node_modules/tmp/CHANGELOG.md +0 -288
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
|
|
12
12
|
Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com>
|
|
13
13
|
Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com>
|
|
14
|
-
Copyright (C) 2020 Apple Inc. All rights reserved.
|
|
15
14
|
|
|
16
15
|
Redistribution and use in source and binary forms, with or without
|
|
17
16
|
modification, are permitted provided that the following conditions are met:
|
|
@@ -86,31 +85,28 @@
|
|
|
86
85
|
Assignment: 1,
|
|
87
86
|
Conditional: 2,
|
|
88
87
|
ArrowFunction: 2,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
Member: 21,
|
|
109
|
-
Primary: 22
|
|
88
|
+
LogicalOR: 3,
|
|
89
|
+
LogicalAND: 4,
|
|
90
|
+
BitwiseOR: 5,
|
|
91
|
+
BitwiseXOR: 6,
|
|
92
|
+
BitwiseAND: 7,
|
|
93
|
+
Equality: 8,
|
|
94
|
+
Relational: 9,
|
|
95
|
+
BitwiseSHIFT: 10,
|
|
96
|
+
Additive: 11,
|
|
97
|
+
Multiplicative: 12,
|
|
98
|
+
Exponentiation: 13,
|
|
99
|
+
Await: 14,
|
|
100
|
+
Unary: 14,
|
|
101
|
+
Postfix: 15,
|
|
102
|
+
Call: 16,
|
|
103
|
+
New: 17,
|
|
104
|
+
TaggedTemplate: 18,
|
|
105
|
+
Member: 19,
|
|
106
|
+
Primary: 20
|
|
110
107
|
};
|
|
111
108
|
|
|
112
109
|
BinaryPrecedence = {
|
|
113
|
-
'??': Precedence.Coalesce,
|
|
114
110
|
'||': Precedence.LogicalOR,
|
|
115
111
|
'&&': Precedence.LogicalAND,
|
|
116
112
|
'|': Precedence.BitwiseOR,
|
|
@@ -145,8 +141,7 @@
|
|
|
145
141
|
F_ALLOW_UNPARATH_NEW = 1 << 2,
|
|
146
142
|
F_FUNC_BODY = 1 << 3,
|
|
147
143
|
F_DIRECTIVE_CTX = 1 << 4,
|
|
148
|
-
F_SEMICOLON_OPT = 1 << 5
|
|
149
|
-
F_FOUND_COALESCE = 1 << 6;
|
|
144
|
+
F_SEMICOLON_OPT = 1 << 5;
|
|
150
145
|
|
|
151
146
|
//Expression flag sets
|
|
152
147
|
//NOTE: Flag order:
|
|
@@ -1822,7 +1817,7 @@
|
|
|
1822
1817
|
}
|
|
1823
1818
|
return parenthesize(
|
|
1824
1819
|
[
|
|
1825
|
-
this.generateExpression(expr.test, Precedence.
|
|
1820
|
+
this.generateExpression(expr.test, Precedence.LogicalOR, flags),
|
|
1826
1821
|
space + '?' + space,
|
|
1827
1822
|
this.generateExpression(expr.consequent, Precedence.Assignment, flags),
|
|
1828
1823
|
space + ':' + space,
|
|
@@ -1834,9 +1829,6 @@
|
|
|
1834
1829
|
},
|
|
1835
1830
|
|
|
1836
1831
|
LogicalExpression: function (expr, precedence, flags) {
|
|
1837
|
-
if (expr.operator === '??') {
|
|
1838
|
-
flags |= F_FOUND_COALESCE;
|
|
1839
|
-
}
|
|
1840
1832
|
return this.BinaryExpression(expr, precedence, flags);
|
|
1841
1833
|
},
|
|
1842
1834
|
|
|
@@ -1874,22 +1866,13 @@
|
|
|
1874
1866
|
if (expr.operator === 'in' && !(flags & F_ALLOW_IN)) {
|
|
1875
1867
|
return ['(', result, ')'];
|
|
1876
1868
|
}
|
|
1877
|
-
if ((expr.operator === '||' || expr.operator === '&&') && (flags & F_FOUND_COALESCE)) {
|
|
1878
|
-
return ['(', result, ')'];
|
|
1879
|
-
}
|
|
1880
1869
|
return parenthesize(result, currentPrecedence, precedence);
|
|
1881
1870
|
},
|
|
1882
1871
|
|
|
1883
1872
|
CallExpression: function (expr, precedence, flags) {
|
|
1884
1873
|
var result, i, iz;
|
|
1885
|
-
|
|
1886
1874
|
// F_ALLOW_UNPARATH_NEW becomes false.
|
|
1887
1875
|
result = [this.generateExpression(expr.callee, Precedence.Call, E_TTF)];
|
|
1888
|
-
|
|
1889
|
-
if (expr.optional) {
|
|
1890
|
-
result.push('?.');
|
|
1891
|
-
}
|
|
1892
|
-
|
|
1893
1876
|
result.push('(');
|
|
1894
1877
|
for (i = 0, iz = expr['arguments'].length; i < iz; ++i) {
|
|
1895
1878
|
result.push(this.generateExpression(expr['arguments'][i], Precedence.Assignment, E_TTT));
|
|
@@ -1902,20 +1885,9 @@
|
|
|
1902
1885
|
if (!(flags & F_ALLOW_CALL)) {
|
|
1903
1886
|
return ['(', result, ')'];
|
|
1904
1887
|
}
|
|
1905
|
-
|
|
1906
1888
|
return parenthesize(result, Precedence.Call, precedence);
|
|
1907
1889
|
},
|
|
1908
1890
|
|
|
1909
|
-
ChainExpression: function (expr, precedence, flags) {
|
|
1910
|
-
if (Precedence.OptionalChaining < precedence) {
|
|
1911
|
-
flags |= F_ALLOW_CALL;
|
|
1912
|
-
}
|
|
1913
|
-
|
|
1914
|
-
var result = this.generateExpression(expr.expression, Precedence.OptionalChaining, flags);
|
|
1915
|
-
|
|
1916
|
-
return parenthesize(result, Precedence.OptionalChaining, precedence);
|
|
1917
|
-
},
|
|
1918
|
-
|
|
1919
1891
|
NewExpression: function (expr, precedence, flags) {
|
|
1920
1892
|
var result, length, i, iz, itemFlags;
|
|
1921
1893
|
length = expr['arguments'].length;
|
|
@@ -1950,15 +1922,11 @@
|
|
|
1950
1922
|
result = [this.generateExpression(expr.object, Precedence.Call, (flags & F_ALLOW_CALL) ? E_TTF : E_TFF)];
|
|
1951
1923
|
|
|
1952
1924
|
if (expr.computed) {
|
|
1953
|
-
if (expr.optional) {
|
|
1954
|
-
result.push('?.');
|
|
1955
|
-
}
|
|
1956
|
-
|
|
1957
1925
|
result.push('[');
|
|
1958
1926
|
result.push(this.generateExpression(expr.property, Precedence.Sequence, flags & F_ALLOW_CALL ? E_TTT : E_TFT));
|
|
1959
1927
|
result.push(']');
|
|
1960
1928
|
} else {
|
|
1961
|
-
if (
|
|
1929
|
+
if (expr.object.type === Syntax.Literal && typeof expr.object.value === 'number') {
|
|
1962
1930
|
fragment = toSourceNodeWhenNeeded(result).toString();
|
|
1963
1931
|
// When the following conditions are all true,
|
|
1964
1932
|
// 1. No floating point
|
|
@@ -1975,7 +1943,7 @@
|
|
|
1975
1943
|
result.push(' ');
|
|
1976
1944
|
}
|
|
1977
1945
|
}
|
|
1978
|
-
result.push(
|
|
1946
|
+
result.push('.');
|
|
1979
1947
|
result.push(generateIdentifier(expr.property));
|
|
1980
1948
|
}
|
|
1981
1949
|
|
|
@@ -2358,16 +2326,6 @@
|
|
|
2358
2326
|
return '/' + expr.regex.pattern + '/' + expr.regex.flags;
|
|
2359
2327
|
}
|
|
2360
2328
|
|
|
2361
|
-
if (typeof expr.value === 'bigint') {
|
|
2362
|
-
return expr.value.toString() + 'n';
|
|
2363
|
-
}
|
|
2364
|
-
|
|
2365
|
-
// `expr.value` can be null if `expr.bigint` exists. We need to check
|
|
2366
|
-
// `expr.bigint` first.
|
|
2367
|
-
if (expr.bigint) {
|
|
2368
|
-
return expr.bigint + 'n';
|
|
2369
|
-
}
|
|
2370
|
-
|
|
2371
2329
|
if (expr.value === null) {
|
|
2372
2330
|
return 'null';
|
|
2373
2331
|
}
|
|
@@ -2499,7 +2457,8 @@
|
|
|
2499
2457
|
this.generateExpression(expr.source, Precedence.Assignment, E_TTT),
|
|
2500
2458
|
')'
|
|
2501
2459
|
], Precedence.Call, precedence);
|
|
2502
|
-
}
|
|
2460
|
+
},
|
|
2461
|
+
|
|
2503
2462
|
};
|
|
2504
2463
|
|
|
2505
2464
|
merge(CodeGenerator.prototype, CodeGenerator.Expression);
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"escodegen.js",
|
|
15
15
|
"package.json"
|
|
16
16
|
],
|
|
17
|
-
"version": "
|
|
17
|
+
"version": "1.14.3",
|
|
18
18
|
"engines": {
|
|
19
|
-
"node": ">=
|
|
19
|
+
"node": ">=4.0"
|
|
20
20
|
},
|
|
21
21
|
"maintainers": [
|
|
22
22
|
{
|
|
@@ -30,26 +30,24 @@
|
|
|
30
30
|
"url": "http://github.com/estools/escodegen.git"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"estraverse": "^
|
|
33
|
+
"estraverse": "^4.2.0",
|
|
34
34
|
"esutils": "^2.0.2",
|
|
35
|
-
"esprima": "^4.0.1"
|
|
35
|
+
"esprima": "^4.0.1",
|
|
36
|
+
"optionator": "^0.8.1"
|
|
36
37
|
},
|
|
37
38
|
"optionalDependencies": {
|
|
38
39
|
"source-map": "~0.6.1"
|
|
39
40
|
},
|
|
40
41
|
"devDependencies": {
|
|
41
|
-
"acorn": "^
|
|
42
|
+
"acorn": "^7.1.0",
|
|
42
43
|
"bluebird": "^3.4.7",
|
|
43
44
|
"bower-registry-client": "^1.0.0",
|
|
44
|
-
"chai": "^
|
|
45
|
-
"chai-exclude": "^2.0.2",
|
|
45
|
+
"chai": "^3.5.0",
|
|
46
46
|
"commonjs-everywhere": "^0.9.7",
|
|
47
|
-
"gulp": "^
|
|
48
|
-
"gulp-eslint": "^
|
|
49
|
-
"gulp-mocha": "^
|
|
50
|
-
"
|
|
51
|
-
"optionator": "^0.9.1",
|
|
52
|
-
"semver": "^7.3.4"
|
|
47
|
+
"gulp": "^3.8.10",
|
|
48
|
+
"gulp-eslint": "^3.0.1",
|
|
49
|
+
"gulp-mocha": "^3.0.1",
|
|
50
|
+
"semver": "^5.1.0"
|
|
53
51
|
},
|
|
54
52
|
"license": "BSD-2-Clause",
|
|
55
53
|
"scripts": {
|
|
@@ -1,39 +1,44 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"esparse": "./bin/esparse.js",
|
|
8
|
-
"esvalidate": "./bin/esvalidate.js"
|
|
9
|
-
},
|
|
10
|
-
"version": "4.0.1",
|
|
11
|
-
"files": [
|
|
12
|
-
"bin",
|
|
13
|
-
"dist/esprima.js"
|
|
2
|
+
"_args": [
|
|
3
|
+
[
|
|
4
|
+
"esprima@4.0.1",
|
|
5
|
+
"/Users/fenster/dev/protobuf.js/cli"
|
|
6
|
+
]
|
|
14
7
|
],
|
|
15
|
-
"
|
|
16
|
-
|
|
8
|
+
"_from": "esprima@4.0.1",
|
|
9
|
+
"_id": "esprima@4.0.1",
|
|
10
|
+
"_inBundle": false,
|
|
11
|
+
"_integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
|
|
12
|
+
"_location": "/esprima",
|
|
13
|
+
"_phantomChildren": {},
|
|
14
|
+
"_requested": {
|
|
15
|
+
"type": "version",
|
|
16
|
+
"registry": true,
|
|
17
|
+
"raw": "esprima@4.0.1",
|
|
18
|
+
"name": "esprima",
|
|
19
|
+
"escapedName": "esprima",
|
|
20
|
+
"rawSpec": "4.0.1",
|
|
21
|
+
"saveSpec": null,
|
|
22
|
+
"fetchSpec": "4.0.1"
|
|
17
23
|
},
|
|
24
|
+
"_requiredBy": [
|
|
25
|
+
"/escodegen"
|
|
26
|
+
],
|
|
27
|
+
"_resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
|
28
|
+
"_spec": "4.0.1",
|
|
29
|
+
"_where": "/Users/fenster/dev/protobuf.js/cli",
|
|
18
30
|
"author": {
|
|
19
31
|
"name": "Ariya Hidayat",
|
|
20
32
|
"email": "ariya.hidayat@gmail.com"
|
|
21
33
|
},
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"email": "ariya.hidayat@gmail.com",
|
|
26
|
-
"web": "http://ariya.ofilabs.com"
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"repository": {
|
|
30
|
-
"type": "git",
|
|
31
|
-
"url": "https://github.com/jquery/esprima.git"
|
|
34
|
+
"bin": {
|
|
35
|
+
"esparse": "bin/esparse.js",
|
|
36
|
+
"esvalidate": "bin/esvalidate.js"
|
|
32
37
|
},
|
|
33
38
|
"bugs": {
|
|
34
39
|
"url": "https://github.com/jquery/esprima/issues"
|
|
35
40
|
},
|
|
36
|
-
"
|
|
41
|
+
"description": "ECMAScript parsing infrastructure for multipurpose analysis",
|
|
37
42
|
"devDependencies": {
|
|
38
43
|
"codecov.io": "~0.1.6",
|
|
39
44
|
"escomplex-js": "1.2.0",
|
|
@@ -62,6 +67,14 @@
|
|
|
62
67
|
"unicode-8.0.0": "~0.7.0",
|
|
63
68
|
"webpack": "~1.14.0"
|
|
64
69
|
},
|
|
70
|
+
"engines": {
|
|
71
|
+
"node": ">=4"
|
|
72
|
+
},
|
|
73
|
+
"files": [
|
|
74
|
+
"bin",
|
|
75
|
+
"dist/esprima.js"
|
|
76
|
+
],
|
|
77
|
+
"homepage": "http://esprima.org",
|
|
65
78
|
"keywords": [
|
|
66
79
|
"ast",
|
|
67
80
|
"ecmascript",
|
|
@@ -70,43 +83,58 @@
|
|
|
70
83
|
"parser",
|
|
71
84
|
"syntax"
|
|
72
85
|
],
|
|
86
|
+
"license": "BSD-2-Clause",
|
|
87
|
+
"main": "dist/esprima.js",
|
|
88
|
+
"maintainers": [
|
|
89
|
+
{
|
|
90
|
+
"name": "Ariya Hidayat",
|
|
91
|
+
"email": "ariya.hidayat@gmail.com",
|
|
92
|
+
"url": "http://ariya.ofilabs.com"
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"name": "esprima",
|
|
96
|
+
"repository": {
|
|
97
|
+
"type": "git",
|
|
98
|
+
"url": "git+https://github.com/jquery/esprima.git"
|
|
99
|
+
},
|
|
73
100
|
"scripts": {
|
|
101
|
+
"all-tests": "npm run verify-line-ending && npm run generate-fixtures && npm run unit-tests && npm run api-tests && npm run grammar-tests && npm run regression-tests && npm run hostile-env-tests",
|
|
102
|
+
"analyze-coverage": "istanbul cover test/unit-tests.js",
|
|
103
|
+
"api-tests": "mocha -R dot test/api-tests.js",
|
|
104
|
+
"appveyor": "npm run compile && npm run all-tests && npm run browser-tests",
|
|
105
|
+
"benchmark": "npm run benchmark-parser && npm run benchmark-tokenizer",
|
|
106
|
+
"benchmark-parser": "node -expose_gc test/benchmark-parser.js",
|
|
107
|
+
"benchmark-tokenizer": "node --expose_gc test/benchmark-tokenizer.js",
|
|
108
|
+
"browser-tests": "npm run compile && npm run generate-fixtures && cd test && karma start --single-run",
|
|
109
|
+
"check-coverage": "istanbul check-coverage --statement 100 --branch 100 --function 100",
|
|
74
110
|
"check-version": "node test/check-version.js",
|
|
75
|
-
"
|
|
111
|
+
"circleci": "npm test && npm run codecov && npm run downstream",
|
|
76
112
|
"code-style": "tsfmt --verify src/*.ts && tsfmt --verify test/*.js",
|
|
77
|
-
"
|
|
113
|
+
"codecov": "istanbul report cobertura && codecov < ./coverage/cobertura-coverage.xml",
|
|
114
|
+
"compile": "tsc -p src/ && webpack && node tools/fixupbundle.js",
|
|
78
115
|
"complexity": "node test/check-complexity.js",
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
116
|
+
"downstream": "node test/downstream.js",
|
|
117
|
+
"droneio": "npm run compile && npm run all-tests && npm run saucelabs",
|
|
118
|
+
"dynamic-analysis": "npm run analyze-coverage && npm run check-coverage",
|
|
119
|
+
"format-code": "tsfmt -r src/*.ts && tsfmt -r test/*.js",
|
|
120
|
+
"generate-fixtures": "node tools/generate-fixtures.js",
|
|
121
|
+
"generate-regex": "node tools/generate-identifier-regex.js",
|
|
122
|
+
"generate-xhtml-entities": "node tools/generate-xhtml-entities.js",
|
|
83
123
|
"grammar-tests": "node test/grammar-tests.js",
|
|
124
|
+
"hostile-env-tests": "node test/hostile-environment-tests.js",
|
|
125
|
+
"prepublish": "npm run compile",
|
|
126
|
+
"profile": "node --prof test/profile.js && mv isolate*.log v8.log && node-tick-processor",
|
|
84
127
|
"regression-tests": "node test/regression-tests.js",
|
|
85
|
-
"
|
|
86
|
-
"verify-line-ending": "node test/verify-line-ending.js",
|
|
87
|
-
"generate-fixtures": "node tools/generate-fixtures.js",
|
|
88
|
-
"browser-tests": "npm run compile && npm run generate-fixtures && cd test && karma start --single-run",
|
|
128
|
+
"saucelabs": "npm run saucelabs-evergreen && npm run saucelabs-ie && npm run saucelabs-safari",
|
|
89
129
|
"saucelabs-evergreen": "cd test && karma start saucelabs-evergreen.conf.js",
|
|
90
|
-
"saucelabs-safari": "cd test && karma start saucelabs-safari.conf.js",
|
|
91
130
|
"saucelabs-ie": "cd test && karma start saucelabs-ie.conf.js",
|
|
92
|
-
"saucelabs": "
|
|
93
|
-
"
|
|
94
|
-
"check-coverage": "istanbul check-coverage --statement 100 --branch 100 --function 100",
|
|
95
|
-
"dynamic-analysis": "npm run analyze-coverage && npm run check-coverage",
|
|
96
|
-
"compile": "tsc -p src/ && webpack && node tools/fixupbundle.js",
|
|
131
|
+
"saucelabs-safari": "cd test && karma start saucelabs-safari.conf.js",
|
|
132
|
+
"static-analysis": "npm run check-version && npm run tslint && npm run code-style && npm run complexity",
|
|
97
133
|
"test": "npm run compile && npm run all-tests && npm run static-analysis && npm run dynamic-analysis",
|
|
98
|
-
"prepublish": "npm run compile",
|
|
99
|
-
"profile": "node --prof test/profile.js && mv isolate*.log v8.log && node-tick-processor",
|
|
100
|
-
"benchmark-parser": "node -expose_gc test/benchmark-parser.js",
|
|
101
|
-
"benchmark-tokenizer": "node --expose_gc test/benchmark-tokenizer.js",
|
|
102
|
-
"benchmark": "npm run benchmark-parser && npm run benchmark-tokenizer",
|
|
103
|
-
"codecov": "istanbul report cobertura && codecov < ./coverage/cobertura-coverage.xml",
|
|
104
|
-
"downstream": "node test/downstream.js",
|
|
105
134
|
"travis": "npm test",
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
135
|
+
"tslint": "tslint src/*.ts",
|
|
136
|
+
"unit-tests": "node test/unit-tests.js",
|
|
137
|
+
"verify-line-ending": "node test/verify-line-ending.js"
|
|
138
|
+
},
|
|
139
|
+
"version": "4.0.1"
|
|
112
140
|
}
|
|
@@ -84,7 +84,6 @@
|
|
|
84
84
|
BreakStatement: 'BreakStatement',
|
|
85
85
|
CallExpression: 'CallExpression',
|
|
86
86
|
CatchClause: 'CatchClause',
|
|
87
|
-
ChainExpression: 'ChainExpression',
|
|
88
87
|
ClassBody: 'ClassBody',
|
|
89
88
|
ClassDeclaration: 'ClassDeclaration',
|
|
90
89
|
ClassExpression: 'ClassExpression',
|
|
@@ -124,10 +123,8 @@
|
|
|
124
123
|
NewExpression: 'NewExpression',
|
|
125
124
|
ObjectExpression: 'ObjectExpression',
|
|
126
125
|
ObjectPattern: 'ObjectPattern',
|
|
127
|
-
PrivateIdentifier: 'PrivateIdentifier',
|
|
128
126
|
Program: 'Program',
|
|
129
127
|
Property: 'Property',
|
|
130
|
-
PropertyDefinition: 'PropertyDefinition',
|
|
131
128
|
RestElement: 'RestElement',
|
|
132
129
|
ReturnStatement: 'ReturnStatement',
|
|
133
130
|
SequenceExpression: 'SequenceExpression',
|
|
@@ -162,7 +159,6 @@
|
|
|
162
159
|
BreakStatement: ['label'],
|
|
163
160
|
CallExpression: ['callee', 'arguments'],
|
|
164
161
|
CatchClause: ['param', 'body'],
|
|
165
|
-
ChainExpression: ['expression'],
|
|
166
162
|
ClassBody: ['body'],
|
|
167
163
|
ClassDeclaration: ['id', 'superClass', 'body'],
|
|
168
164
|
ClassExpression: ['id', 'superClass', 'body'],
|
|
@@ -202,10 +198,8 @@
|
|
|
202
198
|
NewExpression: ['callee', 'arguments'],
|
|
203
199
|
ObjectExpression: ['properties'],
|
|
204
200
|
ObjectPattern: ['properties'],
|
|
205
|
-
PrivateIdentifier: [],
|
|
206
201
|
Program: ['body'],
|
|
207
202
|
Property: ['key', 'value'],
|
|
208
|
-
PropertyDefinition: ['key', 'value'],
|
|
209
203
|
RestElement: [ 'argument' ],
|
|
210
204
|
ReturnStatement: ['argument'],
|
|
211
205
|
SequenceExpression: ['expressions'],
|
|
@@ -394,15 +388,6 @@
|
|
|
394
388
|
function isProperty(nodeType, key) {
|
|
395
389
|
return (nodeType === Syntax.ObjectExpression || nodeType === Syntax.ObjectPattern) && 'properties' === key;
|
|
396
390
|
}
|
|
397
|
-
|
|
398
|
-
function candidateExistsInLeaveList(leavelist, candidate) {
|
|
399
|
-
for (var i = leavelist.length - 1; i >= 0; --i) {
|
|
400
|
-
if (leavelist[i].node === candidate) {
|
|
401
|
-
return true;
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
return false;
|
|
405
|
-
}
|
|
406
391
|
|
|
407
392
|
Controller.prototype.traverse = function traverse(root, visitor) {
|
|
408
393
|
var worklist,
|
|
@@ -484,11 +469,6 @@
|
|
|
484
469
|
if (!candidate[current2]) {
|
|
485
470
|
continue;
|
|
486
471
|
}
|
|
487
|
-
|
|
488
|
-
if (candidateExistsInLeaveList(leavelist, candidate[current2])) {
|
|
489
|
-
continue;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
472
|
if (isProperty(nodeType, candidates[current])) {
|
|
493
473
|
element = new Element(candidate[current2], [key, current2], 'Property', null);
|
|
494
474
|
} else if (isNode(candidate[current2])) {
|
|
@@ -499,10 +479,6 @@
|
|
|
499
479
|
worklist.push(element);
|
|
500
480
|
}
|
|
501
481
|
} else if (isNode(candidate)) {
|
|
502
|
-
if (candidateExistsInLeaveList(leavelist, candidate)) {
|
|
503
|
-
continue;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
482
|
worklist.push(new Element(candidate, key, null, null));
|
|
507
483
|
}
|
|
508
484
|
}
|
|
@@ -791,6 +767,7 @@
|
|
|
791
767
|
return tree;
|
|
792
768
|
}
|
|
793
769
|
|
|
770
|
+
exports.version = require('./package.json').version;
|
|
794
771
|
exports.Syntax = Syntax;
|
|
795
772
|
exports.traverse = traverse;
|
|
796
773
|
exports.replace = replace;
|
|
@@ -1,44 +1,75 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"_args": [
|
|
3
|
+
[
|
|
4
|
+
"esutils@2.0.3",
|
|
5
|
+
"/Users/fenster/dev/protobuf.js/cli"
|
|
6
|
+
]
|
|
7
|
+
],
|
|
8
|
+
"_from": "esutils@2.0.3",
|
|
9
|
+
"_id": "esutils@2.0.3",
|
|
10
|
+
"_inBundle": false,
|
|
11
|
+
"_integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
|
|
12
|
+
"_location": "/esutils",
|
|
13
|
+
"_phantomChildren": {},
|
|
14
|
+
"_requested": {
|
|
15
|
+
"type": "version",
|
|
16
|
+
"registry": true,
|
|
17
|
+
"raw": "esutils@2.0.3",
|
|
18
|
+
"name": "esutils",
|
|
19
|
+
"escapedName": "esutils",
|
|
20
|
+
"rawSpec": "2.0.3",
|
|
21
|
+
"saveSpec": null,
|
|
22
|
+
"fetchSpec": "2.0.3"
|
|
23
|
+
},
|
|
24
|
+
"_requiredBy": [
|
|
25
|
+
"/escodegen"
|
|
26
|
+
],
|
|
27
|
+
"_resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
|
|
28
|
+
"_spec": "2.0.3",
|
|
29
|
+
"_where": "/Users/fenster/dev/protobuf.js/cli",
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/estools/esutils/issues"
|
|
32
|
+
},
|
|
3
33
|
"description": "utility box for ECMAScript language tools",
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"chai": "~1.7.2",
|
|
36
|
+
"coffee-script": "~1.6.3",
|
|
37
|
+
"jshint": "2.6.3",
|
|
38
|
+
"mocha": "~2.2.1",
|
|
39
|
+
"regenerate": "~1.3.1",
|
|
40
|
+
"unicode-9.0.0": "~0.7.0"
|
|
9
41
|
},
|
|
10
42
|
"directories": {
|
|
11
43
|
"lib": "./lib"
|
|
12
44
|
},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=0.10.0"
|
|
47
|
+
},
|
|
13
48
|
"files": [
|
|
14
49
|
"LICENSE.BSD",
|
|
15
50
|
"README.md",
|
|
16
51
|
"lib"
|
|
17
52
|
],
|
|
53
|
+
"homepage": "https://github.com/estools/esutils",
|
|
54
|
+
"license": "BSD-2-Clause",
|
|
55
|
+
"main": "lib/utils.js",
|
|
18
56
|
"maintainers": [
|
|
19
57
|
{
|
|
20
58
|
"name": "Yusuke Suzuki",
|
|
21
59
|
"email": "utatane.tea@gmail.com",
|
|
22
|
-
"
|
|
60
|
+
"url": "http://github.com/Constellation"
|
|
23
61
|
}
|
|
24
62
|
],
|
|
63
|
+
"name": "esutils",
|
|
25
64
|
"repository": {
|
|
26
65
|
"type": "git",
|
|
27
|
-
"url": "
|
|
66
|
+
"url": "git+ssh://git@github.com/estools/esutils.git"
|
|
28
67
|
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"chai": "~1.7.2",
|
|
31
|
-
"coffee-script": "~1.6.3",
|
|
32
|
-
"jshint": "2.6.3",
|
|
33
|
-
"mocha": "~2.2.1",
|
|
34
|
-
"regenerate": "~1.3.1",
|
|
35
|
-
"unicode-9.0.0": "~0.7.0"
|
|
36
|
-
},
|
|
37
|
-
"license": "BSD-2-Clause",
|
|
38
68
|
"scripts": {
|
|
39
|
-
"
|
|
69
|
+
"generate-regex": "node tools/generate-identifier-regex.js",
|
|
40
70
|
"lint": "jshint lib/*.js",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
}
|
|
71
|
+
"test": "npm run-script lint && npm run-script unit-test",
|
|
72
|
+
"unit-test": "mocha --compilers coffee:coffee-script -R spec"
|
|
73
|
+
},
|
|
74
|
+
"version": "2.0.3"
|
|
44
75
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
(MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2013 [Ramesh Nair](http://www.hiddentao.com/)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person
|
|
6
|
+
obtaining a copy of this software and associated documentation
|
|
7
|
+
files (the "Software"), to deal in the Software without
|
|
8
|
+
restriction, including without limitation the rights to use,
|
|
9
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the
|
|
11
|
+
Software is furnished to do so, subject to the following
|
|
12
|
+
conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be
|
|
15
|
+
included in all copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
18
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
19
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
20
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
21
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
22
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
23
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
24
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
25
|
+
|