Skip to content

Commit

Permalink
chore: switch to pnpm, upgrade deps
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards1211 committed Sep 21, 2022
2 parents f0ef126 + 65f42fb commit 065e61e
Show file tree
Hide file tree
Showing 61 changed files with 6,796 additions and 9,405 deletions.
16 changes: 4 additions & 12 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
module.exports = function(api) {
const plugins = [
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-proposal-nullish-coalescing-operator',
]
module.exports = function (api) {
const plugins = ['@babel/plugin-proposal-class-properties']
const presets = [
[
'@babel/preset-env',
api.env('es5')
? { forceAllTransforms: true }
: { targets: { node: 'current' } },
: { targets: { node: '12' } },
],
'@babel/preset-typescript',
['@babel/preset-typescript', { allowDeclareFields: true }],
]

if (api.env(['test', 'coverage', 'es5'])) {
Expand Down
18 changes: 10 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,27 @@ version: 2
jobs:
build:
docker:
- image: circleci/node:12.16
- image: circleci/node:16

steps:
- checkout
- run:
name: Setup NPM Token
command: |
yarn config set registry "https://registry.npmjs.org/"
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
echo "registry=https://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
echo "registry=https://registry.npmjs.org/" >> ~/.npmrc
- run:
name: Install pnpm
command: sudo npm install --global pnpm
- run:
name: Install Dependencies
command: yarn install --frozen-lockfile
command: pnpm install --frozen-lockfile
- run:
name: build
command: yarn run prepublishOnly
command: pnpm prepublishOnly
- run:
name: upload test coverage
command: yarn codecov || true
command: pnpm codecov
- run:
name: release
command: yarn run semantic-release || true
command: pnpm semantic-release
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": [
"@jedwards1211/eslint-config-typescript",
"eslint-config-prettier"
"prettier"
],
"rules": {
"@typescript-eslint/no-explicit-any": 0,
Expand Down
2 changes: 0 additions & 2 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
ambiguous-object-type=error

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

Expand Down
19 changes: 13 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
coverage
.nyc_output
/coverage
/.nyc_output
node_modules
es
/es
.eslintcache
/*.js
/*.js.flow
/*.d.ts
*.js
*.js.flow
*.d.ts
!/flow-typed/**/*.js
!/src/**/*.ts
!/src/**/*.js
!/src/**/*.js.flow
!/test/**/*.ts
!/test/**/*.js
!/test/**/*.js.flow
!/.babelrc.js
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
!**/*.js.flow
!**/*.d.ts
!/*.md
!yarn.lock
/src
/test
/coverage
Expand Down
87 changes: 44 additions & 43 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@
"scripts": {
"lint": "eslint $npm_package_config_lint",
"lint:fix": "eslint $npm_package_config_lint",
"lint:watch": "esw --watch $npm_package_config_lint",
"prettier": "prettier --write .babelrc.js *.json *.md *.ts '{src,test}/**/*.{js,ts}'",
"prettier:check": "prettier --list-different .babelrc.js *.json *.md *.ts '{src,test}/**/*.{js,ts}'",
"tsc": "tsc --noEmit",
"prettier": "prettier --write $npm_package_config_prettier",
"prettier:check": "prettier --list-different $npm_package_config_prettier",
"tsc": "tsc",
"tsc:watch": "npm run tsc -- --watch",
"clean": "rimraf es lib $(cd src; ls) *.js *.d.ts *.js.flow",
"build": "npm run clean && npm run build:types && npm run build:js",
"build:types": "tsc --emitDeclarationOnly && copy 'src/**/*.js.flow' .",
"build:types": "tsc -p tsconfig.build.json && tsc -p tsconfig.build.json --outDir es && copy 'src/**/*.js.flow' . && copy 'src/**/*.js.flow' es",
"build:js": "babel src --out-dir es --extensions \".ts\" --source-maps inline && cross-env BABEL_ENV=es5 babel src --out-dir . --extensions \".ts\"",
"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",
"test:watch": "cross-env NODE_ENV=test BABEL_ENV=test mocha $npm_package_config_mocha --watch --watch-extensions js,ts",
"test:watch": "cross-env NODE_ENV=test BABEL_ENV=test mocha $npm_package_config_mocha --watch",
"test:debug": "cross-env NODE_ENV=test BABEL_ENV=test mocha --inspect-brk $npm_package_config_mocha",
"codecov": "nyc report --reporter=text-lcov > coverage.lcov; codecov",
"prepublishOnly": "npm run clean && npm run prettier:check && npm run lint && flow && npm test && npm run build",
Expand All @@ -26,7 +25,8 @@
},
"config": {
"lint": "--cache --ext .js,.ts src test",
"mocha": "test/configure.js 'test/**/*.ts'",
"mocha": "--extension js --extension ts test/configure.js 'src/**/*.spec.ts' 'test/**/*.ts'",
"prettier": ".babelrc.js *.{json,md} {src,test}/**/*.{js,ts,flow}",
"commitizen": {
"path": "cz-conventional-changelog"
}
Expand All @@ -39,9 +39,8 @@
}
},
"lint-staged": {
"*.{js,ts,json,css,md}": [
"prettier --write",
"git add"
"*.{js,ts,json,css,md,flow}": [
"prettier --write"
]
},
"commitlint": {
Expand Down Expand Up @@ -96,47 +95,49 @@
},
"homepage": "https://github.com/jcoreio/typed-validators#readme",
"devDependencies": {
"@babel/cli": "^7.1.5",
"@babel/core": "^7.1.6",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/plugin-proposal-export-default-from": "^7.0.0",
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
"@babel/cli": "^7.15.7",
"@babel/core": "^7.15.5",
"@babel/plugin-proposal-export-default-from": "^7.14.5",
"@babel/plugin-proposal-export-namespace-from": "^7.14.5",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-proposal-optional-chaining": "^7.6.0",
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.1.0",
"@babel/preset-env": "^7.1.6",
"@babel/preset-typescript": "^7.7.2",
"@babel/register": "^7.0.0",
"@commitlint/cli": "^6.0.2",
"@commitlint/config-conventional": "^6.0.2",
"@jedwards1211/commitlint-config": "^1.0.0",
"@jedwards1211/eslint-config-typescript": "^1.0.0",
"@types/chai": "^4.2.0",
"@types/mocha": "^5.2.7",
"@types/node": "^12.12.6",
"@babel/plugin-transform-runtime": "^7.15.0",
"@babel/preset-env": "^7.15.6",
"@babel/preset-typescript": "^7.15.0",
"@babel/register": "^7.15.3",
"@commitlint/cli": "^13.2.0",
"@commitlint/config-conventional": "^13.2.0",
"@jedwards1211/commitlint-config": "^1.0.2",
"@jedwards1211/eslint-config": "^2.0.2",
"@jedwards1211/eslint-config-typescript": "^2.0.2",
"@types/chai": "^4.2.22",
"@types/mocha": "^9.0.0",
"@types/node": "^16.10.2",
"@typescript-eslint/eslint-plugin": "^4.32.0",
"@typescript-eslint/parser": "^4.32.0",
"@typescript-eslint/typescript-estree": "^4.32.0",
"babel-eslint": "^10.0.1",
"babel-plugin-istanbul": "^5.1.0",
"chai": "^4.2.0",
"codecov": "^3.7.0",
"babel-plugin-istanbul": "^6.0.0",
"chai": "^4.3.4",
"codecov": "^3.8.3",
"copy": "^0.3.2",
"cross-env": "^5.2.0",
"cross-env": "^7.0.3",
"dedent-js": "^1.0.1",
"eslint": "^5.9.0",
"eslint-config-prettier": "^3.3.0",
"eslint-watch": "^4.0.2",
"flow-bin": "^0.141.0",
"husky": "^1.1.4",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"flow-bin": "^0.187.1",
"husky": "^7.0.2",
"istanbul": "^0.4.5",
"lint-staged": "^8.0.4",
"mocha": "^6.2.1",
"nyc": "^13.1.0",
"prettier": "^1.15.2",
"prettier-eslint": "^8.8.2",
"rimraf": "^2.6.0",
"semantic-release": "^15.1.4",
"typescript": "^3.7.2"
"lint-staged": "^11.1.2",
"mocha": "^9.1.2",
"nyc": "^15.1.0",
"prettier": "^2.4.1",
"prettier-eslint": "^13.0.0",
"rimraf": "^3.0.2",
"semantic-release": "^18.0.0",
"typescript": "^4.4.3"
},
"dependencies": {
"@babel/runtime": "^7.1.5"
Expand Down
Loading

0 comments on commit 065e61e

Please sign in to comment.