Skip to content

Commit

Permalink
feat(node): drop Node 8 and update dependencies (#146)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Requires Node 10+
  • Loading branch information
MichaelDeBoey committed Mar 26, 2020
1 parent 03da9e4 commit 324bcb3
Show file tree
Hide file tree
Showing 22 changed files with 367 additions and 300 deletions.
12 changes: 6 additions & 6 deletions .all-contributorsrc
@@ -1,12 +1,15 @@
{
"projectName": "babel-plugin-macros",
"projectOwner": "kentcdodds",
"imageSize": 100,
"commit": false,
"contributorsPerLine": 7,
"repoHost": "https://github.com",
"repoType": "github",
"skipCi": false,
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"contributors": [
{
"login": "kentcdodds",
Expand Down Expand Up @@ -235,8 +238,5 @@
"doc"
]
}
],
"contributorsPerLine": 7,
"repoHost": "https://github.com",
"skipCi": true
]
}
3 changes: 1 addition & 2 deletions .gitattributes
@@ -1,2 +1 @@
* text=auto
*.js text eol=lf
* text=auto eol=lf
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE.md
Expand Up @@ -11,9 +11,9 @@ never done that before, that's great! Check this free short video tutorial to
learn how: http://kcd.im/pull-request
-->

* `babel-plugin-macros` version:
* `node` version:
* `npm` (or `yarn`) version:
- `babel-plugin-macros` version:
- `node` version:
- `npm` (or `yarn`) version:

Relevant code or config

Expand Down
6 changes: 4 additions & 2 deletions .gitignore
@@ -1,7 +1,9 @@
node_modules
coverage
dist
.opt-in
.opt-out
.DS_Store

# these cause more harm than good
# when working with contributors
package-lock.json
yarn.lock
1 change: 1 addition & 0 deletions .huskyrc.js
@@ -0,0 +1 @@
module.exports = require('kcd-scripts/husky')
2 changes: 1 addition & 1 deletion .npmrc
@@ -1 +1 @@
registry=http://registry.npmjs.org/
registry=http://registry.npmjs.org
7 changes: 3 additions & 4 deletions .prettierignore
@@ -1,4 +1,3 @@
node_modules/
coverage/
dist/
package.json
node_modules
coverage
dist
1 change: 1 addition & 0 deletions .prettierrc.js
@@ -0,0 +1 @@
module.exports = require('kcd-scripts/prettier')
40 changes: 23 additions & 17 deletions .travis.yml
@@ -1,24 +1,30 @@
sudo: false
language: node_js
cache: npm
notifications:
email: false
node_js: '10'
node_js:
- 10.0.0
- 12
- node
os:
- linux
- windows
# Travis does not support secrets on Windows yet so we test only external PRs where the secrets are not exposed
# https://travis-ci.community/t/current-known-issues-please-read-this-before-posting-a-new-topic/264
if: os = linux OR (type = pull_request AND head_repo != repo)
install: npm install
script:
- npm run validate
- npx codecov@3
branches:
only:
- master
- beta

jobs:
include:
- stage: test
name: test on windows
os: windows
install: npm install
script: npm run validate
# Travis does not support secrets on Windows yet so we test only external PRs where the secrets are not exposed
# https://travis-ci.community/t/current-known-issues-please-read-this-before-posting-a-new-topic/264
if: type = pull_request AND head_repo != repo
- stage: test and publish
name: test on linux and publish
- stage: release
node_js: 12
# Build release on linux
os: linux
install: npm install
script: npm run validate
after_success: kcd-scripts travis-after-success
branches:
only: master
script: kcd-scripts travis-release
5 changes: 3 additions & 2 deletions CHANGELOG.md
@@ -1,4 +1,5 @@
# CHANGELOG

The changelog is automatically updated using [semantic-release](https://github.com/semantic-release/semantic-release).
You can see it on the [releases page](../../releases).
The changelog is automatically updated using
[semantic-release](https://github.com/semantic-release/semantic-release). You
can see it on the [releases page](../../releases).
56 changes: 15 additions & 41 deletions CONTRIBUTING.md
Expand Up @@ -2,63 +2,36 @@

Thanks for being willing to contribute!

**Working on your first Pull Request?** You can learn how from this _free_ series
[How to Contribute to an Open Source Project on GitHub][egghead]
**Working on your first Pull Request?** You can learn how from this _free_
series [How to Contribute to an Open Source Project on GitHub][egghead]

## Project setup

1. Fork and clone the repo
2. Run `npm run setup -s` to install dependencies and run validation
3. Create a branch for your PR with `git checkout -b pr/your-branch-name`
2. `$ npm install` to install dependencies
3. `$ npm run validate` to validate you've got it working
4. Create a branch for your PR

> Tip: Keep your `master` branch pointing at the original repository and make
> pull requests from branches on your fork. To do this, run:
>
> ```
> git remote add upstream https://github.com/kentcdodds/babel-plugin-macros.git
> git remote add upstream https://github.com/kentcdodds/babel-plugin-macros
> git fetch upstream
> git branch --set-upstream-to=upstream/master master
> ```
>
> This will add the original repository as a "remote" called "upstream,"
> Then fetch the git information from that remote, then set your local `master`
> branch to use the upstream master branch whenever you run `git pull`.
> Then you can make all of your pull request branches based on this `master`
> branch. Whenever you want to update your version of `master`, do a regular
> `git pull`.
## Add yourself as a contributor

This project follows the [all contributors][all-contributors] specification.
To add yourself to the table of contributors on the `README.md`, please use the
automated script as part of your PR:

```console
npm run add-contributor
```

Follow the prompt and commit `.all-contributorsrc` and `README.md` in the PR.
If you've already added yourself to the list and are making
a new type of contribution, you can run it again and select the added
contribution type.
> This will add the original repository as a "remote" called "upstream," Then
> fetch the git information from that remote, then set your local `master`
> branch to use the upstream master branch whenever you run `git pull`. Then you
> can make all of your pull request branches based on this `master` branch.
> Whenever you want to update your version of `master`, do a regular `git pull`.
## Committing and Pushing changes

Please make sure to run the tests before you commit your changes. You can run
`npm run test:update` which will update any snapshots that need updating.
Make sure to include those changes (if they exist) in your commit.

### opt into git hooks

There are git hooks set up with this project that are automatically installed
when you install dependencies. They're really handy, but are turned off by
default (so as to not hinder new contributors). You can opt into these by
creating a file called `.opt-in` at the root of the project and putting this
inside:

```
pre-commit
```
`npm run test:update` which will update any snapshots that need updating. Make
sure to include those changes (if they exist) in your commit.

## Help needed

Expand All @@ -67,6 +40,7 @@ Please checkout the [the open issues][issues]
Also, please watch the repo and respond to questions/bug reports/feature
requests! Thanks!

<!-- prettier-ignore-start -->
[egghead]: https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github
[all-contributors]: https://github.com/kentcdodds/all-contributors
[issues]: https://github.com/kentcdodds/babel-plugin-macros/issues
<!-- prettier-ignore-end -->

0 comments on commit 324bcb3

Please sign in to comment.