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

@stylable/node

Package Overview
Dependencies
Maintainers
6
Versions
226
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stylable/node - npm Package Compare versions

Comparing version 3.4.5 to 3.5.0

1

cjs/find-files.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.findFiles = void 0;
const path_1 = require("path");

@@ -4,0 +5,0 @@ function findFiles(fs, rootDirectory, ext, blacklist, useRelative = false) {

17

cjs/index.js
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./require-hook"));
__export(require("./resolve-namespace"));
__export(require("./find-files"));
__exportStar(require("./require-hook"), exports);
__exportStar(require("./resolve-namespace"), exports);
__exportStar(require("./find-files"), exports);
//# sourceMappingURL=index.js.map

@@ -8,5 +8,4 @@ import { StylableConfig } from '@stylable/core';

ignoreJSModules?: boolean;
legacyRuntime?: boolean;
}
export declare function attachHook({ matcher, afterCompile, stylableConfig, runtimePath, ignoreJSModules, legacyRuntime, }?: Partial<Options>): void;
export declare function attachHook({ matcher, afterCompile, stylableConfig, runtimePath, ignoreJSModules, }?: Partial<Options>): void;
//# sourceMappingURL=require-hook.d.ts.map

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.attachHook = void 0;
const module_utils_1 = require("@stylable/module-utils");

@@ -12,3 +13,3 @@ const fs_1 = __importDefault(require("fs"));

const defaultStylableMatcher = (filename) => !!filename.match(/\.st\.css$/);
function attachHook({ matcher, afterCompile, stylableConfig, runtimePath, ignoreJSModules, legacyRuntime, } = {}) {
function attachHook({ matcher, afterCompile, stylableConfig, runtimePath, ignoreJSModules, } = {}) {
const stylableToModule = module_utils_1.stylableModuleFactory({

@@ -20,3 +21,3 @@ projectRoot: 'root',

...stylableConfig,
}, { runtimePath, legacyRuntime });
}, { runtimePath });
if (!matcher) {

@@ -28,3 +29,3 @@ matcher = defaultStylableMatcher;

if (matcher(filename) || !prevHook) {
const useJSModule = !legacyRuntime && !ignoreJSModules && fs_1.default.existsSync(filename + '.js');
const useJSModule = !ignoreJSModules && fs_1.default.existsSync(filename + '.js');
const source = fs_1.default.readFileSync(useJSModule ? filename + '.js' : filename).toString();

@@ -31,0 +32,0 @@ const code = useJSModule ? source : stylableToModule(source, filename);

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

import { processNamespace } from '@stylable/core';
export declare function resolveNamespaceFactory(hashSalt?: string, prefix?: string): typeof processNamespace;
export declare const resolveNamespace: typeof processNamespace;
export declare function resolveNamespaceFactory(hashSalt?: string, prefix?: string): typeof import("../../core/src").processNamespace;
export declare const resolveNamespace: typeof import("../../core/src").processNamespace;
//# sourceMappingURL=resolve-namespace.d.ts.map

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

Object.defineProperty(exports, "__esModule", { value: true });
const murmurhash_1 = __importDefault(require("murmurhash"));
exports.resolveNamespace = exports.resolveNamespaceFactory = void 0;
const core_1 = require("@stylable/core");
const path_1 = require("path");
const findConfig = require('find-config');
const find_config_1 = __importDefault(require("find-config"));
function resolveNamespaceFactory(hashSalt = '', prefix = '') {
return (namespace, stylesheetPath) => {
const configPath = findConfig('package.json', { cwd: path_1.dirname(stylesheetPath) });
const config = require(configPath);
const fromRoot = path_1.relative(path_1.dirname(configPath), stylesheetPath).replace(/\\/g, '/');
return (prefix +
namespace +
murmurhash_1.default.v3(hashSalt + config.name + '@' + config.version + '/' + fromRoot));
};
return core_1.packageNamespaceFactory(find_config_1.default, require, { dirname: path_1.dirname, relative: path_1.relative }, hashSalt, prefix);
}

@@ -20,0 +14,0 @@ exports.resolveNamespaceFactory = resolveNamespaceFactory;

{
"name": "@stylable/node",
"version": "3.4.5",
"version": "3.5.0",
"description": "Integrate Stylable into your node application",

@@ -14,6 +14,5 @@ "main": "cjs/index.js",

"dependencies": {
"@stylable/core": "^3.4.5",
"@stylable/module-utils": "^3.4.5",
"find-config": "^1.0.0",
"murmurhash": "^1.0.0"
"@stylable/core": "^3.5.0",
"@stylable/module-utils": "^3.5.0",
"find-config": "^1.0.0"
},

@@ -20,0 +19,0 @@ "files": [

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