Skip to content

Commit 2510578

Browse files
authored
Update all the things (#157)
* Drop Node.js < 14 support * Remove debug dependency * Fix tests on Windows * Switch to GitHub Actions CI * Add c8 for coverage * Update dependencies * Remove rewire and esm, update mocha and switch to ESM for tests
1 parent 6358873 commit 2510578

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+11718
-6304
lines changed

.c8rc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"reporter": [
3+
"html",
4+
"lcovonly",
5+
"text"
6+
]
7+
}

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
indent_size = 2
9+
indent_style = space
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Enforce Unix newlines
2+
* text=auto eol=lf

.github/codeql/codeql-config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
name: "CodeQL config"
2+
paths-ignore:
3+
- "test/fixtures/**"

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: monthly

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
- "!dependabot/**"
8+
pull_request:
9+
workflow_dispatch:
10+
11+
env:
12+
FORCE_COLOR: 2
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
test:
19+
name: Node ${{ matrix.node }} on ${{ matrix.os }}
20+
runs-on: ${{ matrix.os }}
21+
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
os: [ubuntu-latest, windows-latest]
26+
node: [14, 16, 18, 20]
27+
28+
steps:
29+
- name: Clone repository
30+
uses: actions/checkout@v3
31+
with:
32+
persist-credentials: false
33+
34+
- name: Set up Node.js
35+
uses: actions/setup-node@v3
36+
with:
37+
node-version: ${{ matrix.node }}
38+
cache: npm
39+
40+
- name: Install npm dependencies
41+
run: npm ci
42+
43+
- name: Run unit tests
44+
run: npm run test:ci

.github/workflows/codeql.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- "!dependabot/**"
8+
pull_request:
9+
branches:
10+
- main
11+
- "!dependabot/**"
12+
schedule:
13+
- cron: "0 0 * * 0"
14+
workflow_dispatch:
15+
16+
jobs:
17+
analyze:
18+
name: Analyze
19+
runs-on: ubuntu-latest
20+
permissions:
21+
actions: read
22+
contents: read
23+
security-events: write
24+
25+
steps:
26+
- name: Clone repository
27+
uses: actions/checkout@v3
28+
with:
29+
persist-credentials: false
30+
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@v2
33+
with:
34+
config-file: ./.github/codeql/codeql-config.yml
35+
languages: "javascript"
36+
queries: +security-and-quality
37+
38+
- name: Autobuild
39+
uses: github/codeql-action/autobuild@v2
40+
41+
- name: Perform CodeQL Analysis
42+
uses: github/codeql-action/analyze@v2
43+
with:
44+
category: "/language:javascript"

.github/workflows/lint.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
- "!dependabot/**"
8+
pull_request:
9+
workflow_dispatch:
10+
11+
env:
12+
FORCE_COLOR: 2
13+
NODE: 18
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
lint:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Clone repository
24+
uses: actions/checkout@v3
25+
with:
26+
persist-credentials: false
27+
28+
- name: Set up Node.js
29+
uses: actions/setup-node@v3
30+
with:
31+
node-version: ${{ env.NODE }}
32+
cache: npm
33+
34+
- name: Install npm dependencies
35+
run: npm ci
36+
37+
- name: Lint
38+
run: npm run lint

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
node_modules
1+
/coverage/
2+
/node_modules/

.jscsrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)