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

fix: compatibility with TypeScript 5.5 and Yarn Berry #3730

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/old-ears-hunt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@urql/exchange-graphcache': patch
'@urql/core': patch
---

Fix compatibility with typescript 5.5 and Yarn Berry
10 changes: 8 additions & 2 deletions exchanges/graphcache/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,16 @@
"prepublishOnly": "run-s clean build"
},
"peerDependencies": {
"@urql/core": "^5.0.0"
"@urql/core": "^5.0.0",
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
},
"peerDependenciesMeta": {
"graphql": {
"optional": true
}
},
"dependencies": {
"@0no-co/graphql.web": "^1.0.5",
"@0no-co/graphql.web": "^1.0.13",
"@urql/core": "workspace:^5.1.0",
"wonka": "^6.3.2"
},
Expand Down
2 changes: 1 addition & 1 deletion exchanges/graphcache/src/ast/graphql.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type * as GraphQL from 'graphql';

type OrNever<T> = 0 extends 1 & T ? never : T;
type OrNever<T> = void extends T ? never : T;

export type IntrospectionQuery =
| {
Expand Down
3 changes: 2 additions & 1 deletion exchanges/graphcache/src/operations/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { CombinedError, ErrorLike, FormattedNode } from '@urql/core';
import type {
InlineFragmentNode,
FragmentDefinitionNode,
FieldNode,
} from '@0no-co/graphql.web';
import { Kind } from '@0no-co/graphql.web';

Expand Down Expand Up @@ -211,7 +212,7 @@ export class SelectionIterator {
];
}

next() {
next(): FormattedNode<FieldNode> | undefined {
while (this.stack.length > 0) {
let state = this.stack[this.stack.length - 1];
while (state.index < state.selectionSet.length) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
}
},
"devDependencies": {
"@0no-co/graphql.web": "^1.0.8",
"@0no-co/graphql.web": "^1.0.13",
"@actions/artifact": "^2.0.0",
"@actions/core": "^1.10.1",
"@babel/core": "^7.25.2",
Expand Down
10 changes: 9 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,17 @@
"jsr": "jsr publish"
},
"dependencies": {
"@0no-co/graphql.web": "^1.0.5",
"@0no-co/graphql.web": "^1.0.13",
"wonka": "^6.3.2"
},
"peerDependencies": {
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
},
"peerDependenciesMeta": {
"graphql": {
"optional": true
}
},
"publishConfig": {
"access": "public",
"provenance": true
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/utils/graphql.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type * as GraphQLWeb from '@0no-co/graphql.web';
import type * as GraphQL from 'graphql';

type OrNever<T> = 0 extends 1 & T ? never : T;
type OrNever<T> = void extends T ? never : T;

export type GraphQLError =
| GraphQLWeb.GraphQLError
Expand Down
Loading
Loading