Skip to content

Commit

Permalink
Merge pull request #240 from jetstreamapp/revert-breaking-change
Browse files Browse the repository at this point in the history
Revert breaking change type WhereClauseWithoutOperator
  • Loading branch information
paustint authored Jan 13, 2024
2 parents 8b458bb + 70a0f9d commit fccf925
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 4.10.1

Jan 13, 2024

Revert accidental breaking change to types. `WhereClause` left can have `null` in the negation case, but the types did not represent this.
Updating types to match reality is a breaking change for consumers, so worked around issue and will publish version 5 with breaking change.

## 4.10.0

Jan 13, 2024
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "soql-parser-js",
"version": "4.10.0",
"version": "4.10.1",
"description": "Salesforce.com SOQL parser and composer",
"main": "dist/index.js",
"module": "dist_esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/api/api-models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export interface Subquery extends QueryBase {
export type WhereClause = WhereClauseWithoutOperator | WhereClauseWithRightCondition;

export interface WhereClauseWithoutOperator {
left: ConditionWithValueQuery | null;
left: ConditionWithValueQuery;
}

export interface WhereClauseWithRightCondition extends WhereClauseWithoutOperator {
Expand Down
2 changes: 1 addition & 1 deletion src/parser/visitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ class SOQLVisitor extends BaseSoqlVisitor {

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

0 comments on commit fccf925

Please sign in to comment.