Filter out astro from peerDependencies
in astro add
(#7620)
This commit is contained in:
parent
13b36d962a
commit
831dfd1516
2 changed files with 7 additions and 1 deletions
5
.changeset/rude-balloons-sniff.md
Normal file
5
.changeset/rude-balloons-sniff.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Filter out `astro` from integration peer dependencies when running `astro add`
|
|
@ -756,7 +756,8 @@ export async function validateIntegrations(integrations: string[]): Promise<Inte
|
|||
const meta = pkgJson['peerDependenciesMeta'] || {};
|
||||
for (const peer in pkgJson['peerDependencies']) {
|
||||
const optional = meta[peer]?.optional || false;
|
||||
if (!optional) {
|
||||
const isAstro = peer === 'astro';
|
||||
if (!optional && !isAstro) {
|
||||
dependencies.push([peer, pkgJson['peerDependencies'][peer]]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue