Skip to content
This repository was archived by the owner on Aug 21, 2019. It is now read-only.

Commit 24f7972

Browse files
authored
Merge pull request #19 from akameco/refactor/update-deps
refactor(deps): update babel7
2 parents 13165ea + b73b8a5 commit 24f7972

File tree

11 files changed

+1600
-1990
lines changed

11 files changed

+1600
-1990
lines changed

.babelrc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
{
2-
"presets": ["env"]
2+
"presets": [
3+
[
4+
"@babel/preset-env", {
5+
"targets": {
6+
"node": "current"
7+
}
8+
}
9+
],
10+
"@babel/preset-flow"
11+
]
312
}

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
language: node_js
22
node_js:
3+
- '11'
34
- '10'
45
- '8'
56

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const glob = require('glob')
55
const pify = require('pify')
66
const merge = require('lodash.merge')
77
const mergeWith = require('lodash.mergewith')
8-
const { resolvePlugin, resolvePreset, transformFile } = require('babel-core')
8+
const { resolvePlugin, resolvePreset, transformFile } = require('@babel/core')
99
const readBabelrcUp = require('read-babelrc-up')
1010

1111
const localeMap = arr =>

package.json

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,30 +39,31 @@
3939
"extract-react-intl"
4040
],
4141
"dependencies": {
42-
"babel-plugin-react-intl": "^2.3.1",
42+
"@babel/core": "^7.0.0",
43+
"babel-plugin-react-intl": "^3.0.1",
4344
"glob": "^7.1.3",
4445
"lodash.merge": "^4.6.1",
4546
"lodash.mergewith": "^4.6.1",
46-
"pify": "^4.0.0",
47+
"pify": "^4.0.1",
4748
"read-babelrc-up": "^0.3.0"
4849
},
49-
"peerDependencies": {
50-
"babel-core": "^6 || ^7"
51-
},
5250
"devDependencies": {
51+
"@babel/core": "^7.0.0",
52+
"@babel/plugin-proposal-class-properties": "^7.3.0",
53+
"@babel/preset-env": "^7.0.0",
54+
"@babel/preset-flow": "^7.0.0",
55+
"@babel/preset-react": "^7.0.0",
5356
"all-contributors-cli": "^5.10.2",
54-
"babel-jest": "^23.6.0",
57+
"babel-core": "^7.0.0-bridge.0",
58+
"babel-jest": "^24.0.0",
5559
"babel-plugin-react-intl-auto": "^1.5.0",
56-
"babel-preset-env": "^1.7.0",
57-
"babel-preset-react": "^6.24.1",
58-
"babel-preset-stage-0": "^6.24.1",
5960
"eslint": "^5.12.1",
6061
"eslint-config-precure": "^3.5.0",
6162
"flow-bin": "^0.91.0",
6263
"husky": "^1.3.1",
63-
"jest": "^23.6.0",
64+
"jest": "^24.0.0",
6465
"lint-staged": "^8.1.0",
65-
"prettier": "^1.15.3"
66+
"prettier": "^1.16.1"
6667
},
6768
"husky": {
6869
"hooks": {

readme.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,8 @@ This package allows you to extract all messages from a glob. It will return an o
99

1010
## Install
1111

12-
This project has a peer dependency on `babel-core`.
13-
14-
To use this with Babel 6, run
15-
16-
```
17-
$ yarn add --dev extract-react-intl babel-core
18-
```
19-
20-
To use this with Babel 7, run
21-
2212
```
23-
$ yarn add --dev extract-react-intl babel-core@bridge @babel/core
13+
$ yarn add --dev extract-react-intl
2414
```
2515

2616
## Usage

test/fixtures/.babelrc

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,30 @@
11
{
22
"presets": [
3-
["env", {
4-
"targets": {
5-
"browsers": ["last 2 versions", "safari >= 7"]
3+
[
4+
"@babel/preset-env",
5+
{
6+
"targets": {
7+
"browsers": [
8+
"last 2 versions",
9+
"safari >= 7"
10+
]
11+
}
612
}
7-
}],
8-
"react"
13+
],
14+
"@babel/preset-react",
15+
"@babel/preset-flow"
916
],
1017
"plugins": [
11-
"transform-class-properties"
18+
"@babel/plugin-proposal-class-properties"
1219
],
1320
"env": {
1421
"react-intl": {
15-
"plugins":[
16-
["react-intl-auto",
17-
{"removePrefix": "test.fixtures"}
22+
"plugins": [
23+
[
24+
"react-intl-auto",
25+
{
26+
"removePrefix": "test.fixtures"
27+
}
1828
]
1929
]
2030
}

test/pluginOrdering/.babelrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"presets": [
3-
"./.babelrc.js"
4-
]
3+
"@babel/preset-flow"
4+
],
5+
"plugins": ["react-intl-auto"]
56
}

test/pluginOrdering/.babelrc.js

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

test/resolution/.babelrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"presets": [
3-
"./.babelrc.js"
4-
]
3+
"@babel/preset-flow"
4+
],
5+
"plugins": ["react-intl"]
56
}

test/resolution/.babelrc.js

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

0 commit comments

Comments
 (0)