Skip to content

Commit

Permalink
fix: support any version of babel (#55)
Browse files Browse the repository at this point in the history
* Make it work with Babel 7

Closes #52

* Fix usage of babel register

* Remove dependency on babel-register

* fix: support any version of babel

BREAKING CHANGE: We no longer run require('babel-register') so not all code will be transpiled with babel by preval. Some will, but it's advised to not write code that you want prevaled in a way that doesn't run in the version of node you're using
  • Loading branch information
tleunen authored and Kent C. Dodds committed Jun 22, 2018
1 parent 5c47ce5 commit 2868210
Show file tree
Hide file tree
Showing 14 changed files with 457 additions and 448 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@
"contributions": [
"code"
]
},
{
"login": "tleunen",
"name": "Tommy",
"avatar_url": "https://avatars3.githubusercontent.com/u/1972567?v=4",
"profile": "http://www.tommyleunen.com",
"contributions": [
"code"
]
}
],
"repoType": "github"
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
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-preval` version:
* `node` version:
* `npm` (or `yarn`) version:
- `babel-plugin-preval` version:
- `node` version:
- `npm` (or `yarn`) version:

Relevant code or config

Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Thanks for being willing to contribute!

## Project setup

1. Fork and clone the repo
2. `$ npm install` to install dependencies
3. `$ npm run validate` to validate you've got it working
4. Create a branch for your PR
1. Fork and clone the repo
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:
Expand Down
196 changes: 137 additions & 59 deletions README.md

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions other/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities
Expand Down
21 changes: 13 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
"validate": "kcd-scripts validate",
"precommit": "kcd-scripts precommit"
},
"files": ["dist", "macro.js"],
"files": [
"dist",
"macro.js"
],
"keywords": [
"babel",
"babel-plugin",
Expand All @@ -27,20 +30,22 @@
"author": "Kent C. Dodds <[email protected]> (http://kentcdodds.com/)",
"license": "MIT",
"dependencies": {
"babel-plugin-macros": "^2.0.0",
"babel-register": "^6.26.0",
"babylon": "^6.18.0",
"require-from-string": "^2.0.1"
"babel-plugin-macros": "^2.2.2",
"require-from-string": "^2.0.2"
},
"devDependencies": {
"ast-pretty-print": "^2.0.1",
"babel-plugin-tester": "^5.0.0",
"kcd-scripts": "^0.30.4"
"babel-plugin-tester": "^5.4.0",
"kcd-scripts": "^0.39.1"
},
"eslintConfig": {
"extends": "./node_modules/kcd-scripts/eslint.js"
},
"eslintIgnore": ["node_modules", "coverage", "dist"],
"eslintIgnore": [
"node_modules",
"coverage",
"dist"
],
"babel": {
"presets": "kcd-scripts/babel"
},
Expand Down
Loading

0 comments on commit 2868210

Please sign in to comment.