Skip to content

Commit 601f1e3

Browse files
author
Kent C. Dodds
committed
feat: upgrade everything
BREAKING CHANGE: This removes the contributors script. Use the bot: https://allcontributors.org/
1 parent e608f70 commit 601f1e3

File tree

12 files changed

+22
-89
lines changed

12 files changed

+22
-89
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,5 @@ merge of your pull request!
3737
- [ ] Documentation
3838
- [ ] Tests
3939
- [ ] Ready to be merged <!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->
40-
- [ ] Added myself to contributors table <!-- this is optional, see the contributing guidelines for instructions -->
4140

4241
<!-- feel free to add additional comments -->

CONTRIBUTING.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,6 @@ Thanks for being willing to contribute!
2828
> branch. Whenever you want to update your version of `master`, do a regular
2929
> `git pull`.
3030
31-
## Add yourself as a contributor
32-
33-
This project follows the [all contributors][all-contributors] specification.
34-
To add yourself to the table of contributors on the `README.md`, please use the
35-
automated script as part of your PR:
36-
37-
```console
38-
npm run add-contributor
39-
```
40-
41-
Follow the prompt and commit `.all-contributorsrc` and `README.md` in the PR.
42-
If you've already added yourself to the list and are making
43-
a new type of contribution, you can run it again and select the added
44-
contribution type.
45-
4631
## Committing and Pushing changes
4732
4833
This project uses [`semantic-release`][semantic-release] to do automatic
@@ -87,5 +72,4 @@ requests! Thanks!
8772
[egghead]: https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github
8873
[semantic-release]: https://npmjs.com/package/semantic-release
8974
[convention]: https://github.com/conventional-changelog/conventional-changelog-angular/blob/ed32559941719a130bb0327f886d6a32a8cbc2ba/convention.md
90-
[all-contributors]: https://github.com/kentcdodds/all-contributors
9175
[issues]: https://github.com/kentcdodds/kcd-scripts/issues

