Socket
Socket
Sign inDemoInstall

ts-jest

Package Overview
Dependencies
Maintainers
1
Versions
199
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-jest - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

scripts/tests.js

13

index.js

@@ -8,2 +8,3 @@ // Except a small part of the code, all of the code here is taken from

var tsc = require('typescript');
var {getTSConfig} = require('./utils');

@@ -95,3 +96,3 @@ // Only install once if called multiple times

transpiled = tsc.transpileModule(contents, {
compilerOptions: getTSConfig(),
compilerOptions: addSourceMapToTSConfig(),
fileName: path

@@ -509,10 +510,8 @@ });

function getTSConfig() {
// if a global __TS_CONFIG__ is set, update the compiler options based on that
var config = __TS_CONFIG__ || {};
config.module = config.module || tsc.ModuleKind.CommonJS;
config.jsx = config.jsx || tsc.JsxEmit.React;
function addSourceMapToTSConfig() {
// if a global __TS_CONFIG__ is set, update the compiler setting to include inline SourceMap
var config = getTSConfig({ __TS_CONFIG__: __TS_CONFIG__ });
config.inlineSourceMap = true;
return tsc.convertCompilerOptionsFromJson(config).options;
return config;
}
{
"name": "ts-jest",
"version": "0.1.5",
"version": "0.1.6",
"main": "index.ts",
"description": "A preprocessor with sourcemap support to help use Typescript with Jest",
"scripts": {
"test": "jest --no-cache"
"test": "node scripts/tests.js"
},

@@ -38,4 +38,6 @@ "repository": {

"react": "^15.3.2",
"react-test-renderer": "^15.3.2"
"react-test-renderer": "^15.3.2",
"jest": "16.0.1",
"cross-spawn": "4.0.2"
}
}
const tsc = require('typescript');
const {getTSConfig} = require('./utils');

@@ -20,10 +21,2 @@ module.exports = {

}
};
function getTSConfig(globals) {
const config = globals.__TS_CONFIG__ || {};
config.module = config.module || tsc.ModuleKind.CommonJS;
config.jsx = config.jsx || tsc.JsxEmit.React;
return tsc.convertCompilerOptionsFromJson(config).options;
}
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc