Skip to content

chore: update dependencies#62

Merged
mvantellingen merged 1 commit intomainfrom
chore/update-deps
Mar 18, 2026
Merged

chore: update dependencies#62
mvantellingen merged 1 commit intomainfrom
chore/update-deps

Conversation

@mvantellingen
Copy link
Member

@mvantellingen mvantellingen commented Mar 18, 2026

This pull request introduces several improvements and updates to dependencies, testing, and configuration for the @labdigital/graphql-fetcher package. The most notable change is the migration of tests from vitest-fetch-mock to msw, providing more robust and realistic HTTP request mocking. Additional changes include updating dependencies, refining Biome linting configuration, and switching the build tool from tsup to tsdown.

Dependency and build tool updates:

  • Updated multiple dependencies in package.json to their latest versions, including @apollo/server-gateway-interface, @biomejs/biome, @changesets/cli, @graphql-typed-document-node/core, @types/react, @vitest/coverage-v8, and replaced tsup with tsdown as the build tool. Added msw for HTTP mocking, and specified a pnpm override for rollup.
  • Added a changeset entry to document the dependency updates for the package.
  • Changed the build script in package.json to use tsdown instead of tsup.

Testing improvements:

  • Migrated all test files (src/client.test.ts, src/server.test.ts) from using vitest-fetch-mock to msw for HTTP mocking. This includes setting up a mock server, using handlers for HTTP requests, and updating assertions to use spies on the global fetch function. This results in more realistic and reliable test scenarios for GraphQL fetchers. [1] [2]
  • Refactored test logic to use msw handlers and fetch spies, ensuring proper cleanup and more accurate call assertions in both client and server tests. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]

Configuration and linting enhancements:

  • Updated biome.json to improve file inclusion rules, refine linting settings (especially for console usage and suspicious code), and update the nursery configuration. [1] [2] [3]

Code quality and minor fixes:

  • Improved type safety in src/client.ts by refining the query string generation logic and cleaning up variable initialization. [1] [2]

These changes collectively modernize the package, improve test reliability, and ensure better code quality and maintainability.

@changeset-bot
Copy link

changeset-bot bot commented Mar 18, 2026

🦋 Changeset detected

Latest commit: 7ec9911

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

This PR includes changesets to release 1 package
Name Type
@labdigital/graphql-fetcher Minor

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

@mvantellingen mvantellingen force-pushed the chore/update-deps branch 2 times, most recently from e6b5705 to b8a3f50 Compare March 18, 2026 10:06
This also moves the test to use msw
@mvantellingen mvantellingen merged commit 1bf53a8 into main Mar 18, 2026
8 checks passed
@mvantellingen mvantellingen deleted the chore/update-deps branch March 18, 2026 10:51
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.

1 participant