Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: JustinBeckwith/linkinator
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c915959529247b1177baf975a04a3bc0ef8cca72
Choose a base ref
...
head repository: JustinBeckwith/linkinator
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: ea89b421e1ddabdfd00263800e85ef7a3a2020d8
Choose a head ref
Loading
Showing with 11,325 additions and 241 deletions.
  1. +9 −0 .c8rc
  2. +63 −22 .github/workflows/ci.yaml
  3. +34 −0 .github/workflows/codeql.yml
  4. +1 −2 .gitignore
  5. +3 −2 .mocharc.json
  6. +4 −0 .releaserc.json
  7. +143 −40 README.md
  8. +9,383 −0 package-lock.json
  9. +19 −18 package.json
  10. +1 −2 renovate.json
  11. +156 −57 src/cli.ts
  12. +5 −0 src/config.ts
  13. +216 −80 src/index.ts
  14. +17 −1 src/links.ts
  15. +49 −0 src/logger.ts
  16. +143 −0 src/options.ts
  17. +75 −0 src/queue.ts
  18. +118 −0 src/server.ts
  19. +2 −1 test/fixtures/config/linkinator.config.json
  20. +6 −0 test/fixtures/config/skip-array-config.json
  21. +1 −0 test/fixtures/directoryIndex/README.md
  22. +1 −0 test/fixtures/directoryIndex/dir1/dir1.md
  23. 0 test/fixtures/directoryIndex/dir2/dir2.md
  24. +5 −0 test/fixtures/local/index.html
  25. +5 −0 test/fixtures/local/page2.html
  26. +21 −0 test/fixtures/markdown/LICENSE.md
  27. +6 −0 test/fixtures/markdown/README.md
  28. BIN test/fixtures/markdown/boo.jpg
  29. +4 −0 test/fixtures/markdown/deep/deep.md
  30. +4 −0 test/fixtures/markdown/unlinked.md
  31. +5 −0 test/fixtures/nested/doll1/index.html
  32. +5 −0 test/fixtures/nested/doll2/index.html
  33. +7 −0 test/fixtures/retry/index.html
  34. +5 −0 test/fixtures/retry/subpage.html
  35. +5 −0 test/fixtures/retryCLI/index.html
  36. +5 −0 test/fixtures/server/5.0/index.html
  37. +5 −0 test/fixtures/server/bag/bag.html
  38. +5 −0 test/fixtures/server/index.html
  39. +1 −0 test/fixtures/server/script.js
  40. +5 −0 test/fixtures/server/test.html
  41. +11 −0 test/fixtures/twittercard/index.html
  42. +235 −0 test/test.cli.ts
  43. +245 −1 test/{test.ts → test.index.ts}
  44. +213 −0 test/test.retry.ts
  45. +78 −0 test/test.server.ts
  46. +0 −13 test/zcli.ts
  47. +1 −2 tsconfig.json
9 changes: 9 additions & 0 deletions .c8rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"exclude": [
"build/test"
],
"reporter": [
"html",
"text"
]
}
85 changes: 63 additions & 22 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,65 +1,106 @@
on:
push:
branches:
- master
- main
pull_request:
name: ci
env:
FORCE_COLOR: 2
NODE: 14
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [10, 12, 14]
node: [10, 12, 14, 15]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- run: npm install
- name: Set up npm cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
- run: npm ci
- run: npm test
- uses: codecov/codecov-action@v1
if: matrix.node == env.NODE
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 12
- run: npm install
node-version: ${{ env.NODE }}
- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Set up npm cache
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
- run: npm ci
- run: npm test
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE }}
- name: Set up npm cache
uses: actions/cache@v2
with:
node-version: 12
- run: npm install
path: ~/.npm
key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
- run: npm ci
- run: npm run lint
coverage:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: 12
- run: npm install
- run: npm test
- run: npm run codecov
- uses: codecov/codecov-action@v1
node-version: ${{ env.NODE }}
- name: Set up npm cache
uses: actions/cache@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
path: ~/.npm
key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
- run: npm ci
- run: npm run docs-test
release:
if: github.ref == 'refs/heads/master'
if: github.repository == 'JustinBeckwith/linkinator' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: [test, lint]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE }}
- name: Set up npm cache
uses: actions/cache@v2
with:
node-version: 12
- run: npm install
path: ~/.npm
key: ${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-v${{ env.NODE }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
- run: npm ci
- run: npm run compile
- run: npm run build-binaries
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 34 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "CodeQL"

on:
push:
branches:
- main
- "!renovate/**"
pull_request:
# The branches below must be a subset of the branches above
branches:
- main
schedule:
- cron: "0 0 * * 0"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: "javascript"

- name: Autobuild
uses: github/codeql-action/autobuild@v1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules/
package-lock.json
.nyc_output
build/
coverage
.vscode
5 changes: 3 additions & 2 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"check-leaks": true,
"timeout": 10000,
"timeout": 2000,
"throw-deprecation": true,
"enable-source-maps": true
"enable-source-maps": true,
"exit": true
}
4 changes: 4 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"assets": "build/binaries/*",
"branches": ["main"]
}
Loading