Skip to content

Commit

Permalink
chore: bump typescript to 4.6.2 (#1239)
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax authored Mar 18, 2022
1 parent df88ce8 commit f1e6417
Show file tree
Hide file tree
Showing 85 changed files with 445 additions and 379 deletions.
84 changes: 75 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@
"tar": "^6.0.1",
"tar-fs": "^2.1.0",
"tmp-promise": "^3.0.2",
"ts-node": "^9.1.1",
"ts-node": "^10.7.0",
"ts-sinon": "^1.2.0",
"typescript": "^4.2.4",
"typescript": "^4.6.2",
"uuid": "^3.3.3",
"which": "^2.0.2",
"yaml": "^1.10.0"
Expand Down
18 changes: 9 additions & 9 deletions packages/async-rewriter2/src/async-writer-babel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe('AsyncWriter', () => {
try {
await runTranspiledCode('Promise.reject(42)');
expect.fail('missed exception');
} catch (err) {
} catch (err: any) {
expect(err).to.equal(42);
}
});
Expand All @@ -122,7 +122,7 @@ describe('AsyncWriter', () => {
try {
runTranspiledCode("'use strict'; delete Object.prototype");
expect.fail('missed exception');
} catch (err) {
} catch (err: any) {
expect(err.name).to.equal('TypeError');
}
});
Expand Down Expand Up @@ -864,7 +864,7 @@ describe('AsyncWriter', () => {
try {
await runTranspiledCode('(async () => { var foo; foo(); })()');
expect.fail('missed exception');
} catch (err) {
} catch (err: any) {
expect(err.message).to.equal('foo is not a function');
}
});
Expand Down Expand Up @@ -947,7 +947,7 @@ describe('AsyncWriter', () => {
}
})();`);
expect.fail('missed exception');
} catch (err) {
} catch (err: any) {
expect(err.message).to.equal('generic error');
}
});
Expand Down Expand Up @@ -1054,7 +1054,7 @@ describe('AsyncWriter', () => {
}
})();`);
expect.fail('missed exception');
} catch (err) {
} catch (err: any) {
expect(err.message).to.equal('uncatchable!');
}
});
Expand All @@ -1068,7 +1068,7 @@ describe('AsyncWriter', () => {
} catch { }
})();`);
expect.fail('missed exception');
} catch (err) {
} catch (err: any) {
expect(err.message).to.equal('uncatchable!');
}
});
Expand All @@ -1082,7 +1082,7 @@ describe('AsyncWriter', () => {
} catch { } finally { return; }
})();`);
expect.fail('missed exception');
} catch (err) {
} catch (err: any) {
expect(err.message).to.equal('uncatchable!');
}
});
Expand All @@ -1096,7 +1096,7 @@ describe('AsyncWriter', () => {
} finally { return; }
})();`);
expect.fail('missed exception');
} catch (err) {
} catch (err: any) {
expect(err.message).to.equal('uncatchable!');
}
});
Expand All @@ -1114,7 +1114,7 @@ describe('AsyncWriter', () => {
}
})();`);
expect.fail('missed exception');
} catch (err) {
} catch (err: any) {
expect(err.message).to.equal('uncatchable!');
}
});
Expand Down
2 changes: 1 addition & 1 deletion packages/async-rewriter2/src/async-writer-babel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default class AsyncWriter {
{ customErrorBuilder: babel.types.identifier('MongoshAsyncWriterError') }
]
], { code: true, ast: false })?.code as string;
} catch (e) {
} catch (e: any) {
e.message = e.message.replace('unknown: ', '');
throw e;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/browser-repl/src/components/utils/inspect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ function tryAddInspect(obj: any, stringifier: (this: any, depth: any, options: a
value: function(...args: [any, any]) {
try {
return stringifier.call(this, ...args);
} catch (err) {
} catch (err: any) {
console.warn('Could not inspect bson object', { obj: this, err });
return utilInspect(this, { customInspect: false });
}
}
});
} catch (err) {
} catch (err: any) {
console.warn('Could not add inspect key to object', { obj, err });
}
}
Expand Down
12 changes: 6 additions & 6 deletions packages/build/src/barque.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe('Barque', () => {
let releasedUrls;
try {
releasedUrls = await barque.releaseToBarque(variant, url);
} catch (err) {
} catch (err: any) {
if (process.platform === 'win32' && err.message.includes('ENOENT')) {
return; // Cannot spawn the fake curator on Windows
}
Expand All @@ -99,7 +99,7 @@ describe('Barque', () => {

try {
await barque.releaseToBarque('debian-x64', debUrl);
} catch (error) {
} catch (error: any) {
expect(error.message).to.include(`Curator is unable to upload ${debUrl},ubuntu1804,amd64 to barque`);
expect(barque.createCuratorDir).to.have.been.called;
expect(barque.extractLatestCurator).to.have.been.called;
Expand All @@ -114,7 +114,7 @@ describe('Barque', () => {
config.platform = 'macos';
try {
barque = new Barque(config);
} catch (e) {
} catch (e: any) {
expect(e.message).to.contain('only supported on linux');
return;
}
Expand All @@ -139,7 +139,7 @@ describe('Barque', () => {
let accessErr: Error | undefined = undefined;
try {
await fs.access(curatorDirPath);
} catch (e) {
} catch (e: any) {
accessErr = e;
}
expect(accessErr).to.be.undefined;
Expand Down Expand Up @@ -192,7 +192,7 @@ describe('Barque', () => {
'https://repo.mongodb.org/apt/dist/package1.deb',
'https://repo.mongodb.org/apt/dist/package2.deb',
], 5, 1);
} catch (e) {
} catch (e: any) {
expect(e.message).to.contain('the following packages are still not available');
expect(e.message).to.contain('package2.deb');
}
Expand Down Expand Up @@ -234,7 +234,7 @@ describe('Barque', () => {
let accessErr: Error | undefined = undefined;
try {
await fs.access(curatorPath);
} catch (e) {
} catch (e: any) {
accessErr = e;
}
expect(accessErr).to.be.undefined;
Expand Down
2 changes: 1 addition & 1 deletion packages/build/src/barque.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export class Barque {
});
console.info(`Result for curator with ${args.join(' ')}`, result);
return this.computePublishedPackageUrl(ppa, architecture, version, edition, packageUrl);
} catch (error) {
} catch (error: any) {
console.error(`Curator with ${args.join(' ')} failed`, error);
throw new Error(`Curator is unable to upload ${packageUrl},${ppa},${architecture} to barque ${error}`);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/build/src/evergreen/artifacts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('evergreen artifacts', () => {
'wrong',
tmpDir
);
} catch (e) {
} catch (e: any) {
return expect(e).to.not.be.undefined;
}
expect.fail('Expected error');
Expand Down
6 changes: 3 additions & 3 deletions packages/build/src/evergreen/rest-api.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('evergreen rest-api', () => {
it('throws an error when the configuration file does not exist', async() => {
try {
await EvergreenApi.fromUserConfiguration('kasldjflasjk dfalsd jfsdfk');
} catch (e) {
} catch (e: any) {
expect(e.message).to.contain('Could not find local evergreen configuration');
return;
}
Expand All @@ -46,7 +46,7 @@ describe('evergreen rest-api', () => {
const configFile = await writeEvergreenConfiguration(YAML.stringify(data));
try {
await EvergreenApi.fromUserConfiguration(configFile);
} catch (e) {
} catch (e: any) {
expect(e.message).to.contain(key);
}
});
Expand Down Expand Up @@ -131,7 +131,7 @@ describe('evergreen rest-api', () => {

try {
await api.getTasks('mongosh', 'sha');
} catch (e) {
} catch (e: any) {
expect(e.message).to.equal('Unexpected response status: 404 - ERR: Not found');
return;
}
Expand Down
12 changes: 6 additions & 6 deletions packages/build/src/git/repository-status.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('git repository-status', () => {
getRepositoryStatus.returns(status);
try {
verifyGitStatus('root', getRepositoryStatus, spawnSync);
} catch (e) {
} catch (e: any) {
expect(e.message).to.contain('Could not determine local repository information');
return;
}
Expand All @@ -64,7 +64,7 @@ describe('git repository-status', () => {
getRepositoryStatus.returns(status);
try {
verifyGitStatus('root', getRepositoryStatus, spawnSync);
} catch (e) {
} catch (e: any) {
expect(e.message).to.contain('The current branch does not match');
return;
}
Expand All @@ -84,7 +84,7 @@ describe('git repository-status', () => {
getRepositoryStatus.returns(status);
try {
verifyGitStatus('root', getRepositoryStatus, spawnSync);
} catch (e) {
} catch (e: any) {
expect(e.message).to.contain('The branch you are on is not tracking any remote branch.');
return;
}
Expand All @@ -104,7 +104,7 @@ describe('git repository-status', () => {
getRepositoryStatus.returns(status);
try {
verifyGitStatus('root', getRepositoryStatus, spawnSync);
} catch (e) {
} catch (e: any) {
expect(e.message).to.contain('Your local repository is not clean or diverged from the remote branch');
return;
}
Expand All @@ -124,7 +124,7 @@ describe('git repository-status', () => {
getRepositoryStatus.returns(status);
try {
verifyGitStatus('root', getRepositoryStatus, spawnSync);
} catch (e) {
} catch (e: any) {
expect(e.message).to.contain('Your local repository is not clean or diverged from the remote branch');
return;
}
Expand All @@ -144,7 +144,7 @@ describe('git repository-status', () => {
getRepositoryStatus.returns(status);
try {
verifyGitStatus('root', getRepositoryStatus, spawnSync);
} catch (e) {
} catch (e: any) {
expect(e.message).to.contain('You have local tags that are not pushed to the remote');
return;
}
Expand Down
Loading

0 comments on commit f1e6417

Please sign in to comment.