-
Notifications
You must be signed in to change notification settings - Fork 34
feat: use oclif/core v4 #1614
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
feat: use oclif/core v4 #1614
Conversation
bin/run.js
Outdated
| const pjson = createRequire(import.meta.url)('../package.json'); | ||
| // Since the CLI is a single process, we can have a larger amount of max listeners since | ||
| // the process gets shut down. Don't set it to 0 (no limit) since we should still be aware | ||
| // of rouge event listeners |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // of rouge event listeners | |
| // of rogue event listeners |
src/hooks/incomplete.ts
Outdated
| import { type Hook } from '@oclif/core/hooks'; | ||
| import { toConfiguredId, toStandardizedId } from '@oclif/core/util/ids'; | ||
| import Interfaces from '@oclif/core/interfaces'; | ||
| import { loadHelpClass } from '@oclif/core/help'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the help barrel isn't small and has a lot of big imports...maybe dynamically load this inside if (argv.includes('--help') || argv.includes('-h')) {
src/hooks/pluginsPreinstall.ts
Outdated
|
|
||
| import { Hook, Errors } from '@oclif/core'; | ||
| import { type Hook } from '@oclif/core/hooks'; | ||
| import { handle } from '@oclif/core/handle'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe also only load this if needed inside the conditional instead of when the hook is instantiated?
src/hooks/prerun.ts
Outdated
|
|
||
| import { Hook, ux } from '@oclif/core'; | ||
| import { type Hook } from '@oclif/core/hooks'; | ||
| import ux from '@oclif/core/ux'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also maybe worth deferring to the conditional
package.json
Outdated
| "debug": "^4.3.4", | ||
| "strip-ansi": "^7.1.0" | ||
| "@salesforce/sf-plugins-core": "10.0.0", | ||
| "ansis": "^3.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it shipped, you can bump
package.json
Outdated
| "strip-ansi": "^7.1.0" | ||
| "@salesforce/sf-plugins-core": "10.0.0", | ||
| "ansis": "^3.2.0", | ||
| "debug": "^4.3.4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
debug-js/debug#926 you might want the latest of debug for a recent fix
| } | ||
|
|
||
| await main(); | ||
| const cli = await import('../dist/cli.js'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it faster to await import? in both these cases we're going to do it anyway so, if not faster, maybe we just use regular imports
|
QA with the entire CLI sf commands/commands --json Logger stuff 🕐 perf |
What does this PR do?
@oclif/coreto usePassing release: https://github.com/salesforcecli/cli/actions/runs/9372566389
What issues does this PR fix or reference?
@W-15932535@