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

feat: [AUTH-4057] Clean up dependecy on DOM type usage #336

Merged
merged 3 commits into from
Sep 4, 2024

Conversation

max-stytch
Copy link
Contributor

This PR:

  • eliminates the use of DOM in tsconfig.json - previously we required all callers to either also have DOM or to disable library typechecking
  • Updates @types/node and typescript to latest
  • Starts to import the BodyInit type from undici

No runtime code changes are made

Comment on lines 46 to 47
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use @ts-expect-error here instead, which has the benefit of introducing an error when/if the line below no longer has an error that needs to be suppressed. (ban-ts-comment is often configured to allow @ts-expect-error + an explanatory comment, to encourage this pattern.)

package.json Outdated
@@ -40,14 +40,14 @@
"@babel/preset-env": "^7.22.20",
"@babel/preset-typescript": "^7.23.0",
"@types/jest": "^29.5.5",
"@types/node": "^18.18.3",
"@types/node": "^22.5.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

22 isn't LTS yet--I would be inclined to pin this to the oldest major/minor version we still support to reduce the odds we start depending on APIs exclusive to newer versions. (It's imperfect because there could still be breaking API changes in newer versions that we miss, but I think that's less of a risk.)

@max-stytch max-stytch merged commit 2624ba5 into main Sep 4, 2024
11 checks passed
@max-stytch max-stytch deleted the max-auth-4057 branch September 4, 2024 18:41
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