vscode-css-languageservice 6.3.9 → 7.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/lib/esm/beautify/beautify-css.js +1437 -1606
- package/lib/esm/cssLanguageService.d.ts +2 -2
- package/lib/esm/cssLanguageService.js +18 -18
- package/lib/esm/data/webCustomData.js +13251 -2444
- package/lib/esm/languageFacts/builtinData.js +2 -1
- package/lib/esm/languageFacts/colors.js +1 -1
- package/lib/esm/languageFacts/dataManager.js +3 -3
- package/lib/esm/languageFacts/entry.js +1 -1
- package/lib/esm/languageFacts/facts.js +3 -3
- package/lib/esm/parser/cssErrors.js +1 -0
- package/lib/esm/parser/cssNodes.js +1 -1
- package/lib/esm/parser/cssParser.js +164 -17
- package/lib/esm/parser/cssSymbolScope.js +2 -2
- package/lib/esm/parser/lessParser.js +5 -5
- package/lib/esm/parser/lessScanner.js +1 -1
- package/lib/esm/parser/scssParser.js +64 -6
- package/lib/esm/parser/scssScanner.js +1 -1
- package/lib/esm/services/cssCodeActions.js +4 -4
- package/lib/esm/services/cssCompletion.js +7 -7
- package/lib/esm/services/cssFolding.js +3 -3
- package/lib/esm/services/cssFormatter.js +3 -3
- package/lib/esm/services/cssHover.js +6 -6
- package/lib/esm/services/cssNavigation.js +6 -6
- package/lib/esm/services/cssSelectionRange.js +2 -2
- package/lib/esm/services/cssValidation.js +4 -4
- package/lib/esm/services/lessCompletion.js +2 -2
- package/lib/esm/services/lint.js +5 -5
- package/lib/esm/services/lintRules.js +1 -1
- package/lib/esm/services/lintUtil.js +1 -1
- package/lib/esm/services/pathCompletion.js +3 -3
- package/lib/esm/services/scssCompletion.js +3 -3
- package/lib/esm/services/scssNavigation.js +4 -4
- package/lib/esm/services/selectorPrinting.js +3 -3
- package/package.json +20 -20
- package/lib/umd/beautify/beautify-css.js +0 -1695
- package/lib/umd/cssLanguageService.d.ts +0 -39
- package/lib/umd/cssLanguageService.js +0 -105
- package/lib/umd/cssLanguageTypes.d.ts +0 -267
- package/lib/umd/cssLanguageTypes.js +0 -89
- package/lib/umd/data/webCustomData.js +0 -33806
- package/lib/umd/languageFacts/builtinData.js +0 -154
- package/lib/umd/languageFacts/colors.js +0 -949
- package/lib/umd/languageFacts/dataManager.js +0 -101
- package/lib/umd/languageFacts/dataProvider.js +0 -86
- package/lib/umd/languageFacts/entry.js +0 -217
- package/lib/umd/languageFacts/facts.js +0 -33
- package/lib/umd/parser/cssErrors.js +0 -60
- package/lib/umd/parser/cssNodes.js +0 -1676
- package/lib/umd/parser/cssParser.js +0 -1888
- package/lib/umd/parser/cssScanner.js +0 -619
- package/lib/umd/parser/cssSymbolScope.js +0 -328
- package/lib/umd/parser/lessParser.js +0 -732
- package/lib/umd/parser/lessScanner.js +0 -70
- package/lib/umd/parser/scssErrors.js +0 -30
- package/lib/umd/parser/scssParser.js +0 -816
- package/lib/umd/parser/scssScanner.js +0 -108
- package/lib/umd/services/cssCodeActions.js +0 -89
- package/lib/umd/services/cssCompletion.js +0 -1109
- package/lib/umd/services/cssFolding.js +0 -202
- package/lib/umd/services/cssFormatter.js +0 -149
- package/lib/umd/services/cssHover.js +0 -174
- package/lib/umd/services/cssNavigation.js +0 -539
- package/lib/umd/services/cssSelectionRange.js +0 -59
- package/lib/umd/services/cssValidation.js +0 -54
- package/lib/umd/services/lessCompletion.js +0 -390
- package/lib/umd/services/lint.js +0 -577
- package/lib/umd/services/lintRules.js +0 -90
- package/lib/umd/services/lintUtil.js +0 -210
- package/lib/umd/services/pathCompletion.js +0 -171
- package/lib/umd/services/scssCompletion.js +0 -367
- package/lib/umd/services/scssNavigation.js +0 -169
- package/lib/umd/services/selectorPrinting.js +0 -575
- package/lib/umd/utils/arrays.js +0 -54
- package/lib/umd/utils/objects.js +0 -24
- package/lib/umd/utils/resources.js +0 -25
- package/lib/umd/utils/strings.js +0 -123
package/lib/esm/services/lint.js
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
'use strict';
|
|
6
6
|
import * as l10n from '@vscode/l10n';
|
|
7
|
-
import * as languageFacts from '../languageFacts/facts';
|
|
8
|
-
import * as nodes from '../parser/cssNodes';
|
|
9
|
-
import { union } from '../utils/arrays';
|
|
10
|
-
import { Rules, Settings } from './lintRules';
|
|
11
|
-
import calculateBoxModel, { Element } from './lintUtil';
|
|
7
|
+
import * as languageFacts from '../languageFacts/facts.js';
|
|
8
|
+
import * as nodes from '../parser/cssNodes.js';
|
|
9
|
+
import { union } from '../utils/arrays.js';
|
|
10
|
+
import { Rules, Settings } from './lintRules.js';
|
|
11
|
+
import calculateBoxModel, { Element } from './lintUtil.js';
|
|
12
12
|
class NodesByRootMap {
|
|
13
13
|
constructor() {
|
|
14
14
|
this.data = {};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
'use strict';
|
|
6
|
-
import * as nodes from '../parser/cssNodes';
|
|
6
|
+
import * as nodes from '../parser/cssNodes.js';
|
|
7
7
|
import * as l10n from '@vscode/l10n';
|
|
8
8
|
const Warning = nodes.Level.Warning;
|
|
9
9
|
const Error = nodes.Level.Error;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
'use strict';
|
|
6
|
-
import { includes } from '../utils/arrays';
|
|
6
|
+
import { includes } from '../utils/arrays.js';
|
|
7
7
|
export class Element {
|
|
8
8
|
constructor(decl) {
|
|
9
9
|
this.fullPropertyName = decl.getFullPropertyName().toLowerCase();
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { FileType, CompletionItemKind, TextEdit, Range, Position } from '../cssLanguageTypes';
|
|
6
|
-
import { startsWith, endsWith } from '../utils/strings';
|
|
7
|
-
import { joinPath } from '../utils/resources';
|
|
5
|
+
import { FileType, CompletionItemKind, TextEdit, Range, Position } from '../cssLanguageTypes.js';
|
|
6
|
+
import { startsWith, endsWith } from '../utils/strings.js';
|
|
7
|
+
import { joinPath } from '../utils/resources.js';
|
|
8
8
|
export class PathCompletionParticipant {
|
|
9
9
|
constructor(readDirectory) {
|
|
10
10
|
this.readDirectory = readDirectory;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
'use strict';
|
|
6
|
-
import { CSSCompletion } from './cssCompletion';
|
|
7
|
-
import * as nodes from '../parser/cssNodes';
|
|
8
|
-
import { CompletionItemKind, TextEdit, InsertTextFormat } from '../cssLanguageTypes';
|
|
6
|
+
import { CSSCompletion } from './cssCompletion.js';
|
|
7
|
+
import * as nodes from '../parser/cssNodes.js';
|
|
8
|
+
import { CompletionItemKind, TextEdit, InsertTextFormat } from '../cssLanguageTypes.js';
|
|
9
9
|
import * as l10n from '@vscode/l10n';
|
|
10
10
|
const sassDocumentationName = l10n.t('Sass documentation');
|
|
11
11
|
export class SCSSCompletion extends CSSCompletion {
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
'use strict';
|
|
6
|
-
import { CSSNavigation, getModuleNameFromPath } from './cssNavigation';
|
|
7
|
-
import * as nodes from '../parser/cssNodes';
|
|
6
|
+
import { CSSNavigation, getModuleNameFromPath } from './cssNavigation.js';
|
|
7
|
+
import * as nodes from '../parser/cssNodes.js';
|
|
8
8
|
import { URI, Utils } from 'vscode-uri';
|
|
9
|
-
import { convertSimple2RegExpPattern, startsWith } from '../utils/strings';
|
|
10
|
-
import { dirname, joinPath } from '../utils/resources';
|
|
9
|
+
import { convertSimple2RegExpPattern, startsWith } from '../utils/strings.js';
|
|
10
|
+
import { dirname, joinPath } from '../utils/resources.js';
|
|
11
11
|
export class SCSSNavigation extends CSSNavigation {
|
|
12
12
|
constructor(fileSystemProvider) {
|
|
13
13
|
super(fileSystemProvider, true);
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
'use strict';
|
|
6
|
-
import * as nodes from '../parser/cssNodes';
|
|
7
|
-
import { Scanner } from '../parser/cssScanner';
|
|
6
|
+
import * as nodes from '../parser/cssNodes.js';
|
|
7
|
+
import { Scanner } from '../parser/cssScanner.js';
|
|
8
8
|
import * as l10n from '@vscode/l10n';
|
|
9
|
-
import { Parser } from '../parser/cssParser';
|
|
9
|
+
import { Parser } from '../parser/cssParser.js';
|
|
10
10
|
export class Element {
|
|
11
11
|
constructor() {
|
|
12
12
|
this.parent = null;
|
package/package.json
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vscode-css-languageservice",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0-next.1",
|
|
4
4
|
"description": "Language service for CSS, LESS and SCSS",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./lib/esm/cssLanguageService.d.ts",
|
|
9
|
+
"import": "./lib/esm/cssLanguageService.js"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"types": "./lib/esm/cssLanguageService.d.ts",
|
|
8
13
|
"author": "Microsoft Corporation",
|
|
9
14
|
"repository": {
|
|
10
15
|
"type": "git",
|
|
@@ -15,16 +20,13 @@
|
|
|
15
20
|
"url": "https://github.com/Microsoft/vscode-css-languageservice"
|
|
16
21
|
},
|
|
17
22
|
"devDependencies": {
|
|
18
|
-
"@types/mocha": "^10.0.10",
|
|
19
23
|
"@types/node": "22.x",
|
|
20
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
21
|
-
"@typescript-eslint/parser": "^8.
|
|
22
|
-
"@vscode/web-custom-data": "^0.6.
|
|
23
|
-
"eslint": "^9.39.
|
|
24
|
+
"@typescript-eslint/eslint-plugin": "^8.56.0",
|
|
25
|
+
"@typescript-eslint/parser": "^8.56.0",
|
|
26
|
+
"@vscode/web-custom-data": "^0.6.3",
|
|
27
|
+
"eslint": "^9.39.3",
|
|
24
28
|
"js-beautify": "^1.15.4",
|
|
25
|
-
"
|
|
26
|
-
"rimraf": "^6.1.2",
|
|
27
|
-
"source-map-support": "^0.5.21",
|
|
29
|
+
"rimraf": "^6.1.3",
|
|
28
30
|
"typescript": "^5.9.3"
|
|
29
31
|
},
|
|
30
32
|
"dependencies": {
|
|
@@ -34,19 +36,17 @@
|
|
|
34
36
|
"vscode-uri": "^3.1.0"
|
|
35
37
|
},
|
|
36
38
|
"scripts": {
|
|
37
|
-
"prepack": "npm run clean && npm run compile
|
|
38
|
-
"compile": "tsc -p ./src && npm run
|
|
39
|
-
"compile-esm": "tsc -p ./src/tsconfig.esm.json",
|
|
39
|
+
"prepack": "npm run clean && npm run compile && npm run test && npm run remove-sourcemap-refs",
|
|
40
|
+
"compile": "tsc -p ./src && npm run lint",
|
|
40
41
|
"clean": "rimraf lib",
|
|
41
42
|
"remove-sourcemap-refs": "node ./build/remove-sourcemap-refs.js",
|
|
42
|
-
"watch": "
|
|
43
|
-
"test": "npm run compile && npm run
|
|
44
|
-
"
|
|
45
|
-
"coverage": "npm run compile && npx nyc --reporter=html --reporter=text
|
|
43
|
+
"watch": "tsc -w -p ./src",
|
|
44
|
+
"test": "npm run compile && npm run node-test",
|
|
45
|
+
"node-test": "node --enable-source-maps --test lib/esm/test/**/*.test.js",
|
|
46
|
+
"coverage": "npm run compile && npx nyc --reporter=html --reporter=text node --test lib/esm/test/**/*.test.js",
|
|
46
47
|
"lint": "eslint src/**/*.ts",
|
|
47
48
|
"update-data": "npm install @vscode/web-custom-data -D && node ./build/generateData.js",
|
|
48
49
|
"install-types-next": "npm install vscode-languageserver-types@next -f -S && npm install vscode-languageserver-textdocument@next -f -S",
|
|
49
|
-
"copy-jsbeautify": "node ./build/copy-jsbeautify.js",
|
|
50
50
|
"update-jsbeautify": "npm install js-beautify && node ./build/update-jsbeautify.js",
|
|
51
51
|
"update-jsbeautify-next": "npm install js-beautify@next && node ./build/update-jsbeautify.js"
|
|
52
52
|
}
|