Skip to content

Commit ad67b0a

Browse files
authored
update dependencies (#6)
* update dependencies * [lint] switch from eslint -> xojs * [karma] apply babel config to SVG files too * [karma] compile all js files, target web * [travis] switch from yarn => npm * [.travis.yml] remove cache from travis config * [karma.conf.js] test on iPhone 8 * [karma.conf.js] iPhone 7, iOS 10.3 * [karma.conf.js] set hostname to 0.0.0.0 * [.travis.yml] browserstack addon * [karma.conf.js] enable all browsers expect iOS * [karma.conf.js] update browserstack config * [karma.conf.js] remove browserstack custom settings * [karma.conf.js] restore browserstack tunnel config * [karma.conf.js] enable iOS * [karma.conf.js] no more iOS 😢 * [.travis.yml] [karma.conf.js] remove unused configurations
1 parent d4a4998 commit ad67b0a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+15755
-7926
lines changed

.babelrc

+6-17
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,29 @@
22
"env": {
33
"production": {
44
"plugins": [
5-
"transform-react-remove-prop-types",
6-
"transform-runtime",
5+
"babel-plugin-transform-react-remove-prop-types",
76
[
8-
"transform-define", {
7+
"babel-plugin-transform-define", {
98
"__TEST__": false
109
}
1110
]
1211
]
1312
}
1413
},
1514
"plugins": [
16-
"transform-class-properties",
17-
"transform-object-rest-spread",
18-
"transform-object-assign",
19-
[
20-
"transform-runtime", {
21-
helpers: false,
22-
polyfill: false,
23-
regenerator: true
24-
}
25-
]
15+
"@babel/plugin-proposal-class-properties",
16+
"@babel/plugin-proposal-object-rest-spread",
2617
],
2718
"presets": [
2819
[
29-
"env",
20+
"@babel/preset-env",
3021
{
3122
"modules": false,
3223
"targets": {
3324
"browsers": ["last 2 versions"]
3425
},
35-
"useBuiltIns": true
3626
}
3727
],
38-
"es2015",
39-
"react"
28+
"@babel/preset-react"
4029
]
4130
}

.eslintrc.json

-26
This file was deleted.

.travis.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
cache: yarn
21
language: node_js
32
node_js:
43
- "8"
54
before_script:
65
- npm run lint
76
- npm run build
87
install:
9-
- yarn --ignore-engines
8+
- npm install

karma.conf.js

+50-49
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ function getBrowserStackConfig(config) {
3535
},
3636
bs_safari_mac: {
3737
base: 'BrowserStack',
38-
browser: 'safari',
39-
browser_version: '8',
4038
os: 'OS X',
41-
os_version: 'Yosemite'
39+
os_version: 'Sierra',
40+
browser: 'Safari',
41+
browser_version: '10.1',
4242
},
4343
bs_ie_windows: {
4444
base: 'BrowserStack',
@@ -54,22 +54,14 @@ function getBrowserStackConfig(config) {
5454
os: 'Windows',
5555
os_version: '10'
5656
},
57-
bs_iphone_5s: {
58-
base: 'BrowserStack',
59-
device: 'iPhone 6',
60-
os: 'ios',
61-
os_version: '8.3',
62-
browser_version: null,
63-
browser: 'Mobile Safari'
64-
},
65-
bs_android_galaxy_s5_mini: {
57+
bs_android_galaxy_s6: {
6658
base: 'BrowserStack',
67-
realMobile: true,
59+
real_mobile: true,
6860
os: 'android',
69-
os_version: '4.4',
61+
os_version: '5.0',
7062
browser: 'Android Browser',
7163
browser_version: null,
72-
device: 'Samsung Galaxy S5 Mini'
64+
device: 'Samsung Galaxy S6'
7365
}
7466
};
7567

@@ -83,6 +75,40 @@ function getBrowserStackConfig(config) {
8375
};
8476
}
8577

78+
const babelOptions = {
79+
plugins: [
80+
'@babel/plugin-proposal-class-properties',
81+
[
82+
'babel-plugin-istanbul', {
83+
exclude: [
84+
'**/index.js',
85+
'**/*.spec.js',
86+
'test/test_index.js'
87+
]
88+
}
89+
]
90+
],
91+
presets: [
92+
[
93+
'@babel/preset-env',
94+
{
95+
targets: {
96+
browsers: [
97+
'Firefox >= 45',
98+
'Chrome >= 49',
99+
'Safari >= 8',
100+
'IE >= 11',
101+
'Edge >= 14',
102+
'iOS >= 10',
103+
'Android >= 5'
104+
]
105+
}
106+
}
107+
],
108+
'@babel/preset-react'
109+
]
110+
};
111+
86112
module.exports = function (config) {
87113
const initialConfig = {
88114
browserConsoleLogOptions: {
@@ -126,7 +152,6 @@ module.exports = function (config) {
126152
},
127153
files: [
128154
'./node_modules/core-js/client/core.js',
129-
'./node_modules/phantomjs-polyfill-object-assign/object-assign-polyfill.js',
130155
'test/test_index.js'
131156
],
132157
frameworks: [
@@ -140,49 +165,21 @@ module.exports = function (config) {
140165
],
141166
singleRun: true,
142167
webpack: {
143-
devtool: 'cheap-module-inline-source-map',
168+
devtool: 'source-map',
144169
externals: {
145170
'react/lib/ExecutionEnvironment': true,
146171
'react/lib/ReactContext': 'window',
147172
'react/addons': true
148173
},
174+
mode: 'development',
149175
module: {
150-
exprContextCritical: false,
151176
rules: [
152177
// Run regular source code through babel
153178
{
154179
test: /\.js$/,
155-
exclude: /node_modules/,
156180
use: {
157181
loader: 'babel-loader',
158-
options: {
159-
plugins: [
160-
'transform-class-properties',
161-
'empower-assert',
162-
[
163-
'espower', {
164-
embedAst: true
165-
}
166-
],
167-
[
168-
'istanbul', {
169-
exclude: [
170-
'**/index.js',
171-
'**/*.spec.js',
172-
'test/test_index.js'
173-
]
174-
}
175-
]
176-
],
177-
presets: [
178-
[
179-
'es2015',
180-
{
181-
modules: false
182-
}
183-
]
184-
]
185-
}
182+
options: babelOptions
186183
}
187184
},
188185
{
@@ -196,7 +193,10 @@ module.exports = function (config) {
196193
{
197194
test: /\.svg$/,
198195
use: [
199-
'babel-loader',
196+
{
197+
loader: 'babel-loader',
198+
options: babelOptions
199+
},
200200
'react-svg-loader'
201201
]
202202
}
@@ -209,7 +209,8 @@ module.exports = function (config) {
209209
NODE_ENV: JSON.stringify('development')
210210
}
211211
})
212-
]
212+
],
213+
target: 'web'
213214
},
214215
webpackServer: {
215216
noInfo: true

0 commit comments

Comments
 (0)