-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.sh
More file actions
41 lines (37 loc) · 937 Bytes
/
script.sh
File metadata and controls
41 lines (37 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
set -euo pipefail
set -x
# Node 25 currently trips Yarn PnP's ESM loader path (EBADF in `tsc`);
# force node-modules linker so CI/local builds stay stable across Node versions.
export YARN_NODE_LINKER=node-modules
cmd="${1:-}"
case "$cmd" in
build)
yarn install --immutable
yarn run tsc --noEmit
yarn run eslint .
yarn run prettier --check .
yarn run tsdown
yarn pack --out artifacts/pretty-error-tree.tgz
;;
test)
yarn install
yarn run tsc --noEmit
yarn run eslint .
yarn run tsx test/test.ts
yarn run prettier --check .
yarn run tsdown
yarn pack --out artifacts/pretty-error-tree.tgz
bash -c "cd test-project && yarn cache clean && yarn && yarn run test"
;;
testlite)
yarn install
yarn run tsc --noEmit
yarn run eslint .
yarn run tsx test/test.ts
;;
*)
echo "Usage: $0 <build|test|testlite>"
exit 1
;;
esac