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.
Files changed (77) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/lib/esm/beautify/beautify-css.js +1437 -1606
  3. package/lib/esm/cssLanguageService.d.ts +2 -2
  4. package/lib/esm/cssLanguageService.js +18 -18
  5. package/lib/esm/data/webCustomData.js +13251 -2444
  6. package/lib/esm/languageFacts/builtinData.js +2 -1
  7. package/lib/esm/languageFacts/colors.js +1 -1
  8. package/lib/esm/languageFacts/dataManager.js +3 -3
  9. package/lib/esm/languageFacts/entry.js +1 -1
  10. package/lib/esm/languageFacts/facts.js +3 -3
  11. package/lib/esm/parser/cssErrors.js +1 -0
  12. package/lib/esm/parser/cssNodes.js +1 -1
  13. package/lib/esm/parser/cssParser.js +164 -17
  14. package/lib/esm/parser/cssSymbolScope.js +2 -2
  15. package/lib/esm/parser/lessParser.js +5 -5
  16. package/lib/esm/parser/lessScanner.js +1 -1
  17. package/lib/esm/parser/scssParser.js +64 -6
  18. package/lib/esm/parser/scssScanner.js +1 -1
  19. package/lib/esm/services/cssCodeActions.js +4 -4
  20. package/lib/esm/services/cssCompletion.js +7 -7
  21. package/lib/esm/services/cssFolding.js +3 -3
  22. package/lib/esm/services/cssFormatter.js +3 -3
  23. package/lib/esm/services/cssHover.js +6 -6
  24. package/lib/esm/services/cssNavigation.js +6 -6
  25. package/lib/esm/services/cssSelectionRange.js +2 -2
  26. package/lib/esm/services/cssValidation.js +4 -4
  27. package/lib/esm/services/lessCompletion.js +2 -2
  28. package/lib/esm/services/lint.js +5 -5
  29. package/lib/esm/services/lintRules.js +1 -1
  30. package/lib/esm/services/lintUtil.js +1 -1
  31. package/lib/esm/services/pathCompletion.js +3 -3
  32. package/lib/esm/services/scssCompletion.js +3 -3
  33. package/lib/esm/services/scssNavigation.js +4 -4
  34. package/lib/esm/services/selectorPrinting.js +3 -3
  35. package/package.json +20 -20
  36. package/lib/umd/beautify/beautify-css.js +0 -1695
  37. package/lib/umd/cssLanguageService.d.ts +0 -39
  38. package/lib/umd/cssLanguageService.js +0 -105
  39. package/lib/umd/cssLanguageTypes.d.ts +0 -267
  40. package/lib/umd/cssLanguageTypes.js +0 -89
  41. package/lib/umd/data/webCustomData.js +0 -33806
  42. package/lib/umd/languageFacts/builtinData.js +0 -154
  43. package/lib/umd/languageFacts/colors.js +0 -949
  44. package/lib/umd/languageFacts/dataManager.js +0 -101
  45. package/lib/umd/languageFacts/dataProvider.js +0 -86
  46. package/lib/umd/languageFacts/entry.js +0 -217
  47. package/lib/umd/languageFacts/facts.js +0 -33
  48. package/lib/umd/parser/cssErrors.js +0 -60
  49. package/lib/umd/parser/cssNodes.js +0 -1676
  50. package/lib/umd/parser/cssParser.js +0 -1888
  51. package/lib/umd/parser/cssScanner.js +0 -619
  52. package/lib/umd/parser/cssSymbolScope.js +0 -328
  53. package/lib/umd/parser/lessParser.js +0 -732
  54. package/lib/umd/parser/lessScanner.js +0 -70
  55. package/lib/umd/parser/scssErrors.js +0 -30
  56. package/lib/umd/parser/scssParser.js +0 -816
  57. package/lib/umd/parser/scssScanner.js +0 -108
  58. package/lib/umd/services/cssCodeActions.js +0 -89
  59. package/lib/umd/services/cssCompletion.js +0 -1109
  60. package/lib/umd/services/cssFolding.js +0 -202
  61. package/lib/umd/services/cssFormatter.js +0 -149
  62. package/lib/umd/services/cssHover.js +0 -174
  63. package/lib/umd/services/cssNavigation.js +0 -539
  64. package/lib/umd/services/cssSelectionRange.js +0 -59
  65. package/lib/umd/services/cssValidation.js +0 -54
  66. package/lib/umd/services/lessCompletion.js +0 -390
  67. package/lib/umd/services/lint.js +0 -577
  68. package/lib/umd/services/lintRules.js +0 -90
  69. package/lib/umd/services/lintUtil.js +0 -210
  70. package/lib/umd/services/pathCompletion.js +0 -171
  71. package/lib/umd/services/scssCompletion.js +0 -367
  72. package/lib/umd/services/scssNavigation.js +0 -169
  73. package/lib/umd/services/selectorPrinting.js +0 -575
  74. package/lib/umd/utils/arrays.js +0 -54
  75. package/lib/umd/utils/objects.js +0 -24
  76. package/lib/umd/utils/resources.js +0 -25
  77. package/lib/umd/utils/strings.js +0 -123
@@ -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": "6.3.9",
3
+ "version": "7.0.0-next.1",
4
4
  "description": "Language service for CSS, LESS and SCSS",
5
- "main": "./lib/umd/cssLanguageService.js",
6
- "typings": "./lib/umd/cssLanguageService",
7
- "module": "./lib/esm/cssLanguageService.js",
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.48.0",
21
- "@typescript-eslint/parser": "^8.48.0",
22
- "@vscode/web-custom-data": "^0.6.2",
23
- "eslint": "^9.39.1",
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
- "mocha": "^11.7.5",
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-esm && npm run test && npm run remove-sourcemap-refs",
38
- "compile": "tsc -p ./src && npm run copy-jsbeautify && npm run lint",
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": "npm run copy-jsbeautify && tsc -w -p ./src",
43
- "test": "npm run compile && npm run mocha",
44
- "mocha": "mocha --require source-map-support/register",
45
- "coverage": "npm run compile && npx nyc --reporter=html --reporter=text mocha",
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
  }