Skip to content

Commit cabf555

Browse files
committed
chore: convert to toolchain and fix errors
1 parent ee6b4c8 commit cabf555

27 files changed

+3586
-2896
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 & 21 deletions
This file was deleted.

.circleci/config.yml

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,38 @@
1-
version: 2
1+
# created by @jcoreio/toolchain-circle
2+
3+
version: 2.1
24
jobs:
35
build:
46
docker:
5-
- image: circleci/node:16
7+
- image: cimg/node:20.10.0
68

79
steps:
810
- checkout
911
- run:
1012
name: Setup NPM Token
1113
command: |
12-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
13-
echo "registry=https://registry.npmjs.org/" >> ~/.npmrc
14+
npm config set \
15+
"//registry.npmjs.org/:_authToken=$NPM_TOKEN" \
16+
"registry=https://registry.npmjs.org/"
1417
- run:
15-
name: Install pnpm
16-
command: sudo npm install --global pnpm
18+
name: Corepack enable
19+
command: sudo corepack enable
1720
- run:
1821
name: Install Dependencies
1922
command: pnpm install --frozen-lockfile
2023
- run:
21-
name: build
22-
command: pnpm prepublishOnly
23-
- run:
24-
name: upload test coverage
25-
command: pnpm codecov
24+
name: Prepublish
25+
command: |
26+
[[ $(netstat -tnlp | grep -F 'circleci-agent') ]] || pnpm run tc prepublish
2627
- run:
27-
name: release
28-
command: pnpm semantic-release
28+
name: Release
29+
command: |
30+
[[ $(netstat -tnlp | grep -F 'circleci-agent') ]] || pnpm run tc release
31+
32+
workflows:
33+
build:
34+
jobs:
35+
- build:
36+
context:
37+
- npm-release
38+
- github-release

.eslintrc

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

.eslintrc.cjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/* eslint-env node, es2018 */
2+
module.exports = {
3+
extends: [require.resolve('@jcoreio/toolchain/eslintConfig.cjs')],
4+
env: {
5+
node: true,
6+
},
7+
rules: {
8+
'@typescript-eslint/no-explicit-any': 0,
9+
'@typescript-eslint/no-use-before-define': 0,
10+
},
11+
}

.flowconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
[ignore]
2+
<PROJECT_ROOT>/dist/.*
3+
.*/malformed_package_json/.*
24

35
[include]
6+
./src
7+
./test
48

59
[libs]
610

.gitignore

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
1-
/coverage
2-
/.nyc_output
1+
/dist
2+
.nyc_output
33
node_modules
4-
/es
5-
.eslintcache
6-
*.js
7-
*.js.flow
8-
*.d.ts
9-
!/flow-typed/**/*.js
10-
!/src/**/*.ts
11-
!/src/**/*.js
12-
!/src/**/*.js.flow
13-
!/test/**/*.ts
14-
!/test/**/*.js
15-
!/test/**/*.js.flow
16-
!/.babelrc.js
4+
/coverage

.mocharc.cjs

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

.npmignore

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

.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+
}

0 commit comments

Comments
 (0)