Skip to content

Commit 262c701

Browse files
committed
feat: merge upstream
BREAKING CHANGE: .opt-* won't be supported anymore, so formatting will always happen on pre-commit BREAKING CHANGE: Default Node compilation target is now 10.13+ BREAKING CHANGE: Updates to latest version of lint-staged which may break you if you're using a custom config for it and have `git add`
1 parent 0aae603 commit 262c701

29 files changed

+1722
-2214
lines changed

.gitattributes

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
* text=auto
2-
*.js text eol=lf
1+
* text=auto eol=lf

.node-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10.16.3
1+
10.19.0

.prettierrc

-10
This file was deleted.

.prettierrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('./src/config/prettierrc');

.travis.yml

+15-17
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
11
language: node_js
22

3-
node_js:
4-
- '8'
5-
- '10'
6-
- '12'
7-
8-
sudo: false
3+
cache: npm
94
notifications:
105
email: false
11-
cache:
12-
directories:
13-
- node_modules
14-
15-
script: yarn validate
6+
node_js:
7+
- 10.18
8+
- 12
9+
- node
10+
install: npm install
11+
script:
12+
- npm run validate
13+
- npx codecov@3
14+
branches:
15+
only:
16+
- master
17+
- next
1618

1719
jobs:
1820
include:
1921
- stage: release
20-
node_js: lts/*
21-
script: yarn build
22-
deploy:
23-
provider: script
24-
skip_cleanup: true
25-
script: 'node src travis-after-success'
22+
node_js: 12
23+
script: node src travis-release

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
FROM node:10.16.3-alpine
1+
FROM node:10.19.0-alpine
22
RUN apk update && apk upgrade && apk add --no-cache git openssh
33
RUN npm config set unsafe-perm true

README.md

+25-16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<p align="center">
2+
<a href="https://codefund.io/properties/447/visit-sponsor">
3+
<img src="https://codefund.io/properties/447/sponsor" />
4+
</a>
5+
</p>
6+
17
<div align="center">
28
<h1>@hover/javascript 🛠📦</h1>
39

@@ -8,18 +14,17 @@
814

915
[![Build Status][build-badge]][build]
1016
[![Code Coverage][coverage-badge]][coverage]
11-
[![version][version-badge]][package]
12-
[![MIT License][license-badge]][license]
17+
[![version][version-badge]][package] [![MIT License][license-badge]][license]
1318

1419
## The problem
1520

16-
~~I~~ **We** do a bunch of open source and want to make it easier to maintain so many
17-
projects.
21+
~~I~~ **We** do a bunch of open source and want to make it easier to maintain so
22+
many projects.
1823

1924
## This solution
2025

21-
This is a CLI that abstracts away all configuration for ~~my~~ **our** open source projects
22-
for linting, testing, building, and more.
26+
This is a CLI that abstracts away all configuration for ~~my~~ **our** open
27+
source projects for linting, testing, building, and more.
2328

2429
## Table of Contents
2530

@@ -44,11 +49,12 @@ yarn add -D @hover/javascript
4449

4550
## Usage
4651

47-
This is a CLI and exposes a bin called `hover-scripts`. You'll find all available scripts in `src/scripts`.
52+
This is a CLI and exposes a bin called `hover-scripts`. You'll find all
53+
available scripts in `src/scripts`.
4854

4955
This project actually dogfoods itself. If you look in the `package.json`, you'll
50-
find scripts with `node src {scriptName}`. This serves as an example of some
51-
of the things you can do with `hover-scripts`.
56+
find scripts with `node src {scriptName}`. This serves as an example of some of
57+
the things you can do with `hover-scripts`.
5258

5359
### Overriding Config
5460

@@ -79,21 +85,21 @@ Or, for `babel`, a `.babelrc` with:
7985
Or, for `jest`:
8086

8187
```javascript
82-
const {jest: jestConfig} = require('@hover/javascript/jest')
88+
const { jest: jestConfig } = require('@hover/javascript/jest');
8389
module.exports = Object.assign(jestConfig, {
8490
// your overrides here
8591

8692
// for test written in Typescript, add:
8793
transform: {
8894
'\\.(ts|tsx)$': '<rootDir>/node_modules/ts-jest/preprocessor.js',
8995
},
90-
})
96+
});
9197
```
9298

9399
> Note: `hover-scripts` intentionally does not merge things for you when you
94100
> start configuring things to make it less magical and more straightforward.
95-
> Extending can take place on your terms. ~~I~~ _Kent_ think[s] this is
96-
> actually a great way to do this.
101+
> Extending can take place on your terms. ~~I~~ _Kent_ think[s] this is actually
102+
> a great way to do this.
97103
>
98104
> For the record, so do I (Jamie)
99105
@@ -103,9 +109,12 @@ MIT
103109

104110
[npm]: https://www.npmjs.com/
105111
[node]: https://nodejs.org
106-
[build-badge]: https://g.codefresh.io/api/badges/pipeline/hoverinc/npm%2Fjavascript?type=cf-1
107-
[build]: https://g.codefresh.io/public/accounts/hoverinc/pipelines/5d4cb5d4e41f3722d4dfdb94
108-
[coverage-badge]: https://img.shields.io/codecov/c/github/hoverinc/hover-javascript.svg
112+
[build-badge]:
113+
https://g.codefresh.io/api/badges/pipeline/hoverinc/npm%2Fjavascript?type=cf-1
114+
[build]:
115+
https://g.codefresh.io/public/accounts/hoverinc/pipelines/5d4cb5d4e41f3722d4dfdb94
116+
[coverage-badge]:
117+
https://img.shields.io/codecov/c/github/hoverinc/hover-javascript.svg
109118
[coverage]: https://codecov.io/github/hoverinc/hover-javascript
110119
[version-badge]: https://img.shields.io/npm/v/@hover/javascript.svg
111120
[package]: https://www.npmjs.com/package/@hover/javascript

codefresh.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ steps:
2020
revision: '${{CF_BRANCH}}'
2121
build:
2222
stage: build
23-
image: node:10.16.3-alpine
23+
image: node:10.19.0-alpine
2424
commands:
2525
- yarn install
2626
test:
2727
stage: build
28-
image: node:10.16.3-alpine
28+
image: node:10.19.0-alpine
2929
commands:
3030
- yarn validate
3131
releaser:

package.json

+34-31
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
"version": "0.0.0-semantically-released",
44
"description": "CLI toolbox for common scripts for JavaScript + TypeScript projects",
55
"engines": {
6-
"node": ">= 8",
7-
"npm": ">= 5"
6+
"node": ">=10.18",
7+
"npm": ">=6",
8+
"yarn": ">=1"
89
},
910
"bin": {
1011
"hover-scripts": "dist/index.js"
@@ -40,71 +41,73 @@
4041
"author": "Jamie Rolfs <[email protected]>",
4142
"license": "MIT",
4243
"dependencies": {
43-
"@babel/cli": "^7.8.3",
44-
"@babel/core": "^7.8.3",
44+
"@babel/cli": "^7.8.4",
45+
"@babel/core": "^7.8.4",
4546
"@babel/plugin-proposal-class-properties": "^7.8.3",
4647
"@babel/plugin-transform-modules-commonjs": "^7.8.3",
4748
"@babel/plugin-transform-runtime": "^7.8.3",
48-
"@babel/preset-env": "^7.8.3",
49+
"@babel/preset-env": "^7.8.4",
4950
"@babel/preset-flow": "^7.8.3",
5051
"@babel/preset-react": "^7.8.3",
51-
"@babel/runtime": "^7.8.3",
52+
"@babel/runtime": "^7.8.4",
5253
"@commitlint/cli": "^8.3.5",
5354
"@commitlint/config-conventional": "^8.3.4",
5455
"@commitlint/prompt": "^8.3.5",
56+
"@rollup/plugin-commonjs": "^11.0.2",
57+
"@rollup/plugin-json": "^4.0.2",
58+
"@rollup/plugin-node-resolve": "^7.1.1",
59+
"@rollup/plugin-replace": "^2.3.1",
60+
"@types/jest": "^25.1.3",
5561
"@typescript-eslint/eslint-plugin": "^2.16.0",
5662
"arrify": "^2.0.1",
57-
"babel-core": "^7.0.0-0",
5863
"babel-jest": "^25.1.0",
5964
"babel-plugin-macros": "^2.8.0",
60-
"babel-plugin-minify-dead-code-elimination": "^0.5.0",
65+
"babel-plugin-minify-dead-code-elimination": "^0.5.1",
6166
"babel-plugin-module-resolver": "^4.0.0",
62-
"babel-plugin-transform-inline-environment-variables": "^0.4.0",
63-
"babel-plugin-transform-react-remove-prop-types": "^0.4.21",
64-
"browserslist": "^4.8.3",
67+
"babel-plugin-transform-inline-environment-variables": "^0.4.3",
68+
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
69+
"browserslist": "^4.8.7",
6570
"commitizen": "^4.0.3",
66-
"concurrently": "^5.0.2",
67-
"cross-env": "^5.1.4",
68-
"cross-spawn": "^7.0.0",
71+
"chalk": "^3.0.0",
72+
"concurrently": "^5.1.0",
73+
"cosmiconfig": "^6.0.0",
74+
"cross-env": "^7.0.0",
75+
"cross-spawn": "^7.0.1",
6976
"doctoc": "^1.4.0",
7077
"eslint": "^6.8.0",
7178
"eslint-config-airbnb-typescript": "^6.3.1",
72-
"eslint-config-kentcdodds": "^14.3.4",
73-
"eslint-config-prettier": "^6.9.0",
79+
"eslint-config-kentcdodds": "^14.8.0",
80+
"eslint-config-prettier": "^6.10.0",
7481
"eslint-plugin-import": "^2.20.0",
7582
"eslint-plugin-jest": "^22.15.0",
7683
"eslint-plugin-jsx-a11y": "^6.2.3",
7784
"eslint-plugin-prettier": "^3.1.2",
7885
"eslint-plugin-react": "^7.18.0",
7986
"eslint-plugin-react-hooks": "^2.3.0",
8087
"glob": "^7.1.6",
81-
"husky": "^4.0.10",
88+
"husky": "^4.2.3",
8289
"is-ci": "^2.0.0",
8390
"jest": "^25.1.0",
8491
"jest-watch-typeahead": "^0.4.2",
85-
"lint-staged": "^10.0.7",
92+
"lint-staged": "^10.0.8",
8693
"lodash.camelcase": "^4.3.0",
8794
"lodash.has": "^4.5.2",
8895
"lodash.omit": "^4.5.0",
89-
"mkdirp": "^0.5.1",
90-
"prettier": "^1.19.1",
91-
"read-pkg-up": "^6.0.0",
92-
"resolve": "^1.14.2",
93-
"rimraf": "^3.0.0",
94-
"rollup": "^1.29.0",
96+
"mkdirp": "^1.0.3",
97+
"prettier": "1.19.1",
98+
"read-pkg-up": "^7.0.1",
99+
"resolve": "^1.15.1",
100+
"rimraf": "^3.0.2",
101+
"rollup": "^1.31.1",
95102
"rollup-plugin-babel": "^4.3.3",
96-
"rollup-plugin-commonjs": "^10.0.1",
97-
"rollup-plugin-json": "^4.0.0",
98103
"rollup-plugin-node-builtins": "^2.1.2",
99104
"rollup-plugin-node-globals": "^1.4.0",
100-
"rollup-plugin-node-resolve": "^5.2.0",
101-
"rollup-plugin-replace": "^2.2.0",
102-
"rollup-plugin-size-snapshot": "^0.10.0",
105+
"rollup-plugin-size-snapshot": "^0.11.0",
103106
"rollup-plugin-terser": "^5.2.0",
104-
"semver": "^6.2.0",
107+
"semver": "^7.1.3",
105108
"typescript": "^3.7.5",
106109
"which": "^2.0.2",
107-
"yargs-parser": "^16.1.0"
110+
"yargs-parser": "^17.0.0"
108111
},
109112
"eslintConfig": {
110113
"extends": [

src/__tests__/__snapshots__/index.js.snap

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
exports[`format calls node with the script path and args 1`] = `node <PROJECT_ROOT>/src/scripts/test.js --no-watch`;
44
5+
exports[`format calls node with the script path and args including inspect-brk argument 1`] = `node --inspect-brk=3080 <PROJECT_ROOT>/src/scripts/test.js --no-watch`;
6+
57
exports[`format does not log for other signals 1`] = `Array []`;
68
79
exports[`format logs for SIGKILL signal 1`] = `

0 commit comments

Comments
 (0)