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(jest): Add ./global-types as an alias to ./index #51587
Conversation
@qnighy Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PR
Code ReviewsBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged. Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. InactiveThis PR has been inactive for 31 days — it is considered abandoned, and therefore closed! Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 51587,
"author": "qnighy",
"headCommitOid": "614b1fd722239dbcc99d3e8223f2bd79fd0a502c",
"lastPushDate": "2021-03-07T04:23:50.000Z",
"lastActivityDate": "2021-03-07T04:23:50.000Z",
"maintainerBlessed": false,
"hasMergeConflict": false,
"isFirstContribution": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "jest",
"kind": "edit",
"files": [
{
"path": "types/jest/global-types.d.ts",
"kind": "definition"
},
{
"path": "types/jest/test/global-types-tests.ts",
"kind": "test"
},
{
"path": "types/jest/tsconfig.json",
"kind": "package-meta-ok"
},
{
"path": "types/jest/tslint.json",
"kind": "package-meta",
"suspect": "not [the expected form](https://github.com/DefinitelyTyped/DefinitelyTyped#user-content-linter-tslintjson) and not moving towards it"
}
],
"owners": [
"NoHomey",
"jwbay",
"asvetliakov",
"alexjoverm",
"epicallan",
"ikatyang",
"wsmd",
"JamieMason",
"douglasduteil",
"ahnpnl",
"joshuakgoldberg",
"UselessPickles",
"r3nya",
"hotell",
"sebald",
"andys8",
"antoinebrault",
"gstamac",
"ExE-Boss",
"quassnoi",
"Belco90",
"tonyhallett",
"ycmjason",
"devanshj",
"pawfa",
"regevbr",
"gerkindev"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "stale",
"reviewer": "ExE-Boss",
"date": "2021-03-06T09:55:15.000Z",
"abbrOid": "bc106a5"
}
],
"ciResult": "fail",
"ciUrl": "https://github.com/DefinitelyTyped/DefinitelyTyped/commit/614b1fd722239dbcc99d3e8223f2bd79fd0a502c/checks?check_suite_id=2196263734"
} |
🔔 @NoHomey @jwbay @asvetliakov @alexjoverm @epicallan @ikatyang @wsmd @JamieMason @douglasduteil @ahnpnl @JoshuaKGoldberg @UselessPickles @r3nya @Hotell @sebald @andys8 @antoinebrault @gstamac @ExE-Boss @quassnoi @Belco90 @tonyhallett @ycmjason @devanshj @pawfa @regevbr @GerkinDev — please review this PR in the next few days. Be sure to explicitly select |
👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings. Let’s review the numbers, shall we? Comparison details 📊
It looks like nothing changed too much. I won’t post performance data again unless it gets worse. |
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.
import "./index"
doesn’t work in JavaScript: #43315
types/jest/global-types.d.ts
Outdated
// This file enables users to specify `types: ["jest/global-types"]` in tsconfig.json | ||
// to clarify their intention. | ||
|
||
import "./index"; |
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.
import "./index"; | |
/// <reference path="./index.d.ts"/> |
@@ -0,0 +1,5 @@ | |||
import "./global-types"; |
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.
import "./global-types"; | |
/// <reference types="jest/global-types.d.ts"/> |
types/jest/OTHER_FILES.txt
Outdated
@@ -0,0 +1 @@ | |||
global-types.d.ts |
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.
global-types.d.ts |
types/jest/tsconfig.json
Outdated
"index.d.ts", | ||
"jest-tests.ts" | ||
"jest-tests.ts", | ||
"test/global-types-tests.ts" |
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.
"index.d.ts", | |
"jest-tests.ts" | |
"jest-tests.ts", | |
"test/global-types-tests.ts" | |
"jest-tests.ts", | |
"test/global-types.ts", | |
"index.d.ts" |
@qnighy One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits. Thank you! |
@qnighy The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
@qnighy I haven't seen any activity on this PR in more than three weeks, and it still has problems that prevent it from being merged. The PR will be closed on Apr 6th (in a week) if the issues aren't addressed. |
@qnighy To keep things tidy, we have to close PRs that aren't mergeable and don't have activity in the last month. No worries, though — please open a new PR if you'd like to continue with this change. Thank you! |
Please fill in this template.
npm test <package to test>
.Select one of these and delete the others:
If changing an existing definition:
Starting from jest v24.3.0, the jest package provides its own type definition.
@types/jest
now serves a different purpose than that; it declares global variables injeced by jest, rather than jest's own API.Unfortunately, that led to
types: ["jest"]
being resolved to the jest package, causing problems whentypeRoots
is configured. (example repository)This file enables users to specify
types: ["jest/global-types"]
in tsconfig.json to clarify their intention.