From eb88e72b0441da0ce42a2b31ecf9b6a767ffe785 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Tue, 13 Apr 2021 15:21:26 +0100 Subject: [PATCH 1/5] ci(dependabot): update github actions --- .github/dependabot.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6cab366..5e48d4e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,8 +1,12 @@ version: 2 updates: + - package-ecosystem: github-actions + directory: '/' + schedule: + interval: daily + open-pull-requests-limit: 10 - package-ecosystem: npm directory: '/' schedule: interval: daily open-pull-requests-limit: 10 - From a69b08c288700747204d1eda2e07d002190a9207 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Tue, 13 Apr 2021 15:21:59 +0100 Subject: [PATCH 2/5] style(ci): use standardized template --- .github/workflows/ci.yml | 47 +++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 480fea7..0caecef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,27 +1,44 @@ -name: CI workflow -on: [push, pull_request] +name: CI + +on: + push: + paths-ignore: + - 'docs/**' + - '*.md' + pull_request: + paths-ignore: + - 'docs/**' + - '*.md' + jobs: test: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: matrix: node-version: [10.x, 12.x, 14.x] + os: [macos-latest, ubuntu-latest, windows-latest] + steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - name: Install Dependencies - run: npm install --ignore-scripts - - name: Test - run: npm test + - uses: actions/checkout@v2 + + - name: Use Node.js + uses: actions/setup-node@v2.1.5 + with: + node-version: ${{ matrix.node-version }} + + - name: Install Dependencies + run: | + npm install --ignore-scripts + + - name: Run Tests + run: | + npm test automerge: needs: test runs-on: ubuntu-latest steps: - - uses: fastify/github-action-merge-dependabot@v1 - if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }} + - uses: fastify/github-action-merge-dependabot@v2.0.0 with: - github-token: ${{secrets.github_token}} + github-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 77c3eb9346ebd9e4d027bb5854e1b18e13a35dec Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Tue, 13 Apr 2021 15:22:13 +0100 Subject: [PATCH 3/5] chore(gitignore): use latest github template --- .gitignore | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 128 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 2d8d77e..1992952 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,130 @@ -.nyc_output/ -coverage/ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +# Vim swap files +*.swp + +# macOS files +.DS_Store + +# lock files package-lock.json +yarn.lock + +# editor files +.vscode +.idea \ No newline at end of file From 4332bf98e54590bba73c2fc48d3229e6c75d77a1 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Tue, 13 Apr 2021 15:22:23 +0100 Subject: [PATCH 4/5] docs(readme): add badges --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index f3e2167..d2c03e4 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # proxy-addr +![CI](https://github.com/fastify/proxy-addr/workflows/CI/badge.svg) +[![NPM version](https://img.shields.io/npm/v/@fastify/proxy-addr.svg?style=flat)](https://www.npmjs.com/package/@fastify/proxy-addr) +[![Known Vulnerabilities](https://snyk.io/test/github/fastify/proxy-addr/badge.svg)](https://snyk.io/test/github/fastify/proxy-addr) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) + Determine address of proxied request. Forked from https://github.com/jshttp/proxy-addr to address https://github.com/jshttp/forwarded/pull/9. From 007cf759b20f4e26f61349e15b7638c2e9af8e61 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Tue, 13 Apr 2021 15:22:45 +0100 Subject: [PATCH 5/5] chore(package): add links --- package.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 533686b..eea578b 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,14 @@ "proxy", "x-forwarded-for" ], - "repository": "fastify/proxy-addr", + "repository": { + "type": "git", + "url": "git+https://github.com/fastify/proxy-addr.git" + }, + "bugs": { + "url": "https://github.com/fastify/proxy-addr/issues" + }, + "homepage": "https://github.com/fastify/proxy-addr#readme", "dependencies": { "@fastify/forwarded": "^1.0.0", "ipaddr.js": "^2.0.0"