Skip to content

Commit 1fa8622

Browse files
author
Kent C. Dodds
committed
feat: bump deps and fix contributors issue
1 parent bf4d73f commit 1fa8622

File tree

4 files changed

+31
-21
lines changed

4 files changed

+31
-21
lines changed

package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,43 +31,43 @@
3131
"author": "Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com/)",
3232
"license": "MIT",
3333
"dependencies": {
34-
"all-contributors-cli": "^4.5.0",
34+
"all-contributors-cli": "^4.9.0",
3535
"arrify": "^1.0.1",
3636
"babel-cli": "^6.26.0",
3737
"babel-jest": "^21.2.0",
38-
"babel-macros": "^1.0.2",
38+
"babel-macros": "^1.2.0",
3939
"babel-plugin-external-helpers": "^6.22.0",
4040
"babel-plugin-minify-dead-code-elimination": "^0.2.0",
41-
"babel-plugin-module-resolver": "^2.7.1",
41+
"babel-plugin-module-resolver": "^3.0.0",
4242
"babel-plugin-transform-class-properties": "^6.24.1",
4343
"babel-plugin-transform-inline-environment-variables": "^0.2.0",
4444
"babel-plugin-transform-object-rest-spread": "^6.26.0",
4545
"babel-plugin-transform-react-jsx": "^6.24.1",
4646
"babel-plugin-transform-react-remove-prop-types": "^0.4.10",
47-
"babel-preset-env": "^1.6.0",
47+
"babel-preset-env": "^1.6.1",
4848
"babel-preset-react": "^6.24.1",
49-
"concurrently": "^3.5.0",
50-
"cross-env": "^5.0.5",
49+
"concurrently": "^3.5.1",
50+
"cross-env": "^5.1.1",
5151
"cross-spawn": "^5.1.0",
5252
"doctoc": "^1.3.0",
53-
"eslint": "^4.8.0",
54-
"eslint-config-kentcdodds": "^13.0.0",
55-
"eslint-config-prettier": "^2.6.0",
53+
"eslint": "^4.11.0",
54+
"eslint-config-kentcdodds": "^13.0.1",
55+
"eslint-config-prettier": "^2.8.0",
5656
"glob": "^7.1.2",
5757
"husky": "^0.14.3",
5858
"is-ci": "^1.0.10",
5959
"jest": "^21.2.1",
60-
"lint-staged": "^4.2.3",
60+
"lint-staged": "^5.0.0",
6161
"lodash.camelcase": "^4.3.0",
6262
"lodash.has": "^4.5.2",
6363
"mkdirp": "^0.5.1",
64-
"prettier": "^1.7.4",
65-
"read-pkg-up": "^2.0.0",
66-
"resolve": "^1.4.0",
64+
"prettier": "^1.8.2",
65+
"read-pkg-up": "^3.0.0",
66+
"resolve": "^1.5.0",
6767
"rimraf": "^2.6.2",
68-
"rollup": "^0.48.2",
68+
"rollup": "^0.51.8",
6969
"rollup-plugin-babel": "^3.0.2",
70-
"rollup-plugin-commonjs": "^8.2.1",
70+
"rollup-plugin-commonjs": "^8.2.6",
7171
"rollup-plugin-json": "^2.3.0",
7272
"rollup-plugin-node-builtins": "^2.1.2",
7373
"rollup-plugin-node-globals": "^1.1.0",

src/scripts/__tests__/contributors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ test('calls all-contributors CLI with args', () => {
1818
require('../contributors')
1919
expect(crossSpawnSyncMock).toHaveBeenCalledTimes(1)
2020
expect(crossSpawnSyncMock).toHaveBeenCalledWith(
21-
expect.stringMatching('all-contributors-cli'),
21+
expect.stringMatching('all-contributors'),
2222
['add'],
2323
{stdio: 'inherit'},
2424
)

src/scripts/contributors.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
const spawn = require('cross-spawn')
2+
const {resolveBin} = require('../utils')
23

34
const args = process.argv.slice(2)
45

5-
const result = spawn.sync(require.resolve('all-contributors-cli/cli'), args, {
6-
stdio: 'inherit',
7-
})
6+
const result = spawn.sync(
7+
resolveBin('all-contributors-cli', {executable: 'all-contributors'}),
8+
args,
9+
{
10+
stdio: 'inherit',
11+
},
12+
)
813

914
process.exit(result.status)

src/scripts/precommit/lint-staged.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const lintStagedPath = require.resolve('lint-staged')
1111
const cosmiconfigPath = resolve.sync('cosmiconfig', {
1212
basedir: path.dirname(lintStagedPath),
1313
})
14+
const realCosmicConfig = require(cosmiconfigPath)
1415

1516
// lint-staged uses cosmiconfig to find its configuration
1617
// and it has no other way to provide config
@@ -19,9 +20,13 @@ const cosmiconfigPath = resolve.sync('cosmiconfig', {
1920
// config so folks don't have to have that in their package.json
2021
function fakeCosmiconfig(...args) {
2122
if (args[0] === 'lint-staged') {
22-
return Promise.resolve({config: require('../../config/lintstagedrc')})
23+
return {
24+
load() {
25+
return Promise.resolve({config: require('../../config/lintstagedrc')})
26+
},
27+
}
2328
} else {
24-
return require(cosmiconfigPath)(...args)
29+
return realCosmicConfig(...args)
2530
}
2631
}
2732

0 commit comments

Comments
 (0)