From 85d35f0bbf365812e3471b94a0c44ddcc72b0e8d Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Tue, 28 Nov 2023 21:10:28 +0000 Subject: [PATCH 1/4] test: return promises directly See https://eslint.org/docs/latest/rules/no-return-await --- src/index.test.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/index.test.js b/src/index.test.js index 9fd30e6..1a97c22 100644 --- a/src/index.test.js +++ b/src/index.test.js @@ -19,9 +19,7 @@ describe("Disablecache plugin", () => { await server.ready(); }); - afterAll(async () => { - await server.close(); - }); + afterAll(async () => server.close()); it("Sets relevant cache response headers", async () => { const response = await server.inject({ From a4996cada167bc5fc9acd79640ef74d26efad79d Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Tue, 28 Nov 2023 21:11:35 +0000 Subject: [PATCH 2/4] build(deps-dev): remove broken eslint-plugin-security-node --- .eslintrc.js | 10 +--------- package.json | 1 - 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 0feb469..831aeb0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -12,7 +12,6 @@ module.exports = { "plugin:promise/recommended", "plugin:regexp/recommended", "plugin:security/recommended", - "plugin:security-node/recommended", "prettier", ], overrides: [ @@ -40,14 +39,7 @@ module.exports = { // Explicitly tell ESLint to parse JavaScript as CommonJS, as airbnb-base sets this to "modules" for ECMAScript sourceType: "script", }, - plugins: [ - "import", - "jsdoc", - "promise", - "regexp", - "security", - "security-node", - ], + plugins: ["import", "jsdoc", "promise", "regexp", "security"], root: true, rules: { "@eslint-community/eslint-comments/disable-enable-pair": "off", diff --git a/package.json b/package.json index fd67467..373f792 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,6 @@ "eslint-plugin-promise": "^6.1.1", "eslint-plugin-regexp": "^2.1.1", "eslint-plugin-security": "^1.7.1", - "eslint-plugin-security-node": "^1.1.1", "fastify": "^4.21.0", "husky": "^8.0.3", "jest": "^29.6.2", From 9d6e702a611d7689b393e77bfff9ae7acf9abacd Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Wed, 29 Nov 2023 07:57:47 +0000 Subject: [PATCH 3/4] docs(readme): use full cjs for example --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8488634..51b8648 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,10 @@ server.get("/", (_req, res) => { res.send("ok"); }); -await server.listen({ port: 3000 }); +server.listen(3000, (err) => { + if (err) throw err; + console.log("Server listening on 3000"); +}); ``` ## Contributing From ceb5228be17f9a7014333dcc104166debd1e2553 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Wed, 29 Nov 2023 08:00:49 +0000 Subject: [PATCH 4/4] build(deps-dev): bump dev dependencies --- package.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 373f792..5cf4baa 100644 --- a/package.json +++ b/package.json @@ -63,24 +63,24 @@ "testTimeout": 10000 }, "devDependencies": { - "@commitlint/cli": "^18.2.0", - "@commitlint/config-conventional": "^18.1.0", + "@commitlint/cli": "^18.4.3", + "@commitlint/config-conventional": "^18.4.3", "@eslint-community/eslint-plugin-eslint-comments": "^4.1.0", - "@types/jest": "^29.5.3", - "eslint": "^8.47.0", + "@types/jest": "^29.5.10", + "eslint": "^8.54.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^9.0.0", - "eslint-plugin-import": "^2.28.0", - "eslint-plugin-jest": "^27.2.3", - "eslint-plugin-jsdoc": "^46.4.6", + "eslint-plugin-import": "^2.29.0", + "eslint-plugin-jest": "^27.6.0", + "eslint-plugin-jsdoc": "^46.9.0", "eslint-plugin-promise": "^6.1.1", "eslint-plugin-regexp": "^2.1.1", "eslint-plugin-security": "^1.7.1", - "fastify": "^4.21.0", + "fastify": "^4.24.3", "husky": "^8.0.3", - "jest": "^29.6.2", + "jest": "^29.7.0", "license-checker": "^25.0.1", - "prettier": "^3.0.2", + "prettier": "^3.1.0", "spdx-copyleft": "^1.0.0", "upath": "^2.0.1" },