Skip to content

Commit 37f19c0

Browse files
authored
yarn -> bun, use TypeScript (miso.ts) (#847)
1 parent f8dd006 commit 37f19c0

19 files changed

+1482
-4468
lines changed

.github/workflows/main.yml

+10-4
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,17 @@ jobs:
2929
- name: Nix channel update
3030
run: nix-channel --update
3131

32-
- name: Miso.js tests
33-
run: nix-shell -p yarn --run 'yarn install && yarn run test'
32+
- name: Bun install
33+
run: nix-env -iA bun -f '<nixpkgs>' && bun install
3434

35-
- name: Miso.js linting
36-
run: nix-shell -p yarn --run 'yarn run lint'
35+
- name: Miso.ts tests
36+
run: bun run test
37+
38+
# - name: Miso.ts linting
39+
# run: bun run lint
40+
41+
- name: Bun build
42+
run: bun run build
3743

3844
- name: (JS) Miso GHCJS
3945
run: nix-build -A miso-ghcjs

.gitignore

+22-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,33 @@
1+
# haskell
12
.stack-work/
23
dist-newstyle/
34
cabal.project.local
45
.ghc.environment.*
5-
result*
6-
node_modules/
76
dist
8-
*~
9-
.DS_Store
107
*.o
118
*.hi
129
*.jsexe
10+
11+
# nix
12+
result*
13+
14+
# emacs
15+
*~
16+
17+
# darwin
18+
.DS_Store
19+
20+
# misc
1321
TAGS
22+
tags
1423
.direnv
24+
25+
# js
26+
package-lock.json
27+
node_modules/
1528
coverage/
29+
30+
# typescript
31+
/js/miso.js
32+
/ts/*.js
33+
/ts/miso/*.js

bun.lock

+220
Large diffs are not rendered by default.

bunfig.toml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[test]
2+
preload = "./ts/happydom.ts"
3+
coverage = true
4+
coverageReporter = ["text", "lcov"]
5+
coverageSkipTestFiles = true

eslint.config.js

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
import { defineConfig } from "eslint/config";
22
import globals from "globals";
33
import js from "@eslint/js";
4-
import jestPlugin from "eslint-plugin-jest";
54

65
export default defineConfig([
7-
{ files: ["**/*.{js,mjs,cjs}"] },
8-
{ files: ["**/*.js"], languageOptions: { sourceType: "script" } },
6+
{ files: ["**/*.{js,mjs,cjs,ts}"] },
7+
{ files: ["**/*.js","**/*.ts"], languageOptions: { sourceType: "script" } },
98
{
10-
files: ["**/*.{js,mjs,cjs}"],
9+
files: ["**/*.{js,mjs,cjs,ts}"],
1110
languageOptions: {
12-
globals: { ...globals.browser, ...globals.node, ...globals.jest },
11+
globals: { ...globals.browser, ...globals.node },
1312
},
1413
},
1514
{
16-
files: ["**/*.{js,mjs,cjs}"],
17-
plugins: { js, jestPlugin },
15+
files: ["**/*.{js,mjs,cjs,ts}"],
16+
plugins: { js },
1817
extends: ["js/recommended"],
1918
},
2019
{
2120
rules: {
22-
"no-global-assign": ["error", { exceptions: ["module"] }],
21+
"no-global-assign": ["error", { exceptions: ["miso"] }],
2322
"arrow-body-style": ["error", "always"],
2423
},
2524
},

0 commit comments

Comments
 (0)