Skip to content

Commit e872e0f

Browse files
author
Kent C. Dodds
committed
feat: upgrade all deps
1 parent 400e5b9 commit e872e0f

File tree

4 files changed

+44
-41
lines changed

4 files changed

+44
-41
lines changed

package.json

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -34,58 +34,58 @@
3434
"author": "Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com/)",
3535
"license": "MIT",
3636
"dependencies": {
37-
"@babel/cli": "^7.2.0",
38-
"@babel/core": "^7.4.0",
39-
"@babel/plugin-proposal-class-properties": "^7.4.0",
40-
"@babel/plugin-transform-modules-commonjs": "^7.4.0",
41-
"@babel/plugin-transform-runtime": "^7.4.0",
42-
"@babel/preset-env": "^7.4.2",
37+
"@babel/cli": "^7.4.4",
38+
"@babel/core": "^7.4.4",
39+
"@babel/plugin-proposal-class-properties": "^7.4.4",
40+
"@babel/plugin-transform-modules-commonjs": "^7.4.4",
41+
"@babel/plugin-transform-runtime": "^7.4.4",
42+
"@babel/preset-env": "^7.4.4",
4343
"@babel/preset-flow": "^7.0.0",
4444
"@babel/preset-react": "^7.0.0",
45-
"@babel/runtime": "^7.4.2",
46-
"arrify": "^1.0.1",
45+
"@babel/runtime": "^7.4.4",
46+
"arrify": "^2.0.1",
4747
"babel-core": "^7.0.0-0",
48-
"babel-jest": "^24.5.0",
49-
"babel-plugin-macros": "^2.4.2",
48+
"babel-jest": "^24.8.0",
49+
"babel-plugin-macros": "^2.5.1",
5050
"babel-plugin-minify-dead-code-elimination": "^0.5.0",
5151
"babel-plugin-module-resolver": "^3.1.1",
5252
"babel-plugin-transform-inline-environment-variables": "^0.4.0",
5353
"babel-plugin-transform-react-remove-prop-types": "^0.4.21",
54-
"browserslist": "^4.5.2",
54+
"browserslist": "^4.6.0",
5555
"concurrently": "^4.1.0",
5656
"cross-env": "^5.1.4",
5757
"cross-spawn": "^6.0.5",
5858
"doctoc": "^1.4.0",
59-
"eslint": "^5.15.3",
60-
"eslint-config-kentcdodds": "^14.3.1",
61-
"eslint-config-prettier": "^4.1.0",
62-
"glob": "^7.1.2",
63-
"husky": "^1.2.0",
59+
"eslint": "^5.16.0",
60+
"eslint-config-kentcdodds": "^14.3.2",
61+
"eslint-config-prettier": "^4.2.0",
62+
"glob": "^7.1.4",
63+
"husky": "^2.3.0",
6464
"is-ci": "^2.0.0",
65-
"jest": "^24.5.0",
66-
"jest-watch-typeahead": "^0.2.1",
67-
"lint-staged": "^8.1.0",
65+
"jest": "^24.8.0",
66+
"jest-watch-typeahead": "^0.3.1",
67+
"lint-staged": "^8.1.6",
6868
"lodash.camelcase": "^4.3.0",
6969
"lodash.has": "^4.5.2",
7070
"lodash.omit": "^4.5.0",
7171
"mkdirp": "^0.5.1",
72-
"prettier": "^1.15.3",
73-
"read-pkg-up": "^5.0.0",
74-
"resolve": "^1.6.0",
72+
"prettier": "^1.17.1",
73+
"read-pkg-up": "^6.0.0",
74+
"resolve": "^1.10.1",
7575
"rimraf": "^2.6.2",
76-
"rollup": "^1.7.3",
76+
"rollup": "^1.11.3",
7777
"rollup-plugin-babel": "^4.0.0",
78-
"rollup-plugin-commonjs": "^9.2.2",
78+
"rollup-plugin-commonjs": "^9.3.4",
7979
"rollup-plugin-json": "^4.0.0",
8080
"rollup-plugin-node-builtins": "^2.1.2",
8181
"rollup-plugin-node-globals": "^1.4.0",
82-
"rollup-plugin-node-resolve": "^4.0.1",
83-
"rollup-plugin-replace": "^2.1.1",
82+
"rollup-plugin-node-resolve": "^4.2.4",
83+
"rollup-plugin-replace": "^2.2.0",
8484
"rollup-plugin-size-snapshot": "^0.8.0",
8585
"rollup-plugin-terser": "^4.0.4",
86-
"semver": "^5.6.0",
86+
"semver": "^6.0.0",
8787
"which": "^1.3.0",
88-
"yargs-parser": "^13.0.0"
88+
"yargs-parser": "^13.1.0"
8989
},
9090
"eslintConfig": {
9191
"extends": [
@@ -116,6 +116,6 @@
116116
"homepage": "https://github.com/kentcdodds/kcd-scripts#readme",
117117
"devDependencies": {
118118
"jest-in-case": "^1.0.2",
119-
"slash": "^2.0.0"
119+
"slash": "^3.0.0"
120120
}
121121
}

src/__tests__/utils.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
jest.mock('read-pkg-up', () => ({
2-
sync: jest.fn(() => ({pkg: {}, path: '/blah/package.json'})),
2+
sync: jest.fn(() => ({package: {}, path: '/blah/package.json'})),
33
}))
44
jest.mock('which', () => ({sync: jest.fn(() => {})}))
55

@@ -11,9 +11,9 @@ beforeEach(() => {
1111
readPkgUpSyncMock = require('read-pkg-up').sync
1212
})
1313

14-
test('pkg is the package.json', () => {
14+
test('package is the package.json', () => {
1515
const myPkg = {name: 'blah'}
16-
mockPkg({pkg: myPkg})
16+
mockPkg({package: myPkg})
1717
expect(require('../utils').pkg).toBe(myPkg)
1818
})
1919

@@ -24,14 +24,14 @@ test('appDirectory is the dirname to the package.json', () => {
2424
})
2525

2626
test('resolveKcdScripts resolves to src/index.js when in the kcd-scripts package', () => {
27-
mockPkg({pkg: {name: 'kcd-scripts'}})
27+
mockPkg({package: {name: 'kcd-scripts'}})
2828
expect(require('../utils').resolveKcdScripts()).toBe(
2929
require.resolve('../').replace(process.cwd(), '.'),
3030
)
3131
})
3232

3333
test('resolveKcdScripts resolves to kcd-scripts if not in the kcd-scripts package', () => {
34-
mockPkg({pkg: {name: 'not-kcd-scripts'}})
34+
mockPkg({package: {name: 'not-kcd-scripts'}})
3535
whichSyncMock.mockImplementationOnce(() => require.resolve('../'))
3636
expect(require('../utils').resolveKcdScripts()).toBe('kcd-scripts')
3737
})
@@ -106,23 +106,23 @@ test(`parseEnv returns the default if the environment variable doesn't exist`, (
106106
})
107107

108108
test('ifAnyDep returns the true argument if true and false argument if false', () => {
109-
mockPkg({pkg: {peerDependencies: {react: '*'}}})
109+
mockPkg({package: {peerDependencies: {react: '*'}}})
110110
const t = {a: 'b'}
111111
const f = {c: 'd'}
112112
expect(require('../utils').ifAnyDep('react', t, f)).toBe(t)
113113
expect(require('../utils').ifAnyDep('preact', t, f)).toBe(f)
114114
})
115115

116116
test('ifAnyDep works with arrays of dependencies', () => {
117-
mockPkg({pkg: {peerDependencies: {react: '*'}}})
117+
mockPkg({package: {peerDependencies: {react: '*'}}})
118118
const t = {a: 'b'}
119119
const f = {c: 'd'}
120120
expect(require('../utils').ifAnyDep(['preact', 'react'], t, f)).toBe(t)
121121
expect(require('../utils').ifAnyDep(['preact', 'webpack'], t, f)).toBe(f)
122122
})
123123

124124
test('ifScript returns the true argument if true and the false argument if false', () => {
125-
mockPkg({pkg: {scripts: {build: 'echo build'}}})
125+
mockPkg({package: {scripts: {build: 'echo build'}}})
126126
const t = {e: 'f'}
127127
const f = {g: 'h'}
128128
expect(require('../utils').ifScript('build', t, f)).toBe(t)
@@ -137,6 +137,6 @@ test('ifFile returns the true argument if true and the false argument if false',
137137
expect(require('../utils').ifFile('does-not-exist.blah', t, f)).toBe(f)
138138
})
139139

140-
function mockPkg({pkg = {}, path = '/blah/package.json'}) {
141-
readPkgUpSyncMock.mockImplementationOnce(() => ({pkg, path}))
140+
function mockPkg({package: pkg = {}, path = '/blah/package.json'}) {
141+
readPkgUpSyncMock.mockImplementationOnce(() => ({package: pkg, path}))
142142
}

src/config/rollup.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,10 @@ module.exports = {
143143
plugins: [
144144
isNode ? nodeBuiltIns() : null,
145145
isNode ? nodeGlobals() : null,
146-
nodeResolve({preferBuiltins: isNode, jsnext: true, main: true}),
146+
nodeResolve({
147+
preferBuiltins: isNode,
148+
mainFields: ['module', 'main', 'jsnext', 'browser'],
149+
}),
147150
commonjs({include: 'node_modules/**'}),
148151
json(),
149152
rollupBabel({

src/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const has = require('lodash.has')
77
const readPkgUp = require('read-pkg-up')
88
const which = require('which')
99

10-
const {pkg, path: pkgPath} = readPkgUp.sync({
10+
const {package: pkg, path: pkgPath} = readPkgUp.sync({
1111
cwd: fs.realpathSync(process.cwd()),
1212
})
1313
const appDirectory = path.dirname(pkgPath)

0 commit comments

Comments
 (0)