From 86f741905819419f54701476e2c7db5553b1570a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 04:37:45 +0000 Subject: [PATCH 1/2] chore(deps-dev): bump fastify from 5.0.0 to 5.1.0 Bumps [fastify](https://github.com/fastify/fastify) from 5.0.0 to 5.1.0. - [Release notes](https://github.com/fastify/fastify/releases) - [Commits](https://github.com/fastify/fastify/compare/v5.0.0...v5.1.0) --- updated-dependencies: - dependency-name: fastify dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 003c130..375776c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -817,9 +817,9 @@ "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==" }, "node_modules/fastify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/fastify/-/fastify-5.0.0.tgz", - "integrity": "sha512-Qe4dU+zGOzg7vXjw4EvcuyIbNnMwTmcuOhlOrOJsgwzvjEZmsM/IeHulgJk+r46STjdJS/ZJbxO8N70ODXDMEQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/fastify/-/fastify-5.1.0.tgz", + "integrity": "sha512-0SdUC5AoiSgMSc2Vxwv3WyKzyGMDJRAW/PgNsK1kZrnkO6MeqUIW9ovVg9F2UGIqtIcclYMyeJa4rK6OZc7Jxg==", "dev": true, "funding": [ { @@ -2680,9 +2680,9 @@ "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==" }, "fastify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/fastify/-/fastify-5.0.0.tgz", - "integrity": "sha512-Qe4dU+zGOzg7vXjw4EvcuyIbNnMwTmcuOhlOrOJsgwzvjEZmsM/IeHulgJk+r46STjdJS/ZJbxO8N70ODXDMEQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/fastify/-/fastify-5.1.0.tgz", + "integrity": "sha512-0SdUC5AoiSgMSc2Vxwv3WyKzyGMDJRAW/PgNsK1kZrnkO6MeqUIW9ovVg9F2UGIqtIcclYMyeJa4rK6OZc7Jxg==", "dev": true, "requires": { "@fastify/ajv-compiler": "^4.0.0", From 395070088cee070251d05e64b5f2998ecfd2ac96 Mon Sep 17 00:00:00 2001 From: Hans Klunder Date: Fri, 1 Nov 2024 14:13:09 +0100 Subject: [PATCH 2/2] chore: undo structuredClone of fastify options --- test/test-cookie-param.v3.js | 4 ++-- test/test-petstore-example.js | 8 ++++---- test/test-plugin.v2.js | 4 ++-- test/test-plugin.v3.js | 10 +++++----- test/test-recursive.v3.js | 2 +- test/test-securityHandlers.js | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/test/test-cookie-param.v3.js b/test/test-cookie-param.v3.js index c8e03ca..44b1f24 100644 --- a/test/test-cookie-param.v3.js +++ b/test/test-cookie-param.v3.js @@ -24,7 +24,7 @@ test("route registration succeeds with cookie param", (t, done) => { serviceHandlers, }; - const fastify = Fastify(structuredClone(noStrict)); + const fastify = Fastify(noStrict); fastify.register(fastifyOpenapiGlue, opts); fastify.ready((err) => { if (err) { @@ -43,7 +43,7 @@ test("route registration inserts cookie schema", (t, done) => { addCookieSchema: true, }; - const fastify = Fastify(structuredClone(noStrict)); + const fastify = Fastify(noStrict); // Register onRoute handler which will be called when the plugin registers routes in the specification. let hadCookieSchema = false; fastify.addHook("onRoute", (routeOptions) => { diff --git a/test/test-petstore-example.js b/test/test-petstore-example.js index e84401a..5817cba 100644 --- a/test/test-petstore-example.js +++ b/test/test-petstore-example.js @@ -5,7 +5,7 @@ import Fastify from "fastify"; import petstoreExample, { options } from "../examples/petstore/index.js"; test("/v2/pet/24 works", async (t) => { - const fastify = Fastify(structuredClone(options)); + const fastify = Fastify(options); fastify.register(petstoreExample, {}); const res = await fastify.inject({ method: "GET", @@ -23,7 +23,7 @@ test("/v2/pet/24 works", async (t) => { }); test("/v2/pet/myPet returns Fastify validation error", async (t) => { - const fastify = Fastify(structuredClone(options)); + const fastify = Fastify(options); fastify.register(petstoreExample, {}); const res = await fastify.inject({ method: "GET", @@ -37,7 +37,7 @@ test("/v2/pet/myPet returns Fastify validation error", async (t) => { }); test("v2/pet/findByStatus?status=available&status=pending returns 'not implemented'", async (t) => { - const fastify = Fastify(structuredClone(options)); + const fastify = Fastify(options); fastify.register(petstoreExample, {}); const res = await fastify.inject({ method: "GET", @@ -54,7 +54,7 @@ test("v2/pet/findByStatus?status=available&status=pending returns 'not implement }); test("v2/pet/0 returns serialization error", async (t) => { - const fastify = Fastify(structuredClone(options)); + const fastify = Fastify(options); fastify.register(petstoreExample, {}); const res = await fastify.inject({ method: "GET", diff --git a/test/test-plugin.v2.js b/test/test-plugin.v2.js index 884584e..e768039 100644 --- a/test/test-plugin.v2.js +++ b/test/test-plugin.v2.js @@ -214,7 +214,7 @@ test("invalid service definition throws error ", (t, done) => { }); test("full pet store V2 definition does not throw error ", (t, done) => { - const fastify = Fastify(structuredClone(noStrict)); + const fastify = Fastify(noStrict); fastify.register(fastifyOpenapiGlue, { specification: structuredClone(petStoreSpec), serviceHandlers, @@ -292,7 +292,7 @@ test("generic path parameters override works", async (t) => { }); test("schema attributes for non-body parameters work", async (t) => { - const fastify = Fastify(structuredClone(noStrict)); + const fastify = Fastify(noStrict); fastify.register(fastifyOpenapiGlue, { specification: structuredClone(petStoreSpec), serviceHandlers, diff --git a/test/test-plugin.v3.js b/test/test-plugin.v3.js index dce6282..c8ac682 100644 --- a/test/test-plugin.v3.js +++ b/test/test-plugin.v3.js @@ -248,7 +248,7 @@ test("response schema works with invalid response", async (t) => { }); test("yaml spec works", async (t) => { - const fastify = Fastify(structuredClone(noStrict)); + const fastify = Fastify(noStrict); fastify.register(fastifyOpenapiGlue, yamlOpts); const res = await fastify.inject({ @@ -315,7 +315,7 @@ test("missing service definition throws error ", (t, done) => { }); test("full pet store V3 definition does not throw error ", (t, done) => { - const fastify = Fastify(structuredClone(noStrict)); + const fastify = Fastify(noStrict); // dummy parser to fix coverage testing fastify.addContentTypeParser( "application/xml", @@ -341,7 +341,7 @@ test("V3.0.1 definition does not throw error", (t, done) => { serviceHandlers, }; - const fastify = Fastify(structuredClone(noStrict)); + const fastify = Fastify(noStrict); fastify.register(fastifyOpenapiGlue, opts301); fastify.ready((err) => { if (err) { @@ -361,7 +361,7 @@ test("V3.0.2 definition does not throw error", (t, done) => { serviceHandlers, }; - const fastify = Fastify(structuredClone(noStrict)); + const fastify = Fastify(noStrict); fastify.register(fastifyOpenapiGlue, opts302); fastify.ready((err) => { if (err) { @@ -381,7 +381,7 @@ test("V3.0.3 definition does not throw error", (t, done) => { serviceHandlers, }; - const fastify = Fastify(structuredClone(noStrict)); + const fastify = Fastify(noStrict); fastify.register(fastifyOpenapiGlue, opts303); fastify.ready((err) => { if (err) { diff --git a/test/test-recursive.v3.js b/test/test-recursive.v3.js index 1eb3975..60cea40 100644 --- a/test/test-recursive.v3.js +++ b/test/test-recursive.v3.js @@ -24,7 +24,7 @@ test("route registration succeeds with recursion", (t, done) => { serviceHandlers, }; - const fastify = Fastify(structuredClone(noStrict)); + const fastify = Fastify(noStrict); fastify.register(fastifyOpenapiGlue, opts); fastify.ready((err) => { if (err) { diff --git a/test/test-securityHandlers.js b/test/test-securityHandlers.js index e0053a1..73dbe1d 100644 --- a/test/test-securityHandlers.js +++ b/test/test-securityHandlers.js @@ -42,7 +42,7 @@ async function doTest(version, testSpecName, petStoreSpecName, prefix) { securityHandlers, }; - const fastify = Fastify(structuredClone(noStrict)); + const fastify = Fastify(noStrict); fastify.register(fastifyOpenapiGlue, opts); fastify.ready((err) => { if (err) {