@travetto/manifest 3.0.0-rc.12 → 3.0.0-rc.13

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/bin/context.js CHANGED
@@ -106,7 +106,7 @@ export async function getManifestContext(folder) {
106
106
 
107
107
  const res = {
108
108
  moduleType,
109
- mainModule,
109
+ mainModule: mainModule ?? 'untitled', // When root package.json is missing a name
110
110
  mainFolder,
111
111
  workspacePath,
112
112
  monoRepo,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/manifest",
3
- "version": "3.0.0-rc.12",
3
+ "version": "3.0.0-rc.13",
4
4
  "description": "Manifest support",
5
5
  "keywords": [
6
6
  "path",
package/src/package.ts CHANGED
@@ -91,10 +91,14 @@ export class PackageUtil {
91
91
  if (forceRead) {
92
92
  delete this.#cache[modulePath];
93
93
  }
94
- return this.#cache[modulePath] ??= JSON.parse(readFileSync(
94
+ const res = this.#cache[modulePath] ??= JSON.parse(readFileSync(
95
95
  modulePath.endsWith('.json') ? modulePath : path.resolve(modulePath, 'package.json'),
96
96
  'utf8'
97
97
  ));
98
+
99
+ res.name ??= 'untitled'; // If a package.json (root-only) is missing a name, allows for npx execution
100
+
101
+ return res;
98
102
  }
99
103
 
100
104
  /**