mirror of
https://github.com/neynarxyz/create-farcaster-mini-app.git
synced 2025-11-16 08:08:56 -05:00
fix: support yarn and pnpm
This commit is contained in:
parent
be7d6b76ae
commit
54646a5035
15
bin/init.js
15
bin/init.js
@ -564,8 +564,8 @@ export async function init(
|
|||||||
packageJson.dependencies['next-auth'] = '^4.24.11';
|
packageJson.dependencies['next-auth'] = '^4.24.11';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add security overrides for vulnerable packages
|
// Add security overrides for vulnerable packages (compatible with npm, Yarn, and pnpm)
|
||||||
packageJson.overrides = {
|
const securityOverrides = {
|
||||||
"backslash": "0.2.0",
|
"backslash": "0.2.0",
|
||||||
"chalk-template": "1.1.0",
|
"chalk-template": "1.1.0",
|
||||||
"supports-hyperlinks": "4.1.0",
|
"supports-hyperlinks": "4.1.0",
|
||||||
@ -585,6 +585,17 @@ export async function init(
|
|||||||
"ansi-styles": "6.2.1"
|
"ansi-styles": "6.2.1"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// npm v8.3+ overrides
|
||||||
|
packageJson.overrides = securityOverrides;
|
||||||
|
|
||||||
|
// Yarn (v1 and Berry) resolutions
|
||||||
|
packageJson.resolutions = securityOverrides;
|
||||||
|
|
||||||
|
// pnpm overrides (namespaced)
|
||||||
|
packageJson.pnpm = {
|
||||||
|
overrides: securityOverrides
|
||||||
|
};
|
||||||
|
|
||||||
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
||||||
|
|
||||||
// Handle .env file
|
// Handle .env file
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@neynar/create-farcaster-mini-app",
|
"name": "@neynar/create-farcaster-mini-app",
|
||||||
"version": "1.8.8",
|
"version": "1.8.9",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"private": false,
|
"private": false,
|
||||||
"access": "public",
|
"access": "public",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user