Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump version from 2.1.0 to 2.1.1 #276

Merged
merged 1 commit into from
Jul 19, 2024
Merged

Bump version from 2.1.0 to 2.1.1 #276

merged 1 commit into from
Jul 19, 2024

Conversation

ecooper
Copy link
Contributor

@ecooper ecooper commented Jul 18, 2024

Patch release for #275.

In the current version (2.1.0), ConstraintFailure had incorrect types for paths:

// v2.1.0 Type declaration in wire-protocol.ts...
export type ConstraintFailure = {
  /** Description of the constraint failure */
  message: string;
  /** Name of the failed constraint */
  name?: string;
  /** Path into the write input data to which the failure applies */
  paths?: Array<number | string>;
};

In #275, paths was updated to match what Fauna returns at runtime :

// v2.1.1 Type declaration in wire-protocol.ts...
export type ConstraintFailure = {
  /** Description of the constraint failure */
  message: string;
  /** Name of the failed constraint */
  name?: string;
  /** Path into the write input data to which the failure applies */
  paths?: Array<Array<number | string>>;
};

Because of the nature of #275, you could argue this change is backwards incompatible because the types for the ConstraintFailureError are changing in an incompatible way. However, if any code actually uses paths at runtime and expected a single array vs a nested one, it would fail at runtime. Code not specifically relying on the structure of paths is not impacted. With all that in mind, the team agreed that a patch is most suitable instead of a more dogmatic major version release, but this PR can be used to debate that if need be.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ecooper ecooper merged commit bc937a5 into main Jul 19, 2024
5 checks passed
@ecooper ecooper deleted the bump-2.1.1 branch July 19, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants