Skip to content

Commit

Permalink
Merge pull request #272 from Fdawgs/chore/tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs authored Apr 3, 2024
2 parents ded4173 + 7b33ad1 commit 7b31246
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ updates:
- "@commitlint*"
eslint:
patterns:
- "@eslint-community*"
- "eslint*"
fastify-core:
patterns:
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >
Expand Down
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7b31246

Please sign in to comment.