diff --git a/package.json b/package.json index c439cdcb..26a59c70 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,9 @@ "version": "0.0.0-semantically-released", "description": "CLI for common scripts for my projects", "engines": { - "node": ">= 8", - "npm": ">= 5" + "node": ">=8", + "npm": ">=5", + "yarn": ">=1" }, "bin": { "kcd-scripts": "dist/index.js" @@ -34,59 +35,58 @@ "author": "Kent C. Dodds (http://kentcdodds.com/)", "license": "MIT", "dependencies": { - "@babel/cli": "^7.5.5", - "@babel/core": "^7.5.5", + "@babel/cli": "^7.6.4", + "@babel/core": "^7.6.4", "@babel/plugin-proposal-class-properties": "^7.5.5", - "@babel/plugin-transform-modules-commonjs": "^7.5.0", - "@babel/plugin-transform-runtime": "^7.5.5", - "@babel/preset-env": "^7.5.5", + "@babel/plugin-transform-modules-commonjs": "^7.6.0", + "@babel/plugin-transform-runtime": "^7.6.2", + "@babel/preset-env": "^7.6.3", "@babel/preset-flow": "^7.0.0", - "@babel/preset-react": "^7.0.0", - "@babel/runtime": "^7.5.5", + "@babel/preset-react": "^7.6.3", + "@babel/runtime": "^7.6.3", + "@rollup/plugin-replace": "^2.2.0", "arrify": "^2.0.1", - "babel-core": "^7.0.0-0", - "babel-jest": "^24.8.0", + "babel-jest": "^24.9.0", "babel-plugin-macros": "^2.6.1", - "babel-plugin-minify-dead-code-elimination": "^0.5.0", - "babel-plugin-module-resolver": "^3.1.1", - "babel-plugin-transform-inline-environment-variables": "^0.4.0", - "babel-plugin-transform-react-remove-prop-types": "^0.4.21", - "browserslist": "^4.6.6", - "concurrently": "^4.1.1", + "babel-plugin-minify-dead-code-elimination": "^0.5.1", + "babel-plugin-module-resolver": "^3.2.0", + "babel-plugin-transform-inline-environment-variables": "^0.4.3", + "babel-plugin-transform-react-remove-prop-types": "^0.4.24", + "browserslist": "^4.7.2", + "concurrently": "^5.0.0", "cosmiconfig": "^5.2.1", - "cross-env": "^5.1.4", - "cross-spawn": "^6.0.5", + "cross-env": "^5.2.1", + "cross-spawn": "^7.0.1", "doctoc": "^1.4.0", - "eslint": "^6.1.0", - "eslint-config-kentcdodds": "^14.3.4", - "eslint-config-prettier": "^6.0.0", - "glob": "^7.1.4", - "husky": "^3.0.3", + "eslint": "^6.6.0", + "eslint-config-kentcdodds": "^14.6.1", + "eslint-config-prettier": "^6.5.0", + "glob": "^7.1.5", + "husky": "^3.0.9", "is-ci": "^2.0.0", - "jest": "^24.8.0", - "jest-watch-typeahead": "^0.3.1", - "lint-staged": "^9.2.1", + "jest": "^24.9.0", + "jest-watch-typeahead": "^0.4.0", + "lint-staged": "^9.4.2", "lodash.camelcase": "^4.3.0", "lodash.has": "^4.5.2", "lodash.omit": "^4.5.0", "mkdirp": "^0.5.1", "prettier": "^1.18.2", - "read-pkg-up": "^6.0.0", + "read-pkg-up": "^7.0.0", "resolve": "^1.12.0", - "rimraf": "^2.6.2", - "rollup": "^1.19.4", + "rimraf": "^3.0.0", + "rollup": "^1.26.0", "rollup-plugin-babel": "^4.3.3", - "rollup-plugin-commonjs": "^10.0.2", + "rollup-plugin-commonjs": "^10.1.0", "rollup-plugin-json": "^4.0.0", "rollup-plugin-node-builtins": "^2.1.2", "rollup-plugin-node-globals": "^1.4.0", "rollup-plugin-node-resolve": "^5.2.0", - "rollup-plugin-replace": "^2.2.0", "rollup-plugin-size-snapshot": "^0.10.0", - "rollup-plugin-terser": "^5.1.1", + "rollup-plugin-terser": "^5.1.2", "semver": "^6.3.0", - "which": "^1.3.0", - "yargs-parser": "^13.1.1" + "which": "^2.0.1", + "yargs-parser": "^16.0.0" }, "eslintConfig": { "extends": [ diff --git a/src/__tests__/utils.js b/src/__tests__/utils.js index b086735f..61677006 100644 --- a/src/__tests__/utils.js +++ b/src/__tests__/utils.js @@ -1,5 +1,5 @@ jest.mock('read-pkg-up', () => ({ - sync: jest.fn(() => ({package: {}, path: '/blah/package.json'})), + sync: jest.fn(() => ({packageJson: {}, path: '/blah/package.json'})), })) jest.mock('which', () => ({sync: jest.fn(() => {})})) jest.mock('cosmiconfig', () => { @@ -165,7 +165,7 @@ test('hasLocalConfiguration returns true if a local config found and it is empty }) function mockPkg({package: pkg = {}, path = '/blah/package.json'}) { - readPkgUpSyncMock.mockImplementationOnce(() => ({package: pkg, path})) + readPkgUpSyncMock.mockImplementationOnce(() => ({packageJson: pkg, path})) } function mockCosmiconfig(result = null) { diff --git a/src/config/rollup.config.js b/src/config/rollup.config.js index 268b5efe..7d967d1b 100644 --- a/src/config/rollup.config.js +++ b/src/config/rollup.config.js @@ -1,11 +1,11 @@ const path = require('path') +const replace = require('@rollup/plugin-replace') const glob = require('glob') const camelcase = require('lodash.camelcase') const rollupBabel = require('rollup-plugin-babel') const commonjs = require('rollup-plugin-commonjs') const nodeResolve = require('rollup-plugin-node-resolve') const json = require('rollup-plugin-json') -const replace = require('rollup-plugin-replace') const {terser} = require('rollup-plugin-terser') const nodeBuiltIns = require('rollup-plugin-node-builtins') const nodeGlobals = require('rollup-plugin-node-globals') diff --git a/src/utils.js b/src/utils.js index c14fdbb3..775dca32 100644 --- a/src/utils.js +++ b/src/utils.js @@ -8,7 +8,7 @@ const readPkgUp = require('read-pkg-up') const which = require('which') const cosmiconfig = require('cosmiconfig') -const {package: pkg, path: pkgPath} = readPkgUp.sync({ +const {packageJson: pkg, path: pkgPath} = readPkgUp.sync({ cwd: fs.realpathSync(process.cwd()), }) const appDirectory = path.dirname(pkgPath)