Skip to content

Commit

Permalink
chore: bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
maggiben committed Sep 23, 2021
1 parent 2b1a5bf commit a122991
Show file tree
Hide file tree
Showing 6 changed files with 996 additions and 1,027 deletions.
2 changes: 1 addition & 1 deletion .mocharc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"require": "ts-node/register, source-map-support/register",
"require": "ts-node/register",
"watch-extensions": "ts",
"recursive": true,
"reporter": "spec",
Expand Down
30 changes: 14 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,49 +17,47 @@
"cli-ux": "^5.6.2",
"sanitize-filename": "^1.6.3",
"streamspeed": "^2.0.1",
"tslib": "^1",
"tslib": "^2.3.1",
"ytdl-core": "^4.9.1",
"ytsr": "^3.5.0"
},
"devDependencies": {
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@commitlint/cli": "^13.1.0",
"@commitlint/config-conventional": "^13.1.0",
"@oclif/dev-cli": "^1.26.0",
"@oclif/plugin-command-snapshot": "^2.2.2",
"@oclif/test": "^1.2.8",
"@salesforce/dev-config": "^2.1.2",
"@salesforce/prettier-config": "^0.0.2",
"@salesforce/ts-sinon": "^1.3.18",
"@types/chai": "^4",
"@types/chai": "^4.2.22",
"@types/cli-progress": "^3.9.1",
"@types/mocha": "^5",
"@types/node": "^10",
"@typescript-eslint/eslint-plugin": "^4.28.1",
"@typescript-eslint/parser": "^4.28.1",
"aws-sdk": "^2.942.0",
"@types/mocha": "^9.0.0",
"@types/node": "^16.9.6",
"@typescript-eslint/eslint-plugin": "^4.31.2",
"@typescript-eslint/parser": "^4.31.2",
"chai": "^4",
"chalk": "^4.1.1",
"codecov": "^3.8.2",
"eslint": "^7.30.0",
"eslint-config-oclif": "^3.1",
"eslint-config-oclif-typescript": "^0.1",
"eslint-config-oclif-typescript": "^1.0.1",
"eslint-config-prettier": "^8.3.0",
"eslint-config-salesforce": "^0.1.6",
"eslint-config-salesforce-typescript": "^0.2.7",
"eslint-config-salesforce-typescript": "^0.2.8",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsdoc": "^35.4.1",
"eslint-plugin-prettier": "^3.4.0",
"globby": "^10",
"eslint-plugin-jsdoc": "^36.1.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^7.0.0",
"mocha": "^9.0.2",
"nock": "^13.1.1",
"nyc": "^15.1.0",
"prettier": "^2.3.2",
"prettier": "^2.4.1",
"pretty-quick": "^3.1.1",
"shelljs": "^0.8.4",
"ts-node": "^10.0.0",
"typescript": "^4.3.5"
"typescript": "^4.4.3"
},
"config": {
"commitizen": {
Expand Down
2 changes: 1 addition & 1 deletion src/Ux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class UX {
* @param {number} y The y position
* @returns {UX}
*/
public clearLine(stdout: NodeJS.WritableStream, dir: number): UX {
public clearLine(stdout: NodeJS.WritableStream, dir: readline.Direction): UX {
if (this.isOutputEnabled) {
this.readline.clearLine(stdout, dir);
}
Expand Down
4 changes: 2 additions & 2 deletions src/YtKitCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ export abstract class YtKitCommand extends Command {
return (this.result.data = await this.run());
} catch (error) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
err = error;
await this.catch(error);
err = error as Error;
await this.catch(error as Error);
} finally {
await this.finally(err);
}
Expand Down
94 changes: 58 additions & 36 deletions test/YtKitCommand.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,16 @@ describe('YtKitCommand', () => {
return mockStdout(async () => {
// Run the command
let output: Optional<string>;
const errorMessage = 'Expected EEXIT error';
try {
output = (await TestCommand.run(['-h'])) as string;
fail('Expected EEXIT error');
} catch (err) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect(err.code).to.equal('ERR_ASSERTION');
fail(errorMessage);
} catch (error) {
expect(error).to.be.instanceOf(Error);
if (error instanceof Error) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect(error?.message).to.equal(errorMessage);
}
}

expect(output).to.equal(undefined);
Expand All @@ -284,12 +288,16 @@ describe('YtKitCommand', () => {
return mockStdout(async () => {
// Run the command
let output: Optional<string>;
const errorMessage = 'Expected EEXIT error';
try {
output = (await TestCommand.run(['-h'])) as string;
fail('Expected EEXIT error');
} catch (err) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect(err.code).to.equal('ERR_ASSERTION');
fail(errorMessage);
} catch (error) {
expect(error).to.be.instanceOf(Error);
if (error instanceof Error) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect(error?.message).to.equal(errorMessage);
}
}

expect(output).to.equal(undefined);
Expand Down Expand Up @@ -328,13 +336,16 @@ describe('YtKitCommand', () => {

return mockStdout(async (lines: string[]) => {
let output: Optional<string>;
const errorMessage = 'Expected EEXIT error';
try {
output = (await TestCommand.run(['-h'])) as string;
fail('Expected EEXIT error');
} catch (err) {
expect(err).to.be.instanceOf(Error);
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect(err.code).to.equal('ERR_ASSERTION');
fail(errorMessage);
} catch (error) {
expect(error).to.be.instanceOf(Error);
if (error instanceof Error) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect(error?.message).to.equal(errorMessage);
}
}

expect(output).to.equal(undefined);
Expand All @@ -357,12 +368,16 @@ describe('YtKitCommand', () => {
return mockStdout(async (lines: string[]) => {
// Run the command
let output: Optional<string>;
const errorMessage = 'Expected EEXIT error';
try {
output = (await TestCommand.run(['-h'])) as string;
fail('Expected EEXIT error');
} catch (err) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect(err.code).to.equal('ERR_ASSERTION');
fail(errorMessage);
} catch (error) {
expect(error).to.be.instanceOf(Error);
if (error instanceof Error) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect(error?.message).to.equal(errorMessage);
}
}

expect(output).to.equal(undefined);
Expand Down Expand Up @@ -745,13 +760,16 @@ describe('YtKitCommand', () => {

return mockStdout(async () => {
let output: Optional<string>;
const errorMessage = 'Expected EEXIT error';
try {
output = (await StderrCommand.run(['--url', 'https://www.youtube.com/watch?v=aqz-KE-bpKQ'])) as string;
fail('Expected EEXIT error');
} catch (err) {
expect(err).to.be.instanceOf(Error);
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect(err.code).to.equal('ERR_ASSERTION');
fail(errorMessage);
} catch (error) {
expect(error).to.be.instanceOf(Error);
if (error instanceof Error) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect(error?.message).to.equal(errorMessage);
}
}
expect(output).to.equal(undefined);
expect(process.exitCode).to.equal(1);
Expand Down Expand Up @@ -781,10 +799,12 @@ describe('YtKitCommand', () => {
try {
output = (await StderrCommand.run(['--url', 'https://www.youtube.com/watch?v=aqz-KE-bpKQ'])) as string;
fail('Expected EEXIT error');
} catch (err) {
expect(err).to.be.instanceOf(Error);
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect(err.code).to.equal(undefined);
} catch (error) {
expect(error).to.be.instanceOf(Error);
if (error instanceof Error) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect(error?.message).to.include('undefined');
}
}
expect(output).to.equal(undefined);
expect(process.exitCode).to.equal(1);
Expand All @@ -810,17 +830,20 @@ describe('YtKitCommand', () => {

return mockStdout(async () => {
let output: Optional<string>;
const errorMessage = 'Expected EEXIT error';
try {
output = (await StderrCommand.run([
'--url',
'https://www.youtube.com/watch?v=aqz-KE-bpKQ',
'--json',
])) as string;
fail('Expected EEXIT error');
} catch (err) {
expect(err).to.be.instanceOf(Error);
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect(err.code).to.equal('ERR_ASSERTION');
fail(errorMessage);
} catch (error) {
expect(error).to.be.instanceOf(Error);
if (error instanceof Error) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect(error?.message).to.equal(errorMessage);
}
}
expect(output).to.equal(undefined);
expect(process.exitCode).to.equal(1);
Expand All @@ -847,17 +870,16 @@ describe('YtKitCommand', () => {

return mockStdout(async () => {
let output: Optional<string>;
const errorMessage = 'Expected EEXIT error';
try {
output = (await StderrCommand.run([
'--url',
'https://www.youtube.com/watch?v=aqz-KE-bpKQ',
'--json',
])) as string;
fail('Expected EEXIT error');
} catch (err) {
expect(err).to.be.instanceOf(Error);
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
expect(err.code).to.equal(undefined);
fail(errorMessage);
} catch (error) {
expect(error).to.be.instanceOf(Error);
}
expect(output).to.equal(undefined);
expect(process.exitCode).to.equal(1);
Expand Down
Loading

0 comments on commit a122991

Please sign in to comment.