Skip to content

Commit 3486d10

Browse files
committed
Print the diff during deploys
1 parent b2b940e commit 3486d10

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

deploy/deployChangedPackages.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { fileURLToPath } from "url";
1111
import fetch from "node-fetch";
1212
import { spawnSync } from "child_process";
1313
import { 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

Comments
 (0)