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: update min ts version of jest & co to 3.8 to allow bumping dependencies #48473

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion types/expect-puppeteer/index.d.ts
Expand Up @@ -4,7 +4,7 @@
// Tanguy Krotoff <https://github.com/tkrotoff>
// Jason Mong <https://github.com/jfm710>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.1
// TypeScript Version: 3.8

/// <reference types="jest" />

Expand Down
2 changes: 1 addition & 1 deletion types/frisby/index.d.ts
Expand Up @@ -3,7 +3,7 @@
// Definitions by: Christopher E. Woodland <https://github.com/cwoodland>
// Johnny Li <https://github.com/johnny4753>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.1
// TypeScript Version: 3.8

/// <reference types='jest'/>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't actually think this is needed - I can't find any evidence of @types/jest being used in this file, but will look into it further once I've got CI green.

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 seems that the original reference was to jasmine, and was because it was argumenting the global jasmine namespace.

However, while v2 of @types/frisby removed this argumenting, the reference was kept in because the author wanted to have @types/jasmine pulled in because the library used jasmine?

I can understand why, and am not against it, but I think it would be better to remove this reference since frisby.js doesn't list jest as a dependency (not even as a peerDependency) nor does it require/import it anywhere, and because people using TypeScript will need to install @types/jest anyway as they'll be consuming them directly.

