@@ -11,6 +11,7 @@ import { fileURLToPath } from "url";
11
11
import fetch from "node-fetch" ;
12
12
import { spawnSync } from "child_process" ;
13
13
import { Octokit } from "@octokit/core" ;
14
+ import printDiff from "print-diff" ;
14
15
15
16
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
16
17
// @ts -ignore
@@ -34,6 +35,7 @@ const go = async () => {
34
35
// .d.ts files from the version available on npm.
35
36
const generatedDir = join ( __dirname , "generated" ) ;
36
37
for ( const dirName of fs . readdirSync ( generatedDir ) ) {
38
+ console . log ( `Looking at ${ dirName } ` ) ;
37
39
const localPackageJSONPath = join ( generatedDir , dirName , "package.json" ) ;
38
40
const newTSConfig = fs . readFileSync ( localPackageJSONPath , "utf-8" ) ;
39
41
const pkgJSON = JSON . parse ( newTSConfig ) ;
@@ -52,6 +54,9 @@ const go = async () => {
52
54
try {
53
55
const npmDTSReq = await fetch ( unpkgURL ) ;
54
56
const npmDTSText = await npmDTSReq . text ( ) ;
57
+ console . log ( "Comparing version from unpkg, to generated version:" ) ;
58
+ printDiff ( npmDTSText , generatedDTSContent ) ;
59
+
55
60
upload = upload || npmDTSText !== generatedDTSContent ;
56
61
} catch ( error ) {
57
62
// Could not find a previous build
0 commit comments