Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
Use old header parser when package.json doesn't look new (#482)
Browse files Browse the repository at this point in the history
* test

* Use old header parser when package.json doesn't look new

* Recreate fixture

* More tests

* Update baselines

* Revert to pre-DT PR and retest

* Add post pnpm PR
  • Loading branch information
jakebailey authored Oct 18, 2023
1 parent 26f6714 commit bf63139
Show file tree
Hide file tree
Showing 328 changed files with 3,673 additions and 1,698 deletions.
27 changes: 27 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"license": "MIT",
"dependencies": {
"@apollo/client": "latest",
"@definitelytyped/old-header-parser": "npm:@definitelytyped/header-parser@0.0.178",
"@azure/functions": "^4.0.0-alpha.1",
"@octokit/webhooks": "^9.5.1",
"dayjs": "^1.10.3",
Expand Down
6 changes: 3 additions & 3 deletions src/_tests/fixtures/38979/_files.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"master:types/es-abstract/package.json": "{\"private\":true,\"name\":\"@types/es-abstract\",\"version\":\"1.16.99999\",\"projects\":[\"https://github.com/ljharb/es-abstract\"],\"devDependencies\":{\"@types/es-abstract\":\"workspace:.\"},\"contributors\":[{\"name\":\"RReverser\",\"githubUsername\":\"RReverser\"}]}",
"222334139e52fc16369464cfb5dc95c82f71192f:types/es-abstract/package.json": "{\"private\":true,\"name\":\"@types/es-abstract\",\"version\":\"1.16.99999\",\"projects\":[\"https://github.com/ljharb/es-abstract\"],\"devDependencies\":{\"@types/es-abstract\":\"workspace:.\"},\"contributors\":[{\"name\":\"RReverser\",\"githubUsername\":\"RReverser\"}]}"
}
"master:types/es-abstract/index.d.ts": "// Type definitions for es-abstract 1.16\n// Project: https://github.com/ljharb/es-abstract\n// Definitions by: RReverser <https://github.com/RReverser>\n// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\n// TypeScript Version: 3.6\n\n FAKE CONTENT TO MATCH PREVIOUS OWNERS.JSON \n",
"222334139e52fc16369464cfb5dc95c82f71192f:types/es-abstract/index.d.ts": "// Type definitions for es-abstract 1.16\n// Project: https://github.com/ljharb/es-abstract\n// Definitions by: RReverser <https://github.com/RReverser>\n// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\n// TypeScript Version: 3.6\n\n FAKE CONTENT TO MATCH PREVIOUS OWNERS.JSON \n"
}
4 changes: 3 additions & 1 deletion src/_tests/fixtures/38979/derived.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,9 @@
"kind": "package-meta-ok"
}
],
"owners": [],
"owners": [
"RReverser"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
Expand Down
12 changes: 10 additions & 2 deletions src/_tests/fixtures/38979/mutations.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"input": {
"labelIds": [
"MDU6TGFiZWwxNjA4NjM0NDg0",
"MDU6TGFiZWwyMTU0ODU3ODAw",
"MDU6TGFiZWwyNDYyODA0MzE1"
],
"labelableId": "MDExOlB1bGxSZXF1ZXN0MzI1ODk5Njc0"
Expand Down Expand Up @@ -42,6 +41,15 @@
}
}
},
{
"mutation": "mutation ($input: AddCommentInput!) {\n addComment(input: $input) {\n __typename\n }\n}\n",
"variables": {
"input": {
"subjectId": "MDExOlB1bGxSZXF1ZXN0MzI1ODk5Njc0",
"body": "🔔 @RReverser — please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/38979/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on.\n<!--typescript_bot_pinging-reviewers-->"
}
}
},
{
"mutation": "mutation ($input: AddCommentInput!) {\n addComment(input: $input) {\n __typename\n }\n}\n",
"variables": {
Expand All @@ -56,7 +64,7 @@
"variables": {
"input": {
"subjectId": "MDExOlB1bGxSZXF1ZXN0MzI1ODk5Njc0",
"body": "It has been more than two weeks and this PR still has no reviews.\n\nI'll bump it to the DT maintainer queue. Thank you for your patience, @ExE-Boss.\n\n(Ping @«anyone?».)\n<!--typescript_bot_Unreviewed:done-->"
"body": "It has been more than two weeks and this PR still has no reviews.\n\nI'll bump it to the DT maintainer queue. Thank you for your patience, @ExE-Boss.\n\n(Ping @RReverser.)\n<!--typescript_bot_Unreviewed:done-->"
}
}
}
Expand Down
7 changes: 5 additions & 2 deletions src/_tests/fixtures/38979/result.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,24 @@
"labels": [
"Critical package",
"Other Approved",
"No Other Owners",
"Unreviewed"
],
"responseComments": [
{
"tag": "welcome",
"status": "@ExE-Boss Thank you for submitting this PR!\n\n***This is a live comment which I will keep updated.***\n\n## 1 package in this PR\n\n* `es-abstract` — [on npm](https://www.npmjs.com/package/es-abstract), [on unpkg](https://unpkg.com/browse/es-abstract@latest/)\n\n## Code Reviews\n\nBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged.\n\nYou can test the changes of this PR [in the Playground](https://www.typescriptlang.org/play/?dtPR=38979&install-plugin=playground-dt-review).\n\n## Status\n\n * ✅ No merge conflicts\n * ✅ Continuous integration tests have passed\n * 🕐 Most recent commit is approved by a DT maintainer\n\nOnce every item on this list is checked, I'll ask you for permission to merge and publish the changes.\n\n## Inactive\n\nThis PR has been inactive for 129 days — it is *still* unreviewed!\n\n----------------------\n... diagnostics scrubbed ..."
},
{
"tag": "pinging-reviewers",
"status": "🔔 @RReverser — please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/38979/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on."
},
{
"tag": "stale-ping-764528-0e6e7f4",
"status": "@sandersn, @weswigham Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?"
},
{
"tag": "Unreviewed:done",
"status": "It has been more than two weeks and this PR still has no reviews.\n\nI'll bump it to the DT maintainer queue. Thank you for your patience, @ExE-Boss.\n\n(Ping @«anyone?».)"
"status": "It has been more than two weeks and this PR still has no reviews.\n\nI'll bump it to the DT maintainer queue. Thank you for your patience, @ExE-Boss.\n\n(Ping @RReverser.)"
}
],
"shouldClose": false,
Expand Down
6 changes: 3 additions & 3 deletions src/_tests/fixtures/43136/_files.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/_tests/fixtures/43136/derived.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"kind": "definition"
}
],
"owners": [],
"owners": [
"RReverser"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
Expand Down
14 changes: 11 additions & 3 deletions src/_tests/fixtures/43136/mutations.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"variables": {
"input": {
"labelIds": [
"MDU6TGFiZWwxNjA4NjM0NDg0",
"MDU6TGFiZWwyMTU0ODU3ODAw"
"MDU6TGFiZWwxNjA4NjM0NDg0"
],
"labelableId": "MDExOlB1bGxSZXF1ZXN0Mzg4MzgyMzYy"
}
Expand All @@ -37,7 +36,16 @@
"variables": {
"input": {
"contentId": "MDExOlB1bGxSZXF1ZXN0Mzg4MzgyMzYy",
"projectColumnId": "MDEzOlByb2plY3RDb2x1bW45ODY3MDA2"
"projectColumnId": "MDEzOlByb2plY3RDb2x1bW43NTUyOTIy"
}
}
},
{
"mutation": "mutation ($input: AddCommentInput!) {\n addComment(input: $input) {\n __typename\n }\n}\n",
"variables": {
"input": {
"subjectId": "MDExOlB1bGxSZXF1ZXN0Mzg4MzgyMzYy",
"body": "🔔 @RReverser — please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/43136/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on.\n<!--typescript_bot_pinging-reviewers-->"
}
}
},
Expand Down
9 changes: 6 additions & 3 deletions src/_tests/fixtures/43136/result.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"projectColumn": "Needs Maintainer Action",
"projectColumn": "Needs Maintainer Review",
"labels": [
"Critical package",
"No Other Owners"
"Critical package"
],
"responseComments": [
{
"tag": "welcome",
"status": "@larsrh Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.\n\n***This is a live comment which I will keep updated.***\n\n## 1 package in this PR\n\n* `estree` — [on npm](https://www.npmjs.com/package/estree), [on unpkg](https://unpkg.com/browse/estree@latest/)\n\n## Code Reviews\n\nBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged.\n\nYou can test the changes of this PR [in the Playground](https://www.typescriptlang.org/play/?dtPR=43136&install-plugin=playground-dt-review).\n\n## Status\n\n * ✅ No merge conflicts\n * ✅ Continuous integration tests have passed\n * 🕐 Most recent commit is approved by a DT maintainer\n\nOnce every item on this list is checked, I'll ask you for permission to merge and publish the changes.\n\n----------------------\n... diagnostics scrubbed ..."
},
{
"tag": "pinging-reviewers",
"status": "🔔 @RReverser — please [review this PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/43136/files) in the next few days. Be sure to explicitly select **`Approve`** or **`Request Changes`** in the GitHub UI so I know what's going on."
},
{
"tag": "stale-ping-f5a3ad-37d784d",
"status": "@RReverser Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?"
Expand Down
6 changes: 3 additions & 3 deletions src/_tests/fixtures/43144/_files.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"master:types/mailcheck/package.json": "{\"private\":true,\"name\":\"@types/mailcheck\",\"version\":\"1.1.99999\",\"projects\":[\"https://github.com/mailcheck/mailcheck\"],\"devDependencies\":{\"@types/mailcheck\":\"workspace:.\"},\"contributors\":[{\"name\":\"Paulo Cesar\",\"githubUsername\":\"pocesar\"}]}",
"f1f5c4bb0ae553f56766882f6458d2e22baa87c7:types/mailcheck/package.json": "{\"private\":true,\"name\":\"@types/mailcheck\",\"version\":\"1.1.99999\",\"projects\":[\"https://github.com/mailcheck/mailcheck\"],\"devDependencies\":{\"@types/mailcheck\":\"workspace:.\"},\"contributors\":[{\"name\":\"Paulo Cesar\",\"githubUsername\":\"pocesar\"}]}"
}
"master:types/mailcheck/index.d.ts": "// Type definitions for Mailcheck 1.1\n// Project: https://github.com/mailcheck/mailcheck\n// Definitions by: Paulo Cesar <https://github.com/pocesar>\n// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\n// TypeScript Version: 3.8\n\n/// <reference types=\"jquery\" />\n\ndeclare var Mailcheck: MailcheckModule.Static;\n\ndeclare namespace MailcheckModule {\n\n export interface IDistanceFunction {\n (s1: string, s2: string): number;\n }\n\n export interface ISuggestFunction {\n (email: string, domains?: string[], topLevelDomains?: string[], distanceFunction?: IDistanceFunction):void;\n }\n\n export interface IJQuerySuggested {\n (element: JQuery, suggested: ISuggestion): void;\n }\n\n export interface IJQueryEmpty {\n (element: JQuery): void;\n }\n\n export interface IEmpty {\n (): void;\n }\n\n export interface ISuggested {\n (suggested: ISuggestion): void;\n }\n\n export interface ISplitEmail {\n topLevelDomain?: string;\n domain?: string;\n address?: string;\n }\n\n export interface ISuggestion {\n address: string;\n domain: string;\n full: string;\n }\n\n export interface IAsynchronousOptions {\n email: string;\n domains?: string[];\n secondLevelDomains?: string[];\n topLevelDomains?: string[];\n distanceFunction?: IDistanceFunction;\n suggested: ISuggested | IJQuerySuggested;\n empty?: IEmpty | IJQueryEmpty;\n }\n export interface ISynchronousOptions {\n email: string;\n domains?: string[];\n secondLevelDomains?: string[];\n topLevelDomains?: string[];\n distanceFunction?: IDistanceFunction;\n\n }\n export interface Static {\n defaultDomains: string[];\n defaultSecondLevelDomains: string[];\n defaultTopLevelDomains: string[];\n domainThreshold: number;\n topLevelThreshold: number;\n run(opts: IAsynchronousOptions):void;\n run(opts: ISynchronousOptions):ISuggestion | undefined;\n suggest: ISuggestFunction;\n encodeEmail(email: string): string;\n splitEmail(email: string): ISplitEmail;\n sift3Distance(s1: string, s2: string): number;\n findClosestDomain(domain: string, domains: string[], distanceFunction?: IDistanceFunction, threshold?: number): boolean|string;\n }\n\n}\n\ninterface JQuery {\n mailcheck(opts: MailcheckModule.IAsynchronousOptions):void;\n mailcheck(opts: MailcheckModule.ISynchronousOptions):MailcheckModule.ISuggestion | void;\n}\n\ndeclare module 'mailcheck' {\n export = Mailcheck;\n}\n",
"f1f5c4bb0ae553f56766882f6458d2e22baa87c7:types/mailcheck/index.d.ts": "// Type definitions for Mailcheck 1.1\n// Project: https://github.com/mailcheck/mailcheck\n// Definitions by: Paulo Cesar <https://github.com/pocesar>\n// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\n// TypeScript Version: 3.8\n\n/// <reference types=\"jquery\" />\n\ndeclare var Mailcheck: MailcheckModule.Static;\n\ndeclare namespace MailcheckModule {\n\n export interface IDistanceFunction {\n (s1: string, s2: string): number;\n }\n\n export interface ISuggestFunction {\n (email: string, domains?: string[], topLevelDomains?: string[], distanceFunction?: IDistanceFunction):void;\n }\n\n export interface IJQuerySuggested {\n (element: JQuery, suggested: ISuggestion): void;\n }\n\n export interface IJQueryEmpty {\n (element: JQuery): void;\n }\n\n export interface IEmpty {\n (): void;\n }\n\n export interface ISuggested {\n (suggested: ISuggestion): void;\n }\n\n export interface ISplitEmail {\n topLevelDomain?: string;\n domain?: string;\n address?: string;\n }\n\n export interface ISuggestion {\n address: string;\n domain: string;\n full: string;\n }\n\n export interface IAsynchronousOptions {\n email: string;\n domains?: string[];\n secondLevelDomains?: string[];\n topLevelDomains?: string[];\n distanceFunction?: IDistanceFunction;\n suggested: ISuggested | IJQuerySuggested;\n empty?: IEmpty | IJQueryEmpty;\n }\n export interface ISynchronousOptions {\n email: string;\n domains?: string[];\n secondLevelDomains?: string[];\n topLevelDomains?: string[];\n distanceFunction?: IDistanceFunction;\n\n }\n export interface Static {\n defaultDomains: string[];\n defaultSecondLevelDomains: string[];\n defaultTopLevelDomains: string[];\n domainThreshold: number;\n topLevelThreshold: number;\n run(opts: IAsynchronousOptions):void;\n run(opts: ISynchronousOptions):ISuggestion | undefined;\n suggest: ISuggestFunction;\n encodeEmail(email: string): string;\n splitEmail(email: string): ISplitEmail;\n sift3Distance(s1: string, s2: string): number;\n findClosestDomain(domain: string, domains: string[], distanceFunction?: IDistanceFunction, threshold?: number): boolean|string;\n }\n\n}\n\ninterface JQuery {\n mailcheck(opts: MailcheckModule.IAsynchronousOptions):void;\n mailcheck(opts: MailcheckModule.ISynchronousOptions):MailcheckModule.ISuggestion | void;\n}\n\ndeclare module 'mailcheck' {\n export = Mailcheck;\n}\n"
}
4 changes: 3 additions & 1 deletion src/_tests/fixtures/43144/derived.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"kind": "test"
}
],
"owners": [],
"owners": [
"pocesar"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
Expand Down
Loading

0 comments on commit bf63139

Please sign in to comment.