Skip to content

Commit ee8f214

Browse files
Merge pull request #8 from yowainwright/update-import-map-location
feat: adds easier testing support ⚡️
2 parents 00260bb + ad1ca5e commit ee8f214

25 files changed

+8122
-6683
lines changed

.devcontainer/devcontainer.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
2-
"name": "Node.js",
3-
"build": {
4-
"dockerfile": "Dockerfile",
5-
"args": { "VARIANT": "18-bullseye", "NODE_ENV": "docker-dev" }
6-
},
7-
"settings": {},
8-
"extensions": [
9-
"rvest.vs-code-prettier-eslint",
2+
"name": "Node.js",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"args": { "VARIANT": "18-bullseye", "NODE_ENV": "docker-dev" }
6+
},
7+
"settings": {},
8+
"extensions": [
9+
"rvest.vs-code-prettier-eslint",
1010
"ZixuanChen.vitest-explorer",
1111
"wix.vscode-import-cost",
1212
"eamodio.gitlens"
13-
],
14-
"postCreateCommand": "chomp install --ignore-scripts",
15-
"remoteUser": "node"
13+
],
14+
"postCreateCommand": "chomp install --ignore-scripts",
15+
"remoteUser": "node"
1616
}

.eslintrc

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

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ updates:
66
interval: daily
77
allow:
88
- dependency-name: '@jspm/generator'
9+
- dependency-name: '@jspm/import-map'

.husky/commit-msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
npm run commit-msg
4+
npx commitlint --edit $1

.husky/post-merge

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
chomp npm:install && chomp build
4+
chomp post-merge

.prettierrc

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

chompfile.toml

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ default-task = 'build'
44

55
[[task]]
66
name = 'build'
7-
run = 'tsup src/loader.ts --format esm,cjs --dts'
8-
dep = 'src/loader.ts'
7+
run = 'tsup src/loader.ts --format esm --dts'
8+
dep = 'src/#.ts'
99
target = 'dist/loader.js'
1010

1111
[[task]]
@@ -16,50 +16,53 @@ target = 'package-lock.json'
1616

1717
[[task]]
1818
name = 'clean'
19-
run = 'rimraf dist'
19+
run = 'rm -rf dist'
2020

2121
[[task]]
2222
name = 'commit'
2323
run = 'git-cz'
2424

2525
[[task]]
26-
name = 'commit-msg'
27-
run = 'commitlint --edit $1'
26+
name = 'default'
27+
run = 'npm install --no-save [email protected] @teleporthq/[email protected] @teleporthq/[email protected] chalk express morgan [email protected] [email protected].1'
2828

2929
[[task]]
30-
name = 'default'
31-
run = 'npm install --no-save [email protected] @teleporthq/[email protected] @teleporthq/[email protected] chalk express morgan [email protected] [email protected] && node tests/e2e/test.js'
30+
name = 'format'
31+
run = 'prettier --write **/*.{ts,json,md}'
3232

3333
[[task]]
3434
name = 'lint'
3535
run = 'eslint src --ext .ts'
36-
deps = ['src/#.ts', 'tests/loader.test.ts']
36+
deps = ['src/#.ts']
3737

3838
[[task]]
39-
name = 'lint-fix'
40-
deps = ['src/#.ts', 'tests/loader.test.ts']
39+
name = 'lint:fix'
4140
run = 'eslint src --ext .ts --fix'
41+
deps = ['src/#.ts']
42+
43+
[[task]]
44+
name = 'post-merge'
45+
deps = ['npm:install', 'build']
4246

4347
[[task]]
4448
name = 'pre-commit'
45-
run = 'lint-staged'
46-
deps = ['src/#.ts', 'tests/loader.test.ts']
49+
deps = ['typecheck', 'test:changed', 'lint:fix', 'format']
4750

4851
[[task]]
4952
name = 'prepare'
5053
run = 'husky install'
5154

5255
[[task]]
5356
name = 'prepublishOnly'
54-
deps = [':test', ':build']
57+
deps = ['test', 'build']
5558

5659
[[task]]
5760
name = 'release'
5861
run = 'release-it'
5962

6063
[[task]]
6164
name = 'server'
62-
deps = [':server:build', ':server:start']
65+
deps = ['server:build', 'server:start']
6366

6467
[[task]]
6568
name = 'server:build'
@@ -75,19 +78,29 @@ echo "Server started."
7578

7679
[[task]]
7780
name = 'test'
78-
deps = [':test:unit', ':test:e2e']
81+
deps = ['test:unit', 'test:e2e']
7982

8083
[[task]]
8184
name = 'test:e2e'
82-
serial = true
83-
deps = [':default', ':build']
8485
run = 'node --loader ./dist/loader.js tests/e2e/test.js'
86+
deps = ['default', 'build']
8587

8688
[[task]]
8789
name = 'test:unit'
88-
run = 'vitest run'
90+
run = 'jest'
91+
92+
[[task]]
93+
name = 'test:changed'
94+
run = 'jest --bail --changesince=main'
8995

9096
[[task]]
9197
name = 'typecheck'
9298
run = 'tsc --noEmit'
93-
deps = ['src/#.ts']
99+
100+
[[task]]
101+
name = 'upgrade'
102+
run = 'npm update --latest'
103+
104+
[[task]]
105+
name = 'dir-size'
106+
run = 'du -hs .cache'

0 commit comments

Comments
 (0)