@stylable/jest
Advanced tools
Comparing version 3.7.0 to 3.7.1
@@ -10,2 +10,5 @@ "use strict"; | ||
const stylableRuntimePath = require.resolve('@stylable/runtime'); | ||
const stylableCorePath = require.resolve('@stylable/core'); | ||
const { version: runtimeVersion } = require('@stylable/runtime/package.json'); | ||
const { version: coreVersion } = require('@stylable/core/package.json'); | ||
function processFactory(stylableConfig, factoryOptions) { | ||
@@ -25,5 +28,12 @@ return module_utils_1.stylableModuleFactory({ | ||
function getCacheKey(fileData, filename, configString, { instrument }) { | ||
return (fileData + configString + (instrument ? 'instrument' : '') + filename + stylableRuntimePath); | ||
return (fileData + | ||
configString + | ||
(instrument ? 'instrument' : '') + | ||
filename + | ||
stylableRuntimePath + | ||
runtimeVersion + | ||
stylableCorePath + | ||
coreVersion); | ||
} | ||
exports.getCacheKey = getCacheKey; | ||
//# sourceMappingURL=jest.js.map |
{ | ||
"name": "@stylable/jest", | ||
"version": "3.7.0", | ||
"version": "3.7.1", | ||
"description": "Test your Stylable React components using Jest", | ||
@@ -5,0 +5,0 @@ "main": "cjs/index.js", |
@@ -6,2 +6,7 @@ import { StylableConfig } from '@stylable/core'; | ||
const stylableRuntimePath = require.resolve('@stylable/runtime'); | ||
const stylableCorePath = require.resolve('@stylable/core'); | ||
const { version: runtimeVersion } = require('@stylable/runtime/package.json') as { | ||
version: string; | ||
}; | ||
const { version: coreVersion } = require('@stylable/core/package.json') as { version: string }; | ||
@@ -34,4 +39,11 @@ export function processFactory( | ||
return ( | ||
fileData + configString + (instrument ? 'instrument' : '') + filename + stylableRuntimePath | ||
fileData + | ||
configString + | ||
(instrument ? 'instrument' : '') + | ||
filename + | ||
stylableRuntimePath + | ||
runtimeVersion + | ||
stylableCorePath + | ||
coreVersion | ||
); | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
8898
101