silgi 0.17.9 → 0.18.1

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.
@@ -1,4 +1,4 @@
1
- const version = "0.17.9";
1
+ const version = "0.18.1";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^2.0.2",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -110,7 +110,7 @@ async function prepareBuild(silgi) {
110
110
  // @ts-nocheck
111
111
  // This file is auto-generated at build time by Silgi
112
112
  // Contains route rules with preserved functions
113
- // Generated: ${(/* @__PURE__ */ new Date()).toISOString()}
113
+ // DO NOT MODIFY THIS FILE DIRECTLY
114
114
 
115
115
  export const routeRules = ${serialized}
116
116
  `;
@@ -401,13 +401,14 @@ async function _resolveSilgiModule(silgiModule, silgi) {
401
401
  silgiModule = resolve(silgi.options.rootDir, silgiModule);
402
402
  }
403
403
  try {
404
+ console.log(silgi.options.conditions);
404
405
  const src = resolveModuleURL(silgiModule, {
405
406
  from: silgi.options.modulesDir.map((m) => directoryToURL(m.replace(/\/node_modules\/?$/, "/"))),
406
407
  suffixes: ["silgi", "silgi/index", "module", "module/index", "", "index"],
407
- extensions: [".js", ".mjs", ".cjs", ".ts", ".mts", ".cts"],
408
- conditions: silgi.options.conditions
408
+ extensions: [".js", ".mjs", ".cjs", ".ts", ".mts", ".cts"]
409
+ // Maybe add https://github.com/unjs/exsolve/blob/dfff3e9bbc4a3a173a2d56b9b9ff731ab15598be/src/resolve.ts#L7
410
+ // conditions: silgi.options.conditions,
409
411
  });
410
- console.log("src:", src);
411
412
  resolvedModulePath = fileURLToPath(src);
412
413
  const resolvedSilgiModule = await jiti.import(src, { default: true });
413
414
  if (typeof resolvedSilgiModule !== "function") {
@@ -299,6 +299,7 @@ async function isDirectory(path) {
299
299
  return (await promises.lstat(path)).isDirectory();
300
300
  }
301
301
  function resolveAlias(path, alias) {
302
+ alias ||= tryUseSilgiCLI()?.options.alias || {};
302
303
  return resolveAlias$1(path, alias || {});
303
304
  }
304
305
  function createResolver(base) {
@@ -1,4 +1,4 @@
1
- const version = "0.17.9";
1
+ const version = "0.18.1";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^2.0.2",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -1,4 +1,4 @@
1
- const version = "0.17.9";
1
+ const version = "0.18.1";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^2.0.2",
4
4
  "@nuxt/kit": "^3.15.3",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.17.9",
4
+ "version": "0.18.1",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {