@jesscss/style-resolver 2.0.0-alpha.5 → 2.0.0-alpha.7

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/lib/index.cjs ADDED
@@ -0,0 +1,122 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region \0rolldown/runtime.js
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
13
+ get: ((k) => from[k]).bind(null, key),
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
20
+ value: mod,
21
+ enumerable: true
22
+ }) : target, mod));
23
+ //#endregion
24
+ let node_path = require("node:path");
25
+ node_path = __toESM(node_path);
26
+ //#region src/index.ts
27
+ function uniq(items) {
28
+ const out = [];
29
+ const seen = /* @__PURE__ */ new Set();
30
+ for (const it of items) {
31
+ if (seen.has(it)) continue;
32
+ seen.add(it);
33
+ out.push(it);
34
+ }
35
+ return out;
36
+ }
37
+ function stripQueryHash(input) {
38
+ const m = input.match(/^([^?#]+)([?#].*)?$/);
39
+ return {
40
+ filePart: m?.[1] ?? input,
41
+ suffix: m?.[2] ?? ""
42
+ };
43
+ }
44
+ function extractImports(sourceText, lang) {
45
+ const out = [];
46
+ const re = /@(import|use)\s*(?:\(([^)]*)\)\s*)*(?:url\(\s*)?(?:'([^']+)'|"([^"]+)")/g;
47
+ for (let m; m = re.exec(sourceText);) {
48
+ const optionsRaw = m[2] ?? "";
49
+ const options = optionsRaw ? optionsRaw.split(",").map((s) => s.trim()).filter(Boolean) : void 0;
50
+ const spec = m[3] ?? m[4] ?? "";
51
+ if (!spec) continue;
52
+ const startInMatch = m[3] != null ? m[0].indexOf(m[3]) : m[0].indexOf(m[4] ?? "");
53
+ const startOffset = m.index + startInMatch;
54
+ const endOffset = startOffset + spec.length;
55
+ out.push({
56
+ lang,
57
+ specifier: spec,
58
+ options,
59
+ specifierRange: {
60
+ startOffset,
61
+ endOffset
62
+ }
63
+ });
64
+ }
65
+ return out;
66
+ }
67
+ function expandLessImportCandidates(importPath) {
68
+ if (node_path.extname(importPath) !== ".less") return [`${importPath}.less`, `${importPath}`];
69
+ return [importPath];
70
+ }
71
+ function expandScssImportCandidates(importPath) {
72
+ const ext = node_path.extname(importPath);
73
+ const base = ext ? importPath.slice(0, -ext.length) : importPath;
74
+ const candidates = [];
75
+ const pushUnique = (p) => {
76
+ if (!candidates.includes(p)) candidates.push(p);
77
+ };
78
+ const withExt = (p) => p.endsWith(".scss") ? p : `${p}.scss`;
79
+ if (ext) {
80
+ pushUnique(importPath);
81
+ const dir = node_path.dirname(importPath);
82
+ const file = node_path.basename(importPath);
83
+ if (!file.startsWith("_")) pushUnique(node_path.join(dir, `_${file}`));
84
+ return candidates;
85
+ }
86
+ pushUnique(withExt(base));
87
+ pushUnique(withExt(node_path.join(node_path.dirname(base), `_${node_path.basename(base)}`)));
88
+ pushUnique(withExt(node_path.join(base, "index")));
89
+ pushUnique(withExt(node_path.join(base, "_index")));
90
+ return candidates;
91
+ }
92
+ function resolveImport(fs, opts) {
93
+ const specifier = opts.specifier.trim();
94
+ if (!specifier) return null;
95
+ if (/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//.test(specifier) || specifier.startsWith("data:")) return null;
96
+ const { filePart, suffix } = stripQueryHash(specifier);
97
+ const fromDir = node_path.dirname(opts.fromFilePath);
98
+ const cfg = opts.config ?? {};
99
+ const searchPaths = [fromDir];
100
+ if (opts.lang === "less" && Array.isArray(cfg.includePaths)) searchPaths.push(...cfg.includePaths);
101
+ if (opts.lang === "scss" && Array.isArray(cfg.loadPaths)) searchPaths.push(...cfg.loadPaths);
102
+ if (cfg.rootDir) searchPaths.push(cfg.rootDir);
103
+ const candidatesRel = opts.lang === "less" ? expandLessImportCandidates(filePart) : opts.lang === "scss" ? expandScssImportCandidates(filePart) : [filePart.endsWith(".css") ? filePart : `${filePart}.css`, filePart];
104
+ const candidatesAbs = [];
105
+ for (const baseDir of uniq(searchPaths)) for (const rel of candidatesRel) {
106
+ const abs = node_path.resolve(baseDir, rel);
107
+ candidatesAbs.push({
108
+ p: abs,
109
+ resolvedBy: baseDir === fromDir ? "exact" : "loadPath"
110
+ });
111
+ }
112
+ for (const c of candidatesAbs) if (fs.exists(c.p)) return {
113
+ filePath: c.p + suffix,
114
+ resolvedBy: c.resolvedBy
115
+ };
116
+ return null;
117
+ }
118
+ //#endregion
119
+ exports.expandLessImportCandidates = expandLessImportCandidates;
120
+ exports.expandScssImportCandidates = expandScssImportCandidates;
121
+ exports.extractImports = extractImports;
122
+ exports.resolveImport = resolveImport;
package/lib/index.js CHANGED
@@ -1,136 +1,95 @@
1
- import * as path from 'node:path';
1
+ import * as path from "node:path";
2
+ //#region src/index.ts
2
3
  function uniq(items) {
3
- const out = [];
4
- const seen = new Set();
5
- for (const it of items) {
6
- if (seen.has(it)) {
7
- continue;
8
- }
9
- seen.add(it);
10
- out.push(it);
11
- }
12
- return out;
4
+ const out = [];
5
+ const seen = /* @__PURE__ */ new Set();
6
+ for (const it of items) {
7
+ if (seen.has(it)) continue;
8
+ seen.add(it);
9
+ out.push(it);
10
+ }
11
+ return out;
13
12
  }
14
13
  function stripQueryHash(input) {
15
- const m = input.match(/^([^?#]+)([?#].*)?$/);
16
- return { filePart: m?.[1] ?? input, suffix: m?.[2] ?? '' };
14
+ const m = input.match(/^([^?#]+)([?#].*)?$/);
15
+ return {
16
+ filePart: m?.[1] ?? input,
17
+ suffix: m?.[2] ?? ""
18
+ };
17
19
  }
18
- // Intentionally tolerant extraction for editor features (not a full parser).
19
- // Supports:
20
- // - @import "x";
21
- // - @import (multiple, reference) "x";
22
- // - @use "x";
23
- // - @import url("x");
24
- export function extractImports(sourceText, lang) {
25
- const out = [];
26
- // options: (a, b) blocks (Less)
27
- // optional url(
28
- // then a quoted string
29
- const re = /@(import|use)\s*(?:\(([^)]*)\)\s*)*(?:url\(\s*)?(?:'([^']+)'|"([^"]+)")/g;
30
- for (let m; (m = re.exec(sourceText));) {
31
- const optionsRaw = m[2] ?? '';
32
- const options = optionsRaw
33
- ? optionsRaw.split(',').map(s => s.trim()).filter(Boolean)
34
- : undefined;
35
- const spec = m[3] ?? m[4] ?? '';
36
- if (!spec) {
37
- continue;
38
- }
39
- const startInMatch = m[3] != null ? m[0].indexOf(m[3]) : m[0].indexOf(m[4] ?? '');
40
- const startOffset = m.index + startInMatch;
41
- const endOffset = startOffset + spec.length;
42
- out.push({
43
- lang,
44
- specifier: spec,
45
- options,
46
- specifierRange: { startOffset, endOffset }
47
- });
48
- }
49
- return out;
20
+ function extractImports(sourceText, lang) {
21
+ const out = [];
22
+ const re = /@(import|use)\s*(?:\(([^)]*)\)\s*)*(?:url\(\s*)?(?:'([^']+)'|"([^"]+)")/g;
23
+ for (let m; m = re.exec(sourceText);) {
24
+ const optionsRaw = m[2] ?? "";
25
+ const options = optionsRaw ? optionsRaw.split(",").map((s) => s.trim()).filter(Boolean) : void 0;
26
+ const spec = m[3] ?? m[4] ?? "";
27
+ if (!spec) continue;
28
+ const startInMatch = m[3] != null ? m[0].indexOf(m[3]) : m[0].indexOf(m[4] ?? "");
29
+ const startOffset = m.index + startInMatch;
30
+ const endOffset = startOffset + spec.length;
31
+ out.push({
32
+ lang,
33
+ specifier: spec,
34
+ options,
35
+ specifierRange: {
36
+ startOffset,
37
+ endOffset
38
+ }
39
+ });
40
+ }
41
+ return out;
50
42
  }
51
- // Mirrors current plugin behavior:
52
- // - If ext is not .less: try `${importPath}.less`, then `${importPath}`.
53
- // - If ext is .less: try as-is.
54
- export function expandLessImportCandidates(importPath) {
55
- const ext = path.extname(importPath);
56
- if (ext !== '.less') {
57
- return [`${importPath}.less`, `${importPath}`];
58
- }
59
- return [importPath];
43
+ function expandLessImportCandidates(importPath) {
44
+ if (path.extname(importPath) !== ".less") return [`${importPath}.less`, `${importPath}`];
45
+ return [importPath];
60
46
  }
61
- // Mirrors current scss plugin behavior (no .sass support):
62
- // - If ext is provided:
63
- // - try explicit path
64
- // - also underscore partial variant if basename isn't already underscored
65
- // - Else try:
66
- // - foo.scss
67
- // - _foo.scss
68
- // - foo/index.scss
69
- // - foo/_index.scss
70
- export function expandScssImportCandidates(importPath) {
71
- const ext = path.extname(importPath);
72
- const base = ext ? importPath.slice(0, -ext.length) : importPath;
73
- const candidates = [];
74
- const pushUnique = (p) => {
75
- if (!candidates.includes(p)) {
76
- candidates.push(p);
77
- }
78
- };
79
- const withExt = (p) => (p.endsWith('.scss') ? p : `${p}.scss`);
80
- if (ext) {
81
- pushUnique(importPath);
82
- const dir = path.dirname(importPath);
83
- const file = path.basename(importPath);
84
- if (!file.startsWith('_')) {
85
- pushUnique(path.join(dir, `_${file}`));
86
- }
87
- return candidates;
88
- }
89
- pushUnique(withExt(base));
90
- pushUnique(withExt(path.join(path.dirname(base), `_${path.basename(base)}`)));
91
- pushUnique(withExt(path.join(base, 'index')));
92
- pushUnique(withExt(path.join(base, '_index')));
93
- return candidates;
47
+ function expandScssImportCandidates(importPath) {
48
+ const ext = path.extname(importPath);
49
+ const base = ext ? importPath.slice(0, -ext.length) : importPath;
50
+ const candidates = [];
51
+ const pushUnique = (p) => {
52
+ if (!candidates.includes(p)) candidates.push(p);
53
+ };
54
+ const withExt = (p) => p.endsWith(".scss") ? p : `${p}.scss`;
55
+ if (ext) {
56
+ pushUnique(importPath);
57
+ const dir = path.dirname(importPath);
58
+ const file = path.basename(importPath);
59
+ if (!file.startsWith("_")) pushUnique(path.join(dir, `_${file}`));
60
+ return candidates;
61
+ }
62
+ pushUnique(withExt(base));
63
+ pushUnique(withExt(path.join(path.dirname(base), `_${path.basename(base)}`)));
64
+ pushUnique(withExt(path.join(base, "index")));
65
+ pushUnique(withExt(path.join(base, "_index")));
66
+ return candidates;
94
67
  }
95
- export function resolveImport(fs, opts) {
96
- const specifier = opts.specifier.trim();
97
- if (!specifier) {
98
- return null;
99
- }
100
- // Don’t resolve URLs here.
101
- if (/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//.test(specifier) || specifier.startsWith('data:')) {
102
- return null;
103
- }
104
- const { filePart, suffix } = stripQueryHash(specifier);
105
- const fromDir = path.dirname(opts.fromFilePath);
106
- const cfg = opts.config ?? {};
107
- const searchPaths = [fromDir];
108
- if (opts.lang === 'less' && Array.isArray(cfg.includePaths)) {
109
- searchPaths.push(...cfg.includePaths);
110
- }
111
- if (opts.lang === 'scss' && Array.isArray(cfg.loadPaths)) {
112
- searchPaths.push(...cfg.loadPaths);
113
- }
114
- if (cfg.rootDir) {
115
- searchPaths.push(cfg.rootDir);
116
- }
117
- const candidatesRel = opts.lang === 'less'
118
- ? expandLessImportCandidates(filePart)
119
- : opts.lang === 'scss'
120
- ? expandScssImportCandidates(filePart)
121
- : [filePart.endsWith('.css') ? filePart : `${filePart}.css`, filePart];
122
- const candidatesAbs = [];
123
- for (const baseDir of uniq(searchPaths)) {
124
- for (const rel of candidatesRel) {
125
- const abs = path.resolve(baseDir, rel);
126
- candidatesAbs.push({ p: abs, resolvedBy: baseDir === fromDir ? 'exact' : 'loadPath' });
127
- }
128
- }
129
- for (const c of candidatesAbs) {
130
- if (fs.exists(c.p)) {
131
- return { filePath: c.p + suffix, resolvedBy: c.resolvedBy };
132
- }
133
- }
134
- return null;
68
+ function resolveImport(fs, opts) {
69
+ const specifier = opts.specifier.trim();
70
+ if (!specifier) return null;
71
+ if (/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//.test(specifier) || specifier.startsWith("data:")) return null;
72
+ const { filePart, suffix } = stripQueryHash(specifier);
73
+ const fromDir = path.dirname(opts.fromFilePath);
74
+ const cfg = opts.config ?? {};
75
+ const searchPaths = [fromDir];
76
+ if (opts.lang === "less" && Array.isArray(cfg.includePaths)) searchPaths.push(...cfg.includePaths);
77
+ if (opts.lang === "scss" && Array.isArray(cfg.loadPaths)) searchPaths.push(...cfg.loadPaths);
78
+ if (cfg.rootDir) searchPaths.push(cfg.rootDir);
79
+ const candidatesRel = opts.lang === "less" ? expandLessImportCandidates(filePart) : opts.lang === "scss" ? expandScssImportCandidates(filePart) : [filePart.endsWith(".css") ? filePart : `${filePart}.css`, filePart];
80
+ const candidatesAbs = [];
81
+ for (const baseDir of uniq(searchPaths)) for (const rel of candidatesRel) {
82
+ const abs = path.resolve(baseDir, rel);
83
+ candidatesAbs.push({
84
+ p: abs,
85
+ resolvedBy: baseDir === fromDir ? "exact" : "loadPath"
86
+ });
87
+ }
88
+ for (const c of candidatesAbs) if (fs.exists(c.p)) return {
89
+ filePath: c.p + suffix,
90
+ resolvedBy: c.resolvedBy
91
+ };
92
+ return null;
135
93
  }
136
- //# sourceMappingURL=index.js.map
94
+ //#endregion
95
+ export { expandLessImportCandidates, expandScssImportCandidates, extractImports, resolveImport };
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@jesscss/style-resolver",
3
- "version": "2.0.0-alpha.5",
3
+ "version": "2.0.0-alpha.7",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
7
  "type": "module",
8
- "main": "lib/index.js",
8
+ "main": "lib/index.cjs",
9
9
  "types": "lib/index.d.ts",
10
10
  "exports": {
11
11
  ".": {
12
- "import": "./lib/index.js",
13
12
  "types": "./lib/index.d.ts",
14
- "source": "./src/index.ts"
13
+ "import": "./lib/index.js",
14
+ "require": "./lib/index.cjs"
15
15
  }
16
16
  },
17
17
  "files": [
@@ -19,11 +19,12 @@
19
19
  ],
20
20
  "devDependencies": {
21
21
  "typescript": "~5.8.2",
22
- "vitest": "^3.2.4"
22
+ "vitest": "^4.1.0"
23
23
  },
24
+ "module": "lib/index.js",
24
25
  "scripts": {
25
26
  "build": "pnpm compile",
26
- "compile": "tsc -p tsconfig.build.json",
27
+ "compile": "tsdown --tsconfig tsconfig.build.json --no-dts && tsc -p tsconfig.build.json --emitDeclarationOnly --noCheck",
27
28
  "test": "vitest --watch=false",
28
29
  "lint": "eslint '**/*.{js,ts}'"
29
30
  }
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAoClC,SAAS,IAAI,CAAI,KAAU;IACzB,MAAM,GAAG,GAAQ,EAAE,CAAC;IACpB,MAAM,IAAI,GAAG,IAAI,GAAG,EAAK,CAAC;IAC1B,KAAK,MAAM,EAAE,IAAI,KAAK,EAAE,CAAC;QACvB,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;YACjB,SAAS;QACX,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACb,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,cAAc,CAAC,KAAa;IACnC,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC7C,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;AAC7D,CAAC;AAED,6EAA6E;AAC7E,YAAY;AACZ,iBAAiB;AACjB,uCAAuC;AACvC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