-
Notifications
You must be signed in to change notification settings - Fork 521
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: π Enable correct handling of undefined in api package fetch. (#2036
) * π Mark rbac as external, allowing tests to pass locally. * π§ͺ Install `vitest` for apis client package. * π Enable correct handling of undefined in api package fetch. * π± Add changeset. * Revert "π Mark rbac as external, allowing tests to pass locally." This reverts commit a20368b. * π§Ή lintin'. * π Update lock file. * π§Ή lint. * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
abe2224
commit 2aada7d
Showing
5 changed files
with
109 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@unkey/api": patch | ||
--- | ||
|
||
fix: π Correctly handle `undefined` values in API package fetch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { describe, expect, test } from "vitest"; | ||
import { Unkey } from "./client"; | ||
|
||
describe("client", () => { | ||
test("fetch can encode the params without throwing", async () => { | ||
const unkey = new Unkey({ token: "rawr" }); | ||
expect(() => { | ||
unkey.apis.listKeys({ | ||
apiId: "meow", | ||
cursor: undefined, | ||
}); | ||
}).not.toThrow(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
2aada7d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
planetfall β ./apps/planetfall
planetfall-unkey.vercel.app
planetfall.unkey.dev
planetfall-git-main-unkey.vercel.app
planetfall-two.vercel.app