From 5ad05bed296d66eb4bad52c2e8bca878bbbf580c Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 6 Jul 2023 07:11:02 -0700 Subject: [PATCH] Update TypeScript code formatting for Prettier 3.x compliance This project uses the default Prettier code style for TypeScript code. The default value for the `trailingComma` configuration setting has been changed from `es5` to `all` in the Prettier 3.0.0 release. This caused the code to no longer be compliant with the new default Prettier code formatting style. The formatting is hereby updated to the new Prettier style. --- src/installer.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/installer.ts b/src/installer.ts index 34f846b..f80d46d 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -42,7 +42,7 @@ async function fetchVersions(repoToken: string): Promise { const tags: ITaskRef[] = ( await rest.get( - "https://api.github.com/repos/go-task/task/git/refs/tags" + "https://api.github.com/repos/go-task/task/git/refs/tags", ) ).result || []; @@ -92,7 +92,7 @@ function normalizeVersion(version: string): string { // Compute an actual version starting from the `version` configuration param. async function computeVersion( version: string, - repoToken: string + repoToken: string, ): Promise { // return if passed version is a valid semver if (semver.valid(version)) { @@ -113,7 +113,7 @@ async function computeVersion( const allVersions = await fetchVersions(repoToken); const possibleVersions = allVersions.filter((v) => - v.startsWith(versionPrefix) + v.startsWith(versionPrefix), ); const versionMap = new Map(); @@ -155,7 +155,7 @@ async function downloadRelease(version: string): Promise { const downloadUrl: string = util.format( "https://github.com/go-task/task/releases/download/%s/%s", version, - fileName + fileName, ); let downloadPath: string | null = null; try {