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

vscode-css-languageservice

Package Overview
Dependencies
Maintainers
7
Versions
187
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-css-languageservice - npm Package Compare versions

Comparing version 6.2.4 to 6.2.5

12

lib/esm/parser/lessParser.js

@@ -279,3 +279,3 @@ /*---------------------------------------------------------------------------------------------

|| this._parseVariableDeclaration() // Variable declarations
|| super._parseRuleSetDeclarationAtStatement();
|| this._parseRuleSetDeclarationAtStatement();
}

@@ -287,3 +287,3 @@ return this._tryParseMixinDeclaration()

|| this._parseExtend() // less extend declaration
|| super._parseRuleSetDeclaration(); // try css ruleset declaration as the last option
|| this._parseDeclaration(); // try css ruleset declaration as the last option
}

@@ -297,5 +297,5 @@ _parseKeyframeIdent() {

}
_parseSimpleSelectorBody() {
return this._parseSelectorCombinator() || super._parseSimpleSelectorBody();
}
// public _parseSimpleSelectorBody(): nodes.Node | null {
// return this._parseNestingSelector() || super._parseSimpleSelectorBody();
// }
_parseSelector(isNested) {

@@ -320,3 +320,3 @@ // CSS Guards

}
_parseSelectorCombinator() {
_parseNestingSelector() {
if (this.peekDelim('&')) {

@@ -323,0 +323,0 @@ const node = this.createNode(nodes.NodeType.SelectorCombinator);

@@ -164,3 +164,3 @@ /*---------------------------------------------------------------------------------------------

this._parseVariable() ||
this._parseSelectorCombinator() ||
this._parseNestingSelector() ||
//this._tryParsePrio() ||

@@ -173,3 +173,3 @@ super._parseTermExpression();

this.consumeToken();
if (!node.addChild(this._parseExpr()) && !this._parseSelectorCombinator()) {
if (!node.addChild(this._parseExpr()) && !this._parseNestingSelector()) {
if (this.accept(TokenType.CurlyR)) {

@@ -224,7 +224,7 @@ return this.finish(node);

|| this._parsePropertyAtRule() // @property
|| super._parseRuleSetDeclarationAtStatement();
|| this._parseRuleSetDeclarationAtStatement();
}
return this._parseVariableDeclaration() // variable declaration
|| this._tryParseRuleset(true) // nested ruleset
|| super._parseRuleSetDeclaration(); // try css ruleset declaration as last so in the error case, the ast will contain a declaration
|| this._parseDeclaration(); // try css ruleset declaration as last so in the error case, the ast will contain a declaration
}

@@ -288,5 +288,5 @@ _parseDeclaration(stopTokens) {

_parseSimpleSelectorBody() {
return this._parseSelectorCombinator() || this._parseSelectorPlaceholder() || super._parseSimpleSelectorBody();
return this._parseSelectorPlaceholder() || super._parseSimpleSelectorBody();
}
_parseSelectorCombinator() {
_parseNestingSelector() {
if (this.peekDelim('&')) {

@@ -293,0 +293,0 @@ const node = this.createNode(nodes.NodeType.SelectorCombinator);

@@ -176,3 +176,3 @@ /*---------------------------------------------------------------------------------------------

const entry = {
name,
name: name || l10n.t('<undefined>'),
kind,

@@ -191,5 +191,8 @@ location: Location.create(document.uri, range)

const range = symbolNodeOrRange instanceof nodes.Node ? getRange(symbolNodeOrRange, document) : symbolNodeOrRange;
const selectionRange = (nameNodeOrRange instanceof nodes.Node ? getRange(nameNodeOrRange, document) : nameNodeOrRange) ?? Range.create(range.start, range.start);
let selectionRange = nameNodeOrRange instanceof nodes.Node ? getRange(nameNodeOrRange, document) : nameNodeOrRange;
if (!selectionRange || !containsRange(range, selectionRange)) {
selectionRange = Range.create(range.start, range.start);
}
const entry = {
name,
name: name || l10n.t('<undefined>'),
kind,

@@ -196,0 +199,0 @@ range,

@@ -9,3 +9,3 @@ /*---------------------------------------------------------------------------------------------

import * as l10n from '@vscode/l10n';
export class LESSCompletion extends CSSCompletion {
class LESSCompletion extends CSSCompletion {
constructor(lsOptions, cssDataManager) {

@@ -379,1 +379,2 @@ super('@', lsOptions, cssDataManager);

];
export { LESSCompletion };

@@ -28,3 +28,3 @@ /*---------------------------------------------------------------------------------------------

}
export class LintVisitor {
class LintVisitor {
static entries(node, document, settings, cssDataManager, entryFilter) {

@@ -566,1 +566,2 @@ const visitor = new LintVisitor(document, settings, cssDataManager);

];
export { LintVisitor };

@@ -11,3 +11,3 @@ /*---------------------------------------------------------------------------------------------

const sassDocumentationName = l10n.t('Sass documentation');
export class SCSSCompletion extends CSSCompletion {
class SCSSCompletion extends CSSCompletion {
constructor(lsServiceOptions, cssDataManager) {

@@ -337,2 +337,3 @@ super('$', lsServiceOptions, cssDataManager);

];
export { SCSSCompletion };
/**

@@ -339,0 +340,0 @@ * Todo @Pine: Remove this and do it through custom data

@@ -405,4 +405,3 @@ /*---------------------------------------------------------------------------------------------

const specificity = calculateScore(node);
;
return l10n.t("[Selector Specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity): ({0}, {1}, {2})", specificity.id, specificity.attr, specificity.tag);
return `[${l10n.t("Selector Specificity")}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${specificity.id}, ${specificity.attr}, ${specificity.tag})`;
}

@@ -409,0 +408,0 @@ }

@@ -290,3 +290,3 @@ (function (factory) {

|| this._parseVariableDeclaration() // Variable declarations
|| super._parseRuleSetDeclarationAtStatement();
|| this._parseRuleSetDeclarationAtStatement();
}

@@ -298,3 +298,3 @@ return this._tryParseMixinDeclaration()

|| this._parseExtend() // less extend declaration
|| super._parseRuleSetDeclaration(); // try css ruleset declaration as the last option
|| this._parseDeclaration(); // try css ruleset declaration as the last option
}

@@ -308,5 +308,5 @@ _parseKeyframeIdent() {

}
_parseSimpleSelectorBody() {
return this._parseSelectorCombinator() || super._parseSimpleSelectorBody();
}
// public _parseSimpleSelectorBody(): nodes.Node | null {
// return this._parseNestingSelector() || super._parseSimpleSelectorBody();
// }
_parseSelector(isNested) {

@@ -331,3 +331,3 @@ // CSS Guards

}
_parseSelectorCombinator() {
_parseNestingSelector() {
if (this.peekDelim('&')) {

@@ -334,0 +334,0 @@ const node = this.createNode(nodes.NodeType.SelectorCombinator);

@@ -175,3 +175,3 @@ (function (factory) {

this._parseVariable() ||
this._parseSelectorCombinator() ||
this._parseNestingSelector() ||
//this._tryParsePrio() ||

@@ -184,3 +184,3 @@ super._parseTermExpression();

this.consumeToken();
if (!node.addChild(this._parseExpr()) && !this._parseSelectorCombinator()) {
if (!node.addChild(this._parseExpr()) && !this._parseNestingSelector()) {
if (this.accept(cssScanner_1.TokenType.CurlyR)) {

@@ -235,7 +235,7 @@ return this.finish(node);

|| this._parsePropertyAtRule() // @property
|| super._parseRuleSetDeclarationAtStatement();
|| this._parseRuleSetDeclarationAtStatement();
}
return this._parseVariableDeclaration() // variable declaration
|| this._tryParseRuleset(true) // nested ruleset
|| super._parseRuleSetDeclaration(); // try css ruleset declaration as last so in the error case, the ast will contain a declaration
|| this._parseDeclaration(); // try css ruleset declaration as last so in the error case, the ast will contain a declaration
}

@@ -299,5 +299,5 @@ _parseDeclaration(stopTokens) {

_parseSimpleSelectorBody() {
return this._parseSelectorCombinator() || this._parseSelectorPlaceholder() || super._parseSimpleSelectorBody();
return this._parseSelectorPlaceholder() || super._parseSimpleSelectorBody();
}
_parseSelectorCombinator() {
_parseNestingSelector() {
if (this.peekDelim('&')) {

@@ -304,0 +304,0 @@ const node = this.createNode(nodes.NodeType.SelectorCombinator);

@@ -187,3 +187,3 @@ (function (factory) {

const entry = {
name,
name: name || l10n.t('<undefined>'),
kind,

@@ -202,5 +202,8 @@ location: cssLanguageTypes_1.Location.create(document.uri, range)

const range = symbolNodeOrRange instanceof nodes.Node ? getRange(symbolNodeOrRange, document) : symbolNodeOrRange;
const selectionRange = (nameNodeOrRange instanceof nodes.Node ? getRange(nameNodeOrRange, document) : nameNodeOrRange) ?? cssLanguageTypes_1.Range.create(range.start, range.start);
let selectionRange = nameNodeOrRange instanceof nodes.Node ? getRange(nameNodeOrRange, document) : nameNodeOrRange;
if (!selectionRange || !containsRange(range, selectionRange)) {
selectionRange = cssLanguageTypes_1.Range.create(range.start, range.start);
}
const entry = {
name,
name: name || l10n.t('<undefined>'),
kind,

@@ -207,0 +210,0 @@ range,

@@ -58,3 +58,2 @@ (function (factory) {

}
exports.LESSCompletion = LESSCompletion;
LESSCompletion.builtInProposals = [

@@ -391,2 +390,3 @@ // Boolean functions

];
exports.LESSCompletion = LESSCompletion;
});

@@ -572,3 +572,2 @@ (function (factory) {

}
exports.LintVisitor = LintVisitor;
LintVisitor.prefixes = [

@@ -578,2 +577,3 @@ '-ms-', '-moz-', '-o-', '-webkit-', // Quite common

];
exports.LintVisitor = LintVisitor;
});

@@ -121,3 +121,2 @@ (function (factory) {

}
exports.SCSSCompletion = SCSSCompletion;
SCSSCompletion.variableDefaults = {

@@ -349,2 +348,3 @@ '$red': '1',

];
exports.SCSSCompletion = SCSSCompletion;
/**

@@ -351,0 +351,0 @@ * Todo @Pine: Remove this and do it through custom data

@@ -420,4 +420,3 @@ (function (factory) {

const specificity = calculateScore(node);
;
return l10n.t("[Selector Specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity): ({0}, {1}, {2})", specificity.id, specificity.attr, specificity.tag);
return `[${l10n.t("Selector Specificity")}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${specificity.id}, ${specificity.attr}, ${specificity.tag})`;
}

@@ -424,0 +423,0 @@ }

{
"name": "vscode-css-languageservice",
"version": "6.2.4",
"version": "6.2.5",
"description": "Language service for CSS, LESS and SCSS",

@@ -20,14 +20,14 @@ "main": "./lib/umd/cssLanguageService.js",

"@types/node": "16.x",
"@typescript-eslint/eslint-plugin": "^5.53.0",
"@typescript-eslint/parser": "^5.53.0",
"@vscode/web-custom-data": "^0.4.5",
"eslint": "^8.34.0",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"@vscode/web-custom-data": "^0.4.6",
"eslint": "^8.39.0",
"js-beautify": "^1.14.7",
"mocha": "^10.2.0",
"rimraf": "^4.1.2",
"rimraf": "^5.0.0",
"source-map-support": "^0.5.21",
"typescript": "^4.9.5"
"typescript": "^5.0.4"
},
"dependencies": {
"@vscode/l10n": "^0.0.11",
"@vscode/l10n": "^0.0.13",
"vscode-languageserver-textdocument": "^1.0.8",

@@ -34,0 +34,0 @@ "vscode-languageserver-types": "^3.17.3",

@@ -76,3 +76,3 @@ # vscode-css-languageservice

With the exceptions of `build/mdn-documentation.js`, which is built upon content from [Mozilla Developer Network](https://developer.mozilla.org/en-US/docs/Web)
With the exceptions of `build/mdn-documentation.js`, which is built upon content from [Mozilla Developer Network](https://developer.mozilla.org/docs/Web)
and distributed under CC BY-SA 2.5.

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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