@stylable/jest
Advanced tools
Comparing version 2.5.1 to 2.5.2
@@ -5,2 +5,5 @@ import { StylableConfig } from '@stylable/core'; | ||
export declare const process: (source: string, path: string) => string; | ||
export declare function getCacheKey(fileData: string, filename: string, configString: string, { instrument }: { | ||
instrument: boolean; | ||
}): string; | ||
//# sourceMappingURL=jest.d.ts.map |
@@ -8,7 +8,12 @@ "use strict"; | ||
const fs_1 = __importDefault(require("fs")); | ||
const stylableRuntimePath = require.resolve('@stylable/runtime'); | ||
function processFactory(stylableConfig, factoryOptions) { | ||
return module_utils_1.stylableModuleFactory(Object.assign({ fileSystem: fs_1.default, requireModule: require, projectRoot: '' }, stylableConfig), Object.assign({ runtimePath: require.resolve('@stylable/runtime') }, factoryOptions)); | ||
return module_utils_1.stylableModuleFactory(Object.assign({ fileSystem: fs_1.default, requireModule: require, projectRoot: '' }, stylableConfig), Object.assign({ runtimePath: stylableRuntimePath }, factoryOptions)); | ||
} | ||
exports.processFactory = processFactory; | ||
exports.process = processFactory(); | ||
function getCacheKey(fileData, filename, configString, { instrument }) { | ||
return (fileData + configString + (instrument ? 'instrument' : '') + filename + stylableRuntimePath); | ||
} | ||
exports.getCacheKey = getCacheKey; | ||
//# sourceMappingURL=jest.js.map |
{ | ||
"name": "@stylable/jest", | ||
"version": "2.5.1", | ||
"version": "2.5.2", | ||
"description": "Test your Stylable React components using Jest", | ||
@@ -14,5 +14,5 @@ "main": "cjs/index.js", | ||
"dependencies": { | ||
"@stylable/core": "^2.5.1", | ||
"@stylable/module-utils": "^2.5.1", | ||
"@stylable/runtime": "^2.5.0" | ||
"@stylable/core": "^2.5.2", | ||
"@stylable/module-utils": "^2.5.2", | ||
"@stylable/runtime": "^2.5.2" | ||
}, | ||
@@ -32,3 +32,3 @@ "files": [ | ||
"license": "BSD-3-Clause", | ||
"gitHead": "e16709344319d8a21264d9e0b48419b9965d112e" | ||
"gitHead": "154cc4124336f533eb327d5d935eb010d4f071ae" | ||
} |
@@ -5,2 +5,4 @@ import { StylableConfig } from '@stylable/core'; | ||
const stylableRuntimePath = require.resolve('@stylable/runtime'); | ||
export function processFactory( | ||
@@ -19,3 +21,3 @@ stylableConfig?: Partial<StylableConfig>, | ||
// this allows @stylable/jest to be used as part of a globally installed CLI | ||
{ runtimePath: require.resolve('@stylable/runtime'), ...factoryOptions } | ||
{ runtimePath: stylableRuntimePath, ...factoryOptions } | ||
); | ||
@@ -25,1 +27,12 @@ } | ||
export const process = processFactory(); | ||
export function getCacheKey( | ||
fileData: string, | ||
filename: string, | ||
configString: string, | ||
{ instrument }: { instrument: boolean } | ||
) { | ||
return ( | ||
fileData + configString + (instrument ? 'instrument' : '') + filename + stylableRuntimePath | ||
); | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8264
77
Updated@stylable/core@^2.5.2
Updated@stylable/runtime@^2.5.2