Additionally, the source code of frisby still references jasmine rather than jest, and was originally switched to jest as the jasmine types were causing problems (#32191).

@cwoodland @johnny4753 thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've made #48935 to remove the reference.


Expand Down
2 changes: 1 addition & 1 deletion types/heft-jest/index.d.ts
Expand Up @@ -3,7 +3,7 @@
// Definitions by: Pete Gonzalez <https://github.com/octogonz>
// Ian Clanton-Thuon <https://github.com/iclanton>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.5
// TypeScript Version: 3.8
Copy link
Contributor

Choose a reason for hiding this comment

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

Heft currently ships with Jest 25. Seems like this change should wait until Heft upgrades its Jest dependency.

Copy link
Contributor Author

@G-Rath G-Rath Oct 4, 2020

Choose a reason for hiding this comment

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

Any idea of when that might be?

I don't think this'll be a problem so long as Heft can support TypeScript 3.8, which by the looks of it it can.


/// <reference types="jest" />
/// <reference path="./mocked.d.ts" />
Expand Down
2 changes: 1 addition & 1 deletion types/jest-axe/index.d.ts
Expand Up @@ -3,7 +3,7 @@
// Definitions by: Josh Goldberg <https://github.com/JoshuaKGoldberg>
// erbridge <https://github.com/erbridge>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.1
// TypeScript Version: 3.8

/// <reference types="jest" />

Expand Down
2 changes: 1 addition & 1 deletion types/jest-expect-message/index.d.ts
Expand Up @@ -3,7 +3,7 @@
// Definitions by: Mike Davydov <https://github.com/mike-d-davydov>
// Michael Bashurov <https://github.com/saitonakamura>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.4
// TypeScript Version: 3.8

/// <reference types="jest"/>

Expand Down
2 changes: 1 addition & 1 deletion types/jest-image-snapshot/index.d.ts
Expand Up @@ -4,7 +4,7 @@
// erbridge <https://github.com/erbridge>
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.1
// TypeScript Version: 3.8

/// <reference types="jest" />
import { PixelmatchOptions } from 'pixelmatch';
Expand Down
2 changes: 1 addition & 1 deletion types/jest-image-snapshot/v2/index.d.ts
Expand Up @@ -3,7 +3,7 @@
// Definitions by: Janeene Beeforth <https://github.com/dawnmist>
// erbridge <https://github.com/erbridge>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.1
// TypeScript Version: 3.8

/// <reference types="jest" />

Expand Down
2 changes: 1 addition & 1 deletion types/jest-in-case/index.d.ts
Expand Up @@ -2,7 +2,7 @@
// Project: https://github.com/thinkmill/jest-in-case#readme
// Definitions by: Geovani de Souza <https://github.com/geovanisouza92>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.1
// TypeScript Version: 3.8

/// <reference types="jest" />
/// <reference types="node" />
Expand Down
2 changes: 1 addition & 1 deletion types/jest-json-schema/index.d.ts
Expand Up @@ -3,7 +3,7 @@
// Definitions by: Igor Korolev <https://github.com/deadNightTiger>
// Matt Scheurich <https://github.com/lvl99>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.1
// TypeScript Version: 3.8

/// <reference types="jest" />
import * as ajv from 'ajv';
Expand Down
2 changes: 1 addition & 1 deletion types/jest-matcher-one-of/index.d.ts
Expand Up @@ -2,7 +2,7 @@
// Project: https://github.com/d4nyll/jest-matcher-one-of#readme
// Definitions by: Joe Mitchard <https://github.com/joemitchard>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.1
// TypeScript Version: 3.8

/// <reference types="jest" />
declare namespace jest {
Expand Down
2 changes: 1 addition & 1 deletion types/jest-plugin-context/index.d.ts
Expand Up @@ -2,7 +2,7 @@
// Project: https://github.com/negativetwelve/jest-plugins/tree/master/packages/jest-plugin-context, https://github.com/negativetwelve/jest-plugins
// Definitions by: Jonas Heinrich <https://github.com/jonasheinrich>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.1
// TypeScript Version: 3.8

/// <reference types="jest" />

Expand Down
2 changes: 1 addition & 1 deletion types/jest-specific-snapshot/index.d.ts
Expand Up @@ -2,7 +2,7 @@
// Project: https://github.com/igor-dv/jest-specific-snapshot#readme
// Definitions by: Janeene Beeforth <https://github.com/dawnmist>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.1
// TypeScript Version: 3.8

/// <reference types="jest" />

Expand Down
2 changes: 1 addition & 1 deletion types/jest-when/index.d.ts
Expand Up @@ -5,7 +5,7 @@
// Gregor Stamać <https://github.com/gstamac>
// Valentin Stern <https://github.com/sehsyha>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.1
// TypeScript Version: 3.8

/// <reference types="jest" />

Expand Down
1 change: 1 addition & 0 deletions types/jest/index.d.ts
Expand Up @@ -28,6 +28,7 @@
// Pawel Fajfer <https://github.com/pawfa>
// Regev Brody <https://github.com/regevbr>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 3.8
Copy link
Contributor

@ExE-Boss ExE-Boss Oct 4, 2020

Choose a reason for hiding this comment

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

For the sake of consistency, this should be:

Suggested change
// Minimum TypeScript Version: 3.8
// TypeScript Version: 3.8

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See, I'd prefer that for consistency, but the readme says it should have that word 🤔


declare var beforeAll: jest.Lifecycle;
declare var beforeEach: jest.Lifecycle;
Expand Down
4 changes: 2 additions & 2 deletions types/jest/package.json
@@ -1,7 +1,7 @@
{
"private": true,
"dependencies": {
"jest-diff": "^25.2.1",
"pretty-format": "^25.2.1"
"jest-diff": "^26.0.0",
"pretty-format": "^26.0.0"
}
}
2 changes: 1 addition & 1 deletion types/testing-library__jest-dom/index.d.ts
Expand Up @@ -4,7 +4,7 @@
// John Gozde <https://github.com/jgoz>
// Seth Macpherson <https://github.com/smacpherson64>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.1
// TypeScript Version: 3.8

/// <reference types="jest" />

Expand Down
2 changes: 1 addition & 1 deletion types/wordpress__jest-console/index.d.ts
Expand Up @@ -2,7 +2,7 @@
// Project: https://github.com/WordPress/gutenberg/blob/master/packages/jest-console/README.md
// Definitions by: Damien Sorel <https://github.com/mistic100>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.1
// TypeScript Version: 3.8

/// <reference types="jest" />

Expand Down