Skip to content

Commit 2a2e3d5

Browse files
committed
Upgrade dependencies, use Bun instead of Node.js
1 parent 4d64340 commit 2a2e3d5

File tree

7 files changed

+42
-21415
lines changed

7 files changed

+42
-21415
lines changed

.github/workflows/pages.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ jobs:
3131
- name: Setup Pages
3232
uses: actions/configure-pages@v2
3333

34-
- name: Setup Node
35-
uses: actions/setup-node@v3
34+
- name: Setup Bun
35+
uses: oven-sh/setup-bun@v1
3636

3737
- name: Install dependencies
38-
run: npm ci
38+
run: bun install
3939

4040
- name: Install Cargo
4141
uses: dtolnay/rust-toolchain@stable

contributing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ By simply running `make` it will also print a short list of them.
1111
Build and run:
1212

1313
```shell
14-
npx spago run --exec-args 'balance test/test.yaml'
14+
bun x spago run --exec-args 'balance test/test.yaml'
1515
```
1616

1717
Make `transity` executable available in your path:
@@ -29,7 +29,7 @@ will now be available via the linked `transity` executable.
2929
Generate and serve the Pursuit documentation with:
3030

3131
```sh
32-
npx spago docs
32+
bun x spago docs
3333
cd generated-docs/html
3434
python3 -m http.server 1222
3535
```

flake.nix

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
# TODO: This somehow makes it use nodejs_18
5757
# inputsFrom = builtins.attrValues self.packages.${system};
5858
buildInputs = with pkgs; [
59+
bun
5960
nodejs_20
6061
watchexec
6162

makefile

+26-25
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ all: changelog.md readme.md index.js docs output
99

1010
.PHONY: build
1111
build: | node_modules
12-
npx spago build
12+
bun x spago build
1313

1414

1515
changelog.md: .git | node_modules
1616
# git config changelog.format '- %s (%h)'
1717
# git changelog
18-
npx conventional-changelog \
18+
bun x conventional-changelog \
1919
--infile $@ \
2020
--same-file \
2121
--output-unreleased
2222

2323

2424
srcFiles := $(shell find src -type f -name "*.purs")
2525
index.js: $(srcFiles) spago.yaml | node_modules
26-
npx spago bundle \
26+
bun x spago bundle \
2727
--platform node \
2828
--minify
2929

@@ -33,7 +33,7 @@ bundle: index.js
3333

3434
# The specified target is configured in package.json
3535
docs: output | node_modules
36-
npx parcel build webapp/index.html \
36+
bun x parcel build webapp/index.html \
3737
--public-url /Transity \
3838
--no-source-maps \
3939
--target $@
@@ -43,54 +43,54 @@ docs: output | node_modules
4343
# Use e.g. Vercel's "serve" like this: `serve docs-dev`.
4444
# The specified target is configured in package.json.
4545
docs-dev: output index.js | node_modules
46-
npx parcel build webapp/index.html \
46+
bun x parcel build webapp/index.html \
4747
--no-source-maps \
4848
--target $@
4949

5050

5151

5252
output: src spago.yaml | node_modules
53-
npx spago build
53+
bun x spago build
5454

5555

56-
node_modules: package.json package-lock.json
57-
if test ! -d $@; then npm install; fi
56+
node_modules: package.json
57+
if test ! -d $@; then bun install; fi
5858

5959

6060
readme.md: | node_modules
61-
npx markdown-toc -i $@
61+
bun x markdown-toc -i $@
6262

6363

6464
##### TESTING ######
6565

6666
.PHONY: lint-js
6767
lint-js: | node_modules
68-
npx eslint \
68+
bun x eslint \
6969
--max-warnings 0 \
70-
--ignore-path .gitignore \
70+
--ignore-pattern .gitignore \
7171
scripts
7272

7373

7474
.PHONY: test-spago
7575
test-spago: | node_modules
76-
npx spago test
76+
bun x spago test
7777

7878

7979
.PHONY: test-cli
8080
test-cli: | node_modules
81-
npx spago run -- \
81+
bun x spago run -- \
8282
balance examples/journal.yaml \
8383
> /dev/null
8484

85-
npx spago run -- \
85+
bun x spago run -- \
8686
balance examples/journal.yaml examples/journal-only-transactions.yaml \
8787
> /dev/null
8888

89-
npx spago run -- \
89+
bun x spago run -- \
9090
unused-files examples/receipts examples/journal.yaml \
9191
2> /dev/null
9292

93-
npx spago run -- \
93+
bun x spago run -- \
9494
unused-files \
9595
examples/receipts \
9696
examples/journal.yaml \
@@ -106,16 +106,17 @@ test: test-spago test-cli lint-js
106106
test-watch: | node_modules
107107
watchexec \
108108
--exts purs \
109-
'npx spago test'
109+
'bun x spago test'
110110

111111

112112
.PHONY: clean
113113
clean:
114-
-rm -rf \
115-
.parcel-cache \
116-
.spago \
117-
docs \
118-
docs-dev \
119-
index.js \
120-
node_modules \
121-
output
114+
-rm -f bun.lockb
115+
-rm -f index.js
116+
-rm -f package-lock.json
117+
-rm -rf .parcel-cache
118+
-rm -rf .spago
119+
-rm -rf docs
120+
-rm -rf docs-dev
121+
-rm -rf node_modules
122+
-rm -rf output

0 commit comments

Comments
 (0)