@balena/odata-parser 2.4.5 → 2.4.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/.versionbot/CHANGELOG.yml +12 -1
- package/CHANGELOG.md +5 -0
- package/odata-parser.d.ts +12 -4
- package/package.json +2 -2
- package/tsconfig.json +2 -1
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
- commits:
|
|
2
|
+
- subject: Improve typings
|
|
3
|
+
hash: ed5fa5675021485a775eb777f2358d8041b93ce1
|
|
4
|
+
body: ""
|
|
5
|
+
footer:
|
|
6
|
+
Change-type: patch
|
|
7
|
+
change-type: patch
|
|
8
|
+
author: Pagan Gazzard
|
|
9
|
+
version: 2.4.6
|
|
10
|
+
title: ""
|
|
11
|
+
date: 2023-02-24T17:00:10.268Z
|
|
1
12
|
- commits:
|
|
2
13
|
- subject: Use const/let as appropriate
|
|
3
14
|
hash: 0824fe7d85eeb97941319749fc802f9bae3c9fb6
|
|
@@ -8,7 +19,7 @@
|
|
|
8
19
|
author: Pagan Gazzard
|
|
9
20
|
version: 2.4.5
|
|
10
21
|
title: ""
|
|
11
|
-
date: 2023-02-23T16:
|
|
22
|
+
date: 2023-02-23T16:31:08.299Z
|
|
12
23
|
- commits:
|
|
13
24
|
- subject: Use shorthand object notation
|
|
14
25
|
hash: 611c0480681965c7af06302264eac79fea18bded
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file
|
|
|
4
4
|
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
|
|
5
5
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
|
|
7
|
+
# v2.4.6
|
|
8
|
+
## (2023-02-24)
|
|
9
|
+
|
|
10
|
+
* Improve typings [Pagan Gazzard]
|
|
11
|
+
|
|
7
12
|
# v2.4.5
|
|
8
13
|
## (2023-02-23)
|
|
9
14
|
|
package/odata-parser.d.ts
CHANGED
|
@@ -10,7 +10,8 @@ export type SupportedMethod =
|
|
|
10
10
|
/**
|
|
11
11
|
* string for a parameter alias reference, number for an extracted constant
|
|
12
12
|
*/
|
|
13
|
-
export type
|
|
13
|
+
export type BindKey = `@${string}` | number;
|
|
14
|
+
export type BindReference = { bind: BindKey };
|
|
14
15
|
|
|
15
16
|
export type NumberBind = ['Real', number];
|
|
16
17
|
export type BooleanBind = ['Boolean', boolean];
|
|
@@ -88,8 +89,8 @@ export interface ODataQuery extends ResourceOptions {
|
|
|
88
89
|
link?: any;
|
|
89
90
|
property?: any;
|
|
90
91
|
}
|
|
91
|
-
export interface ODataBinds extends Array<any> {
|
|
92
|
-
[key: string]: any;
|
|
92
|
+
export interface ODataBinds extends Array<[type: string, value: any]> {
|
|
93
|
+
[key: `@${string}`]: [type: string, value: any];
|
|
93
94
|
}
|
|
94
95
|
|
|
95
96
|
export class SyntaxError extends Error {}
|
|
@@ -104,7 +105,7 @@ export function parse(
|
|
|
104
105
|
url: string,
|
|
105
106
|
opts?: { startRule: 'ProcessRule'; rule: 'KeyBind' },
|
|
106
107
|
): {
|
|
107
|
-
tree:
|
|
108
|
+
tree: BindReference;
|
|
108
109
|
binds: ODataBinds;
|
|
109
110
|
};
|
|
110
111
|
export function parse(
|
|
@@ -114,6 +115,13 @@ export function parse(
|
|
|
114
115
|
tree: FilterOption;
|
|
115
116
|
binds: ODataBinds;
|
|
116
117
|
};
|
|
118
|
+
export function parse(
|
|
119
|
+
url: string,
|
|
120
|
+
opts?: { startRule: 'ProcessRule'; rule: 'QueryOptions' },
|
|
121
|
+
): {
|
|
122
|
+
tree: ODataOptions;
|
|
123
|
+
binds: ODataBinds;
|
|
124
|
+
};
|
|
117
125
|
export function parse(
|
|
118
126
|
url: string,
|
|
119
127
|
opts?: { startRule: 'ProcessRule'; rule: string },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@balena/odata-parser",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.6",
|
|
4
4
|
"description": "An OData parser written in OMeta",
|
|
5
5
|
"main": "odata-parser.js",
|
|
6
6
|
"scripts": {
|
|
@@ -37,6 +37,6 @@
|
|
|
37
37
|
"_": "test/run.js"
|
|
38
38
|
},
|
|
39
39
|
"versionist": {
|
|
40
|
-
"publishedAt": "2023-02-
|
|
40
|
+
"publishedAt": "2023-02-24T17:00:10.410Z"
|
|
41
41
|
}
|
|
42
42
|
}
|