-
Notifications
You must be signed in to change notification settings - Fork 21
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
Conversation
lib/shared/index.ts
Outdated
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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.)
This PR:
DOM
intsconfig.json
- previously we required all callers to either also haveDOM
or to disable library typechecking@types/node
andtypescript
to latestBodyInit
type fromundici
No runtime code changes are made