Skip to content

Commit 065e61e

Browse files
committed
chore: switch to pnpm, upgrade deps
2 parents f0ef126 + 65f42fb commit 065e61e

Some content is hidden

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

61 files changed

+6796
-9405
lines changed

.babelrc.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
1-
module.exports = function(api) {
2-
const plugins = [
3-
'@babel/plugin-syntax-dynamic-import',
4-
'@babel/plugin-proposal-class-properties',
5-
'@babel/plugin-proposal-export-default-from',
6-
'@babel/plugin-proposal-export-namespace-from',
7-
'@babel/plugin-proposal-object-rest-spread',
8-
'@babel/plugin-proposal-optional-chaining',
9-
'@babel/plugin-proposal-nullish-coalescing-operator',
10-
]
1+
module.exports = function (api) {
2+
const plugins = ['@babel/plugin-proposal-class-properties']
113
const presets = [
124
[
135
'@babel/preset-env',
146
api.env('es5')
157
? { forceAllTransforms: true }
16-
: { targets: { node: 'current' } },
8+
: { targets: { node: '12' } },
179
],
18-
'@babel/preset-typescript',
10+
['@babel/preset-typescript', { allowDeclareFields: true }],
1911
]
2012

2113
if (api.env(['test', 'coverage', 'es5'])) {

.circleci/config.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,27 @@ version: 2
22
jobs:
33
build:
44
docker:
5-
- image: circleci/node:12.16
5+
- image: circleci/node:16
66

77
steps:
88
- checkout
99
- run:
1010
name: Setup NPM Token
1111
command: |
12-
yarn config set registry "https://registry.npmjs.org/"
13-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
14-
echo "registry=https://registry.npmjs.org/" >> .npmrc
12+
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
13+
echo "registry=https://registry.npmjs.org/" >> ~/.npmrc
14+
- run:
15+
name: Install pnpm
16+
command: sudo npm install --global pnpm
1517
- run:
1618
name: Install Dependencies
17-
command: yarn install --frozen-lockfile
19+
command: pnpm install --frozen-lockfile
1820
- run:
1921
name: build
20-
command: yarn run prepublishOnly
22+
command: pnpm prepublishOnly
2123
- run:
2224
name: upload test coverage
23-
command: yarn codecov || true
25+
command: pnpm codecov
2426
- run:
2527
name: release
26-
command: yarn run semantic-release || true
28+
command: pnpm semantic-release

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": [
33
"@jedwards1211/eslint-config-typescript",
4-
"eslint-config-prettier"
4+
"prettier"
55
],
66
"rules": {
77
"@typescript-eslint/no-explicit-any": 0,

.flowconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
ambiguous-object-type=error
99

1010
[options]
11-
well_formed_exports=true
12-
types_first=true
1311
; Fixes out of shared memory error for Mac Rosetta 2, see https://github.com/facebook/flow/issues/8538
1412
sharedmemory.heap_size=3221225472
1513

.gitignore

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
coverage
2-
.nyc_output
1+
/coverage
2+
/.nyc_output
33
node_modules
4-
es
4+
/es
55
.eslintcache
6-
/*.js
7-
/*.js.flow
8-
/*.d.ts
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
916
!/.babelrc.js

.npmignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
!**/*.js.flow
44
!**/*.d.ts
55
!/*.md
6-
!yarn.lock
76
/src
87
/test
98
/coverage

package.json

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,16 @@
77
"scripts": {
88
"lint": "eslint $npm_package_config_lint",
99
"lint:fix": "eslint $npm_package_config_lint",
10-
"lint:watch": "esw --watch $npm_package_config_lint",
11-
"prettier": "prettier --write .babelrc.js *.json *.md *.ts '{src,test}/**/*.{js,ts}'",
12-
"prettier:check": "prettier --list-different .babelrc.js *.json *.md *.ts '{src,test}/**/*.{js,ts}'",
13-
"tsc": "tsc --noEmit",
10+
"prettier": "prettier --write $npm_package_config_prettier",
11+
"prettier:check": "prettier --list-different $npm_package_config_prettier",
12+
"tsc": "tsc",
1413
"tsc:watch": "npm run tsc -- --watch",
1514
"clean": "rimraf es lib $(cd src; ls) *.js *.d.ts *.js.flow",
1615
"build": "npm run clean && npm run build:types && npm run build:js",
17-
"build:types": "tsc --emitDeclarationOnly && copy 'src/**/*.js.flow' .",
16+
"build:types": "tsc -p tsconfig.build.json && tsc -p tsconfig.build.json --outDir es && copy 'src/**/*.js.flow' . && copy 'src/**/*.js.flow' es",
1817
"build:js": "babel src --out-dir es --extensions \".ts\" --source-maps inline && cross-env BABEL_ENV=es5 babel src --out-dir . --extensions \".ts\"",
1918
"test": "cross-env NODE_ENV=test BABEL_ENV=es5 mocha $npm_package_config_mocha && cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=lcov --reporter=text mocha $npm_package_config_mocha",
20-
"test:watch": "cross-env NODE_ENV=test BABEL_ENV=test mocha $npm_package_config_mocha --watch --watch-extensions js,ts",
19+
"test:watch": "cross-env NODE_ENV=test BABEL_ENV=test mocha $npm_package_config_mocha --watch",
2120
"test:debug": "cross-env NODE_ENV=test BABEL_ENV=test mocha --inspect-brk $npm_package_config_mocha",
2221
"codecov": "nyc report --reporter=text-lcov > coverage.lcov; codecov",
2322
"prepublishOnly": "npm run clean && npm run prettier:check && npm run lint && flow && npm test && npm run build",
@@ -26,7 +25,8 @@
2625
},
2726
"config": {
2827
"lint": "--cache --ext .js,.ts src test",
29-
"mocha": "test/configure.js 'test/**/*.ts'",
28+
"mocha": "--extension js --extension ts test/configure.js 'src/**/*.spec.ts' 'test/**/*.ts'",
29+
"prettier": ".babelrc.js *.{json,md} {src,test}/**/*.{js,ts,flow}",
3030
"commitizen": {
3131
"path": "cz-conventional-changelog"
3232
}
@@ -39,9 +39,8 @@
3939
}
4040
},
4141
"lint-staged": {
42-
"*.{js,ts,json,css,md}": [
43-
"prettier --write",
44-
"git add"
42+
"*.{js,ts,json,css,md,flow}": [
43+
"prettier --write"
4544
]
4645
},
4746
"commitlint": {
@@ -96,47 +95,49 @@
9695
},
9796
"homepage": "https://github.com/jcoreio/typed-validators#readme",
9897
"devDependencies": {
99-
"@babel/cli": "^7.1.5",
100-
"@babel/core": "^7.1.6",
101-
"@babel/plugin-proposal-class-properties": "^7.1.0",
102-
"@babel/plugin-proposal-export-default-from": "^7.0.0",
103-
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
98+
"@babel/cli": "^7.15.7",
99+
"@babel/core": "^7.15.5",
100+
"@babel/plugin-proposal-export-default-from": "^7.14.5",
101+
"@babel/plugin-proposal-export-namespace-from": "^7.14.5",
104102
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
105103
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
106104
"@babel/plugin-proposal-optional-chaining": "^7.6.0",
107105
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
108-
"@babel/plugin-transform-runtime": "^7.1.0",
109-
"@babel/preset-env": "^7.1.6",
110-
"@babel/preset-typescript": "^7.7.2",
111-
"@babel/register": "^7.0.0",
112-
"@commitlint/cli": "^6.0.2",
113-
"@commitlint/config-conventional": "^6.0.2",
114-
"@jedwards1211/commitlint-config": "^1.0.0",
115-
"@jedwards1211/eslint-config-typescript": "^1.0.0",
116-
"@types/chai": "^4.2.0",
117-
"@types/mocha": "^5.2.7",
118-
"@types/node": "^12.12.6",
106+
"@babel/plugin-transform-runtime": "^7.15.0",
107+
"@babel/preset-env": "^7.15.6",
108+
"@babel/preset-typescript": "^7.15.0",
109+
"@babel/register": "^7.15.3",
110+
"@commitlint/cli": "^13.2.0",
111+
"@commitlint/config-conventional": "^13.2.0",
112+
"@jedwards1211/commitlint-config": "^1.0.2",
113+
"@jedwards1211/eslint-config": "^2.0.2",
114+
"@jedwards1211/eslint-config-typescript": "^2.0.2",
115+
"@types/chai": "^4.2.22",
116+
"@types/mocha": "^9.0.0",
117+
"@types/node": "^16.10.2",
118+
"@typescript-eslint/eslint-plugin": "^4.32.0",
119+
"@typescript-eslint/parser": "^4.32.0",
120+
"@typescript-eslint/typescript-estree": "^4.32.0",
119121
"babel-eslint": "^10.0.1",
120-
"babel-plugin-istanbul": "^5.1.0",
121-
"chai": "^4.2.0",
122-
"codecov": "^3.7.0",
122+
"babel-plugin-istanbul": "^6.0.0",
123+
"chai": "^4.3.4",
124+
"codecov": "^3.8.3",
123125
"copy": "^0.3.2",
124-
"cross-env": "^5.2.0",
126+
"cross-env": "^7.0.3",
125127
"dedent-js": "^1.0.1",
126-
"eslint": "^5.9.0",
127-
"eslint-config-prettier": "^3.3.0",
128-
"eslint-watch": "^4.0.2",
129-
"flow-bin": "^0.141.0",
130-
"husky": "^1.1.4",
128+
"eslint": "^7.32.0",
129+
"eslint-config-prettier": "^8.3.0",
130+
"flow-bin": "^0.187.1",
131+
"husky": "^7.0.2",
131132
"istanbul": "^0.4.5",
132-
"lint-staged": "^8.0.4",
133-
"mocha": "^6.2.1",
134-
"nyc": "^13.1.0",
135-
"prettier": "^1.15.2",
136-
"prettier-eslint": "^8.8.2",
137-
"rimraf": "^2.6.0",
138-
"semantic-release": "^15.1.4",
139-
"typescript": "^3.7.2"
133+
"lint-staged": "^11.1.2",
134+
"mocha": "^9.1.2",
135+
"nyc": "^15.1.0",
136+
"prettier": "^2.4.1",
137+
"prettier-eslint": "^13.0.0",
138+
"rimraf": "^3.0.2",
139+
"semantic-release": "^18.0.0",
140+
"typescript": "^4.4.3"
140141
},
141142
"dependencies": {
142143
"@babel/runtime": "^7.1.5"

0 commit comments

Comments
 (0)