From 25bc7a30955a1823301856ec0f148d7076ec9570 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Fri, 8 Mar 2024 16:05:44 +0000 Subject: [PATCH 1/4] ci(dependabot): add `@eslint-community` scoped deps to eslint group --- .github/dependabot.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6aa2514..9b66f98 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -24,6 +24,7 @@ updates: - "@commitlint*" eslint: patterns: + - "@eslint-community*" - "eslint*" fastify-core: patterns: From 7805d50e0abe69fbe4142eeb48657621b8cb2e56 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Fri, 8 Mar 2024 16:18:18 +0000 Subject: [PATCH 2/4] ci(cd): standardise @fdawgs cd workflows --- .github/workflows/cd.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 2b713ea..35e2854 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -53,8 +53,11 @@ jobs: - name: Publish to NPM env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - # Remove dev values from package.json before publishing to reduce package size + # Build docs/definitions, and remove dev values + # from package.json before publishing to reduce package size run: | + npm i --ignore-scripts + npm run build --if-present npm pkg delete commitlint devDependencies jest scripts npm publish --access public --ignore-scripts --provenance @@ -63,6 +66,7 @@ jobs: needs: release if: needs.release.outputs.release_created == 'true' runs-on: ubuntu-latest + environment: main permissions: contents: read id-token: write @@ -82,13 +86,16 @@ jobs: - name: Scope package run: | - pkgName=$(npm pkg get name | tr -d '"') + pkgName=$(node -p "require('./package.json').name") npm pkg set name="@fdawgs/$pkgName" - name: Publish to GitHub Packages env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Remove dev values from package.json before publishing to reduce package size + # Build docs/definitions, and remove dev values + # from package.json before publishing to reduce package size run: | + npm i --ignore-scripts + npm run build --if-present npm pkg delete commitlint devDependencies jest scripts npm publish --access public --ignore-scripts --provenance From 933847831acd26a15c794f6d34c684448b949a4b Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Sat, 9 Mar 2024 08:41:45 +0000 Subject: [PATCH 3/4] ci(ci): standardise @fdawgs ci workflows --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 02aa563..353f55c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,6 +69,9 @@ jobs: - name: Run License Checker run: npm run lint:licenses + - name: Run Build + run: npm run build --if-present + commit-lint: name: Lint Commit Messages if: > From 7b33ad13faf9937791aedc85280911d8306a21af Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Wed, 3 Apr 2024 18:57:21 +0100 Subject: [PATCH 4/4] chore(index): inline comment re export types --- src/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 98b23ea..17bc470 100644 --- a/src/index.js +++ b/src/index.js @@ -22,6 +22,6 @@ async function fastifyDisablecache(server) { module.exports = fp(fastifyDisablecache, { fastify: "4.x", name: "fastify-disablecache", -}); -module.exports.default = fastifyDisablecache; -module.exports.fastifyDisablecache = fastifyDisablecache; +}); // CommonJS export +module.exports.default = fastifyDisablecache; // ESM default export +module.exports.fastifyDisablecache = fastifyDisablecache; // TypeScript and named export