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

@stylable/core

Package Overview
Dependencies
Maintainers
5
Versions
218
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stylable/core - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

12

cjs/create-infra-structure.js

@@ -13,13 +13,9 @@ "use strict";

};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var path_1 = __importDefault(require("path"));
var cached_process_file_1 = require("./cached-process-file");
var parser_1 = require("./parser");
var path = __importStar(require("./path"));
var stylable_processor_1 = require("./stylable-processor");

@@ -32,3 +28,3 @@ var ResolverFactory = require('enhanced-resolve/lib/ResolverFactory');

if (context === void 0) { context = projectRoot; }
if (!path.isAbsolute(moduleId) && moduleId.charAt(0) !== '.') {
if (!path_1.default.isAbsolute(moduleId) && moduleId.charAt(0) !== '.') {
moduleId = eResolver.resolveSync({}, context, moduleId);

@@ -35,0 +31,0 @@ }

@@ -164,2 +164,3 @@ "use strict";

else if (diagnostics) {
parsedNode.resolvedValue = stringifyFunction(value, parsedNode);
diagnostics.warn(node, exports.functionWarnings.UNKNOWN_FORMATTER(value), {

@@ -166,0 +167,0 @@ word: value

@@ -20,5 +20,4 @@ export { safeParse } from './parser';

export * from './native-reserved-lists';
export { isAbsolute } from './path';
import * as pseudoStates from './pseudo-states';
export { pseudoStates };
//# sourceMappingURL=index.d.ts.map

@@ -42,6 +42,4 @@ "use strict";

__export(require("./native-reserved-lists"));
var path_1 = require("./path");
exports.isAbsolute = path_1.isAbsolute;
var pseudoStates = __importStar(require("./pseudo-states"));
exports.pseudoStates = pseudoStates;
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var path_1 = require("path");
var deindent = require('deindent');
var path_1 = require("./path");
function createMinimalFS(config) {

@@ -6,0 +6,0 @@ var files = config.files;

@@ -5,57 +5,58 @@ export declare const nativePseudoClasses: string[];

export declare const nativeFunctionsDic: {
'attr': boolean;
'blur': boolean;
'brightness': boolean;
'calc': boolean;
'circle': boolean;
'contrast': boolean;
'counter': boolean;
'counters': boolean;
attr: boolean;
blur: boolean;
brightness: boolean;
calc: boolean;
circle: boolean;
contrast: boolean;
counter: boolean;
counters: boolean;
'cubic-bezier': boolean;
'drop-shadow': boolean;
'ellipse': boolean;
'grayscale': boolean;
'hsl': boolean;
'hsla': boolean;
ellipse: boolean;
grayscale: boolean;
hsl: boolean;
hsla: boolean;
'hue-rotate': boolean;
'hwb': boolean;
'image': boolean;
'inset': boolean;
'invert': boolean;
hwb: boolean;
image: boolean;
inset: boolean;
invert: boolean;
'linear-gradient': boolean;
'matrix': boolean;
'matrix3d': boolean;
'minmax': boolean;
'opacity': boolean;
'paint': boolean;
'perspective': boolean;
'polygon': boolean;
matrix: boolean;
matrix3d: boolean;
minmax: boolean;
opacity: boolean;
paint: boolean;
perspective: boolean;
polygon: boolean;
'radial-gradient': boolean;
repeat: boolean;
'repeating-linear-gradient': boolean;
'repeating-radial-gradient': boolean;
'rgb': boolean;
'rgba': boolean;
'rotate': boolean;
'rotate3d': boolean;
'rotateX': boolean;
'rotateY': boolean;
'rotateZ': boolean;
'saturate': boolean;
'sepia': boolean;
'scale': boolean;
'scale3d': boolean;
'scaleX': boolean;
'scaleY': boolean;
'scaleZ': boolean;
'skew': boolean;
'skewX': boolean;
'skewY': boolean;
'symbols': boolean;
'translate': boolean;
'translate3d': boolean;
'translateX': boolean;
'translateY': boolean;
'translateZ': boolean;
'url': boolean;
'var': boolean;
rgb: boolean;
rgba: boolean;
rotate: boolean;
rotate3d: boolean;
rotateX: boolean;
rotateY: boolean;
rotateZ: boolean;
saturate: boolean;
sepia: boolean;
scale: boolean;
scale3d: boolean;
scaleX: boolean;
scaleY: boolean;
scaleZ: boolean;
skew: boolean;
skewX: boolean;
skewY: boolean;
symbols: boolean;
translate: boolean;
translate3d: boolean;
translateX: boolean;
translateY: boolean;
translateZ: boolean;
url: boolean;
var: boolean;
};

@@ -62,0 +63,0 @@ export declare type nativeFunctions = keyof typeof nativeFunctionsDic;

@@ -95,57 +95,58 @@ "use strict";

exports.nativeFunctionsDic = {
'attr': true,
'blur': true,
'brightness': true,
'calc': true,
'circle': true,
'contrast': true,
'counter': true,
'counters': true,
attr: true,
blur: true,
brightness: true,
calc: true,
circle: true,
contrast: true,
counter: true,
counters: true,
'cubic-bezier': true,
'drop-shadow': true,
'ellipse': true,
'grayscale': true,
'hsl': true,
'hsla': true,
ellipse: true,
grayscale: true,
hsl: true,
hsla: true,
'hue-rotate': true,
'hwb': true,
'image': true,
'inset': true,
'invert': true,
hwb: true,
image: true,
inset: true,
invert: true,
'linear-gradient': true,
'matrix': true,
'matrix3d': true,
'minmax': true,
'opacity': true,
'paint': true,
'perspective': true,
'polygon': true,
matrix: true,
matrix3d: true,
minmax: true,
opacity: true,
paint: true,
perspective: true,
polygon: true,
'radial-gradient': true,
repeat: true,
'repeating-linear-gradient': true,
'repeating-radial-gradient': true,
'rgb': true,
'rgba': true,
'rotate': true,
'rotate3d': true,
'rotateX': true,
'rotateY': true,
'rotateZ': true,
'saturate': true,
'sepia': true,
'scale': true,
'scale3d': true,
'scaleX': true,
'scaleY': true,
'scaleZ': true,
'skew': true,
'skewX': true,
'skewY': true,
'symbols': true,
'translate': true,
'translate3d': true,
'translateX': true,
'translateY': true,
'translateZ': true,
'url': true,
'var': true
rgb: true,
rgba: true,
rotate: true,
rotate3d: true,
rotateX: true,
rotateY: true,
rotateZ: true,
saturate: true,
sepia: true,
scale: true,
scale3d: true,
scaleX: true,
scaleY: true,
scaleZ: true,
skew: true,
skewX: true,
skewY: true,
symbols: true,
translate: true,
translate3d: true,
translateX: true,
translateY: true,
translateZ: true,
url: true,
var: true
};

@@ -152,0 +153,0 @@ function isCssNativeFunction(name) {

@@ -5,12 +5,5 @@ "use strict";

};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var path_1 = __importDefault(require("path"));
var url_regex_1 = __importDefault(require("url-regex"));
var path = __importStar(require("./path"));
var _a = require('css-selector-tokenizer'), parseValues = _a.parseValues, stringifyValues = _a.stringifyValues;

@@ -36,3 +29,3 @@ var isUrl = url_regex_1.default({ exact: true, strict: true });

function makeAbsolute(resourcePath, rootContext, moduleContext) {
var isAbs = path.isAbsolute(resourcePath);
var isAbs = path_1.default.isAbsolute(resourcePath);
var abs;

@@ -43,3 +36,3 @@ if (isExternal(resourcePath)) {

else if (isAbs && resourcePath[0] === '/') {
abs = path.join(rootContext, resourcePath);
abs = path_1.default.join(rootContext, resourcePath);
}

@@ -50,3 +43,3 @@ else if (isAbs) {

else {
abs = path.join(moduleContext, resourcePath);
abs = path_1.default.join(moduleContext, resourcePath);
}

@@ -87,4 +80,4 @@ return abs;

'./' +
path
.join(path.relative(path.dirname(targetMeta.source), path.dirname(mix.ref.import.from)), node.url)
path_1.default
.join(path_1.default.relative(path_1.default.dirname(targetMeta.source), path_1.default.dirname(mix.ref.import.from)), node.url)
.replace(/\\/gm, '/');

@@ -91,0 +84,0 @@ }

@@ -8,14 +8,7 @@ "use strict";

};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var murmurhash_1 = __importDefault(require("murmurhash"));
var path_1 = __importDefault(require("path"));
var postcss_1 = __importDefault(require("postcss"));
var diagnostics_1 = require("./diagnostics");
var path = __importStar(require("./path"));
var selector_utils_1 = require("./selector-utils");

@@ -253,3 +246,3 @@ var stylable_assets_1 = require("./stylable-assets");

toRemove.forEach(function (node) { return node.remove(); });
namespace = namespace || utils_1.filename2varname(path.basename(this.meta.source)) || 's';
namespace = namespace || utils_1.filename2varname(path_1.default.basename(this.meta.source)) || 's';
this.meta.namespace = this.resolveNamespace(namespace, this.meta.source);

@@ -383,3 +376,3 @@ };

import: importDef,
context: path.dirname(this.meta.source)
context: path_1.default.dirname(this.meta.source)
};

@@ -394,3 +387,3 @@ }

import: importDef,
context: path.dirname(_this.meta.source)
context: path_1.default.dirname(_this.meta.source)
};

@@ -565,3 +558,3 @@ });

