@travetto/manifest 3.0.0-rc.5 → 3.0.0-rc.6

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/package.ts +5 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/manifest",
3
- "version": "3.0.0-rc.5",
3
+ "version": "3.0.0-rc.6",
4
4
  "description": "Manifest support",
5
5
  "keywords": [
6
6
  "path",
package/src/package.ts CHANGED
@@ -79,7 +79,10 @@ export class PackageUtil {
79
79
  /**
80
80
  * Read a package.json from a given folder
81
81
  */
82
- static readPackage(modulePath: string): Package {
82
+ static readPackage(modulePath: string, forceRead = false): Package {
83
+ if (forceRead) {
84
+ delete this.#cache[modulePath];
85
+ }
83
86
  return this.#cache[modulePath] ??= JSON.parse(readFileSync(
84
87
  modulePath.endsWith('.json') ? modulePath : path.resolve(modulePath, 'package.json'),
85
88
  'utf8'
@@ -175,7 +178,7 @@ export class PackageUtil {
175
178
  */
176
179
  static async syncVersions(folders: string[], versionMapping: Record<string, string> = {}): Promise<void> {
177
180
  const packages = folders.map(folder => {
178
- const pkg = this.readPackage(folder);
181
+ const pkg = this.readPackage(folder, true);
179
182
  versionMapping[pkg.name] = `^${pkg.version}`;
180
183
  return { folder, pkg };
181
184
  });