@stylable/jest
Advanced tools
Comparing version 5.2.0 to 5.2.1
import { createTransformer } from './jest'; | ||
declare const _default: { | ||
createTransformer: (options?: import("./jest").StylableJestConfig | undefined) => { | ||
process: (source: string, path: string) => string; | ||
process: (source: string, path: string) => { | ||
code: string; | ||
}; | ||
getCacheKey: (fileData: string, filename: string, configString: string, options?: { | ||
@@ -6,0 +8,0 @@ instrument: boolean; |
@@ -9,3 +9,5 @@ import type { StylableConfig } from '@stylable/core'; | ||
export declare const createTransformer: (options?: StylableJestConfig) => { | ||
process: (source: string, path: string) => string; | ||
process: (source: string, path: string) => { | ||
code: string; | ||
}; | ||
getCacheKey: typeof getCacheKey; | ||
@@ -12,0 +14,0 @@ canInstrument: boolean; |
@@ -25,3 +25,3 @@ "use strict"; | ||
const createTransformer = (options) => { | ||
const process = (0, module_utils_1.stylableModuleFactory)({ | ||
const moduleFactory = (0, module_utils_1.stylableModuleFactory)({ | ||
fileSystem: fs_1.default, | ||
@@ -36,2 +36,5 @@ requireModule: require, | ||
{ runtimePath: stylableRuntimePath }); | ||
const process = (source, path) => { | ||
return { code: moduleFactory(source, path) }; | ||
}; | ||
return { | ||
@@ -38,0 +41,0 @@ process, |
{ | ||
"name": "@stylable/jest", | ||
"version": "5.2.0", | ||
"version": "5.2.1", | ||
"description": "Test your Stylable React components using Jest", | ||
@@ -10,6 +10,6 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@stylable/core": "^5.2.0", | ||
"@stylable/module-utils": "^5.2.0", | ||
"@stylable/node": "^5.2.0", | ||
"@stylable/runtime": "^5.2.0" | ||
"@stylable/core": "^5.2.1", | ||
"@stylable/module-utils": "^5.2.1", | ||
"@stylable/node": "^5.2.1", | ||
"@stylable/runtime": "^5.2.1" | ||
}, | ||
@@ -16,0 +16,0 @@ "files": [ |
@@ -36,3 +36,3 @@ import fs from 'fs'; | ||
export const createTransformer = (options?: StylableJestConfig) => { | ||
const process = stylableModuleFactory( | ||
const moduleFactory = stylableModuleFactory( | ||
{ | ||
@@ -50,2 +50,6 @@ fileSystem: fs, | ||
const process = (source: string, path: string) => { | ||
return { code: moduleFactory(source, path) }; | ||
}; | ||
return { | ||
@@ -52,0 +56,0 @@ process, |
Sorry, the diff of this file is not supported yet
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
10546
134
Updated@stylable/core@^5.2.1
Updated@stylable/node@^5.2.1
Updated@stylable/runtime@^5.2.1