Skip to content

Commit 9dfa3d1

Browse files
authored
Merge pull request #605 from geostyler/update-and-bun
Update dependencies and use bun
2 parents 11ae5eb + 8bce720 commit 9dfa3d1

File tree

10 files changed

+7270
-5834
lines changed

10 files changed

+7270
-5834
lines changed

.eslintignore

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

.eslintrc.cjs

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

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

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,23 @@ jobs:
1414
- name: Checkout sources
1515
uses: actions/checkout@v4
1616

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 }}-
17+
- name: Use bun
18+
uses: oven-sh/setup-bun@v2
3019

3120
- name: Install dependencies ⏬
32-
run: npm install
21+
run: bun install
3322

3423
- name: Lint code 💄
35-
run: npm run lint
24+
run: bun run lint
3625

3726
- name: Typecheck code 🤖
38-
run: npm run typecheck
27+
run: bun run typecheck
3928

4029
- name: Test code ✅
41-
run: npm run test
30+
run: bun test --coverage --coverage-reporter=lcov
4231

4332
- name: Build artifacts 🏗️
44-
run: npm run build
33+
run: bun run build
4534

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

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

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,23 @@ jobs:
1717
- name: Checkout sources
1818
uses: actions/checkout@v4
1919

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 }}-
20+
- name: Use bun
21+
uses: oven-sh/setup-bun@v2
3322

3423
- name: Install dependencies ⏬
35-
run: npm install
24+
run: bun install
3625

3726
- name: Lint code 💄
38-
run: npm run lint
27+
run: bun run lint
3928

4029
- name: Typecheck code 🤖
41-
run: npm run typecheck
30+
run: bun run typecheck
4231

4332
- name: Test code ✅
44-
run: npm run test
33+
run: bun test --coverage --coverage-reporter=lcov
4534

4635
- name: Build artifacts 🏗️
47-
run: npm run build
36+
run: bun run build
4837

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

bun.lock

Lines changed: 2302 additions & 0 deletions
Large diffs are not rendered by default.

eslint.config.mjs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
ignores: ['eslint.config.mjs', 'vite.config.ts', 'vitest.config.ts', 'dist', '.commitlintrc.cjs']
17+
},
18+
...compat.extends('@terrestris/eslint-config-typescript'), {
19+
files: ['**/*.ts', '**/*.tsx'],
20+
languageOptions: {
21+
parser: tsParser,
22+
parserOptions: {
23+
project: ['tsconfig.test.json'],
24+
tsconfigRootDir: dirname,
25+
}
26+
},
27+
}];

0 commit comments

Comments
 (0)