rule: rule,
context: path.dirname(this.meta.source)
context: path_1.default.dirname(this.meta.source)
};

@@ -578,3 +571,3 @@ rule.walkDecls(function (decl) {

}
if (!path.isAbsolute(importPath) && !importPath.startsWith('.')) {
if (!path_1.default.isAbsolute(importPath) && !importPath.startsWith('.')) {
importObj.fromRelative = importPath;

@@ -585,3 +578,3 @@ importObj.from = importPath;

importObj.fromRelative = importPath;
importObj.from = path.resolve(path.dirname(_this.meta.source), importPath);
importObj.from = path_1.default.resolve(path_1.default.dirname(_this.meta.source), importPath);
}

@@ -588,0 +581,0 @@ fromExists = true;

@@ -7,6 +7,6 @@ "use strict";

var lodash_clonedeep_1 = __importDefault(require("lodash.clonedeep"));
var path_1 = require("path");
var custom_values_1 = require("./custom-values");
var functions_1 = require("./functions");
var native_reserved_lists_1 = require("./native-reserved-lists");
var path_1 = require("./path");
var pseudo_states_1 = require("./pseudo-states");

@@ -13,0 +13,0 @@ var selector_utils_1 = require("./selector-utils");

@@ -18,4 +18,4 @@ "use strict";

var lodash_clonedeep_1 = __importDefault(require("lodash.clonedeep"));
var path_1 = require("path");
var postcss_1 = __importDefault(require("postcss"));
var path_1 = require("./path");
var selector_utils_1 = require("./selector-utils");

@@ -22,0 +22,0 @@ var stylable_value_parsers_1 = require("./stylable-value-parsers");

{
"name": "@stylable/core",
"version": "2.1.0",
"version": "2.1.1",
"description": "CSS for Components",

@@ -24,3 +24,3 @@ "main": "./cjs/index.js",

"postcss": "^7.0.17",
"postcss-js": "^2.0.1",
"postcss-js": "^2.0.2",
"postcss-nested": "^4.1.2",

@@ -49,3 +49,3 @@ "postcss-safe-parser": "^4.0.1",

"license": "BSD-3-Clause",
"gitHead": "64960865befc97447931d6b5cd76ee940c18aa51"
"gitHead": "0f3682cc13ba8ba076518f8ecc21bc373a20d61e"
}

@@ -0,4 +1,4 @@

import path from 'path';
import { cachedProcessFile, FileProcessor, MinimalFS } from './cached-process-file';
import { safeParse } from './parser';
import * as path from './path';
import { process, processNamespace, StylableMeta } from './stylable-processor';

@@ -34,3 +34,7 @@ const ResolverFactory = require('enhanced-resolve/lib/ResolverFactory');

(from, content) => {
return process(safeParse(content, { from: resolvePath(projectRoot, from) }), undefined, resolveNamespace);
return process(
safeParse(content, { from: resolvePath(projectRoot, from) }),
undefined,
resolveNamespace
);
},

@@ -37,0 +41,0 @@ {

@@ -265,2 +265,3 @@ import postcss from 'postcss';

} else if (diagnostics) {
parsedNode.resolvedValue = stringifyFunction(value, parsedNode);
diagnostics.warn(node, functionWarnings.UNKNOWN_FORMATTER(value), {

@@ -267,0 +268,0 @@ word: value

@@ -30,5 +30,4 @@ export { safeParse } from './parser';

export * from './native-reserved-lists';
export { isAbsolute } from './path';
import * as pseudoStates from './pseudo-states';
export { pseudoStates };

@@ -0,3 +1,3 @@

import { resolve, sep } from 'path';
const deindent = require('deindent');
import { resolve, sep } from './path';

@@ -4,0 +4,0 @@ import { MinimalFS } from './cached-process-file';

@@ -96,57 +96,58 @@ // MDN reference: https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes

export const nativeFunctionsDic = {
'attr': true,
'blur': true,
'brightness': true,
'calc': true,
'circle': true,
'contrast': true,
'counter': true,
'counters': true,
attr: true,
blur: true,
brightness: true,
calc: true,
circle: true,
contrast: true,
counter: true,
counters: true,
'cubic-bezier': true,
'drop-shadow': true,
'ellipse': true,
'grayscale': true,
'hsl': true,
'hsla': true,
ellipse: true,
grayscale: true,
hsl: true,
hsla: true,
'hue-rotate': true,
'hwb': true,
'image': true,
'inset': true,
'invert': true,
hwb: true,
image: true,
inset: true,
invert: true,
'linear-gradient': true,
'matrix': true,
'matrix3d': true,
'minmax': true,
'opacity': true,
'paint': true,
'perspective': true,
'polygon': true,
matrix: true,
matrix3d: true,
minmax: true,
opacity: true,
paint: true,
perspective: true,
polygon: true,
'radial-gradient': true,
repeat: true,
'repeating-linear-gradient': true,
'repeating-radial-gradient': true,
'rgb': true,
'rgba': true,
'rotate': true,
'rotate3d': true,
'rotateX': true,
'rotateY': true,
'rotateZ': true,
'saturate': true,
'sepia': true,
'scale': true,
'scale3d': true,
'scaleX': true,
'scaleY': true,
'scaleZ': true,
'skew': true,
'skewX': true,
'skewY': true,
'symbols': true,
'translate': true,
'translate3d': true,
'translateX': true,
'translateY': true,
'translateZ': true,
'url': true,
'var': true
rgb: true,
rgba: true,
rotate: true,
rotate3d: true,
rotateX: true,
rotateY: true,
rotateZ: true,
saturate: true,
sepia: true,
scale: true,
scale3d: true,
scaleX: true,
scaleY: true,
scaleZ: true,
skew: true,
skewX: true,
skewY: true,
symbols: true,
translate: true,
translate3d: true,
translateX: true,
translateY: true,
translateZ: true,
url: true,
var: true
};

@@ -153,0 +154,0 @@

@@ -0,4 +1,4 @@

import path from 'path';
import postcss from 'postcss';
import urlRegex from 'url-regex';
import * as path from './path';
import { ImportSymbol, RefedMixin, StylableMeta } from './stylable-processor';

@@ -5,0 +5,0 @@ import { ParsedValue } from './types';

import hash from 'murmurhash';
import path from 'path';
import postcss from 'postcss';
import { Diagnostics } from './diagnostics';
import * as path from './path';
import {

@@ -6,0 +6,0 @@ createSimpleSelectorChecker,

import cloneDeep from 'lodash.clonedeep';
import { basename } from 'path';
import postcss from 'postcss';

@@ -8,3 +9,2 @@ import { FileProcessor } from './cached-process-file';

import { nativePseudoElements, reservedKeyFrames } from './native-reserved-lists';
import { basename } from './path';
import { transformPseudoStateSelector, validateStateDefinition } from './pseudo-states';

@@ -11,0 +11,0 @@ import {

import cloneDeep from 'lodash.clonedeep';
import { isAbsolute, resolve } from 'path';
import postcss from 'postcss';
import { Diagnostics } from './diagnostics';
import { isAbsolute, resolve } from './path';
import {

@@ -6,0 +6,0 @@ DeclStylableProps,

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

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

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

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

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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