@jesscss/less-parser 2.0.0-alpha.11 → 2.0.0-alpha.13

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 (56) hide show
  1. package/README.md +55 -11
  2. package/lib/chunks/parse-with.cjs +172 -0
  3. package/lib/chunks/parse-with.js +161 -0
  4. package/lib/chunks/trivia-labels.cjs +18 -0
  5. package/lib/chunks/trivia-labels.js +13 -0
  6. package/lib/cst/positions.cjs +24 -0
  7. package/lib/cst/positions.d.ts +8 -0
  8. package/lib/cst/positions.d.ts.map +1 -0
  9. package/lib/cst/positions.js +21 -0
  10. package/lib/cst.cjs +11 -4
  11. package/lib/cst.d.ts +8 -2
  12. package/lib/cst.d.ts.map +1 -1
  13. package/lib/cst.js +10 -4
  14. package/lib/grammar/ast/positions.cjs +28802 -0
  15. package/lib/grammar/ast/positions.d.ts +3 -0
  16. package/lib/grammar/ast/positions.d.ts.map +1 -0
  17. package/lib/grammar/ast/positions.js +28801 -0
  18. package/lib/grammar/ast.cjs +29126 -0
  19. package/lib/grammar/ast.d.ts +11 -0
  20. package/lib/grammar/ast.d.ts.map +1 -0
  21. package/lib/grammar/ast.js +29125 -0
  22. package/lib/grammar/cst/positions.cjs +28802 -0
  23. package/lib/grammar/cst/positions.d.ts +3 -0
  24. package/lib/grammar/cst/positions.d.ts.map +1 -0
  25. package/lib/grammar/cst/positions.js +28801 -0
  26. package/lib/grammar/cst.cjs +29127 -0
  27. package/lib/grammar/cst.d.ts +3 -0
  28. package/lib/grammar/cst.d.ts.map +1 -0
  29. package/lib/grammar/cst.js +29126 -0
  30. package/lib/grammar-helpers.d.ts +478 -0
  31. package/lib/grammar-helpers.d.ts.map +1 -0
  32. package/lib/grammar.d.ts +4 -1
  33. package/lib/grammar.d.ts.map +1 -1
  34. package/lib/index.cjs +25 -63
  35. package/lib/index.d.ts +17 -9
  36. package/lib/index.d.ts.map +1 -1
  37. package/lib/index.js +18 -57
  38. package/lib/parse-error.cjs +160 -0
  39. package/lib/parse-error.d.ts +26 -0
  40. package/lib/parse-error.d.ts.map +1 -1
  41. package/lib/parse-error.js +152 -0
  42. package/lib/parse-state.d.ts +39 -0
  43. package/lib/parse-state.d.ts.map +1 -0
  44. package/lib/parse-with.d.ts +25 -0
  45. package/lib/parse-with.d.ts.map +1 -0
  46. package/lib/positions.cjs +24 -0
  47. package/lib/positions.d.ts +20 -0
  48. package/lib/positions.d.ts.map +1 -0
  49. package/lib/positions.js +14 -0
  50. package/lib/trivia-labels.d.ts +11 -0
  51. package/lib/trivia-labels.d.ts.map +1 -0
  52. package/package.json +42 -12
  53. package/lib/grammar.cjs +0 -5
  54. package/lib/grammar.js +0 -2
  55. package/lib/grammar2.cjs +0 -141792
  56. package/lib/grammar2.js +0 -141733
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "2.0.0-alpha.11",
7
+ "version": "2.0.0-alpha.13",
8
8
  "engines": {
9
9
  "node": "^20.19.0 || >=22.12.0"
10
10
  },
@@ -17,15 +17,45 @@
17
17
  "import": "./lib/index.js",
18
18
  "require": "./lib/index.cjs"
19
19
  },
20
+ "./positions": {
21
+ "types": "./lib/positions.d.ts",
22
+ "import": "./lib/positions.js",
23
+ "require": "./lib/positions.cjs"
24
+ },
20
25
  "./cst": {
21
26
  "types": "./lib/cst.d.ts",
22
27
  "import": "./lib/cst.js",
23
28
  "require": "./lib/cst.cjs"
24
29
  },
