@fuzdev/gro 0.192.1 â 0.193.0
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/filer.d.ts.map +1 -1
- package/dist/filer.js +8 -6
- package/package.json +5 -5
- package/src/lib/filer.ts +7 -5
package/dist/filer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filer.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/filer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"filer.d.ts","sourceRoot":"../src/lib/","sources":["../src/lib/filer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,2BAA2B,CAAC;AAG1D,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAC,UAAU,EAAE,MAAM,EAAC,MAAM,0BAA0B,CAAC;AAGjE,OAAO,EACN,SAAS,EAET,KAAK,aAAa,EAClB,KAAK,eAAe,EAEpB,MAAM,gBAAgB,CAAC;AAOxB,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAI5C,MAAM,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;AAEhF,MAAM,WAAW,YAAY;IAC5B,SAAS,CAAC,EAAE,OAAO,SAAS,CAAC;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC,CAAC;IACtE,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IACjD,GAAG,CAAC,EAAE,MAAM,CAAC;CACb;AAED,qBAAa,KAAK;;IACjB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAG1B,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAa;gBAetC,OAAO,GAAE,YAA2B;IAUhD,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,SAAS,GAAI,IAAI,MAAM,KAAG,QAAQ,GAAG,SAAS,CAE5C;IAEF,aAAa,GAAI,IAAI,MAAM,KAAG,QAAQ,CAqBpC;IAEF,MAAM,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,IAAI;IAU1E;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAsDrB,KAAK,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC;IAmBzD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAiPtB;AAGD,eAAO,MAAM,iBAAiB,GAC7B,UAAU,QAAQ,EAClB,WAAW,CAAC,EAAE,EAAE,MAAM,KAAK,QAAQ,GAAG,SAAS,EAC/C,SAAS,UAAU,EACnB,UAAS,GAAG,CAAC,MAAM,CAAa,EAChC,WAAU,GAAG,CAAC,MAAM,CAAa,EACjC,MAAM,MAAM,KACV,GAAG,CAAC,MAAM,CAuBZ,CAAC"}
|
package/dist/filer.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { EMPTY_OBJECT } from '@fuzdev/fuz_util/object.js';
|
|
2
2
|
import { readFile, stat } from 'node:fs/promises';
|
|
3
3
|
import { dirname, resolve } from 'node:path';
|
|
4
|
-
import { isBuiltin } from 'node:module';
|
|
5
4
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
6
5
|
import { UnreachableError } from '@fuzdev/fuz_util/error.js';
|
|
7
6
|
import { hash_secure } from '@fuzdev/fuz_util/hash.js';
|
|
@@ -227,23 +226,26 @@ export class Filer {
|
|
|
227
226
|
continue;
|
|
228
227
|
const path = map_sveltekit_aliases(specifier, aliases);
|
|
229
228
|
let path_id;
|
|
230
|
-
// TODO
|
|
229
|
+
// TODO replace `resolve_specifier` with `import.meta.resolve` for local specifiers too
|
|
230
|
+
// once we move to explicit extensions (Deno-compatible) - the .jsâ.ts Vite convention
|
|
231
|
+
// is the only reason resolve_specifier is still needed here
|
|
231
232
|
if (path[0] === '.' || path[0] === '/') {
|
|
232
233
|
const resolved = await resolve_specifier(path, dir); // eslint-disable-line no-await-in-loop
|
|
233
234
|
path_id = resolved.path_id;
|
|
234
235
|
}
|
|
235
236
|
else {
|
|
236
|
-
if (isBuiltin(path))
|
|
237
|
-
continue;
|
|
238
237
|
const file_url = pathToFileURL(file.id);
|
|
238
|
+
let resolved_url;
|
|
239
239
|
try {
|
|
240
|
-
|
|
240
|
+
resolved_url = import.meta.resolve(path, file_url.href);
|
|
241
241
|
}
|
|
242
242
|
catch (error) {
|
|
243
|
-
// if resolving fails for any reason, just log and ignore it
|
|
244
243
|
this.#log?.error('[filer] failed to resolve path', path, file_url.href, error);
|
|
245
244
|
continue;
|
|
246
245
|
}
|
|
246
|
+
if (!resolved_url.startsWith('file:'))
|
|
247
|
+
continue; // skip node:, npm:, https:, jsr:, etc.
|
|
248
|
+
path_id = fileURLToPath(resolved_url);
|
|
247
249
|
}
|
|
248
250
|
dependencies_removed.delete(path_id);
|
|
249
251
|
if (!dependencies_before.has(path_id)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fuzdev/gro",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.193.0",
|
|
4
4
|
"description": "task runner and toolkit extending SvelteKit",
|
|
5
5
|
"motto": "generate, run, optimize",
|
|
6
6
|
"glyph": "ð°",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"zod": "^4.3.6"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"@fuzdev/fuz_util": ">=0.
|
|
62
|
+
"@fuzdev/fuz_util": ">=0.50.1",
|
|
63
63
|
"@sveltejs/kit": "^2",
|
|
64
64
|
"esbuild": "^0.27.0",
|
|
65
65
|
"svelte": "^5",
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@changesets/changelog-git": "^0.2.1",
|
|
82
82
|
"@changesets/types": "^6.1.0",
|
|
83
|
-
"@fuzdev/fuz_code": "^0.
|
|
84
|
-
"@fuzdev/fuz_css": "^0.
|
|
85
|
-
"@fuzdev/fuz_ui": "^0.
|
|
83
|
+
"@fuzdev/fuz_code": "^0.45.0",
|
|
84
|
+
"@fuzdev/fuz_css": "^0.50.0",
|
|
85
|
+
"@fuzdev/fuz_ui": "^0.183.1",
|
|
86
86
|
"@fuzdev/fuz_util": "^0.50.1",
|
|
87
87
|
"@jridgewell/trace-mapping": "^0.3.31",
|
|
88
88
|
"@ryanatkn/eslint-config": "^0.9.0",
|
package/src/lib/filer.ts
CHANGED
|
@@ -2,7 +2,6 @@ import {EMPTY_OBJECT} from '@fuzdev/fuz_util/object.js';
|
|
|
2
2
|
import {readFile, stat} from 'node:fs/promises';
|
|
3
3
|
import {dirname, resolve} from 'node:path';
|
|
4
4
|
import type {OmitStrict} from '@fuzdev/fuz_util/types.js';
|
|
5
|
-
import {isBuiltin} from 'node:module';
|
|
6
5
|
import {fileURLToPath, pathToFileURL} from 'node:url';
|
|
7
6
|
import {UnreachableError} from '@fuzdev/fuz_util/error.js';
|
|
8
7
|
import type {Logger} from '@fuzdev/fuz_util/log.js';
|
|
@@ -276,20 +275,23 @@ export class Filer {
|
|
|
276
275
|
const path = map_sveltekit_aliases(specifier, aliases);
|
|
277
276
|
|
|
278
277
|
let path_id;
|
|
279
|
-
// TODO
|
|
278
|
+
// TODO replace `resolve_specifier` with `import.meta.resolve` for local specifiers too
|
|
279
|
+
// once we move to explicit extensions (Deno-compatible) - the .jsâ.ts Vite convention
|
|
280
|
+
// is the only reason resolve_specifier is still needed here
|
|
280
281
|
if (path[0] === '.' || path[0] === '/') {
|
|
281
282
|
const resolved = await resolve_specifier(path, dir); // eslint-disable-line no-await-in-loop
|
|
282
283
|
path_id = resolved.path_id;
|
|
283
284
|
} else {
|
|
284
|
-
if (isBuiltin(path)) continue;
|
|
285
285
|
const file_url = pathToFileURL(file.id);
|
|
286
|
+
let resolved_url;
|
|
286
287
|
try {
|
|
287
|
-
|
|
288
|
+
resolved_url = import.meta.resolve(path, file_url.href);
|
|
288
289
|
} catch (error) {
|
|
289
|
-
// if resolving fails for any reason, just log and ignore it
|
|
290
290
|
this.#log?.error('[filer] failed to resolve path', path, file_url.href, error);
|
|
291
291
|
continue;
|
|
292
292
|
}
|
|
293
|
+
if (!resolved_url.startsWith('file:')) continue; // skip node:, npm:, https:, jsr:, etc.
|
|
294
|
+
path_id = fileURLToPath(resolved_url);
|
|
293
295
|
}
|
|
294
296
|
dependencies_removed.delete(path_id);
|
|
295
297
|
if (!dependencies_before.has(path_id)) {
|