Fix astro add
adding lines from extended configurations (#5095)
This commit is contained in:
parent
0173c2b2df
commit
ddfbef5acb
4 changed files with 14 additions and 1 deletions
5
.changeset/gorgeous-baboons-sleep.md
Normal file
5
.changeset/gorgeous-baboons-sleep.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fix `astro add` trying to add lines from extended configurations when adding frameworks
|
5
.changeset/neat-phones-sin.md
Normal file
5
.changeset/neat-phones-sin.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@astrojs/react': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Add `@types/` packages as peerDependencies
|
|
@ -56,6 +56,7 @@ export function loadTSConfig(cwd: string | undefined, resolve = true): tsr.TsCon
|
||||||
let config = tsr.tsconfigResolverSync({
|
let config = tsr.tsconfigResolverSync({
|
||||||
cwd,
|
cwd,
|
||||||
filePath: resolve ? undefined : cwd,
|
filePath: resolve ? undefined : cwd,
|
||||||
|
ignoreExtends: !resolve,
|
||||||
});
|
});
|
||||||
|
|
||||||
// When a direct filepath is provided to `tsconfigResolver`, it'll instead return invalid-config even when
|
// When a direct filepath is provided to `tsconfigResolver`, it'll instead return invalid-config even when
|
||||||
|
@ -70,6 +71,7 @@ export function loadTSConfig(cwd: string | undefined, resolve = true): tsr.TsCon
|
||||||
cwd,
|
cwd,
|
||||||
filePath: resolve ? undefined : cwd,
|
filePath: resolve ? undefined : cwd,
|
||||||
searchName: 'jsconfig.json',
|
searchName: 'jsconfig.json',
|
||||||
|
ignoreExtends: !resolve,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
|
|
@ -48,7 +48,8 @@
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": "^17.0.2 || ^18.0.0",
|
"react": "^17.0.2 || ^18.0.0",
|
||||||
"react-dom": "^17.0.2 || ^18.0.0",
|
"react-dom": "^17.0.2 || ^18.0.0",
|
||||||
"@types/react": "^17.0.50 || ^18.0.21"
|
"@types/react": "^17.0.50 || ^18.0.21",
|
||||||
|
"@types/react-dom": "^17.0.17 || ^18.0.6"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^14.18.0 || >=16.12.0"
|
"node": "^14.18.0 || >=16.12.0"
|
||||||
|
|
Loading…
Add table
Reference in a new issue