@jesscss/scss-parser 2.0.0-alpha.10 → 2.0.0-alpha.12

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.
@@ -0,0 +1,12 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_parse_with = require("./chunks/parse-with.cjs");
3
+ let src_grammar_ast_positions_js = require("./grammar/ast/positions.cjs");
4
+ //#region src/positions.ts
5
+ /** Parse SCSS into the canonical AST v2 document with line/column facts. */
6
+ function parse(input) {
7
+ return require_parse_with.parseWith(src_grammar_ast_positions_js.scssPositionsGrammar, input);
8
+ }
9
+ //#endregion
10
+ exports.ScssImportPostludeError = require_parse_with.ScssImportPostludeError;
11
+ exports.ScssParseError = require_parse_with.ScssParseError;
12
+ exports.parse = parse;
@@ -0,0 +1,9 @@
1
+ import { n as ScssImportPostludeError, r as ScssParseError, t as parseWith } from "./chunks/parse-with.js";
2
+ import { scssPositionsGrammar } from "./grammar/ast/positions.js";
3
+ //#region src/positions.ts
4
+ /** Parse SCSS into the canonical AST v2 document with line/column facts. */
5
+ function parse(input) {
6
+ return parseWith(scssPositionsGrammar, input);
7
+ }
8
+ //#endregion
9
+ export { ScssImportPostludeError, ScssParseError, parse };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Root-trivia label selection for the SCSS grammar.
3
+ *
4
+ * This is a plain fact about the grammar's trivia arm labels, so it lives in a
5
+ * leaf module with no imports. Reading it from the CST entry instead would make
6
+ * every consumer of the package entry load the compiled CST grammar tables:
7
+ * Node's ESM loader does not tree-shake, so an unused named import still
8
+ * executes the module it is taken from, and each table is multiple megabytes.
9
+ */
10
+ export declare const commentTriviaLabels: readonly ["comment"];
package/package.json CHANGED
@@ -4,9 +4,9 @@
4
4
  "access": "public"
5
5
  },
6
6
  "description": "",
7
- "version": "2.0.0-alpha.10",
7
+ "version": "2.0.0-alpha.12",
8
8
  "engines": {
9
- "node": "^20.19.0 || >=22.12.0"
9
+ "node": "^20.19.0 || >=22.18.0"
10
10
  },
11
11
  "main": "lib/index.cjs",
12
12
  "types": "lib/index.d.ts",
@@ -16,15 +16,45 @@
16
16
  "import": "./lib/index.js",
17
17
  "require": "./lib/index.cjs"
18
18
  },
19
+ "./positions": {
20
+ "types": "./lib/positions.d.ts",
21
+ "import": "./lib/positions.js",
22
+ "require": "./lib/positions.cjs"
23
+ },
19
24
  "./cst": {
20
25
  "types": "./lib/cst.d.ts",
21
26
  "import": "./lib/cst.js",
22
27
  "require": "./lib/cst.cjs"
23
28
  },
29
+ "./cst/positions": {
30
+ "types": "./lib/cst/positions.d.ts",
31
+ "import": "./lib/cst/positions.js",
32
+ "require": "./lib/cst/positions.cjs"
33
+ },
24
34
  "./grammar": {
25
- "types": "./lib/grammar.d.ts",
26
- "import": "./lib/grammar.js",
27
- "require": "./lib/grammar.cjs"
35
+ "types": "./lib/grammar/ast.d.ts",
36
+ "import": "./lib/grammar/ast.js",
37
+ "require": "./lib/grammar/ast.cjs"
38
+ },
39
+ "./grammar/ast": {
40
+ "types": "./lib/grammar/ast.d.ts",
41
+ "import": "./lib/grammar/ast.js",
42
+ "require": "./lib/grammar/ast.cjs"
43
+ },
44
+ "./grammar/ast/positions": {
45
+ "types": "./lib/grammar/ast/positions.d.ts",
46
+ "import": "./lib/grammar/ast/positions.js",
47
+ "require": "./lib/grammar/ast/positions.cjs"
48
+ },
49
+ "./grammar/cst": {
50
+ "types": "./lib/grammar/cst.d.ts",
51
+ "import": "./lib/grammar/cst.js",
52
+ "require": "./lib/grammar/cst.cjs"
53
+ },
54
+ "./grammar/cst/positions": {
55
+ "types": "./lib/grammar/cst/positions.d.ts",
56
+ "import": "./lib/grammar/cst/positions.js",
57
+ "require": "./lib/grammar/cst/positions.cjs"
28
58
  },
29
59
  "./package.json": "./package.json"
30
60
  },
@@ -32,11 +62,11 @@
32
62
  "lib"
33
63
  ],
34
64
  "dependencies": {
35
- "@jesscss/css-parser": "2.0.0-alpha.10"
65
+ "@jesscss/css-parser": "2.0.0-alpha.12"
36
66
  },
37
67
  "peerDependencies": {
38
- "parseman": "^0.41.0",
39
- "@jesscss/core": "2.0.0-alpha.10"
68
+ "parseman": "^0.50.1",
69
+ "@jesscss/core": "2.0.0-alpha.12"
40
70
  },
41
71
  "peerDependenciesMeta": {
42
72
  "@jesscss/core": {
@@ -44,10 +74,10 @@
44
74
  }
45
75
  },
46
76
  "devDependencies": {
47
- "parseman": "^0.41.0",
77
+ "parseman": "^0.50.1",
48
78
  "sass-spec": "github:sass/sass-spec",
49
- "@jesscss/parser-shared": "0.0.0",
50
- "@jesscss/core": "2.0.0-alpha.10"
79
+ "@jesscss/parser-shared": "2.0.0-alpha.12",
80
+ "@jesscss/core": "2.0.0-alpha.12"
51
81
  },
52
82
  "author": "Matthew Dean <matthew-dean@users.noreply.github.com>",
53
83
  "license": "MIT",
@@ -61,7 +91,7 @@
61
91
  "postinstall": "node ./scripts/materialize-sass-spec-cache.cjs",
62
92
  "ci": "pnpm build && pnpm test",
63
93
  "build": "pnpm --filter @jesscss/parser-shared build && pnpm compile",
64
- "compile": "tsdown --tsconfig tsconfig.build.json --no-dts && tsc -p tsconfig.build.json --emitDeclarationOnly --noCheck",
94
+ "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 --noCheck",
65
95
  "dev": "tsdown --tsconfig tsconfig.build.json --no-dts --watch",
66
96
  "sass-spec:cache": "node ./scripts/materialize-sass-spec-cache.cjs",
67
97
  "test": "vitest --run --passWithNoTests",
@@ -1,6 +0,0 @@
1
- import type { Stylesheet } from '@jesscss/core/ast';
2
- /**
3
- * Rewrite user-`@function` call sites in a parsed SCSS document to `$f(args)`
4
- * lambda invokes. Returns the document unchanged when it defines no user function.
5
- */
6
- export declare function lowerUserFunctionCalls(sheet: Stylesheet): Stylesheet;