hermes-estree 0.36.0 → 0.37.0
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/dist/generated/HermesESTreeSelectorTypes.js.flow +2472 -1968
- package/dist/generated/predicates.js +2 -2
- package/dist/generated/predicates.js.flow +1 -1
- package/dist/index.js +1 -1
- package/dist/predicates.js +1 -1
- package/dist/selectors.js +1 -1
- package/dist/selectors.js.flow +1 -1
- package/dist/src/generated/predicates.js +2 -2
- package/dist/src/index.js +1 -1
- package/dist/src/predicates.js +1 -1
- package/dist/src/selectors.js +1 -1
- package/dist/src/types.js +51 -3
- package/dist/types.js +51 -3
- package/dist/types.js.flow +882 -924
- package/package.json +3 -2
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* strict-local
|
|
8
8
|
* @generated
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
/* eslint no-undef: 'error', no-unused-vars: ['error', {vars: "local"}], no-redeclare: 'error' */
|
|
19
19
|
|
|
20
|
-
/* global
|
|
20
|
+
/* global NonNullable, Partial, Readonly, ReadonlyArray, $FlowFixMe */
|
|
21
21
|
'use strict';
|
|
22
22
|
/*::
|
|
23
23
|
import type {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
// lint directives to let us do some basic validation of generated files
|
|
18
18
|
/* eslint no-undef: 'error', no-unused-vars: ['error', {vars: "local"}], no-redeclare: 'error' */
|
|
19
|
-
/* global
|
|
19
|
+
/* global NonNullable, Partial, Readonly, ReadonlyArray, $FlowFixMe */
|
|
20
20
|
|
|
21
21
|
'use strict';
|
|
22
22
|
|
package/dist/index.js
CHANGED
package/dist/predicates.js
CHANGED
package/dist/selectors.js
CHANGED
package/dist/selectors.js.flow
CHANGED
|
@@ -20,7 +20,7 @@ export type ESQueryNodeSelectors = {
|
|
|
20
20
|
// 'FunctionDeclaration[id="foo"]'(node: FunctionDeclaration) {...}
|
|
21
21
|
// But this sucks as it means someone would then have to manually do an \`if\`
|
|
22
22
|
// check inside the selector body.
|
|
23
|
-
|
|
23
|
+
readonly [selector: string]: (node: $FlowFixMe) => void,
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
export type {ESQueryNodeSelectorsWithoutFallback} from './generated/HermesESTreeSelectorTypes';
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* strict-local
|
|
8
8
|
* @generated
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
/* eslint no-undef: 'error', no-unused-vars: ['error', {vars: "local"}], no-redeclare: 'error' */
|
|
19
19
|
|
|
20
|
-
/* global
|
|
20
|
+
/* global NonNullable, Partial, Readonly, ReadonlyArray, $FlowFixMe */
|
|
21
21
|
'use strict';
|
|
22
22
|
/*::
|
|
23
23
|
import type {
|
package/dist/src/index.js
CHANGED
package/dist/src/predicates.js
CHANGED
package/dist/src/selectors.js
CHANGED
package/dist/src/types.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* strict
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
'use strict';
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* IMPORTANT NOTE
|
|
14
14
|
*
|
|
15
|
-
* This file intentionally uses interfaces and
|
|
15
|
+
* This file intentionally uses interfaces and `readonly` fields.
|
|
16
16
|
*
|
|
17
17
|
* - `$ReadOnly` is an "evaluated" utility type in flow; meaning that flow does
|
|
18
18
|
* not actually calculate the resulting type until it is used. This creates
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* - but in this giant circular-referencing graph that is the AST types, this
|
|
23
23
|
* causes check times for consumers to be awful.
|
|
24
24
|
*
|
|
25
|
-
* Thus instead we manually annotate properties with
|
|
25
|
+
* Thus instead we manually annotate properties with `readonly` to avoid the `$ReadOnly` type.
|
|
26
26
|
*
|
|
27
27
|
* - `...Type` spreads do not preserve the readonly-ness of the properties. If
|
|
28
28
|
* we used object literal types then we would have to `$ReadOnly` all spreads
|
|
@@ -34,6 +34,54 @@
|
|
|
34
34
|
*** Please ensure all properties are marked as readonly! ***
|
|
35
35
|
*/
|
|
36
36
|
|
|
37
|
+
/*
|
|
38
|
+
* Token and Comment are pseudo-nodes to represent pieces of source code
|
|
39
|
+
*
|
|
40
|
+
* NOTE:
|
|
41
|
+
* They are not included in the `ESNode` union below on purpose because they
|
|
42
|
+
* are not ever included as part of the standard AST tree.
|
|
43
|
+
*/
|
|
44
|
+
// note: this is only ever present on Program.interpreter, never in the body
|
|
45
|
+
// Flow declares a "Node" type as part of its HTML typedefs.
|
|
46
|
+
// Because this file declares global types - we can't clash with it
|
|
47
|
+
// nodes that can be the direct parent of a statement
|
|
48
|
+
// nodes that can be the parent of a statement that store the statements in an array
|
|
49
|
+
// This is the complete type of a "Property"
|
|
50
|
+
// This same node (unfortunately) covers both object literal properties
|
|
51
|
+
// and object desturcturing properties.
|
|
52
|
+
// Private brand checks (#foo in bar) are a special case
|
|
53
|
+
// other binary expressions do not allow PrivateIdentifier in the left
|
|
54
|
+
// `PropertyDefinition` is the new standard for all class properties
|
|
55
|
+
|
|
56
|
+
/***********************
|
|
57
|
+
* Flow specific nodes *
|
|
58
|
+
***********************/
|
|
59
|
+
// type T = { [[foo]]: number };
|
|
60
|
+
|
|
61
|
+
/*****************
|
|
62
|
+
* Declare nodes *
|
|
63
|
+
*****************/
|
|
64
|
+
|
|
65
|
+
/**********************
|
|
66
|
+
* JSX specific nodes *
|
|
67
|
+
**********************/
|
|
68
|
+
|
|
69
|
+
/************************************
|
|
70
|
+
* Match expressions and statements *
|
|
71
|
+
************************************/
|
|
72
|
+
|
|
73
|
+
/******************
|
|
74
|
+
* Match patterns *
|
|
75
|
+
******************/
|
|
76
|
+
|
|
77
|
+
/***********
|
|
78
|
+
* Records *
|
|
79
|
+
***********/
|
|
80
|
+
|
|
81
|
+
/******************************************************
|
|
82
|
+
* Deprecated spec nodes awaiting migration by Hermes *
|
|
83
|
+
******************************************************/
|
|
84
|
+
|
|
37
85
|
Object.defineProperty(exports, "__esModule", {
|
|
38
86
|
value: true
|
|
39
87
|
});
|
package/dist/types.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* strict
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
'use strict';
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* IMPORTANT NOTE
|
|
14
14
|
*
|
|
15
|
-
* This file intentionally uses interfaces and
|
|
15
|
+
* This file intentionally uses interfaces and `readonly` fields.
|
|
16
16
|
*
|
|
17
17
|
* - `$ReadOnly` is an "evaluated" utility type in flow; meaning that flow does
|
|
18
18
|
* not actually calculate the resulting type until it is used. This creates
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* - but in this giant circular-referencing graph that is the AST types, this
|
|
23
23
|
* causes check times for consumers to be awful.
|
|
24
24
|
*
|
|
25
|
-
* Thus instead we manually annotate properties with
|
|
25
|
+
* Thus instead we manually annotate properties with `readonly` to avoid the `$ReadOnly` type.
|
|
26
26
|
*
|
|
27
27
|
* - `...Type` spreads do not preserve the readonly-ness of the properties. If
|
|
28
28
|
* we used object literal types then we would have to `$ReadOnly` all spreads
|
|
@@ -34,6 +34,54 @@
|
|
|
34
34
|
*** Please ensure all properties are marked as readonly! ***
|
|
35
35
|
*/
|
|
36
36
|
|
|
37
|
+
/*
|
|
38
|
+
* Token and Comment are pseudo-nodes to represent pieces of source code
|
|
39
|
+
*
|
|
40
|
+
* NOTE:
|
|
41
|
+
* They are not included in the `ESNode` union below on purpose because they
|
|
42
|
+
* are not ever included as part of the standard AST tree.
|
|
43
|
+
*/
|
|
44
|
+
// note: this is only ever present on Program.interpreter, never in the body
|
|
45
|
+
// Flow declares a "Node" type as part of its HTML typedefs.
|
|
46
|
+
// Because this file declares global types - we can't clash with it
|
|
47
|
+
// nodes that can be the direct parent of a statement
|
|
48
|
+
// nodes that can be the parent of a statement that store the statements in an array
|
|
49
|
+
// This is the complete type of a "Property"
|
|
50
|
+
// This same node (unfortunately) covers both object literal properties
|
|
51
|
+
// and object desturcturing properties.
|
|
52
|
+
// Private brand checks (#foo in bar) are a special case
|
|
53
|
+
// other binary expressions do not allow PrivateIdentifier in the left
|
|
54
|
+
// `PropertyDefinition` is the new standard for all class properties
|
|
55
|
+
|
|
56
|
+
/***********************
|
|
57
|
+
* Flow specific nodes *
|
|
58
|
+
***********************/
|
|
59
|
+
// type T = { [[foo]]: number };
|
|
60
|
+
|
|
61
|
+
/*****************
|
|
62
|
+
* Declare nodes *
|
|
63
|
+
*****************/
|
|
64
|
+
|
|
65
|
+
/**********************
|
|
66
|
+
* JSX specific nodes *
|
|
67
|
+
**********************/
|
|
68
|
+
|
|
69
|
+
/************************************
|
|
70
|
+
* Match expressions and statements *
|
|
71
|
+
************************************/
|
|
72
|
+
|
|
73
|
+
/******************
|
|
74
|
+
* Match patterns *
|
|
75
|
+
******************/
|
|
76
|
+
|
|
77
|
+
/***********
|
|
78
|
+
* Records *
|
|
79
|
+
***********/
|
|
80
|
+
|
|
81
|
+
/******************************************************
|
|
82
|
+
* Deprecated spec nodes awaiting migration by Hermes *
|
|
83
|
+
******************************************************/
|
|
84
|
+
|
|
37
85
|
Object.defineProperty(exports, "__esModule", {
|
|
38
86
|
value: true
|
|
39
87
|
});
|