Skip to content

Add node exec directive #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions apps/cli/src/lib/ensure-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,10 @@ export async function isVersionUpToDate(
return true;
}
console.log(
`${yellow(
'Your version:',
red(`${packageName}@${packageVersion}`),
`is not up to date`
)}`
`${yellow('Your version:', red(`${packageName}@${packageVersion}`), `is not up to date`)}`
);
console.log(
`${yellow('Latest version:', red(`${packageName}@${latestVersion}...`))}`
);
return false;
console.log(`${yellow('Latest version:', red(`${packageName}@${latestVersion}...`))}`);
return true;
}

export async function ensureVersionIsUpToDate(
Expand All @@ -53,9 +47,7 @@ export async function ensureVersionIsUpToDate(
[
`\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\n`,
`${red(`ERROR:`)} Did not run command.\n\n`,
` - Rerun your command with the ${yellow(
'@latest'
)} tag to ensure correct output:\n\n\n`,
` - Rerun your command with the ${yellow('@latest')} tag to ensure correct output:\n\n\n`,
`\t${yellow(`npx ${packageName}@latest`)}\n`,
`\n\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n`,
].join(' ')
Expand Down
2 changes: 2 additions & 0 deletions apps/cli/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env node

import { cli } from './lib/cli';

cli();
Loading