From 4b01d0ff61e34b60e334db0b6bb9a3ce20a92514 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Tue, 5 Apr 2022 21:12:03 +0200 Subject: [PATCH] feat: update dependencies (#227) * feat: update dependencies * chore: fix ESLint errors --- package.json | 22 ++++++++--------- src/__tests__/__snapshots__/index.js.snap | 14 +++++------ src/__tests__/index.js | 8 +++---- .../__tests__/__snapshots__/precommit.js.snap | 24 +++++++++---------- src/scripts/__tests__/precommit.js | 4 ++-- 5 files changed, 36 insertions(+), 36 deletions(-) diff --git a/package.json b/package.json index 6d89c0fc..9cd76b32 100644 --- a/package.json +++ b/package.json @@ -32,16 +32,16 @@ "license": "MIT", "dependencies": { "@babel/cli": "^7.17.6", - "@babel/core": "^7.17.5", + "@babel/core": "^7.17.8", "@babel/plugin-proposal-class-properties": "^7.16.7", - "@babel/plugin-transform-modules-commonjs": "^7.16.8", + "@babel/plugin-transform-modules-commonjs": "^7.17.7", "@babel/plugin-transform-runtime": "^7.17.0", "@babel/preset-env": "^7.16.11", "@babel/preset-react": "^7.16.7", "@babel/preset-typescript": "^7.16.7", - "@babel/runtime": "^7.17.2", + "@babel/runtime": "^7.17.8", "@rollup/plugin-babel": "^5.3.1", - "@rollup/plugin-commonjs": "^21.0.2", + "@rollup/plugin-commonjs": "^21.0.3", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^13.1.3", "@rollup/plugin-replace": "^4.0.0", @@ -53,17 +53,17 @@ "babel-plugin-module-resolver": "^4.1.0", "babel-plugin-transform-inline-environment-variables": "^0.4.3", "babel-plugin-transform-react-remove-prop-types": "^0.4.24", - "browserslist": "^4.19.3", + "browserslist": "^4.20.2", "builtin-modules": "^3.2.0", "chalk": "^4.1.2", - "concurrently": "^7.0.0", + "concurrently": "^7.1.0", "cosmiconfig": "^7.0.1", "cpy": "^8.1.2", "cross-env": "^7.0.3", "cross-spawn": "^7.0.3", "doctoc": "^2.1.0", - "eslint": "^8.10.0", - "eslint-config-kentcdodds": "^20.0.1", + "eslint": "^8.12.0", + "eslint-config-kentcdodds": "^20.2.0", "glob": "^7.2.0", "husky": "^4.3.8", "is-ci": "^3.0.1", @@ -71,16 +71,16 @@ "jest-serializer-path": "^0.1.15", "jest-snapshot-serializer-raw": "^1.2.0", "jest-watch-typeahead": "^1.0.0", - "lint-staged": "^12.3.5", + "lint-staged": "^12.3.7", "lodash.camelcase": "^4.3.0", "lodash.has": "^4.5.2", "lodash.omit": "^4.5.0", "mkdirp": "^1.0.4", - "prettier": "2.5.1", + "prettier": "2.6.2", "read-pkg-up": "^7.0.1", "resolve": "^1.22.0", "rimraf": "^3.0.2", - "rollup": "^2.69.1", + "rollup": "^2.70.1", "rollup-plugin-node-builtins": "^2.1.2", "rollup-plugin-node-globals": "^1.4.0", "rollup-plugin-terser": "^7.0.2", diff --git a/src/__tests__/__snapshots__/index.js.snap b/src/__tests__/__snapshots__/index.js.snap index 343a16e8..7376bee2 100644 --- a/src/__tests__/__snapshots__/index.js.snap +++ b/src/__tests__/__snapshots__/index.js.snap @@ -1,12 +1,12 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`format calls node with the script path and args 1`] = `node /src/scripts/test.js --no-watch`; +exports[`format calls node with the script path and args including inspect-brk argument: format script 1`] = `node --inspect-brk=3080 /src/scripts/test.js --no-watch`; -exports[`format calls node with the script path and args including inspect-brk argument 1`] = `node --inspect-brk=3080 /src/scripts/test.js --no-watch`; +exports[`format calls node with the script path and args: format script 1`] = `node /src/scripts/test.js --no-watch`; -exports[`format does not log for other signals 1`] = `Array []`; +exports[`format does not log for other signals: format signal 1`] = `Array []`; -exports[`format logs for SIGKILL signal 1`] = ` +exports[`format logs for SIGKILL signal: format signal 1`] = ` Array [ Array [ The script "lint" failed because the process exited too early. This probably means the system ran out of memory or someone called \`kill -9\` on the process., @@ -14,7 +14,7 @@ Array [ ] `; -exports[`format logs for SIGTERM signal 1`] = ` +exports[`format logs for SIGTERM signal: format signal 1`] = ` Array [ Array [ The script "build" failed because the process exited too early. Someone might have called \`kill\` or \`killall\`, or the system could be shutting down., @@ -22,7 +22,7 @@ Array [ ] `; -exports[`format logs help with no args 1`] = ` +exports[`format logs help with no args: format snapshotLog 1`] = ` Array [ Array [ @@ -46,4 +46,4 @@ May the force be with you. ] `; -exports[`format throws unknown script 1`] = `Unknown script "unknown-script".`; +exports[`format throws unknown script: format error 1`] = `Unknown script "unknown-script".`; diff --git a/src/__tests__/index.js b/src/__tests__/index.js index eb69c322..91325e86 100644 --- a/src/__tests__/index.js +++ b/src/__tests__/index.js @@ -28,20 +28,20 @@ cases( } require('../') if (snapshotLog) { - expect(console.log.mock.calls).toMatchSnapshot() + expect(console.log.mock.calls).toMatchSnapshot('format snapshotLog') } else if (signal) { expect(process.exit).toHaveBeenCalledTimes(1) expect(process.exit).toHaveBeenCalledWith(1) - expect(console.log.mock.calls).toMatchSnapshot() + expect(console.log.mock.calls).toMatchSnapshot('format signal') } else { expect(crossSpawnSyncMock).toHaveBeenCalledTimes(1) const [firstCall] = crossSpawnSyncMock.mock.calls const [script, calledArgs] = firstCall - expect([script, ...calledArgs].join(' ')).toMatchSnapshot() + expect([script, ...calledArgs].join(' ')).toMatchSnapshot('format script') } } catch (error) { if (throws) { - expect(error.message).toMatchSnapshot() + expect(error.message).toMatchSnapshot('format error') } else { throw error } diff --git a/src/scripts/__tests__/__snapshots__/precommit.js.snap b/src/scripts/__tests__/__snapshots__/precommit.js.snap index 9f717644..4d6fbf72 100644 --- a/src/scripts/__tests__/__snapshots__/precommit.js.snap +++ b/src/scripts/__tests__/__snapshots__/precommit.js.snap @@ -1,25 +1,25 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`pre-commit calls lint-staged CLI with default args 1`] = `lint-staged --config ./src/config/lintstagedrc.js`; +exports[`pre-commit calls lint-staged CLI with default args: pre-commit scriptOne 1`] = `lint-staged --config ./src/config/lintstagedrc.js`; -exports[`pre-commit calls lint-staged CLI with default args 2`] = `npm run validate`; +exports[`pre-commit calls lint-staged CLI with default args: pre-commit scriptTwo 1`] = `npm run validate`; -exports[`pre-commit does not use built-in config with .lintstagedrc file 1`] = `lint-staged`; +exports[`pre-commit does not use built-in config with .lintstagedrc file: pre-commit scriptOne 1`] = `lint-staged`; -exports[`pre-commit does not use built-in config with .lintstagedrc file 2`] = `npm run validate`; +exports[`pre-commit does not use built-in config with .lintstagedrc file: pre-commit scriptTwo 1`] = `npm run validate`; -exports[`pre-commit does not use built-in config with --config 1`] = `lint-staged --config ./custom-config.js`; +exports[`pre-commit does not use built-in config with --config: pre-commit scriptOne 1`] = `lint-staged --config ./custom-config.js`; -exports[`pre-commit does not use built-in config with --config 2`] = `npm run validate`; +exports[`pre-commit does not use built-in config with --config: pre-commit scriptTwo 1`] = `npm run validate`; -exports[`pre-commit does not use built-in config with lint-staged pkg prop 1`] = `lint-staged`; +exports[`pre-commit does not use built-in config with lint-staged pkg prop: pre-commit scriptOne 1`] = `lint-staged`; -exports[`pre-commit does not use built-in config with lint-staged pkg prop 2`] = `npm run validate`; +exports[`pre-commit does not use built-in config with lint-staged pkg prop: pre-commit scriptTwo 1`] = `npm run validate`; -exports[`pre-commit does not use built-in config with lint-staged.config.js file 1`] = `lint-staged`; +exports[`pre-commit does not use built-in config with lint-staged.config.js file: pre-commit scriptOne 1`] = `lint-staged`; -exports[`pre-commit does not use built-in config with lint-staged.config.js file 2`] = `npm run validate`; +exports[`pre-commit does not use built-in config with lint-staged.config.js file: pre-commit scriptTwo 1`] = `npm run validate`; -exports[`pre-commit forwards args 1`] = `lint-staged --config ./src/config/lintstagedrc.js --verbose`; +exports[`pre-commit forwards args: pre-commit scriptOne 1`] = `lint-staged --config ./src/config/lintstagedrc.js --verbose`; -exports[`pre-commit forwards args 2`] = `npm run validate`; +exports[`pre-commit forwards args: pre-commit scriptTwo 1`] = `npm run validate`; diff --git a/src/scripts/__tests__/precommit.js b/src/scripts/__tests__/precommit.js index 76bf605e..fd5d0460 100644 --- a/src/scripts/__tests__/precommit.js +++ b/src/scripts/__tests__/precommit.js @@ -31,9 +31,9 @@ cases( expect(crossSpawnSyncMock).toHaveBeenCalledTimes(2) const [firstCall, secondCall] = crossSpawnSyncMock.mock.calls const [scriptOne, calledArgsOne] = firstCall - expect([scriptOne, ...calledArgsOne].join(' ')).toMatchSnapshot() + expect([scriptOne, ...calledArgsOne].join(' ')).toMatchSnapshot('pre-commit scriptOne') const [scriptTwo, calledArgsTwo] = secondCall - expect([scriptTwo, ...calledArgsTwo].join(' ')).toMatchSnapshot() + expect([scriptTwo, ...calledArgsTwo].join(' ')).toMatchSnapshot('pre-commit scriptTwo') } catch (error) { throw error } finally {