Skip to content

Commit 635464d

Browse files
Merge pull request #95 from conveyal/dev
v3.1.0
2 parents 61fee34 + 42280f5 commit 635464d

File tree

7 files changed

+1060
-997
lines changed

7 files changed

+1060
-997
lines changed

__tests__/lib/test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ describe('test.js', () => {
1414
expect(cfg.length).toEqual(7)
1515
const jestCfg = JSON.parse(cfg.splice(3, 1))
1616
expect(cfg).toMatchSnapshot()
17-
expect(jestCfg.scriptPreprocessor).toContain('lib/jest-preprocessor.js')
18-
delete jestCfg.scriptPreprocessor
17+
expect(jestCfg.transform['.*']).toContain('lib/jest-preprocessor.js')
18+
delete jestCfg.transform
1919
expect(jestCfg).toMatchSnapshot()
2020
})
2121
})

__tests__/lib/util.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
/* globals describe, expect, it, jest */
2-
3-
jest.mock('../../lib/pkg', () => { return {} })
1+
/* globals describe, expect, it */
42

53
const util = require('../../lib/util')
64
const testUtils = require('../test-utils/util')

lib/babel-config.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const addExports = require('babel-plugin-add-module-exports')
22
const babelEnv = require('babel-preset-env')
33
const react = require('babel-preset-react')
44
const runtime = require('babel-plugin-transform-runtime')
5+
const stripFlow = require('babel-plugin-transform-flow-strip-types')
56
const stage2 = require('babel-preset-stage-2')
67

78
module.exports = function (env) {
@@ -19,7 +20,8 @@ module.exports = function (env) {
1920
],
2021
plugins: [
2122
addExports,
22-
runtime
23+
runtime,
24+
stripFlow
2325
]
2426
}
2527
}

lib/pkg.js

-8
This file was deleted.

lib/test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports.generateTestConfig = (patterns, options) => {
77
collectCoverage: options.coverage,
88
collectCoverageFrom: ['lib/**/*.js'],
99
coverageDirectory: 'coverage',
10-
scriptPreprocessor: path.resolve(__dirname, 'jest-preprocessor.js'),
10+
transform: { '.*': path.resolve(__dirname, 'jest-preprocessor.js') },
1111
testPathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/__tests__/test-utils']
1212
}
1313

package.json

+10-9
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"mastarm": "bin/mastarm"
1111
},
1212
"scripts": {
13-
"cover": "bin/mastarm test --coverage --coverage-paths bin",
13+
"cover": "bin/mastarm test --env test --coverage --coverage-paths bin",
1414
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
15-
"test": "bin/mastarm lint && bin/mastarm test"
15+
"test": "bin/mastarm lint && bin/mastarm test --env test"
1616
},
1717
"repository": {
1818
"type": "git",
@@ -34,10 +34,11 @@
3434
"aws-sdk": "^2.4.2",
3535
"babel-core": "^6.10.4",
3636
"babel-eslint": "^7.0.0",
37-
"babel-jest": "^16.0.0",
37+
"babel-jest": "^17.0.2",
3838
"babel-plugin-add-module-exports": "^0.2.1",
39+
"babel-plugin-transform-flow-strip-types": "^6.18.0",
3940
"babel-plugin-transform-runtime": "^6.9.0",
40-
"babel-preset-env": "^0.0.7",
41+
"babel-preset-env": "^0.0.9",
4142
"babel-preset-react": "^6.5.0",
4243
"babel-preset-stage-2": "^6.17.0",
4344
"babelify": "^7.3.0",
@@ -49,31 +50,31 @@
4950
"commitizen": "^2.8.2",
5051
"concat-stream": "^1.5.1",
5152
"cz-conventional-changelog": "^1.1.6",
52-
"envify": "^3.4.1",
53+
"envify": "^4.0.0",
5354
"errorify": "^0.3.1",
5455
"exorcist": "^0.4.0",
5556
"http-proxy": "^1.14.0",
5657
"isomorphic-fetch": "^2.2.1",
57-
"jest": "^16.0.0",
58+
"jest": "^17.0.3",
5859
"lodash.uniq": "^4.5.0",
5960
"mime": "^1.3.4",
6061
"mkdirp": "^0.5.1",
6162
"postcss": "^5.0.21",
6263
"postcss-cssnext": "^2.6.0",
6364
"postcss-import": "^8.1.2",
64-
"postcss-reporter": "^1.3.3",
65+
"postcss-reporter": "^2.0.0",
6566
"postcss-safe-parser": "^2.0.0",
6667
"rimraf": "^2.5.4",
6768
"standard": "^8.3.0",
6869
"standard-engine": "^5.0.0",
6970
"through2": "^2.0.1",
7071
"uglifyify": "^3.0.2",
71-
"uuid": "^2.0.2",
72+
"uuid": "^3.0.0",
7273
"watchify": "^3.7.0",
7374
"yamljs": "^0.2.8"
7475
},
7576
"devDependencies": {
76-
"semantic-release": "^4.3.5"
77+
"semantic-release": "^6.3.2"
7778
},
7879
"standard": {
7980
"parser": "babel-eslint"

0 commit comments

Comments
 (0)