Comparing version 0.7.1 to 0.7.2
@@ -0,5 +1,13 @@ | ||
<a name="0.7.2"></a> | ||
## [0.7.2](https://github.com/eddyerburgh/vue-jest/compare/v0.7.1...v0.7.2) (2017-10-06) | ||
### Bug Fixes | ||
* use babel to compile TS ([3467128](https://github.com/eddyerburgh/vue-jest/commit/3467128)) | ||
<a name="0.7.1"></a> | ||
## [0.7.1](https://github.com/eddyerburgh/vue-jest/compare/v0.7.0...v0.7.1) (2017-10-06) | ||
### Bug Fixes | ||
@@ -6,0 +14,0 @@ |
@@ -0,3 +1,4 @@ | ||
const tsconfig = require('tsconfig') | ||
const ensureRequire = require('../ensure-require') | ||
const tsconfig = require('tsconfig') | ||
const compileBabel = require('./babel-compiler') | ||
const cache = require('../cache') | ||
@@ -13,3 +14,3 @@ const logger = require('../logger') | ||
], | ||
'module': 'commonjs', | ||
'module': 'es2015', | ||
'moduleResolution': 'node', | ||
@@ -32,16 +33,16 @@ 'types': ['vue-typescript-import-dts', 'jest', 'node'], | ||
function getTypescriptConfig () { | ||
// const cachedConfig = cache.get('typescript-config') | ||
// if (cachedConfig) { | ||
// return cachedConfig | ||
// } else { | ||
const { config } = tsconfig.loadSync(process.cwd()) | ||
const cachedConfig = cache.get('typescript-config') | ||
if (cachedConfig) { | ||
return cachedConfig | ||
} else { | ||
const { config } = tsconfig.loadSync(process.cwd()) | ||
if (!config) { | ||
logger.info('no tsconfig.json found, defaulting to default typescript options') | ||
if (!config) { | ||
logger.info('no tsconfig.json found, defaulting to default typescript options') | ||
} | ||
const typescriptConfig = config || defaultTypescriptConfig | ||
cache.set('typescript-config', typescriptConfig) | ||
return typescriptConfig | ||
} | ||
const typescriptConfig = config || defaultTypescriptConfig | ||
cache.set('typescript-config', typescriptConfig) | ||
return typescriptConfig | ||
// } | ||
} | ||
@@ -56,3 +57,3 @@ | ||
return { code: res.outputText, sourceMap: res.sourceMapText } | ||
return compileBabel(res.outputText, JSON.parse(res.sourceMapText)) | ||
} |
{ | ||
"name": "jest-vue", | ||
"version": "0.7.1", | ||
"version": "0.7.2", | ||
"description": "Jest Vue transform", | ||
@@ -5,0 +5,0 @@ "main": "jest-vue.js", |
@@ -8,3 +8,3 @@ { | ||
], | ||
"module": "commonjs", | ||
"module": "es2015", | ||
"moduleResolution": "node", | ||
@@ -11,0 +11,0 @@ "types": ["vue-typescript-import-dts", "jest", "node"], |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
170634
44
501