Update dev (w/ stricter tsconfig) (#3444)

This commit is contained in:
Jaco
2023-06-09 12:58:28 +03:00
committed by GitHub
parent b9bf83dec7
commit 9f397f38ac
6 changed files with 93 additions and 86 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ describe('added urls', (): void => {
}, []);
expect(
process.env.CI_LOG
process.env['CI_LOG']
? []
: dupes
).toEqual([]);
+3 -3
View File
@@ -45,9 +45,9 @@ async function loopSome (site: string, matcher: () => Promise<string[] | null>):
// shared between polkadot.center & polkadot-event.com (addresses are also the same on first run)
function checkGetWallet (site: string): Promise<[string, string[]]> {
return loopSome(site, async (): Promise<string[] | null> => {
const result = await fetchJson<Record<string, string>>(`https://${site}/get_wallet.php`, TIMEOUT);
const result = await fetchJson<{ wallet?: string }>(`https://${site}/get_wallet.php`, TIMEOUT);
return (result && result.wallet)
return result?.wallet
? [result.wallet.replace('\r', '').trim()]
: null;
});
@@ -204,7 +204,7 @@ describe('addrcheck', (): void => {
console.log('Addresses found\n', JSON.stringify(mapFound, null, 2));
console.log('Addresses missing\n', JSON.stringify(mapMiss, null, 2));
sites.length && process.env.CI_LOG && fs.appendFileSync('./.github/addrcheck.md', `\n\n${sites.length} urls with missing entries found at ${new Date().toUTCString()}:\n\n${TICKS}\n${JSON.stringify(mapMiss, null, 2)}\n${TICKS}\n`);
sites.length && process.env['CI_LOG'] && fs.appendFileSync('./.github/addrcheck.md', `\n\n${sites.length} urls with missing entries found at ${new Date().toUTCString()}:\n\n${TICKS}\n${JSON.stringify(mapMiss, null, 2)}\n${TICKS}\n`);
expect(sites).toEqual([]);
+1 -1
View File
@@ -29,7 +29,7 @@ const ourSiteList = JSON.parse(fs.readFileSync('all.json', 'utf-8')) as { allow:
function assertAndLog (check: boolean, site: string, missing: unknown): void {
if (!check) {
process.env.CI_LOG && fs.appendFileSync('./.github/crosscheck.md', `
process.env['CI_LOG'] && fs.appendFileSync('./.github/crosscheck.md', `
Missing entries found from ${site}: