difit 3.1.6 → 3.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/utils.d.ts +0 -11
- package/dist/cli/utils.js +2 -2
- package/dist/client/assets/index-C3dUtNTw.js +92 -0
- package/dist/client/assets/index-D4vctQX_.css +1 -0
- package/dist/client/assets/{prism-csharp-BpyjrzGK.js → prism-csharp-CBHytnk2.js} +1 -1
- package/dist/client/assets/{prism-hcl-CNTYUO5q.js → prism-hcl-Dg0qCBz9.js} +1 -1
- package/dist/client/assets/{prism-java-vPlbwzUD.js → prism-java-qbAyqoLL.js} +1 -1
- package/dist/client/assets/{prism-perl-BhZdI1gh.js → prism-perl-C5wGhuJd.js} +1 -1
- package/dist/client/assets/{prism-php-CH-HzCHi.js → prism-php-BAMztFi0.js} +1 -1
- package/dist/client/assets/{prism-ruby-DJgS1ZsF.js → prism-ruby-BVXH3cUk.js} +1 -1
- package/dist/client/assets/{prism-solidity-DePJfmfK.js → prism-solidity-DLMGfXyj.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/types/watch.d.ts +0 -14
- package/dist/utils/commentFormatting.d.ts +1 -1
- package/dist/utils/commentFormatting.js +32 -2
- package/dist/utils/commentFormatting.test.js +30 -0
- package/dist/utils/suggestionUtils.d.ts +18 -0
- package/dist/utils/suggestionUtils.js +31 -0
- package/dist/utils/suggestionUtils.test.d.ts +1 -0
- package/dist/utils/suggestionUtils.test.js +106 -0
- package/package.json +6 -7
- package/dist/client/assets/index-BVVFshvc.css +0 -1
- package/dist/client/assets/index-BpBUhaGB.js +0 -67
package/dist/cli/utils.d.ts
CHANGED
|
@@ -9,18 +9,7 @@ export interface PullRequestInfo {
|
|
|
9
9
|
pullNumber: number;
|
|
10
10
|
hostname: string;
|
|
11
11
|
}
|
|
12
|
-
export interface PullRequestDetails {
|
|
13
|
-
baseSha: string;
|
|
14
|
-
headSha: string;
|
|
15
|
-
baseRef: string;
|
|
16
|
-
headRef: string;
|
|
17
|
-
}
|
|
18
12
|
export declare function parseGitHubPrUrl(url: string): PullRequestInfo | null;
|
|
19
|
-
export declare function fetchPrDetails(prInfo: PullRequestInfo): Promise<PullRequestDetails>;
|
|
20
|
-
export declare function resolveCommitInLocalRepo(sha: string, context?: {
|
|
21
|
-
owner: string;
|
|
22
|
-
repo: string;
|
|
23
|
-
}): string;
|
|
24
13
|
export declare function resolvePrCommits(prUrl: string): Promise<{
|
|
25
14
|
targetCommitish: string;
|
|
26
15
|
baseCommitish: string;
|
package/dist/cli/utils.js
CHANGED
|
@@ -114,7 +114,7 @@ function getGitHubToken() {
|
|
|
114
114
|
return undefined;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
|
|
117
|
+
async function fetchPrDetails(prInfo) {
|
|
118
118
|
const token = getGitHubToken();
|
|
119
119
|
const octokitOptions = {
|
|
120
120
|
auth: token,
|
|
@@ -160,7 +160,7 @@ export async function fetchPrDetails(prInfo) {
|
|
|
160
160
|
throw new Error('Failed to fetch PR details: Unknown error');
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
|
|
163
|
+
function resolveCommitInLocalRepo(sha, context) {
|
|
164
164
|
try {
|
|
165
165
|
// Verify if the commit exists locally
|
|
166
166
|
execSync(`git cat-file -e ${sha}`, { stdio: 'ignore' });
|