chore: upgrade inquirerer/create-gen-app and add init welcome messages #474
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades
inquirererto 2.3.0 andcreate-gen-appto 0.6.2 across all packages that use them. These updates include the keypress event duplication fix from constructive-io/dev-utils#29.Dependency Changes:
packages/csv-to-pg: inquirerer ^2.0.3 → ^2.3.0packages/cli: inquirerer ^2.2.0 → ^2.3.0pgpm/cli: inquirerer ^2.2.0 → ^2.3.0, create-gen-app ^0.6.0 → ^0.6.2pgpm/core: create-gen-app ^0.6.0 → ^0.6.2Output Simplification:
Replaced
@pgpmjs/loggerwith plainprocess.stdout.write/process.stderr.writein scaffold and cache commands to keep testing cleaner:pgpm/cli/src/commands/init/module.ts- simplified to plain stdout/stderr for init success/error messagespgpm/cli/src/commands/cache.ts- simplified to plain stdout for cache clear messageThis removes the
[scope] SUCCESS:/[scope] ERROR:prefixes and ANSI color codes from these commands.Init Welcome Messages (Workspace & Module):
After scaffolding completes, both workspace and module init now display a friendly welcome message:
.motdfile in the created folder - if found, prints its contents and deletes the file.motdexists, prints default ASCII art:✨ Enjoy!followed bycd ./<folder-name>to guide the userFor module init, the cd path is calculated based on context:
cd ./packages/<module-name>cd ./<module-name>Snapshot Update:
Updated
packages/cli/__tests__/__snapshots__/cli.test.ts.snapto reflect inquirerer 2.3.0's new prompt format. The prompt changed from multi-line format to a more compact single-line format:autocompleteField?\nArgument --autocompleteField type [autocomplete]\n> Your input:\n$autocompleteField? (--autocompleteField)\n>Review & Testing Checklist for Human
pgpm init workspaceandpgpm init(module) and confirm the ASCII art displays with proper spacing and alignment (especially the backslash characters `'-//``)cdinstruction shows correct path when running from workspace root (packages/<name>) vs frompackages/directory (<name>).motdfile and verify it gets printed and deleted (not left on disk)Recommended test plan:
pgpm init workspace- should show ASCII art, "✨ Enjoy!", andcd ./<workspace-name>pgpm initfrom workspace root - should show ASCII art andcd ./packages/<module-name>cd packages && pgpm init- should show ASCII art andcd ./<module-name>pgpm initoutside a workspace - should show error message via stderrpgpm cache clean- should show "Cleared template cache for pgpm."Notes
Link to Devin run: https://app.devin.ai/sessions/0bd3a404994b4e93a87e76a3320690d2
Requested by: Dan Lynch (@pyramation)