package.json

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"kcd-scripts": "dist/index.js"
1111
},
1212
"scripts": {
13-
"add-contributor": "node src contributors add",
1413
"test": "node src test",
1514
"test:update": "node src test --updateSnapshot",
1615
"build": "node src build",
@@ -41,13 +40,12 @@
4140
"@babel/plugin-transform-modules-commonjs": "^7.2.0",
4241
"@babel/plugin-transform-runtime": "^7.2.0",
4342
"@babel/preset-env": "^7.2.0",
44-
"@babel/preset-react": "^7.0.0",
4543
"@babel/preset-flow": "^7.0.0",
44+
"@babel/preset-react": "^7.0.0",
4645
"@babel/runtime": "^7.2.0",
47-
"all-contributors-cli": "^5.4.1",
4846
"arrify": "^1.0.1",
4947
"babel-core": "^7.0.0-0",
50-
"babel-jest": "^23.6.0",
48+
"babel-jest": "^24.3.1",
5149
"babel-plugin-macros": "^2.4.2",
5250
"babel-plugin-minify-dead-code-elimination": "^0.5.0",
5351
"babel-plugin-module-resolver": "^3.1.1",
@@ -59,12 +57,12 @@
5957
"cross-spawn": "^6.0.5",
6058
"doctoc": "^1.4.0",
6159
"eslint": "^5.9.0",
62-
"eslint-config-kentcdodds": "^14.0.4",
63-
"eslint-config-prettier": "^3.3.0",
60+
"eslint-config-kentcdodds": "^14.3.0",
61+
"eslint-config-prettier": "^4.1.0",
6462
"glob": "^7.1.2",
6563
"husky": "^1.2.0",
6664
"is-ci": "^2.0.0",
67-
"jest": "^23.6.0",
65+
"jest": "^24.3.1",
6866
"lint-staged": "^8.1.0",
6967
"lodash.camelcase": "^4.3.0",
7068
"lodash.has": "^4.5.2",
@@ -74,19 +72,19 @@
7472
"read-pkg-up": "^4.0.0",
7573
"resolve": "^1.6.0",
7674
"rimraf": "^2.6.2",
77-
"rollup": "^0.67.4",
75+
"rollup": "^1.5.0",
7876
"rollup-plugin-babel": "^4.0.0",
7977
"rollup-plugin-commonjs": "^9.2.0",
8078
"rollup-plugin-json": "^3.1.0",
8179
"rollup-plugin-node-builtins": "^2.1.2",
8280
"rollup-plugin-node-globals": "^1.4.0",
83-
"rollup-plugin-node-resolve": "^3.4.0",
81+
"rollup-plugin-node-resolve": "^4.0.1",
8482
"rollup-plugin-replace": "^2.1.0",
85-
"rollup-plugin-size-snapshot": "^0.7.0",
86-
"rollup-plugin-terser": "^3.0.0",
83+
"rollup-plugin-size-snapshot": "^0.8.0",
84+
"rollup-plugin-terser": "^4.0.4",
8785
"semver": "^5.6.0",
8886
"which": "^1.3.0",
89-
"yargs-parser": "^11.1.1"
87+
"yargs-parser": "^13.0.0"
9088
},
9189
"eslintConfig": {
9290
"extends": [

src/__tests__/__snapshots__/index.js.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ Usage: ../ [script] [--flags]
2828
2929
Available Scripts:
3030
build
31-
contributors
3231
format
3332
lint
3433
pre-commit

src/config/__tests__/lintstagedrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function hasGitAdd(linter) {
3535

3636
function getJsLinter(linters) {
3737
const key = Object.keys(linters).find(
38-
k => k.includes('**') && k.includes('js'),
38+
k => k.includes('*') && k.includes('js'),
3939
)
4040
return linters[key]
4141
}

src/config/babelrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const hasBabelRuntimeDep = Boolean(
1717
pkg.dependencies && pkg.dependencies['@babel/runtime'],
1818
)
1919
const RUNTIME_HELPERS_WARN =
20-
'You should add @babel/runtime as dependency to your package. It will allow reusing so-called babel helpers from npm rather than bundling their copies into your files.'
20+
'You should add @babel/runtime as dependency to your package. It will allow reusing "babel helpers" from node_modules rather than bundling their copies into your files.'
2121

2222
if (!treeshake && !hasBabelRuntimeDep) {
2323
throw new Error(RUNTIME_HELPERS_WARN)

src/config/jest.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ const jestConfig = {
3232
},
3333
}
3434

35+
if (hasFile('tests/setup-env.js')) {
36+
jestConfig.setupFilesAfterEnv = [fromRoot('tests/setup-env.js')]
37+
}
38+
3539
if (useBuiltInBabelConfig) {
3640
jestConfig.transform = {'^.+\\.js$': here('./babel-transform')}
3741
}

src/config/lintstagedrc.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,10 @@ module.exports = {
77
concurrent: false,
88
linters: {
99
'README.md': [`${doctoc} --maxlevel 3 --notitle`, 'git add'],
10-
'.all-contributorsrc': [
11-
`${kcdScripts} contributors generate`,
12-
'git add README.md',
13-
],
14-
'**/*.+(js|json|less|css|ts|tsx|md)': [
10+
'*.+(js|jsx|json|yml|yaml|css|less|scss|ts|tsx|md|graphql|mdx)': [
1511
isOptedOut('autoformat', null, `${kcdScripts} format`),
1612
`${kcdScripts} lint`,
17-
`${kcdScripts} test --findRelatedTests --passWithNoTests`,
13+
`${kcdScripts} test --findRelatedTests`,
1814
isOptedOut('autoformat', null, 'git add'),
1915
].filter(Boolean),
2016
},

src/config/rollup.config.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const {
1616
hasFile,
1717
hasPkgProp,
1818
parseEnv,
19-
ifFile,
2019
fromRoot,
2120
uniq,
2221
writeExtraEntry,
@@ -47,16 +46,7 @@ const deps = Object.keys(pkg.dependencies || {})
4746
const peerDeps = Object.keys(pkg.peerDependencies || {})
4847
const defaultExternal = umd ? peerDeps : deps.concat(peerDeps)
4948

50-
const input = glob.sync(
51-
fromRoot(
52-
process.env.BUILD_INPUT ||
53-
ifFile(
54-
`src/${format}-entry.js`,
55-
`src/${format}-entry.js`,
56-
'src/index.js',
57-
),
58-
),
59-
)
49+
const input = glob.sync(fromRoot(process.env.BUILD_INPUT || 'src/index.js'))
6050
const codeSplitting = input.length > 1
6151

6252
if (

src/scripts/__tests__/contributors.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)