Skip to content

Commit

Permalink
Merge pull request #215 from Fdawgs/chore/2024-01
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs authored Jan 7, 2024
2 parents cc74fc8 + f9ebbc6 commit 716dfa9
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 213 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
"plugin:jsdoc/recommended",
"plugin:promise/recommended",
"plugin:regexp/recommended",
"plugin:security/recommended",
"plugin:security/recommended-legacy",
"prettier",
],
overrides: [
Expand Down
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

48 changes: 42 additions & 6 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
release:
name: Create/Update Release Pull Request
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- name: Release Please
id: release
Expand All @@ -29,24 +31,58 @@ jobs:
release-type: node
package-name: fastify-floc-off

publish-npm:
name: Publish to NPM
needs: release
if: needs.release.outputs.release_created == 'true'
runs-on: ubuntu-latest
steps:
- name: Check out repo
if: steps.release.outputs.release_created
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node
if: steps.release.outputs.release_created
uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: https://registry.npmjs.org/
registry-url: https://registry.npmjs.org

- name: Publish to NPM
if: steps.release.outputs.release_created
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Remove dev values from package.json
# Remove dev values from package.json before publishing to reduce package size
run: |
npm pkg delete commitlint devDependencies jest scripts
npm publish --ignore-scripts --provenance --registry https://registry.npmjs.org
publish-ghp:
name: Publish to GitHub Packages
needs: release
if: needs.release.outputs.release_created == 'true'
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: https://npm.pkg.github.com
scope: "@fdawgs"

- name: Scope package
run: |
pkgName=$(npm pkg get name | tr -d '"')
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
run: |
npm pkg delete commitlint devDependencies jest scripts
npm publish --ignore-scripts --provenance
npm publish --ignore-scripts --registry https://npm.pkg.github.com/@fdawgs
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint:prettier && npm run lint:licenses && npm test
npm run lint:licenses && npm test
127 changes: 0 additions & 127 deletions CODE_OF_CONDUCT.md

This file was deleted.

49 changes: 0 additions & 49 deletions CONTRIBUTING.md

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ server.listen(3000, (err) => {

Contributions are welcome, and any help is greatly appreciated!

See [the contributing guide](./CONTRIBUTING.md) for details on how to get started.
Please adhere to this project's [Code of Conduct](./CODE_OF_CONDUCT.md) when contributing.
See [the contributing guide](https://github.com/Fdawgs/.github/blob/main/CONTRIBUTING.md) for details on how to get started.
Please adhere to this project's [Code of Conduct](https://github.com/Fdawgs/.github/blob/main/CODE_OF_CONDUCT.md) when contributing.

## Acknowledgements

Expand Down
13 changes: 0 additions & 13 deletions SECURITY.md

This file was deleted.

27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@
"jest": "jest",
"jest:coverage": "jest --coverage",
"lint": "eslint . --cache --ext js,jsx --ignore-path .gitignore",
"lint:fix": "npm run lint -- --fix",
"lint:licenses": "node scripts/license-checker.js",
"lint:prettier": "prettier . -c -u",
"lint:prettier:fix": "prettier . -w -u",
"prepare": "husky install",
"test": "npm run lint && npm run jest"
"test": "npm run lint && npm run lint:prettier && npm run jest"
},
"commitlint": {
"extends": [
Expand All @@ -63,24 +64,24 @@
"testTimeout": 10000
},
"devDependencies": {
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
"@commitlint/cli": "^18.4.4",
"@commitlint/config-conventional": "^18.4.4",
"@eslint-community/eslint-plugin-eslint-comments": "^4.1.0",
"@types/jest": "^29.5.10",
"eslint": "^8.54.0",
"@types/jest": "^29.5.11",
"eslint": "^8.56.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-jest": "^27.6.0",
"eslint-plugin-jsdoc": "^46.9.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.6.1",
"eslint-plugin-jsdoc": "^48.0.2",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-regexp": "^2.1.1",
"eslint-plugin-security": "^1.7.1",
"fastify": "^4.24.3",
"eslint-plugin-regexp": "^2.1.2",
"eslint-plugin-security": "^2.1.0",
"fastify": "^4.25.2",
"husky": "^8.0.3",
"jest": "^29.7.0",
"license-checker": "^25.0.1",
"prettier": "^3.1.0",
"prettier": "^3.1.1",
"spdx-copyleft": "^1.0.0",
"upath": "^2.0.1"
},
Expand Down

0 comments on commit 716dfa9

Please sign in to comment.