Skip to content

Commit

Permalink
fix: remove @types/jsdom dependency (#12107)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB authored Dec 1, 2021
1 parent 26abf9a commit f9814d2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
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

0 comments on commit f9814d2

Please sign in to comment.