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

migrate @graphiql/toolkit to tsup #3746

Merged
merged 5 commits into from
Aug 23, 2024
Merged

migrate @graphiql/toolkit to tsup #3746

merged 5 commits into from
Aug 23, 2024

Conversation

dimaMachina
Copy link
Collaborator

make package independent from tsc with own dev/build scripts, will be possible to fix #3668 later

Copy link

changeset-bot bot commented Aug 23, 2024

🦋 Changeset detected

Latest commit: b5b118a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@graphiql/toolkit Minor
@graphiql/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment on lines -19 to +22
let httpFetch;
if (typeof window !== 'undefined' && window.fetch) {
httpFetch = window.fetch;
}
if (
options?.enableIncrementalDelivery === null ||
options.enableIncrementalDelivery !== false
) {
options.enableIncrementalDelivery = true;
}
if (options.fetch) {
httpFetch = options.fetch;
}
const httpFetch =
options.fetch || (typeof window !== 'undefined' && window.fetch);
if (!httpFetch) {
throw new Error('No valid fetcher implementation available');
}
options.enableIncrementalDelivery =
options.enableIncrementalDelivery !== false;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplified these parts

Copy link

codecov bot commented Aug 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.24%. Comparing base (26cd829) to head (b5b118a).
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3746      +/-   ##
==========================================
- Coverage   67.29%   67.24%   -0.05%     
==========================================
  Files         121      121              
  Lines        7017     7007      -10     
  Branches     2269     2259      -10     
==========================================
- Hits         4722     4712      -10     
  Misses       2278     2278              
  Partials       17       17              
Files Coverage Δ
...aphiql-toolkit/src/create-fetcher/createFetcher.ts 44.00% <100.00%> (-7.62%) ⬇️
...ackages/graphiql-toolkit/src/create-fetcher/lib.ts 59.32% <100.00%> (+0.70%) ⬆️
...phiql-toolkit/src/graphql-helpers/auto-complete.ts 0.00% <ø> (ø)
...hiql-toolkit/src/graphql-helpers/operation-name.ts 25.00% <ø> (ø)

... and 1 file with indirect coverage changes

Copy link
Contributor

The latest changes of this PR are available as canary in npm (based on the declared changesets):

@dimaMachina dimaMachina merged commit 2ad4e75 into main Aug 23, 2024
14 checks passed
@dimaMachina dimaMachina deleted the migrate-toolkit-to-tsup branch August 23, 2024 18:35
@acao acao mentioned this pull request Aug 23, 2024
dimaMachina added a commit that referenced this pull request Aug 23, 2024
* aa

* removes unneeded `undefined`

* try

* fix

* fix vitest
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.

[graphiql] CommonJS syntax in ESM build
1 participant