@stylable/core-test-kit
Advanced tools
Comparing version 3.6.3 to 3.7.0
@@ -12,7 +12,6 @@ "use strict"; | ||
const { fs, requireModule } = core_1.createMinimalFS(config); | ||
const fileProcessor = core_1.cachedProcessFile((from, content) => { | ||
const meta = core_1.process(postcss_1.default.parse(content, { from }), diagnostics); | ||
meta.namespace = config.files[from].namespace || meta.namespace; | ||
const { fileProcessor } = core_1.createInfrastructure('/', fs, (meta, filePath) => { | ||
meta.namespace = config.files[filePath].namespace || meta.namespace; | ||
return meta; | ||
}, fs, (x) => (x.startsWith('./') || path_1.isAbsolute(x) ? x : '/node_modules/' + x)); | ||
}, undefined, undefined, undefined, undefined, diagnostics); | ||
const resolver = new core_1.StylableResolver(fileProcessor, requireModule); | ||
@@ -19,0 +18,0 @@ return { resolver, requireModule, fileProcessor }; |
{ | ||
"name": "@stylable/core-test-kit", | ||
"version": "3.6.3", | ||
"version": "3.7.0", | ||
"description": "Stylable core test-kit", | ||
@@ -14,3 +14,3 @@ "main": "./cjs/index.js", | ||
"dependencies": { | ||
"@stylable/core": "^3.6.3", | ||
"@stylable/core": "^3.7.0", | ||
"chai": "^4.2.0", | ||
@@ -17,0 +17,0 @@ "flat": "^5.0.0", |
import { | ||
cachedProcessFile, | ||
createMinimalFS, | ||
@@ -15,2 +14,3 @@ Diagnostics, | ||
StylableTransformer, | ||
createInfrastructure, | ||
} from '@stylable/core'; | ||
@@ -52,13 +52,15 @@ import { isAbsolute } from 'path'; | ||
const { fs, requireModule } = createMinimalFS(config); | ||
const fileProcessor = cachedProcessFile<StylableMeta>( | ||
(from, content) => { | ||
const meta = process(postcss.parse(content, { from }), diagnostics); | ||
meta.namespace = config.files[from].namespace || meta.namespace; | ||
const { fileProcessor } = createInfrastructure( | ||
'/', | ||
fs, | ||
(meta, filePath) => { | ||
meta.namespace = config.files[filePath].namespace || meta.namespace; | ||
return meta; | ||
}, | ||
fs, | ||
(x) => (x.startsWith('./') || isAbsolute(x) ? x : '/node_modules/' + x) | ||
undefined, | ||
undefined, | ||
undefined, | ||
undefined, | ||
diagnostics | ||
); | ||
const resolver = new StylableResolver(fileProcessor, requireModule); | ||
@@ -65,0 +67,0 @@ |
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
807
51214
Updated@stylable/core@^3.7.0