Skip to content

Commit

Permalink
fix: remove Object.fromEntries for node 10 support
Browse files Browse the repository at this point in the history
  • Loading branch information
prototypicalpro committed Dec 4, 2020
1 parent 41d26ba commit 0644374
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ jobs:
python -m pip install --upgrade pip
pip install docutils
- name: Setup Licensee and Linguist Dependencies (MacOS)
- name: Setup Licensee, Linguist, and Github-Markup Dependencies (MacOS)
if: ${{ runner.os == 'macOS' }}
run: brew install cmake pkg-config icu4c libidn

- name: Setup Licensee and Linguist Dependencies (Linux)
- name: Setup Licensee, Linguist, and Github-Markup Dependencies (Linux)
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update
sudo apt-get install -y build-essential libicu-dev libcurl4-openssl-dev libidn11
sudo apt-get install -y build-essential libicu-dev libcurl4-openssl-dev idn
- name: Setup Ruby
if: ${{ runner.os != 'Windows' }}
Expand All @@ -67,8 +67,9 @@ jobs:
if: ${{ runner.os != 'Windows' }}
run: |
gem install --no-document bundler
bundle config set system 'true'
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
echo "$(pwd)/vendor/bundle/ruby/2.6.0/bin" >> $GITHUB_PATH
- name: Run Test
run: npm test
9 changes: 8 additions & 1 deletion rules/file-no-broken-links.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@ async function fileNoBrokenLinks(fs, options) {
...options,
autoPrefix: [{ pattern: /^[\w_-]+\.[^\s]+$/i, prefix: 'https://' }], // autoprefix domain-only links
includeLink: link => !link.get('originalURL').startsWith('#') // exclude local section links
}).on('link', res => linkRes.push(Object.fromEntries(res.entries())))
}).on('link', res =>
linkRes.push(
Array.from(res.entries()).reduce((a, [key, value]) => {
a[key] = value
return a
}, {})
)
)
await htmlChecker.scan(
rendered,
new URL(`file://${path.posix.join(fs.targetDir, '/')}`)
Expand Down

0 comments on commit 0644374

Please sign in to comment.