Skip to content

Commit 5f7bac9

Browse files
authored
Merge pull request #367 from geostyler/update-and-bun
Update dependencies and switch to bun
2 parents e6905f7 + 70e8ade commit 5f7bac9

File tree

13 files changed

+114
-13864
lines changed

13 files changed

+114
-13864
lines changed

.eslintignore

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

.eslintrc.cjs

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

.github/workflows/commitlint.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- uses: actions/checkout@v4
9-
with:
10-
fetch-depth: 0
119
- uses: wagoid/commitlint-github-action@v5
1210
with:
1311
configFile: .commitlintrc.js

.github/workflows/on-pull-request.yml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,24 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88

9-
strategy:
10-
matrix:
11-
node-version: [18.x, 20.x]
12-
139
steps:
1410
- name: Checkout sources
1511
uses: actions/checkout@v4
1612

17-
- name: Use Node.js ${{ matrix.node-version }}
18-
uses: actions/setup-node@v4
19-
with:
20-
node-version: ${{ matrix.node-version }}
21-
22-
- name: Cache Node.js modules 💾
23-
uses: actions/cache@v4
24-
with:
25-
path: ~/.npm
26-
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
27-
restore-keys: |
28-
${{ runner.OS }}-node-
29-
${{ runner.OS }}-
13+
- name: Set up bun
14+
uses: oven-sh/setup-bun@v2
3015

3116
- name: Install dependencies ⏬
32-
run: npm install
17+
run: bun install
3318

3419
- name: Lint code 💄
35-
run: npm run lint
20+
run: bun run lint
3621

3722
- name: Test code ✅
38-
run: npm run test
23+
run: bun test --coverage --coverage-reporter=lcov
3924

4025
- name: Build artifacts 🏗️
41-
run: npm run build
26+
run: bun run build
4227

4328
- name: Publish to coveralls ⭐
4429
# coverage/lcov.info was generated in the previous npm run build step

.github/workflows/on-push-master.yml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,24 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111

12-
strategy:
13-
matrix:
14-
node-version: [18.x, 20.x]
15-
1612
steps:
1713
- name: Checkout sources
1814
uses: actions/checkout@v4
1915

20-
- name: Use Node.js ${{ matrix.node-version }}
21-
uses: actions/setup-node@v4
22-
with:
23-
node-version: ${{ matrix.node-version }}
24-
25-
- name: Cache Node.js modules 💾
26-
uses: actions/cache@v4
27-
with:
28-
path: ~/.npm
29-
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
30-
restore-keys: |
31-
${{ runner.OS }}-node-
32-
${{ runner.OS }}-
16+
- name: Set up bun
17+
uses: oven-sh/setup-bun@v2
3318

3419
- name: Install dependencies ⏬
35-
run: npm install
20+
run: bun install
3621

3722
- name: Lint code 💄
38-
run: npm run lint
23+
run: bun run lint
3924

4025
- name: Test code ✅
41-
run: npm run test
26+
run: bun test --coverage --coverage-reporter=lcov
4227

4328
- name: Build artifacts 🏗️
44-
run: npm run build
29+
run: bun run build
4530

4631
- name: Publish to coveralls ⭐
4732
# coverage/lcov.info was generated in the previous npm run build step

.github/workflows/release.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@ jobs:
1414
- name: Checkout sources 🔰
1515
uses: actions/checkout@v4
1616

17-
- name: Setup Node.js 20 👷🏻
18-
uses: actions/setup-node@v4
19-
with:
20-
node-version: 20
17+
- name: Set up bun
18+
uses: oven-sh/setup-bun@v2
2119

2220
- name: Install dependencies ⏬
23-
run: npm ci
21+
run: bun install
2422

2523
- name: Build artifacts 🏗️
26-
run: npm run build
24+
run: bun run build
2725

2826
- name: Release 🚀
2927
uses: cycjimmy/semantic-release-action@v4.1.1

bun.lockb

358 KB
Binary file not shown.

eslint.config.mjs

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import tsParser from '@typescript-eslint/parser';
2+
import path from 'node:path';
3+
import { fileURLToPath } from 'node:url';
4+
import js from '@eslint/js';
5+
import { FlatCompat } from '@eslint/eslintrc';
6+
7+
const filename = fileURLToPath(import.meta.url);
8+
const dirname = path.dirname(filename);
9+
const compat = new FlatCompat({
10+
baseDirectory: dirname,
11+
recommendedConfig: js.configs.recommended,
12+
allConfig: js.configs.all
13+
});
14+
15+
export default [
16+
{
17+
ignores: ['eslint.config.mjs', 'dist/**', 'data/**', '.commitlintrc.cjs']
18+
},
19+
...compat.extends('@terrestris/eslint-config-typescript'),
20+
{
21+
files: ['**/*.ts', '**/*.tsx', '*.mjs'],
22+
languageOptions: {
23+
parser: tsParser,
24+
parserOptions: {
25+
project: [
26+
'tsconfig.json',
27+
'tsconfig.test.json',
28+
],
29+
tsconfigRootDir: dirname,
30+
}
31+
},
32+
},
33+
{
34+
rules: {
35+
'@typescript-eslint/switch-exhaustiveness-check': 'off'
36+
}
37+
}
38+
];

0 commit comments

Comments
 (0)