Skip to content

Commit dece82a

Browse files
chore(snippets): update dynamic snippets dependencies (#6085)
Co-authored-by: chdeskur <46695336+chdeskur@users.noreply.github.com> Co-authored-by: chdeskur <chdeskur@gmail.com>
1 parent 0b21673 commit dece82a

File tree

6 files changed

+4180
-3666
lines changed

6 files changed

+4180
-3666
lines changed

packages/fern-dashboard/src/app/api/bootstrap-docs-repo/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ export const POST = withZodValidation(
214214

215215
const zipBuffer = await createZipArchive(organizationName, openapiSpec, openapiFileName, marketingSite);
216216

217-
return new NextResponse(zipBuffer, {
217+
return new NextResponse(new Uint8Array(zipBuffer), {
218218
status: 200,
219219
headers: {
220220
"Content-Type": "application/zip",

packages/fern-dashboard/src/components/login-page/EmailLoginForm.test.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,12 @@ describe("EmailLoginForm", () => {
9090
});
9191

9292
// Mock window.location.href setter
93-
const originalLocation = window.location;
94-
// @ts-expect-error - mocking location
95-
delete window.location;
96-
window.location = { ...originalLocation, href: "" } as Location;
93+
const originalHref = window.location.href;
94+
Object.defineProperty(window, "location", {
95+
value: { ...window.location, href: "" },
96+
writable: true,
97+
configurable: true
98+
});
9799

98100
render(<EmailLoginForm />);
99101

@@ -107,7 +109,11 @@ describe("EmailLoginForm", () => {
107109
expect(localStorage.getItem(LAST_USED_LOGIN_KEY)).toBe("enterprise-sso");
108110
});
109111

110-
window.location = originalLocation;
112+
Object.defineProperty(window, "location", {
113+
value: { ...window.location, href: originalHref },
114+
writable: true,
115+
configurable: true
116+
});
111117
});
112118

113119
it("does not save to localStorage when form submission fails", async () => {

packages/fern-docs/bundle/src/components/playground/endpoint/PlaygroundEndpoint.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,17 @@ export const PlaygroundEndpoint = ({
212212

213213
if (res.headers.get("content-type")?.includes("audio/")) {
214214
const reader = stream.getReader();
215-
const chunks: Uint8Array[] = [];
215+
const chunks: Uint8Array<ArrayBuffer>[] = [];
216216

217217
while (true) {
218218
const { done, value } = await reader.read();
219219
if (done) {
220220
break;
221221
}
222-
chunks.push(value);
222+
const buffer = new ArrayBuffer(value.length);
223+
const copy = new Uint8Array(buffer);
224+
copy.set(value);
225+
chunks.push(copy);
223226
}
224227

225228
const audioBlob = new Blob(chunks, {

packages/snippets/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@
2929
"test:update": "vitest --run --passWithNoTests --update"
3030
},
3131
"dependencies": {
32-
"@fern-api/csharp-dynamic-snippets": "0.0.5",
33-
"@fern-api/dynamic-ir-sdk": "61.4.0",
34-
"@fern-api/go-dynamic-snippets": "0.0.16",
35-
"@fern-api/java-dynamic-snippets": "0.0.4",
36-
"@fern-api/php-dynamic-snippets": "0.0.6",
37-
"@fern-api/python-dynamic-snippets": "0.0.6",
38-
"@fern-api/ruby-dynamic-snippets": "1.0.0-rc62",
32+
"@fern-api/csharp-dynamic-snippets": "2.12.1",
33+
"@fern-api/dynamic-ir-sdk": "63.0.0",
34+
"@fern-api/go-dynamic-snippets": "1.21.8",
35+
"@fern-api/java-dynamic-snippets": "3.27.3",
36+
"@fern-api/php-dynamic-snippets": "1.25.2",
37+
"@fern-api/python-dynamic-snippets": "4.46.4-rc2",
38+
"@fern-api/ruby-dynamic-snippets": "1.0.0-rc73",
3939
"@fern-api/snippets-core": "0.1.11",
4040
"@fern-api/swift-dynamic-snippets": "0.1.1",
41-
"@fern-api/typescript-dynamic-snippets": "0.0.9",
41+
"@fern-api/typescript-dynamic-snippets": "3.42.8",
4242
"@types/lodash-es": "^4.17.12",
4343
"lodash-es": "^4.17.21",
4444
"openapi-types": "^12.1.3"

0 commit comments

Comments
 (0)