New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

es-css-modules

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es-css-modules - npm Package Compare versions

Comparing version

to
1.2.1

9

index.js

@@ -248,3 +248,3 @@ 'use strict';

var index = _postcss2.default.plugin('postcss-modules', function () {
var index = _postcss2.default.plugin('es-css-modules', function () {
var _ref9 = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];

@@ -295,3 +295,3 @@

return (css, result) => {
const resultPlugins = (0, _fp.flow)((0, _fp.reject)({ postcssPlugin: 'postcss-modules' }), (0, _fp.reject)({ postcssPlugin: 'postcss-modules-es' }))(result.processor.plugins);
const resultPlugins = (0, _fp.flow)((0, _fp.reject)({ postcssPlugin: 'postcss-modules' }), (0, _fp.reject)({ postcssPlugin: 'es-css-modules' }))(result.processor.plugins);

@@ -315,3 +315,4 @@ const plugins = [].concat(_toConsumableArray(_cssModulesLoaderCore2.default.defaultPlugins), _toConsumableArray(resultPlugins));

return new Promise((res, rej) => {
const moduleFilename = cssToCssModuleMap[file];
// They might have a css file that has global styles, but not import it. Allow fallback here
const moduleFilename = cssToCssModuleMap[file] || file;
const jsExports = styleImports[moduleFilename];

@@ -334,3 +335,3 @@

if ((0, _fp.isEmpty)(jsExportsWithoutNs)) {
return { cssExports: {} };
return { tokensToExport: {} };
}

@@ -337,0 +338,0 @@

{
"name": "es-css-modules",
"version": "1.2.0",
"version": "1.2.1",
"description": "PostCSS plugin that combines CSS Modules and ES Imports",

@@ -25,2 +25,3 @@ "main": "index.js",

"css-modules-loader-core": "^1.0.0",
"get-es-imports": "^1.0.1",
"get-es-imports-exports": "^1.0.4",

@@ -27,0 +28,0 @@ "is-keyword-js": "^1.0.3",

@@ -29,3 +29,3 @@ import {

export default postcss.plugin('postcss-modules', ({
export default postcss.plugin('es-css-modules', ({
moduleExportDirectory, // removed

@@ -68,3 +68,3 @@ jsFiles,

reject({ postcssPlugin: 'postcss-modules' }),
reject({ postcssPlugin: 'postcss-modules-es' })
reject({ postcssPlugin: 'es-css-modules' })
)(result.processor.plugins);

@@ -92,3 +92,4 @@

.then(({ styleImports, cssToCssModuleMap, typesPerName }) => new Promise((res, rej) => {
const moduleFilename = cssToCssModuleMap[file];
// They might have a css file that has global styles, but not import it. Allow fallback here
const moduleFilename = cssToCssModuleMap[file] || file;
const jsExports = styleImports[moduleFilename];

@@ -113,3 +114,3 @@

if (isEmpty(jsExportsWithoutNs)) {
return { cssExports: {} };
return { tokensToExport: {} };
}

@@ -116,0 +117,0 @@