30
+ "./cst/positions": {
31
+ "types": "./lib/cst/positions.d.ts",
32
+ "import": "./lib/cst/positions.js",
33
+ "require": "./lib/cst/positions.cjs"
34
+ },
25
35
  "./grammar": {
26
- "types": "./lib/grammar.d.ts",
27
- "import": "./lib/grammar.js",
28
- "require": "./lib/grammar.cjs"
36
+ "types": "./lib/grammar/ast.d.ts",
37
+ "import": "./lib/grammar/ast.js",
38
+ "require": "./lib/grammar/ast.cjs"
39
+ },
40
+ "./grammar/ast": {
41
+ "types": "./lib/grammar/ast.d.ts",
42
+ "import": "./lib/grammar/ast.js",
43
+ "require": "./lib/grammar/ast.cjs"
44
+ },
45
+ "./grammar/ast/positions": {
46
+ "types": "./lib/grammar/ast/positions.d.ts",
47
+ "import": "./lib/grammar/ast/positions.js",
48
+ "require": "./lib/grammar/ast/positions.cjs"
49
+ },
50
+ "./grammar/cst": {
51
+ "types": "./lib/grammar/cst.d.ts",
52
+ "import": "./lib/grammar/cst.js",
53
+ "require": "./lib/grammar/cst.cjs"
54
+ },
55
+ "./grammar/cst/positions": {
56
+ "types": "./lib/grammar/cst/positions.d.ts",
57
+ "import": "./lib/grammar/cst/positions.js",
58
+ "require": "./lib/grammar/cst/positions.cjs"
29
59
  },
30
60
  "./package.json": "./package.json"
31
61
  },
@@ -34,11 +64,11 @@
34
64
  ],
35
65
  "dependencies": {
36
66
  "known-css-properties": "~0.37.0",
37
- "@jesscss/css-parser": "2.0.0-alpha.11"
67
+ "@jesscss/css-parser": "2.0.0-alpha.13"
38
68
  },
39
69
  "peerDependencies": {
40
- "parseman": "^0.41.0",
41
- "@jesscss/core": "2.0.0-alpha.11"
70
+ "parseman": "^0.50.5",
71
+ "@jesscss/core": "2.0.0-alpha.13"
42
72
  },
43
73
  "peerDependenciesMeta": {
44
74
  "@jesscss/core": {
@@ -48,12 +78,12 @@
48
78
  "devDependencies": {
49
79
  "@types/node": "^18.19.31",
50
80
  "less": "^4.6.3",
51
- "parseman": "^0.41.0",
81
+ "parseman": "^0.50.5",
52
82
  "postcss-less": "~6.0.0",
53
83
  "tsx": "~4.21.0",
54
- "@jesscss/core": "2.0.0-alpha.11",
55
- "@jesscss/shared": "2.0.0-alpha.1",
56
- "@jesscss/parser-shared": "0.0.0"
84
+ "@jesscss/core": "2.0.0-alpha.13",
85
+ "@jesscss/parser-shared": "2.0.0-alpha.13",
86
+ "@jesscss/shared": "2.0.0-alpha.1"
57
87
  },
58
88
  "author": "Matthew Dean <matthew-dean@users.noreply.github.com>",
59
89
  "license": "MIT",
@@ -65,7 +95,7 @@
65
95
  "scripts": {
66
96
  "ci": "pnpm build && pnpm test",
67
97
  "build": "pnpm --filter @jesscss/parser-shared build && pnpm compile",
68
- "compile": "tsdown --tsconfig tsconfig.build.json --no-dts && tsc -p tsconfig.build.json --emitDeclarationOnly --noCheck",
98
+ "compile": "node -e \"require('node:fs').rmSync('lib',{recursive:true,force:true})\" && tsdown --tsconfig tsconfig.build.json --no-dts && tsc -p tsconfig.build.json --emitDeclarationOnly",
69
99
  "dev": "tsdown --tsconfig tsconfig.build.json --watch",
70
100
  "test": "cross-env TEST=true vitest --watch=false",
71
101
  "test:coverage": "cross-env TEST=true vitest --coverage",
package/lib/grammar.cjs DELETED
@@ -1,5 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_grammar = require("./grammar2.cjs");
3
- exports.lessAstGrammar = require_grammar.lessAstGrammar;
4
- exports.lessCstGrammar = require_grammar.lessCstGrammar;
5
- exports.lessGrammar = require_grammar.lessGrammar;
package/lib/grammar.js DELETED
@@ -1,2 +0,0 @@
1
- import { n as lessCstGrammar, r as lessGrammar, t as lessAstGrammar } from "./grammar2.js";
2
- export { lessAstGrammar, lessCstGrammar, lessGrammar };