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

sass-embedded

Package Overview
Dependencies
Maintainers
2
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sass-embedded - npm Package Compare versions

Comparing version 1.75.0 to 1.76.0

dist/lib/src/canonicalize-context.js

2

dist/lib/src/compiler/async.js

@@ -75,2 +75,4 @@ "use strict";

cwd: path.dirname(compiler_path_1.compilerCommand[0]),
// Node blocks launching .bat and .cmd without a shell due to CVE-2024-27980
shell: ['.bat', '.cmd'].includes(path.extname(compiler_path_1.compilerCommand[0]).toLowerCase()),
windowsHide: true,

@@ -77,0 +79,0 @@ });

@@ -104,2 +104,4 @@ "use strict";

cwd: path.dirname(compiler_path_1.compilerCommand[0]),
// Node blocks launching .bat and .cmd without a shell due to CVE-2024-27980
shell: ['.bat', '.cmd'].includes(path.extname(compiler_path_1.compilerCommand[0]).toLowerCase()),
windowsHide: true,

@@ -106,0 +108,0 @@ });

@@ -155,2 +155,9 @@ "use strict";

},
'css-function-mixin': {
id: 'css-function-mixin',
status: 'active',
deprecatedIn: new Version(1, 76, 0),
obsoleteIn: null,
description: 'Function and mixin names beginning with --.',
},
import: {

@@ -157,0 +164,0 @@ id: 'import',

19

dist/lib/src/importer-registry.js

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

const util_1 = require("util");
const canonicalize_context_1 = require("./canonicalize-context");
const utils = require("./utils");

@@ -93,12 +94,9 @@ const proto = require("./vendor/embedded_sass_pb");

}
const canonicalizeContext = new canonicalize_context_1.CanonicalizeContext(request.containingUrl ? new url_1.URL(request.containingUrl) : null, request.fromImport);
return (0, utils_1.catchOr)(() => {
return (0, utils_1.thenOr)(importer.canonicalize(request.url, {
fromImport: request.fromImport,
containingUrl: request.containingUrl
? new url_1.URL(request.containingUrl)
: null,
}), url => new proto.InboundMessage_CanonicalizeResponse({
return (0, utils_1.thenOr)(importer.canonicalize(request.url, canonicalizeContext), url => new proto.InboundMessage_CanonicalizeResponse({
result: url === null
? { case: undefined }
: { case: 'url', value: url.toString() },
containingUrlUnused: !canonicalizeContext.containingUrlAccessed,
}));

@@ -148,9 +146,5 @@ }, error => new proto.InboundMessage_CanonicalizeResponse({

}
const canonicalizeContext = new canonicalize_context_1.CanonicalizeContext(request.containingUrl ? new url_1.URL(request.containingUrl) : null, request.fromImport);
return (0, utils_1.catchOr)(() => {
return (0, utils_1.thenOr)(importer.findFileUrl(request.url, {
fromImport: request.fromImport,
containingUrl: request.containingUrl
? new url_1.URL(request.containingUrl)
: null,
}), url => {
return (0, utils_1.thenOr)(importer.findFileUrl(request.url, canonicalizeContext), url => {
if (!url)

@@ -164,2 +158,3 @@ return new proto.InboundMessage_FileImportResponse();

result: { case: 'fileUrl', value: url.toString() },
containingUrlUnused: !canonicalizeContext.containingUrlAccessed,
});

@@ -166,0 +161,0 @@ });

@@ -46,2 +46,26 @@ "use strict";

return new URL(url);
// Emulate a base importer instead of using a real base importer,
// because we want to mark containingUrl as used, which is impossible
// in a real base importer.
if (options.containingUrl !== null) {
try {
const absoluteUrl = new URL(url, options.containingUrl).toString();
const resolved = this.canonicalize(absoluteUrl, {
fromImport: options.fromImport,
containingUrl: null,
});
if (resolved !== null)
return resolved;
}
catch (error) {
if (error instanceof TypeError &&
(0, utils_1.isErrnoException)(error) &&
error.code === 'ERR_INVALID_URL') {
// ignore
}
else {
throw error;
}
}
}
if (url.startsWith(utils_2.legacyImporterProtocolPrefix) ||

@@ -48,0 +72,0 @@ url.startsWith(utils_2.legacyImporterProtocol)) {

@@ -125,5 +125,14 @@ "use strict";

const modernOptions = convertOptions(options, sync);
// Find the first non-NodePackageImporter to pass as legacy `importer` option.
// NodePackageImporter will be passed in `modernOptions.importers`.
const importer = (_a = modernOptions.importers) === null || _a === void 0 ? void 0 : _a.find(_importer => !(_importer instanceof importer_registry_1.NodePackageImporter));
// Use a no-op base importer, because the LegacyImporterWrapper will emulate
// the base importer by itself in order to mark containingUrl as accessed.
const importer = ((_a = modernOptions.importers) === null || _a === void 0 ? void 0 : _a.some(importer => importer instanceof importer_1.LegacyImporterWrapper))
? {
canonicalize() {
return null;
},
load() {
return null;
},
}
: undefined;
return {

@@ -130,0 +139,0 @@ ...modernOptions,

@@ -10,4 +10,14 @@ "use strict";

class SassArgumentList extends list_1.SassList {
/**
* Whether the `keywords` getter has been accessed.
*
* This is marked as public so that the protofier can access it, but it's not
* part of the package's public API and should not be accessed by user code.
* It may be renamed or removed without warning in the future.
*/
get keywordsAccessed() {
return this._keywordsAccessed;
}
get keywords() {
this.keywordsAccessed = true;
this._keywordsAccessed = true;
return this.keywordsInternal;

@@ -17,10 +27,3 @@ }

super(contents, { separator });
/**
* Whether the `keywords` getter has been accessed.
*
* This is marked as public so that the protofier can access it, but it's not
* part of the package's public API and should not be accessed by user code.
* It may be renamed or removed without warning in the future.
*/
this.keywordsAccessed = false;
this._keywordsAccessed = false;
this.keywordsInternal = (0, immutable_1.isOrderedMap)(keywords)

@@ -27,0 +30,0 @@ ? keywords

{
"name": "sass-embedded",
"version": "1.75.0",
"protocol-version": "2.6.0",
"compiler-version": "1.75.0",
"version": "1.76.0",
"protocol-version": "2.7.0",
"compiler-version": "1.76.0",
"description": "Node.js library that communicates with Embedded Dart Sass using the Embedded Sass protocol",

@@ -38,19 +38,19 @@ "repository": "sass/embedded-host-node",

"optionalDependencies": {
"sass-embedded-android-arm": "1.75.0",
"sass-embedded-android-arm64": "1.75.0",
"sass-embedded-android-ia32": "1.75.0",
"sass-embedded-android-x64": "1.75.0",
"sass-embedded-darwin-arm64": "1.75.0",
"sass-embedded-darwin-x64": "1.75.0",
"sass-embedded-linux-arm": "1.75.0",
"sass-embedded-linux-arm64": "1.75.0",
"sass-embedded-linux-ia32": "1.75.0",
"sass-embedded-linux-x64": "1.75.0",
"sass-embedded-linux-musl-arm": "1.75.0",
"sass-embedded-linux-musl-arm64": "1.75.0",
"sass-embedded-linux-musl-ia32": "1.75.0",
"sass-embedded-linux-musl-x64": "1.75.0",
"sass-embedded-win32-arm64": "1.75.0",
"sass-embedded-win32-ia32": "1.75.0",
"sass-embedded-win32-x64": "1.75.0"
"sass-embedded-android-arm": "1.76.0",
"sass-embedded-android-arm64": "1.76.0",
"sass-embedded-android-ia32": "1.76.0",
"sass-embedded-android-x64": "1.76.0",
"sass-embedded-darwin-arm64": "1.76.0",
"sass-embedded-darwin-x64": "1.76.0",
"sass-embedded-linux-arm": "1.76.0",
"sass-embedded-linux-arm64": "1.76.0",
"sass-embedded-linux-ia32": "1.76.0",
"sass-embedded-linux-x64": "1.76.0",
"sass-embedded-linux-musl-arm": "1.76.0",
"sass-embedded-linux-musl-arm64": "1.76.0",
"sass-embedded-linux-musl-ia32": "1.76.0",
"sass-embedded-linux-musl-x64": "1.76.0",
"sass-embedded-win32-arm64": "1.76.0",
"sass-embedded-win32-ia32": "1.76.0",
"sass-embedded-win32-x64": "1.76.0"
},

@@ -57,0 +57,0 @@ "dependencies": {

@@ -110,2 +110,9 @@ /**

/**
* Deprecation for function and mixin names beginning with `--`.
*
* This deprecation became active in Dart Sass 1.76.0.
*/
'css-function-mixin': Deprecation<'css-function-mixin'>;
/**
* Deprecation for `@import` rules.

@@ -112,0 +119,0 @@ *

{
"name": "sass-embedded",
"version": "1.75.0",
"protocol-version": "2.6.0",
"compiler-version": "1.75.0",
"version": "1.76.0",
"protocol-version": "2.7.0",
"compiler-version": "1.76.0",
"description": "Node.js library that communicates with Embedded Dart Sass using the Embedded Sass protocol",

@@ -38,19 +38,19 @@ "repository": "sass/embedded-host-node",

"optionalDependencies": {
"sass-embedded-android-arm": "1.75.0",
"sass-embedded-android-arm64": "1.75.0",
"sass-embedded-android-ia32": "1.75.0",
"sass-embedded-android-x64": "1.75.0",
"sass-embedded-darwin-arm64": "1.75.0",
"sass-embedded-darwin-x64": "1.75.0",
"sass-embedded-linux-arm": "1.75.0",
"sass-embedded-linux-arm64": "1.75.0",
"sass-embedded-linux-ia32": "1.75.0",
"sass-embedded-linux-x64": "1.75.0",
"sass-embedded-linux-musl-arm": "1.75.0",
"sass-embedded-linux-musl-arm64": "1.75.0",
"sass-embedded-linux-musl-ia32": "1.75.0",
"sass-embedded-linux-musl-x64": "1.75.0",
"sass-embedded-win32-arm64": "1.75.0",
"sass-embedded-win32-ia32": "1.75.0",
"sass-embedded-win32-x64": "1.75.0"
"sass-embedded-android-arm": "1.76.0",
"sass-embedded-android-arm64": "1.76.0",
"sass-embedded-android-ia32": "1.76.0",
"sass-embedded-android-x64": "1.76.0",
"sass-embedded-darwin-arm64": "1.76.0",
"sass-embedded-darwin-x64": "1.76.0",
"sass-embedded-linux-arm": "1.76.0",
"sass-embedded-linux-arm64": "1.76.0",
"sass-embedded-linux-ia32": "1.76.0",
"sass-embedded-linux-x64": "1.76.0",
"sass-embedded-linux-musl-arm": "1.76.0",
"sass-embedded-linux-musl-arm64": "1.76.0",
"sass-embedded-linux-musl-ia32": "1.76.0",
"sass-embedded-linux-musl-x64": "1.76.0",
"sass-embedded-win32-arm64": "1.76.0",
"sass-embedded-win32-ia32": "1.76.0",
"sass-embedded-win32-x64": "1.76.0"
},

@@ -57,0 +57,0 @@ "dependencies": {

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 too big to display

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