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

GQL-23: Implements esbuild #104

Merged
merged 5 commits into from
Mar 26, 2024
Merged

GQL-23: Implements esbuild #104

merged 5 commits into from
Mar 26, 2024

Conversation

macrouch
Copy link
Contributor

Overview

What is the feature?

Updates repo to use esbuild over webpack. Also updated test suite to use Vitest over Jest in order to update packages.

What areas of the application does this impact?

Builds, tests

Testing

Ensure npm start works, ensure npm test works.

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (a60de35) to head (f4d996e).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #104   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           87        89    +2     
  Lines         1882      1886    +4     
  Branches       222       222           
=========================================
+ Hits          1882      1886    +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

coverage: {
enabled: true,
exclude: [
'**/handler.js'
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this exclude handler.js files from the code coverage report and if so why is that necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does exclude that file. Each test creates its own instance of ApolloServer, which is mostly all the handler does. There might be a way to test that file better, but we haven't spent the time to do that. This setting was copied from the previous setup, so the coverage report stays consistent.

Copy link
Member

Choose a reason for hiding this comment

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

The only work that the handler does that isn't an external library is the acceptance of the authentication headers, that could be pulled into a util or something to make it testable. The important part of this is that the code is actually tested because it runs in many tests, its just the coverage is ignored.

},
"overrides": {
"graphql-parse-resolve-info": {
"graphql": "^16"
"graphql": "$graphql"
Copy link
Member

Choose a reason for hiding this comment

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

What does this do? It's a vastly different value than it was previously

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is how we do the overrides in other apps, it tells npm to use the version of graphql we specified when we installed the package. So if we upgrade it at some point using $graphql keeps us from having to change this value to ^17

Copy link
Member

Choose a reason for hiding this comment

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

Ah, neat.

@macrouch macrouch merged commit 4c3e681 into main Mar 26, 2024
6 checks passed
@macrouch macrouch deleted the GQL-23 branch March 26, 2024 19:08
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.

5 participants