Skip to content

Commit

Permalink
fix: fix npm release tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Loïc Mangeonjean committed Jan 29, 2024
1 parent 262d199 commit b646b03
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if (NPM_TOKEN == null) {
throw new Error('env.NPM_TOKEN must be set')
}

async function publishNpm (version: string, tag: string = 'latest') {
async function publishNpm (version: string, tag: string) {
const distDir = path.resolve(__dirname, 'dist')
for (const dirName of await fs.readdir(distDir)) {
const libDir = path.resolve(distDir, dirName)
Expand Down Expand Up @@ -66,7 +66,8 @@ async function run (options: SemanticReleaseOptions) {
return
}

await publishNpm(result.nextRelease.version, result.nextRelease.channel)
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
await publishNpm(result.nextRelease.version, result.nextRelease.channel ?? 'latest')
}

async function cli () {
Expand Down

0 comments on commit b646b03

Please sign in to comment.