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: readmeio/fetch-har
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8.1.2
Choose a base ref
...
head repository: readmeio/fetch-har
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
17 changes: 5 additions & 12 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
{
"extends": [
"@readme/eslint-config",
"@readme/eslint-config/typescript"
],
"extends": ["@readme/eslint-config", "@readme/eslint-config/typescript", "@readme/eslint-config/esm"],
"root": true,
"env": {
"es2020": true
},
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"global-require": "off",
"no-case-declarations": "off"
},
"settings": {
"polyfills": [
"fetch",
"Headers",
"Request"
]
},
"overrides": [
{
"files": ["example.js"],
"files": ["example.{c,m}js"],
"rules": {
"@typescript-eslint/no-var-requires": "off",
"import/extensions": "off",
"import/no-commonjs": "off",
"import/no-extraneous-dependencies": "off",
"no-console": "off"
}
22 changes: 10 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
directory: '/'
schedule:
interval: monthly
reviewers:
@@ -13,27 +13,25 @@ updates:
prefix-development: chore(deps-dev)

- package-ecosystem: npm
directory: "/"
directory: '/'
schedule:
interval: monthly
open-pull-requests-limit: 10
reviewers:
- erunion
labels:
- dependencies
groups:
minor-development-deps:
dependency-type: 'development'
update-types:
- minor
- patch
commit-message:
prefix: chore(deps)
prefix-development: chore(deps-dev)
ignore:
# These can't be upgraded because `@jsdevtools/karma-config@3` still requires Webpack 4.
- dependency-name: ts-loader
versions:
- "> 8"
- dependency-name: webpack
versions:
- "> 4"

# node-fetch is now an ESM package and can't be used here without a rewrite.
- dependency-name: node-fetch
- dependency-name: temp-dir
versions:
- ">= 3"
- '>= 3'
160 changes: 60 additions & 100 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -7,26 +7,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16

- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v3.0.5
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
node-version: lts/-1
cache: 'npm'

- run: npm ci
- run: npm run build
- run: npm run lint

node_tests:
@@ -40,93 +27,66 @@ jobs:
- ubuntu-latest
- windows-latest
node:
- 14
- 16
- 18
- lts/-1
- lts/*
- latest

steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Node ${{ matrix.node }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v3.0.5
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
# Node 14 still ships with npm@6 which doesn't install peerDeps by default.
- name: Install npm@7
if: matrix.node == '14'
run: npm install -g npm@7

- run: npm ci
- run: npm run build
- run: npm run test --ignore-scripts

browser_tests:
name: Browser
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
browser:
- chrome
- firefox
os:
- ubuntu-latest
- windows-latest

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

- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 16

- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v3.0.5
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run build

# Chrome
- uses: browser-actions/setup-chrome@latest
if: matrix.browser == 'chrome'

- name: Run tests on Chrome
if: matrix.browser == 'chrome'
run: |
npm run test:browser -- --browsers=ChromeHeadless
# Firefox
- uses: browser-actions/setup-chrome@latest
if: matrix.browser == 'firefox'

- name: Run tests on Firefox
if: matrix.browser == 'firefox'
run: |
npm run test:browser -- --browsers=FirefoxHeadless
cache: 'npm'

- run: npm cit

###
### Temporarily skipping these until browser testing in Vitest is a bit more stable.
###
# browser_tests:
# name: Browser
# runs-on: ${{ matrix.os }}
# timeout-minutes: 5
# strategy:
# fail-fast: true
# matrix:
# browser:
# - chrome
# - firefox
# os:
# - ubuntu-latest
# - windows-latest

# steps:
# - name: Checkout source
# uses: actions/checkout@v4

# - name: Install Node
# uses: actions/setup-node@v4
# with:
# node-version: 18
# cache: 'npm'

# - run: npm ci
# - run: npm run build

# # Chrome
# - uses: browser-actions/setup-chrome@latest
# if: matrix.browser == 'chrome'

# - name: Run tests on Chrome
# if: matrix.browser == 'chrome'
# run: |
# npm run test:browser -- --browsers=ChromeHeadless

# # Firefox
# - uses: browser-actions/setup-chrome@latest
# if: matrix.browser == 'firefox'

# - name: Run tests on Firefox
# if: matrix.browser == 'firefox'
# run: |
# npm run test:browser -- --browsers=FirefoxHeadless
20 changes: 10 additions & 10 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "CodeQL"
name: 'CodeQL'

on:
push:
@@ -20,16 +20,16 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: ['javascript']

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

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
13 changes: 0 additions & 13 deletions .mocharc.json

This file was deleted.

9 changes: 0 additions & 9 deletions .npmignore

This file was deleted.

1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lockfile-version=3
Loading