@knighted/css 1.0.0-rc.14 → 1.0.0-rc.15
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/dist/cjs/moduleGraph.cjs +5 -4
- package/dist/moduleGraph.js +5 -4
- package/package.json +1 -1
package/dist/cjs/moduleGraph.cjs
CHANGED
|
@@ -197,7 +197,10 @@ function normalizeSpecifier(raw) {
|
|
|
197
197
|
if (!trimmed || trimmed.startsWith('\0')) {
|
|
198
198
|
return '';
|
|
199
199
|
}
|
|
200
|
-
const
|
|
200
|
+
const querySearchOffset = trimmed.startsWith('#') ? 1 : 0;
|
|
201
|
+
const remainder = trimmed.slice(querySearchOffset);
|
|
202
|
+
const queryMatchIndex = remainder.search(/[?#]/);
|
|
203
|
+
const queryIndex = queryMatchIndex === -1 ? -1 : querySearchOffset + queryMatchIndex;
|
|
201
204
|
const withoutQuery = queryIndex === -1 ? trimmed : trimmed.slice(0, queryIndex);
|
|
202
205
|
if (!withoutQuery) {
|
|
203
206
|
return '';
|
|
@@ -303,9 +306,7 @@ function createResolverFactory(cwd, extensions, scriptExtensions, graphOptions)
|
|
|
303
306
|
options.extensionAlias = extensionAlias;
|
|
304
307
|
}
|
|
305
308
|
const tsconfigOption = resolveResolverTsconfig(graphOptions?.tsConfig, cwd);
|
|
306
|
-
|
|
307
|
-
options.tsconfig = tsconfigOption;
|
|
308
|
-
}
|
|
309
|
+
options.tsconfig = tsconfigOption ?? 'auto';
|
|
309
310
|
return new oxc_resolver_1.ResolverFactory(options);
|
|
310
311
|
}
|
|
311
312
|
function buildExtensionAlias(scriptExtensions) {
|
package/dist/moduleGraph.js
CHANGED
|
@@ -191,7 +191,10 @@ function normalizeSpecifier(raw) {
|
|
|
191
191
|
if (!trimmed || trimmed.startsWith('\0')) {
|
|
192
192
|
return '';
|
|
193
193
|
}
|
|
194
|
-
const
|
|
194
|
+
const querySearchOffset = trimmed.startsWith('#') ? 1 : 0;
|
|
195
|
+
const remainder = trimmed.slice(querySearchOffset);
|
|
196
|
+
const queryMatchIndex = remainder.search(/[?#]/);
|
|
197
|
+
const queryIndex = queryMatchIndex === -1 ? -1 : querySearchOffset + queryMatchIndex;
|
|
195
198
|
const withoutQuery = queryIndex === -1 ? trimmed : trimmed.slice(0, queryIndex);
|
|
196
199
|
if (!withoutQuery) {
|
|
197
200
|
return '';
|
|
@@ -297,9 +300,7 @@ function createResolverFactory(cwd, extensions, scriptExtensions, graphOptions)
|
|
|
297
300
|
options.extensionAlias = extensionAlias;
|
|
298
301
|
}
|
|
299
302
|
const tsconfigOption = resolveResolverTsconfig(graphOptions?.tsConfig, cwd);
|
|
300
|
-
|
|
301
|
-
options.tsconfig = tsconfigOption;
|
|
302
|
-
}
|
|
303
|
+
options.tsconfig = tsconfigOption ?? 'auto';
|
|
303
304
|
return new ResolverFactory(options);
|
|
304
305
|
}
|
|
305
306
|
function buildExtensionAlias(scriptExtensions) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knighted/css",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.15",
|
|
4
4
|
"description": "A build-time utility that traverses JavaScript/TypeScript module dependency graphs to extract, compile, and optimize all imported CSS into a single, in-memory string.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/css.js",
|