silgi 0.19.15 → 0.19.16

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.19.15";
1
+ const version = "0.19.16";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^3.0.0",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -726,10 +726,13 @@ async function silgiGenerateType(silgi) {
726
726
  );
727
727
  }
728
728
  const references = [];
729
- const pkg = await readPackageJSON(resolve(silgi.options.rootDir, "package.json"));
730
- if (pkg.name && silgi.options.preset === "npm-package") {
731
- references.push({ types: pkg.name });
732
- }
729
+ await Promise.all([...silgi.options.modules, ...silgi.options._modules].map(async (id) => {
730
+ if (typeof id !== "string") {
731
+ return;
732
+ }
733
+ const pkg = await readPackageJSON(id, { url: silgi.options.rootDir }).catch(() => null);
734
+ references.push({ types: pkg?.name || id });
735
+ }));
733
736
  const declarations = [];
734
737
  await silgi.callHook("prepare:types", { references, declarations, tsConfig });
735
738
  tsConfig.include = [...new Set(tsConfig.include.map((p) => isAbsolute(p) ? relativeWithDot(tsconfigDir, p) : p))];
@@ -1,4 +1,4 @@
1
- const version = "0.19.15";
1
+ const version = "0.19.16";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^3.0.0",
4
4
  "@nuxt/kit": "^3.15.3",
@@ -1,4 +1,4 @@
1
- const version = "0.19.15";
1
+ const version = "0.19.16";
2
2
  const peerDependencies = {
3
3
  "@fastify/deepmerge": "^3.0.0",
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.19.15",
4
+ "version": "0.19.16",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {