Skip to content

Commit f739109

Browse files
committed
feat: improve TypeScript types
BREAKING CHANGE: remove flow types, TypeScript type changes may cause new errors
1 parent 2b51f09 commit f739109

File tree

70 files changed

+5522
-16555
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+5522
-16555
lines changed

.babelrc.cjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* eslint-env node, es2018 */
2+
module.exports = function (api) {
3+
const base = require('@jcoreio/toolchain-esnext/.babelrc.cjs')(api)
4+
return {
5+
...base,
6+
}
7+
}

.babelrc.js

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

.circleci/config.yml

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,43 @@
1-
version: 2
1+
# created by @jcoreio/toolchain-circle
2+
3+
version: 2.1
4+
5+
orbs:
6+
codecov: codecov/codecov@4.1.0
7+
28
jobs:
39
build:
410
docker:
5-
- image: circleci/node:8
11+
- image: cimg/node:20.10.0
612

713
steps:
814
- checkout
9-
- restore_cache:
10-
name: Restore Yarn Package Cache
11-
keys:
12-
- v1-yarn-packages-{{ checksum "yarn.lock" }}
13-
1415
- run:
1516
name: Setup NPM Token
1617
command: |
17-
yarn config set registry "https://registry.npmjs.org/"
18-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
19-
echo "registry=https://registry.npmjs.org/" >> .npmrc
20-
18+
npm config set \
19+
"//registry.npmjs.org/:_authToken=$NPM_TOKEN" \
20+
"registry=https://registry.npmjs.org/"
2121
- run:
22-
name: Install Dependencies
23-
command: yarn install --frozen-lockfile
24-
- save_cache:
25-
name: Save Yarn Package Cache
26-
key: v1-yarn-packages-{{ checksum "yarn.lock" }}
27-
paths:
28-
- ~/.cache/yarn
29-
22+
name: Corepack enable
23+
command: sudo corepack enable
3024
- run:
31-
name: build
32-
command: yarn run prepublishOnly
25+
name: Install Dependencies
26+
command: pnpm install --frozen-lockfile
3327
- run:
34-
name: upload test coverage
35-
command: yarn codecov || true
28+
name: Prepublish
29+
command: |
30+
[[ $(netstat -tnlp | grep -F 'circleci-agent') ]] || pnpm run tc prepublish
31+
- codecov/upload
3632
- run:
37-
name: release
38-
command: yarn run semantic-release || true
33+
name: Release
34+
command: |
35+
[[ $(netstat -tnlp | grep -F 'circleci-agent') ]] || pnpm run tc release
36+
37+
workflows:
38+
build:
39+
jobs:
40+
- build:
41+
context:
42+
- npm-release
43+
- github-release

.eslintrc

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

.flowconfig

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

.gitignore

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
coverage
1+
/dist
22
.nyc_output
33
node_modules
4-
.eslintcache
5-
/*.js
6-
/*.cjs
7-
/*.js.flow
8-
/*.d.ts
9-
!/.babelrc.js
4+
/coverage

.mocharc.cjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* eslint-env node, es2018 */
2+
const base = require('@jcoreio/toolchain-mocha/.mocharc.cjs')
3+
const { getSpecs } = require('@jcoreio/toolchain-mocha')
4+
module.exports = {
5+
...base,
6+
spec: getSpecs(['test/index.ts']),
7+
}

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
optional=false

.vscode/launch.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "test:debug <file>",
6+
"port": 9229,
7+
"request": "attach",
8+
"skipFiles": ["<node_internals>/**"],
9+
"type": "node",
10+
"preLaunchTask": "test:debug <file>"
11+
}
12+
]
13+
}

.vscode/tasks.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "shell",
6+
"options": {
7+
"shell": {
8+
"executable": "bash",
9+
"args": ["-c", "-l"]
10+
}
11+
},
12+
"command": "pnpm",
13+
"isBackground": false,
14+
"group": "test",
15+
"presentation": {
16+
"panel": "dedicated",
17+
"clear": true
18+
},
19+
"label": "test <file>",
20+
"args": ["tc", "test", "${file}"]
21+
},
22+
{
23+
"type": "shell",
24+
"options": {
25+
"shell": {
26+
"executable": "bash",
27+
"args": ["-c", "-l"]
28+
}
29+
},
30+
"command": "pnpm",
31+
"isBackground": false,
32+
"group": "test",
33+
"presentation": {
34+
"panel": "dedicated",
35+
"clear": true
36+
},
37+
"label": "test:watch <file>",
38+
"args": ["tc", "test", "--watch", "${file}"]
39+
},
40+
{
41+
"type": "shell",
42+
"options": {
43+
"shell": {
44+
"executable": "bash",
45+
"args": ["-c", "-l"]
46+
}
47+
},
48+
"command": "pnpm",
49+
"isBackground": false,
50+
"group": "test",
51+
"presentation": {
52+
"panel": "dedicated",
53+
"clear": true
54+
},
55+
"label": "test:debug <file>",
56+
"args": ["tc", "test", "-n", "inspect-brk", "${file}"]
57+
}
58+
]
59+
}

0 commit comments

Comments
 (0)