|
@@ -9,21 +9,13 @@ import {
|
|
|
import { VersionWithoutPatch } from './versionCore';
|
|
import { VersionWithoutPatch } from './versionCore';
|
|
|
|
|
|
|
|
export async function patchSolanaDependencies(
|
|
export async function patchSolanaDependencies(
|
|
|
- ctx: Pick<
|
|
|
|
|
- RenderContext,
|
|
|
|
|
- 'solanaVersion' | 'targetDirectory' | 'programFramework'
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ ctx: Pick<RenderContext, 'solanaVersion' | 'targetDirectory'>
|
|
|
): Promise<void> {
|
|
): Promise<void> {
|
|
|
const patchMap: Record<VersionWithoutPatch, string[]> = {
|
|
const patchMap: Record<VersionWithoutPatch, string[]> = {
|
|
|
'1.17': ['-p ahash@0.8.12 --precise 0.8.6'],
|
|
'1.17': ['-p ahash@0.8.12 --precise 0.8.6'],
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const patches = patchMap[ctx.solanaVersion.withoutPatch] ?? [];
|
|
const patches = patchMap[ctx.solanaVersion.withoutPatch] ?? [];
|
|
|
-
|
|
|
|
|
- if (ctx.programFramework === 'anchor') {
|
|
|
|
|
- patches.push('-p base64ct@1.8.0 --precise 1.7.3');
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
await Promise.all(
|
|
await Promise.all(
|
|
|
patches.map(async (patch) =>
|
|
patches.map(async (patch) =>
|
|
|
waitForCommand(
|
|
waitForCommand(
|