Skip to content

Commit 7b1302d

Browse files
authored
Correct npm client options (#1250)
1 parent c80c8da commit 7b1302d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.changeset/petite-jars-train.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+
Correct npm options

packages/utils/src/npm.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ export class NpmPublishClient {
4343

4444
const manifest = { ...packageJson, readme } as unknown as { name: string; version: string };
4545
await publish(manifest, tarballBuffer, {
46-
token: this.token,
46+
forceAuth: { token: this.token },
4747
access: "public",
48-
tag: this.defaultTag,
48+
defaultTag: this.defaultTag,
4949
});
5050
}
5151

@@ -57,7 +57,7 @@ export class NpmPublishClient {
5757

5858
await npmFetch(`/-/package/${encodeURIComponent(packageName)}/dist-tags/${encodeURIComponent(distTag)}`, {
5959
method: "PUT",
60-
token: this.token,
60+
forceAuth: { token: this.token },
6161
body: JSON.stringify(version),
6262
headers: {
6363
"content-type": "application/json",

0 commit comments

Comments
 (0)