Skip to content

Commit f1dee01

Browse files
authored
Always set latest tag in publish code (#1255)
1 parent 73a07e6 commit f1dee01

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.changeset/large-mirrors-bathe.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@definitelytyped/utils": patch
3+
---
4+
5+
Fix missing dist-tag in deprecated package publish

packages/utils/src/npm.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ export interface NpmPublishClientConfig {
1515

1616
export class NpmPublishClient {
1717
static async create(token: string, config: NpmPublishClientConfig = {}): Promise<NpmPublishClient> {
18-
return new NpmPublishClient(token, config.defaultTag);
18+
return new NpmPublishClient(token, config.defaultTag ?? "latest");
1919
}
2020

2121
private constructor(
2222
private readonly token: string,
23-
private readonly defaultTag: string | undefined,
23+
private readonly defaultTag: string,
2424
) {}
2525

2626
async publish(

0 commit comments

Comments
 (0)