@@ -11,6 +11,7 @@ import { fileURLToPath } from "url";
1111import fetch from "node-fetch" ;
1212import { spawnSync } from "child_process" ;
1313import { Octokit } from "@octokit/core" ;
14+ import printDiff from "print-diff" ;
1415
1516// eslint-disable-next-line @typescript-eslint/ban-ts-comment
1617// @ts -ignore
@@ -34,6 +35,7 @@ const go = async () => {
3435 // .d.ts files from the version available on npm.
3536 const generatedDir = join ( __dirname , "generated" ) ;
3637 for ( const dirName of fs . readdirSync ( generatedDir ) ) {
38+ console . log ( `Looking at ${ dirName } ` ) ;
3739 const localPackageJSONPath = join ( generatedDir , dirName , "package.json" ) ;
3840 const newTSConfig = fs . readFileSync ( localPackageJSONPath , "utf-8" ) ;
3941 const pkgJSON = JSON . parse ( newTSConfig ) ;
@@ -52,6 +54,9 @@ const go = async () => {
5254 try {
5355 const npmDTSReq = await fetch ( unpkgURL ) ;
5456 const npmDTSText = await npmDTSReq . text ( ) ;
57+ console . log ( "Comparing version from unpkg, to generated version:" ) ;
58+ printDiff ( npmDTSText , generatedDTSContent ) ;
59+
5560 upload = upload || npmDTSText !== generatedDTSContent ;
5661 } catch ( error ) {
5762 // Could not find a previous build
0 commit comments