-
Notifications
You must be signed in to change notification settings - Fork 595
[BUG].ts #20748
Copy link
Copy link
Closed as not planned
Labels
T-bugType: Bug. Something is broken.Type: Bug. Something is broken.from-communityThis originated from the community :)This originated from the community :)
Metadata
Metadata
Assignees
Labels
T-bugType: Bug. Something is broken.Type: Bug. Something is broken.from-communityThis originated from the community :)This originated from the community :)
Type
Fields
Give feedbackNo fields configured for issues without a type.
What are you trying to do?
// Current (possible buggy) logic:
const requestedVersion = args.v || args.version || 'latest';
// Better logic:
import { getAvailableVersions } from './version-utils'; // assume this exists or add
async function installVersion(requested: string) {
const versions = await getAvailableVersionsFromNpm('@aztec/aztec-up'); // or git tags
let targetVersion: string;
if (requested === 'latest') {
targetVersion = versions[0]; // latest tag
} else if (versions.includes(requested)) {
targetVersion = requested;
} else {
// fallback or error
console.error(
Version ${requested} not found. Available: ${versions.slice(0,5).join(', ')}...);process.exit(1);
}
// Then proceed to yarn add @aztec/aztec-up@${targetVersion} or git checkout
await exec(
yarn global add @aztec/aztec-up@${targetVersion});}
Code Reference
typescript for bugs problems solve
Aztec Version
9,85
OS
No response
Browser (if relevant)
No response
Node Version
No response
Additional Context
No response