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

fix: remove @types/jsdom dependency #12107

Merged
merged 2 commits into from
Dec 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

### Performance

## 27.4.3

### Fixes

- `[jest-environment-jsdom]` Remove `@types/jsdom` dependency (and make its `dom` property `private`) ([#12107](https://github.com/facebook/jest/pull/12107))

## 27.4.2

### Fixes
Expand Down
4 changes: 2 additions & 2 deletions packages/jest-environment-jsdom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
"@jest/environment": "^27.4.2",
"@jest/fake-timers": "^27.4.2",
"@jest/types": "^27.4.2",
"@types/jsdom": "^16.2.4",
"@types/node": "*",
"jest-mock": "^27.4.2",
"jest-util": "^27.4.2",
"jsdom": "^16.6.0"
},
"devDependencies": {
"@jest/test-utils": "^27.4.2"
"@jest/test-utils": "^27.4.2",
"@types/jsdom": "^16.2.4"
},
"engines": {
"node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/jest-environment-jsdom/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ type Win = Window &
};

class JSDOMEnvironment implements JestEnvironment<number> {
dom: JSDOM | null;
private dom: JSDOM | null;
fakeTimers: LegacyFakeTimers<number> | null;
fakeTimersModern: ModernFakeTimers | null;
global: Win;
errorEventListener: ((event: Event & {error: Error}) => void) | null;
private errorEventListener: ((event: Event & {error: Error}) => void) | null;
moduleMocker: ModuleMocker | null;

constructor(config: Config.ProjectConfig, options?: EnvironmentContext) {
Expand Down