Skip to content

Commit

Permalink
chore: adjust code for new versions of packages
Browse files Browse the repository at this point in the history
  • Loading branch information
gamemaker1 committed Jul 9, 2022
1 parent 23b5fe0 commit d9bdc25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 1 addition & 5 deletions source/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import path from 'node:path';
import chalk from 'chalk';
import boxen from 'boxen';
import clipboard from 'clipboardy';
// @ts-expect-error No type definitions.
import checkForUpdate from 'update-check';
import manifest from '../package.json';
import { resolve } from './utilities/promise.js';
Expand All @@ -26,10 +25,7 @@ import type { Arguments } from './types.js';
* @returns
*/
const printUpdateNotification = async (debugMode: boolean) => {
const [error, update] = await resolve<{ latest: string }>(

checkForUpdate(manifest),
);
const [error, update] = await resolve(checkForUpdate(manifest));

if (error) {
const suffix = debugMode ? ':' : ' (use `--debug` to see full error)';
Expand Down
6 changes: 4 additions & 2 deletions source/utilities/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// CLI-related utility functions.

import chalk from 'chalk';
// @ts-expect-error No type definitions.
import parseArgv from 'arg';
import { parseEndpoint } from './http.js';
import type { Arguments } from '../types.js';
Expand Down Expand Up @@ -118,7 +117,10 @@ const helpText = chalk`
*
* @returns The parsed options and arguments.
*/
export const parseArguments = (): Arguments => parseArgv(options);
export const parseArguments = (): Arguments =>
// @ts-expect-error The handler array for the `--listen` option does have only
// one element, I'm not sure why Typescript is throwing an error here.
parseArgv(options) as unknown as Arguments;

/**
* Returns the help text.
Expand Down

0 comments on commit d9bdc25

Please sign in to comment.