Skip to content

Conversation

@pyramation
Copy link
Contributor

@pyramation pyramation commented Dec 25, 2025

Summary

Upgrades inquirerer to 2.3.0 and create-gen-app to 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.0
  • packages/cli: inquirerer ^2.2.0 → ^2.3.0
  • pgpm/cli: inquirerer ^2.2.0 → ^2.3.0, create-gen-app ^0.6.0 → ^0.6.2
  • pgpm/core: create-gen-app ^0.6.0 → ^0.6.2

Output Simplification:
Replaced @pgpmjs/logger with plain process.stdout.write / process.stderr.write in scaffold and cache commands to keep testing cleaner:

  • pgpm/cli/src/commands/init/module.ts - simplified to plain stdout/stderr for init success/error messages
  • pgpm/cli/src/commands/cache.ts - simplified to plain stdout for cache clear message

This 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:

  • Checks for .motd file in the created folder - if found, prints its contents and deletes the file
  • If no .motd exists, prints default ASCII art:
                     |              _   _
         ===         |.===.        '\-//`
        (o o)        {}o o{}        (o o)
    ooO--(_)--Ooo-ooO--(_)--Ooo-ooO--(_)--Ooo-
    
  • Prints ✨ Enjoy! followed by cd ./<folder-name> to guide the user

For module init, the cd path is calculated based on context:

  • At workspace root: cd ./packages/<module-name>
  • In packages/ directory: cd ./<module-name>

Snapshot Update:
Updated packages/cli/__tests__/__snapshots__/cli.test.ts.snap to reflect inquirerer 2.3.0's new prompt format. The prompt changed from multi-line format to a more compact single-line format:

  • Old: autocompleteField?\nArgument --autocompleteField type [autocomplete]\n> Your input:\n$
  • New: autocompleteField? (--autocompleteField)\n>

Review & Testing Checklist for Human

  • Verify new inquirerer prompt format is acceptable - The prompt format changed significantly in 2.3.0 (see snapshot diff). Run any interactive CLI command and confirm the new compact prompt style is acceptable UX.
  • Verify ASCII art renders correctly - Run both pgpm init workspace and pgpm init (module) and confirm the ASCII art displays with proper spacing and alignment (especially the backslash characters `'-//``)
  • Test module init cd path - Verify cd instruction shows correct path when running from workspace root (packages/<name>) vs from packages/ directory (<name>)
  • Test .motd file support - Create a template with a .motd file and verify it gets printed and deleted (not left on disk)

Recommended test plan:

  1. Run pgpm init workspace - should show ASCII art, "✨ Enjoy!", and cd ./<workspace-name>
  2. Run pgpm init from workspace root - should show ASCII art and cd ./packages/<module-name>
  3. Run cd packages && pgpm init - should show ASCII art and cd ./<module-name>
  4. Run pgpm init outside a workspace - should show error message via stderr
  5. Run pgpm cache clean - should show "Cleared template cache for pgpm."
  6. Test any autocomplete/checkbox prompt to verify the new prompt format works correctly

Notes

Link to Devin run: https://app.devin.ai/sessions/0bd3a404994b4e93a87e76a3320690d2
Requested by: Dan Lynch (@pyramation)

- packages/csv-to-pg: inquirerer ^2.0.3 -> ^2.2.1
- packages/cli: inquirerer ^2.2.0 -> ^2.2.1
- pgpm/cli: inquirerer ^2.2.0 -> ^2.2.1, create-gen-app ^0.6.0 -> ^0.6.1
- pgpm/core: create-gen-app ^0.6.0 -> ^0.6.1

These updates include the keypress event duplication fix from
constructive-io/dev-utils#29 which prevents duplicate keypress behavior
when multiple Inquirerer instances share the same input stream.
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Replace @pgpmjs/logger usage with plain process.stdout.write and
process.stderr.write in the init/workspace, init/module, and cache
commands. This keeps testing cleaner by avoiding the Logger's colored
prefixes and formatting.

Files changed:
- pgpm/cli/src/commands/init/workspace.ts
- pgpm/cli/src/commands/init/module.ts
- pgpm/cli/src/commands/cache.ts
@devin-ai-integration devin-ai-integration bot changed the title chore: upgrade inquirerer to 2.2.1 and create-gen-app to 0.6.1 chore: upgrade inquirerer/create-gen-app and simplify scaffold output Dec 25, 2025
Remove the cache status and 'Workspace templates rendered' messages
entirely - they were too verbose and not useful to users.
…ding

After workspace scaffolding completes:
- Check for .motd file in the created folder
- If found, print its contents and delete the file
- If not found, print default ASCII art
- Print 'Enjoy!' message with cd command to the created folder
@devin-ai-integration devin-ai-integration bot changed the title chore: upgrade inquirerer/create-gen-app and simplify scaffold output chore: upgrade inquirerer/create-gen-app and add workspace init welcome message Dec 25, 2025
After module scaffolding completes:
- Check for .motd file in the created module folder
- If found, print its contents and delete the file
- If not found, print default ASCII art (same as workspace)
- Print 'Enjoy!' message with cd command to the created module folder
@devin-ai-integration devin-ai-integration bot changed the title chore: upgrade inquirerer/create-gen-app and add workspace init welcome message chore: upgrade inquirerer/create-gen-app and add init welcome messages Dec 25, 2025
The new inquirerer version changed the prompt format from:
  'autocompleteField?\nArgument --autocompleteField type [autocomplete]\n> Your input:\n$ '
to:
  'autocompleteField? (--autocompleteField)\n> '
@pyramation pyramation merged commit d46dc5e into main Dec 25, 2025
34 checks passed
@pyramation pyramation deleted the devin/1766637311-upgrade-inquirerer-create-gen-app branch December 25, 2025 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants