Skip to content

Commit fccf925

Browse files
authored
Merge pull request #240 from jetstreamapp/revert-breaking-change
Revert breaking change type WhereClauseWithoutOperator
2 parents 8b458bb + 70a0f9d commit fccf925

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 4.10.1
4+
5+
Jan 13, 2024
6+
7+
Revert accidental breaking change to types. `WhereClause` left can have `null` in the negation case, but the types did not represent this.
8+
Updating types to match reality is a breaking change for consumers, so worked around issue and will publish version 5 with breaking change.
9+
310
## 4.10.0
411

512
Jan 13, 2024

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "soql-parser-js",
3-
"version": "4.10.0",
3+
"version": "4.10.1",
44
"description": "Salesforce.com SOQL parser and composer",
55
"main": "dist/index.js",
66
"module": "dist_esm/index.js",

src/api/api-models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export interface Subquery extends QueryBase {
157157
export type WhereClause = WhereClauseWithoutOperator | WhereClauseWithRightCondition;
158158

159159
export interface WhereClauseWithoutOperator {
160-
left: ConditionWithValueQuery | null;
160+
left: ConditionWithValueQuery;
161161
}
162162

163163
export interface WhereClauseWithRightCondition extends WhereClauseWithoutOperator {

src/parser/visitor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ class SOQLVisitor extends BaseSoqlVisitor {
733733

734734
expressionPartWithNegation(ctx: any) {
735735
const output: Partial<WhereClauseWithRightCondition> = {
736-
left: ctx.L_PAREN ? { openParen: ctx.L_PAREN.length } : null,
736+
left: ctx.L_PAREN ? { openParen: ctx.L_PAREN.length } : (null as any), // FIXME: type does not allow null, but changing is a breaking change
737737
operator: 'NOT',
738738
right: {
739739
left: {} as ValueCondition,

0 commit comments

Comments
 (0)