create-nextblock 0.8.1 → 0.8.2
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/create-nextblock.js
CHANGED
|
@@ -1841,6 +1841,20 @@ async function transformPackageJson(projectDir) {
|
|
|
1841
1841
|
// Project-specific overrides (if any) win over the inherited defaults.
|
|
1842
1842
|
packageJson.overrides = { ...rootOverrides, ...(packageJson.overrides ?? {}) };
|
|
1843
1843
|
|
|
1844
|
+
// npm throws EOVERRIDE when a package is BOTH a direct dependency and has an override with a
|
|
1845
|
+
// different spec (e.g. dependencies.uuid ^11.0.4 vs overrides.uuid ^11.1.1). Align any such
|
|
1846
|
+
// direct (dev)dependency to the override value so they share the exact same spec — which is
|
|
1847
|
+
// also what lets the override dedupe that package's transitive copies.
|
|
1848
|
+
for (const [name, spec] of Object.entries(packageJson.overrides)) {
|
|
1849
|
+
if (typeof spec !== 'string') continue;
|
|
1850
|
+
if (packageJson.dependencies?.[name] !== undefined) {
|
|
1851
|
+
packageJson.dependencies[name] = spec;
|
|
1852
|
+
}
|
|
1853
|
+
if (packageJson.devDependencies?.[name] !== undefined) {
|
|
1854
|
+
packageJson.devDependencies[name] = spec;
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1844
1858
|
await fs.writeJSON(packageJsonPath, packageJson, { spaces: 2 });
|
|
1845
1859
|
}
|
|
1846
1860
|
|
package/package.json
CHANGED