Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vanilla-extract/jest-transform

Package Overview
Dependencies
Maintainers
4
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vanilla-extract/jest-transform - npm Package Compare versions

Comparing version 0.0.0-inline-prototype-202342012537 to 0.0.0-jest-transform-identifiers-20241289814

11

dist/vanilla-extract-jest-transform.cjs.d.ts
import { Transformer } from '@jest/transform';
import { IdentifierOption } from '@vanilla-extract/integration';
declare const vanillaTransformer: Transformer;
interface TransformerConfig {
identifiers: IdentifierOption;
}
declare function createTransformer(config: TransformerConfig): Transformer;
declare const _default: {
createTransformer: typeof createTransformer;
};
export { vanillaTransformer as default };
export { _default as default };

64

dist/vanilla-extract-jest-transform.cjs.dev.js

@@ -32,32 +32,40 @@ 'use strict';

const vanillaTransformer = {
canInstrument: false,
process(source, filePath, options) {
if (!integration.cssFileFilter.test(filePath)) {
// If the file that passes through to the transformer is not a VE file,
// then it's likely a vanilla .css file (because Jest can't differentiate
// between them)
return {
code: `module.exports = ${JSON.stringify(path__default["default"].basename(filePath))};`
};
function createTransformer(config) {
const {
identifiers = 'debug'
} = config;
return {
canInstrument: false,
process(source, filePath, options) {
if (!integration.cssFileFilter.test(filePath)) {
// If the file that passes through to the transformer is not a VE file,
// then it's likely a vanilla .css file (because Jest can't differentiate
// between them)
return {
code: `module.exports = ${JSON.stringify(path__default["default"].basename(filePath))};`
};
}
const {
name: packageName
} = integration.getPackageInfo(options.config.rootDir);
const code = integration.transformSync({
source,
filePath,
rootPath: options.config.rootDir,
packageName: packageName,
identOption: identifiers
});
const result = esbuild__namespace.transformSync(code, {
format: options.supportsStaticESM ? 'esm' : 'cjs',
target: 'es2018',
loader: 'ts'
});
return result;
}
const {
name: packageName
} = integration.getPackageInfo(options.config.rootDir);
const code = integration.transformSync({
source,
filePath,
rootPath: options.config.rootDir,
packageName: packageName,
identOption: 'debug'
});
const result = esbuild__namespace.transformSync(code, {
format: options.supportsStaticESM ? 'esm' : 'cjs',
target: 'es2018',
loader: 'ts'
});
return result;
}
};
}
var index = {
createTransformer
};
exports["default"] = vanillaTransformer;
exports["default"] = index;

@@ -32,32 +32,40 @@ 'use strict';

const vanillaTransformer = {
canInstrument: false,
process(source, filePath, options) {
if (!integration.cssFileFilter.test(filePath)) {
// If the file that passes through to the transformer is not a VE file,
// then it's likely a vanilla .css file (because Jest can't differentiate
// between them)
return {
code: `module.exports = ${JSON.stringify(path__default["default"].basename(filePath))};`
};
function createTransformer(config) {
const {
identifiers = 'debug'
} = config;
return {
canInstrument: false,
process(source, filePath, options) {
if (!integration.cssFileFilter.test(filePath)) {
// If the file that passes through to the transformer is not a VE file,
// then it's likely a vanilla .css file (because Jest can't differentiate
// between them)
return {
code: `module.exports = ${JSON.stringify(path__default["default"].basename(filePath))};`
};
}
const {
name: packageName
} = integration.getPackageInfo(options.config.rootDir);
const code = integration.transformSync({
source,
filePath,
rootPath: options.config.rootDir,
packageName: packageName,
identOption: identifiers
});
const result = esbuild__namespace.transformSync(code, {
format: options.supportsStaticESM ? 'esm' : 'cjs',
target: 'es2018',
loader: 'ts'
});
return result;
}
const {
name: packageName
} = integration.getPackageInfo(options.config.rootDir);
const code = integration.transformSync({
source,
filePath,
rootPath: options.config.rootDir,
packageName: packageName,
identOption: 'debug'
});
const result = esbuild__namespace.transformSync(code, {
format: options.supportsStaticESM ? 'esm' : 'cjs',
target: 'es2018',
loader: 'ts'
});
return result;
}
};
}
var index = {
createTransformer
};
exports["default"] = vanillaTransformer;
exports["default"] = index;

@@ -5,32 +5,40 @@ import path from 'path';

const vanillaTransformer = {
canInstrument: false,
process(source, filePath, options) {
if (!cssFileFilter.test(filePath)) {
// If the file that passes through to the transformer is not a VE file,
// then it's likely a vanilla .css file (because Jest can't differentiate
// between them)
return {
code: `module.exports = ${JSON.stringify(path.basename(filePath))};`
};
function createTransformer(config) {
const {
identifiers = 'debug'
} = config;
return {
canInstrument: false,
process(source, filePath, options) {
if (!cssFileFilter.test(filePath)) {
// If the file that passes through to the transformer is not a VE file,
// then it's likely a vanilla .css file (because Jest can't differentiate
// between them)
return {
code: `module.exports = ${JSON.stringify(path.basename(filePath))};`
};
}
const {
name: packageName
} = getPackageInfo(options.config.rootDir);
const code = transformSync({
source,
filePath,
rootPath: options.config.rootDir,
packageName: packageName,
identOption: identifiers
});
const result = esbuild.transformSync(code, {
format: options.supportsStaticESM ? 'esm' : 'cjs',
target: 'es2018',
loader: 'ts'
});
return result;
}
const {
name: packageName
} = getPackageInfo(options.config.rootDir);
const code = transformSync({
source,
filePath,
rootPath: options.config.rootDir,
packageName: packageName,
identOption: 'debug'
});
const result = esbuild.transformSync(code, {
format: options.supportsStaticESM ? 'esm' : 'cjs',
target: 'es2018',
loader: 'ts'
});
return result;
}
};
}
var index = {
createTransformer
};
export { vanillaTransformer as default };
export { index as default };
{
"name": "@vanilla-extract/jest-transform",
"version": "0.0.0-inline-prototype-202342012537",
"version": "0.0.0-jest-transform-identifiers-20241289814",
"description": "Jest transformer for vanilla-extract",

@@ -23,3 +23,3 @@ "main": "dist/vanilla-extract-jest-transform.cjs.js",

"dependencies": {
"@vanilla-extract/integration": "^0.0.0-inline-prototype-202342012537",
"@vanilla-extract/integration": "^6.2.0",
"esbuild": "0.17.6"

@@ -26,0 +26,0 @@ },

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