diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 0a934de..8128a14 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -23,7 +23,7 @@ jobs: id: release uses: google-github-actions/release-please-action@v3 with: - changelog-types: '[ { "type": "feat", "section": "Features", "hidden": false }, { "type": "fix", "section": "Bug Fixes", "hidden": false }, { "type": "build", "section": "Dependencies", "hidden": false }, { "type": "chore", "section": "Miscellaneous", "hidden": false }, { "type": "ci", "section": "Continuous Integration", "hidden": false }, { "type": "perf", "section": "Improvements", "hidden": false }, { "type": "refactor", "section": "Improvements", "hidden": false }, { "type": "style", "section": "Miscellaneous", "hidden": false }, { "type": "docs", "section": "Documentation", "hidden": false }]' + changelog-types: '[ { "type": "feat", "section": "Features", "hidden": false }, { "type": "fix", "section": "Bug fixes", "hidden": false }, { "type": "build", "section": "Dependencies", "hidden": false }, { "type": "chore", "section": "Miscellaneous", "hidden": false }, { "type": "ci", "section": "Continuous integration", "hidden": false }, { "type": "perf", "section": "Improvements", "hidden": false }, { "type": "refactor", "section": "Improvements", "hidden": false }, { "type": "style", "section": "Miscellaneous", "hidden": false }, { "type": "docs", "section": "Documentation", "hidden": false }]' release-type: node package-name: fastify-floc-off diff --git a/CHANGELOG.md b/CHANGELOG.md index 953a84b..fe8076a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## [2.0.5](https://github.com/Fdawgs/fastify-floc-off/compare/v2.0.4...v2.0.5) (2023-01-31) -### Bug Fixes +### Bug fixes * **index:** add to permissions-policy header if one already exists ([#144](https://github.com/Fdawgs/fastify-floc-off/issues/144)) ([2b12ab4](https://github.com/Fdawgs/fastify-floc-off/commit/2b12ab448314a7f05b38eb8d6f951e26aaec55db)) @@ -29,7 +29,7 @@ ## [2.0.4](https://github.com/Fdawgs/fastify-floc-off/compare/v2.0.3...v2.0.4) (2022-10-25) -### Continuous Integration +### Continuous integration * **cd:** remove dev values from `package.json` ([#138](https://github.com/Fdawgs/fastify-floc-off/issues/138)) ([2c7f75c](https://github.com/Fdawgs/fastify-floc-off/commit/2c7f75c854fe6f40e804c91b8904eed1b39fd66d)) @@ -131,7 +131,7 @@ * use npm install alias ([c52fc0a](https://github.com/Fdawgs/fastify-floc-off/commit/c52fc0ade2fd8db2a4c949f04d5d670abbe8b35c)) -### Continuous Integration +### Continuous integration * add dependency-review job ([14f81fd](https://github.com/Fdawgs/fastify-floc-off/commit/14f81fd52fd2e7cb9db794b167668f9074ba3d17)) * **automerge:** fix context ([7c3cab1](https://github.com/Fdawgs/fastify-floc-off/commit/7c3cab1a244ca1c1d83b36829e2601f3aa0aa8e9)) @@ -177,7 +177,7 @@ * **scripts:** use shorter arg aliases; remove debugging args from jest ([ac15f3b](https://github.com/Fdawgs/fastify-floc-off/commit/ac15f3bfe0151234aa3c209729e4b0e7b3451d00)) -### Continuous Integration +### Continuous integration * add job step names, workflow comments, and whitespace ([970f4db](https://github.com/Fdawgs/fastify-floc-off/commit/970f4db7202a8725c120ee8d0aeb9cd2338afff6)) * **codeql-analysis:** remove unused autobuild step ([3648199](https://github.com/Fdawgs/fastify-floc-off/commit/3648199bc37942745cdda65c11e006c3efb04a96)) @@ -232,7 +232,7 @@ * **index:** fix `server` jsdoc tag param type ([4e73240](https://github.com/Fdawgs/fastify-floc-off/commit/4e73240dd1588c4e42e5f15c2e4f931cc91eb42a)) -### Continuous Integration +### Continuous integration * **cd:** stop `prepare` script running ([#65](https://github.com/Fdawgs/fastify-floc-off/issues/65)) ([7758b27](https://github.com/Fdawgs/fastify-floc-off/commit/7758b274760e6731bac5c005df1f2885c4014ef3)) * **ci:** do not run clean-up on draft prs ([cc8d3a0](https://github.com/Fdawgs/fastify-floc-off/commit/cc8d3a00000a1bc2d9c22f70b1f945228d492df7)) @@ -262,7 +262,7 @@ ### [1.0.3](https://github.com/Fdawgs/fastify-floc-off/compare/v1.0.2...v1.0.3) (2021-10-29) -### Continuous Integration +### Continuous integration * **automerge:** update location of octokit rest methods ([0e82ead](https://github.com/Fdawgs/fastify-floc-off/commit/0e82ead92e0dd6f2f87e2ab545a4cd099fc14516)) * **ci:** revert to workflow-run-clean-action from github concurrency ([2aa77ca](https://github.com/Fdawgs/fastify-floc-off/commit/2aa77ca05c4752b0010f77beb3a895aec5608d1e)) @@ -318,7 +318,7 @@ * **workflows:** remove `stale.yml` ([5c66306](https://github.com/Fdawgs/fastify-floc-off/commit/5c66306151ce5d6b21ccccfd59f7efae4c073342)) -### Continuous Integration +### Continuous integration * **cd:** move perf optimizations and refactoring into same section ([256e987](https://github.com/Fdawgs/fastify-floc-off/commit/256e98760fa071f4919bb7458bf2bb6d79bd426b)) * **ci:** replace workflow-run-cleanup-action with github concurrency ([#36](https://github.com/Fdawgs/fastify-floc-off/issues/36)) ([ae97274](https://github.com/Fdawgs/fastify-floc-off/commit/ae9727410e4f60bded6ffb2f413fb4fcae22d6fd)) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8c150b0..f608427 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,13 +13,13 @@ Other processes and specifications that are in use in this repository are: - [Conventional commits](https://conventionalcommits.org/en/v1.0.0/) following the @commitlint/config-conventional config - [Prettier](https://prettier.io/) style guide -## Getting Started +## Getting started This repository requires that you have [Node.js](https://nodejs.org) >=14.0.0 installed. With that in place, you can fork the repository, clone it, and then run `npm i` to install all dependencies. -### Development Workflow +### Development workflow After cloning the repository and installing all the dependencies, there are several commands available for local development: @@ -27,19 +27,13 @@ After cloning the repository and installing all the dependencies, there are seve - `npm run jest` - Runs Jest over all tests in src directory - `npm test` - Runs `npm run lint` and `npm run jest` together -## Documentation Style +## Documentation style Documentation (both in markdown files and inline comments) should be written in **British English** where possible. -Titles and headings should adhere to the [Associated Press (AP)](https://apstylebook.com/) style: +Titles and headings should use sentence-style capitalisation, where only the first letter of a sentence and proper nouns are capitalised. -- Capitalise words with three or more letters -- Capitalise the first and the last word -- Capitalise nouns, pronouns, adjectives, verbs, adverbs, and subordinate conjunctions -- Lowercase articles (a, an, the), coordinating conjunctions, and prepositions -- Capitalise words with four or more letters (including conjunctions and prepositions) - -## Pull Request Checklist +## Pull request checklist Before submitting a pull request back to the main repository, please make sure you have completed the following steps: diff --git a/README.md b/README.md index 99cd88d..5509cb9 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ > Fastify plugin to opt-out of Google's FLoC advertising-surveillance network -## Intro +## Overview The `fastify-floc-off` plugin adds the "interest-cohort=()" directive to the `Permissions-Policy` response header to opt-out of Google's FLoC advertising-surveillance network. It will create a new header if one does not already exist. @@ -26,7 +26,7 @@ npm i fastify-floc-off For Fastify v3.x support, use `fastify-floc-off@1.0.7`. -## Example Usage +## Example usage ```js const Fastify = require("fastify"); diff --git a/SECURITY.md b/SECURITY.md index fd706f6..a4de9d7 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,6 +1,6 @@ # Security -## Disclosure Policy +## Disclosure policy Please email reports about any security-related issues you find to frazer.dev@outlook.com. Please use a descriptive subject line in your report email, in addition to a reference or link to this repository. diff --git a/package.json b/package.json index 7f9cf7a..5ae092f 100644 --- a/package.json +++ b/package.json @@ -51,20 +51,20 @@ "devDependencies": { "@commitlint/cli": "^17.4.2", "@commitlint/config-conventional": "^17.4.2", - "eslint": "^8.33.0", + "eslint": "^8.34.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^8.6.0", "eslint-plugin-import": "^2.27.5", "eslint-plugin-jest": "^27.2.1", - "eslint-plugin-jsdoc": "^39.7.4", + "eslint-plugin-jsdoc": "^40.0.0", "eslint-plugin-promise": "^6.1.1", - "eslint-plugin-security": "^1.7.0", + "eslint-plugin-security": "^1.7.1", "eslint-plugin-security-node": "^1.1.1", - "fastify": "^4.12.0", + "fastify": "^4.13.0", "husky": "^8.0.3", - "jest": "^29.4.1", + "jest": "^29.4.2", "license-checker": "^25.0.1", - "prettier": "^2.8.3" + "prettier": "^2.8.4" }, "dependencies": { "fastify-plugin": "^4.5.0" diff --git a/src/index.test.js b/src/index.test.js index e8ccdd5..003b63a 100644 --- a/src/index.test.js +++ b/src/index.test.js @@ -1,8 +1,8 @@ const Fastify = require("fastify"); const plugin = require("."); -describe("Floc-Off Plugin", () => { - describe("Response Headers", () => { +describe("Floc-Off plugin", () => { + describe("Response headers", () => { let server; beforeAll(async () => {