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: a6ed6f0ebb5207329296b78588a379851b984ced
Choose a base ref
...
head repository: JustinBeckwith/linkinator
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2cab633c9659eb10794a4bac06f8b0acdc3e2c0c
Choose a head ref

Commits on Jun 11, 2020

  1. Copy the full SHA
    8726a9f View commit details
  2. chore(deps): update dependency mocha to v8 (#172)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 11, 2020
    Copy the full SHA
    d07f9b4 View commit details

Commits on Jun 28, 2020

  1. chore(deps): update dependency nock to v13 (#174)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jun 28, 2020
    Copy the full SHA
    f790f9a View commit details

Commits on Jul 16, 2020

  1. chore(deps): update dependency @types/mocha to v8 (#176)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jul 16, 2020
    Copy the full SHA
    5eee0c3 View commit details

Commits on Aug 20, 2020

  1. chore(deps): update dependency typescript to v4 (#177)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Aug 20, 2020
    Copy the full SHA
    72d4c53 View commit details
  2. fix(deps): update dependency jsonexport to v3 (#170)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Aug 20, 2020
    Copy the full SHA
    f7c6b3a View commit details

Commits on Sep 29, 2020

  1. fix(deps): update dependency update-notifier to v5 (#181)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Sep 29, 2020
    Copy the full SHA
    e5b1aca View commit details

Commits on Sep 30, 2020

  1. chore(deps): update dependency @types/update-notifier to v5 (#182)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Sep 30, 2020
    Copy the full SHA
    ae5a42a View commit details

Commits on Oct 13, 2020

  1. chore(deps): update dependency gts to v3 (#183)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Oct 13, 2020
    Copy the full SHA
    9d38cdb View commit details
  2. feat: Send requests with human User-Agent header to reduce false posi…

    …tives. (#134)
    
    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36
    
    Co-authored-by: Justin Beckwith <beckwith@google.com>
    jakejarvis and JustinBeckwith authored Oct 13, 2020
    Copy the full SHA
    9a32354 View commit details
  3. Copy the full SHA
    5b72e08 View commit details

Commits on Oct 29, 2020

  1. Copy the full SHA
    a0cc8ba View commit details
  2. fix(deps): update dependency meow to v8 (#186)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Oct 29, 2020
    Copy the full SHA
    e23c0dd View commit details
  3. fix(deps): update dependency gaxios to v4 (#185)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Oct 29, 2020
    Copy the full SHA
    c915959 View commit details

Commits on Nov 29, 2020

  1. feat: add basic support for markdown (#188)

    This adds a `--markdown` flag that allows for basic markdown link scanning.  When passing `--markdown` on the CLI or setting the `markdown: true` option, markdown in the local directory will be rendered as HTML and scanned.
    JustinBeckwith authored Nov 29, 2020
    Copy the full SHA
    524f600 View commit details
  2. Copy the full SHA
    f4822f0 View commit details
  3. Copy the full SHA
    bae9d38 View commit details
  4. Copy the full SHA
    ce649d4 View commit details

Commits on Dec 1, 2020

  1. Copy the full SHA
    e70dff6 View commit details
  2. Copy the full SHA
    8913f87 View commit details

Commits on Dec 2, 2020

  1. 4
    Copy the full SHA
    429b325 View commit details

Commits on Dec 3, 2020

  1. Copy the full SHA
    b47f4b6 View commit details
  2. Copy the full SHA
    c40be4b View commit details
  3. chore(deps): update dependency execa to v5 (#201)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Dec 3, 2020
    Copy the full SHA
    c7fa9ad View commit details

Commits on Dec 6, 2020

  1. Copy the full SHA
    8d8472a View commit details

Commits on Dec 7, 2020

  1. Copy the full SHA
    0c8cd4b View commit details

Commits on Dec 21, 2020

  1. Copy the full SHA
    217074e View commit details

Commits on Dec 22, 2020

  1. Copy the full SHA
    7c84936 View commit details

Commits on Dec 24, 2020

  1. feat: add verbosity flag to CLI (#214)

    This adds a --verbosity flag, which defaults to WARNING. Skipped links now are hidden by default, unless verbosity is set to INFO or DEBUG.
    JustinBeckwith authored Dec 24, 2020
    Copy the full SHA
    d20cff5 View commit details
  2. Copy the full SHA
    cf29469 View commit details
  3. Copy the full SHA
    9eb5590 View commit details
  4. Copy the full SHA
    a8c0a43 View commit details

Commits on Dec 26, 2020

  1. Copy the full SHA
    fee112b View commit details
  2. Copy the full SHA
    679d64f View commit details

Commits on Dec 28, 2020

  1. Copy the full SHA
    c752724 View commit details
  2. Copy the full SHA
    6e49545 View commit details

Commits on Dec 29, 2020

  1. Copy the full SHA
    6f8d65a View commit details
  2. feat: support directory listings (#225)

    In addition to providing the directory listing flag, this swaps the underlying HTTP server from `serve-static` to `serve-handler`.  There should be no user facing changes for that swap.
    JustinBeckwith authored Dec 29, 2020
    Copy the full SHA
    39cf9d2 View commit details
  3. Copy the full SHA
    a7d8625 View commit details

Commits on Dec 30, 2020

  1. Copy the full SHA
    d7c4758 View commit details
  2. Copy the full SHA
    96a8750 View commit details
  3. Copy the full SHA
    936af89 View commit details

Commits on Jan 3, 2021

  1. feat: introduce retry-after detection (#221)

    This introduces a --retry flag, which when passed will automatically retry requests that comes back with a HTTP 429, and a retry-after header. I tested this against GitHub , and it appears to work as expected.
    JustinBeckwith authored Jan 3, 2021
    Copy the full SHA
    cebea21 View commit details

Commits on Jan 4, 2021

  1. Copy the full SHA
    1850490 View commit details

Commits on Jan 5, 2021

  1. fix: map paths in results back to filesystem (#231)

    Fixes #166.  This updates the returned paths in the results to map to the filesystem if a local path was given.
    JustinBeckwith authored Jan 5, 2021
    Copy the full SHA
    5f7bb18 View commit details

Commits on Jan 7, 2021

  1. fix(deps): update dependency meow to v9 (#232)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>
    renovate[bot] and renovate-bot authored Jan 7, 2021
    Copy the full SHA
    6374c60 View commit details

Commits on Jan 10, 2021

  1. Copy the full SHA
    5d347f0 View commit details
  2. Copy the full SHA
    9ff9e9a View commit details
  3. build: disable package-lock.json properly (#236)

    The default setting is to always generate a package-lock.json file, so this step is required to prevent its generation.
    
    Co-authored-by: Justin Beckwith <beckwith@google.com>
    XhmikosR and JustinBeckwith authored Jan 10, 2021
    Copy the full SHA
    e6c539a View commit details
  4. docs: README.md Markdown tweaks (#238)

    * add newlines before/after code blocks and lists
    * remove dollar sign from snippets since it makes copying harder and the commands don't have any output
    * fix headings hierarchy
    
    Co-authored-by: Justin Beckwith <beckwith@google.com>
    XhmikosR and JustinBeckwith authored Jan 10, 2021
    Copy the full SHA
    105d783 View commit details
Showing with 20,872 additions and 616 deletions.
  1. +9 −0 .c8rc
  2. +37 −28 .github/workflows/ci.yaml
  3. +35 −0 .github/workflows/codeql.yml
  4. +1 −2 .gitignore
  5. +3 −2 .mocharc.json
  6. +0 −3 .prettierrc.js
  7. +6 −0 .prettierrc.json
  8. +4 −0 .releaserc.json
  9. +171 −43 README.md
  10. +9 −0 SECURITY.md
  11. +18,140 −0 package-lock.json
  12. +40 −41 package.json
  13. +0 −4 prettier.config.js
  14. +1 −1 renovate.json
  15. +233 −73 src/cli.ts
  16. +17 −7 src/config.ts
  17. +306 −80 src/index.ts
  18. +50 −25 src/links.ts
  19. +49 −0 src/logger.ts
  20. +156 −0 src/options.ts
  21. +82 −0 src/queue.ts
  22. +124 −0 src/server.ts
  23. +2 −1 test/fixtures/config/linkinator.config.json
  24. +6 −0 test/fixtures/config/skip-array-config.json
  25. +1 −0 test/fixtures/directoryIndex/README.md
  26. +1 −0 test/fixtures/directoryIndex/dir1/dir1.md
  27. 0 test/fixtures/directoryIndex/dir2/dir2.md
  28. +5 −0 test/fixtures/local/index.html
  29. +5 −0 test/fixtures/local/page2.html
  30. +21 −0 test/fixtures/markdown/LICENSE.md
  31. +6 −0 test/fixtures/markdown/README.md
  32. BIN test/fixtures/markdown/boo.jpg
  33. +4 −0 test/fixtures/markdown/deep/deep.md
  34. +4 −0 test/fixtures/markdown/unlinked.md
  35. +5 −0 test/fixtures/nested/doll1/index.html
  36. +5 −0 test/fixtures/nested/doll2/index.html
  37. +7 −0 test/fixtures/retry/index.html
  38. +5 −0 test/fixtures/retry/subpage.html
  39. +5 −0 test/fixtures/retryCLI/index.html
  40. +21 −0 test/fixtures/rewrite/LICENSE.md
  41. +2 −0 test/fixtures/rewrite/README.md
  42. +5 −0 test/fixtures/server/5.0/index.html
  43. +5 −0 test/fixtures/server/bag/bag.html
  44. +5 −0 test/fixtures/server/index.html
  45. +1 −0 test/fixtures/server/script.js
  46. +5 −0 test/fixtures/server/test.html
  47. +4 −0 test/fixtures/srcset/_site/bar.html
  48. +4 −0 test/fixtures/srcset/_site/foo.html
  49. +5 −0 test/fixtures/srcset/index.html
  50. +11 −0 test/fixtures/twittercard/index.html
  51. +3 −0 test/fixtures/urlpatterns/funky+path.html
  52. +3 −0 test/fixtures/urlpatterns/index.html
  53. +293 −0 test/test.cli.ts
  54. +6 −7 test/test.config.ts
  55. +576 −0 test/test.index.ts
  56. +285 −0 test/test.retry.ts
  57. +79 −0 test/test.server.ts
  58. +0 −283 test/test.ts
  59. +0 −13 test/zcli.ts
  60. +4 −3 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"
]
}
65 changes: 37 additions & 28 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,65 +1,74 @@
on:
push:
branches:
- master
- main
pull_request:
name: ci
env:
FORCE_COLOR: 2
NODE: 16
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [10, 12, 13]
node: [14, 16, 18]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: npm install
cache: npm
- run: node -v
- run: npm ci
- run: npm test
- run: npm run codecov
if: matrix.node == env.NODE
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12
- run: npm install
node-version: ${{ env.NODE }}
cache: npm
- run: npm ci
- run: npm test
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12
- run: npm install
node-version: ${{ env.NODE }}
cache: npm
- run: npm ci
- run: npm run lint
coverage:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm install
- run: npm test
- run: npm run codecov
- uses: codecov/codecov-action@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
node-version: ${{ env.NODE }}
cache: npm
- 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/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12
- run: npm install
node-version: ${{ env.NODE }}
cache: npm
- run: npm ci
- run: npm run compile
# disabed due to https://github.com/vercel/pkg/issues/1291
# - run: npm run build-binaries
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "CodeQL"

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

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

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

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: "javascript"

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
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
}
3 changes: 0 additions & 3 deletions .prettierrc.js

This file was deleted.

6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"bracketSpacing": false,
"singleQuote": true,
"trailingComma": "es5",
"arrowParens": "avoid"
}
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