Skip to content

🎉 create-node-spark v2.6.1 —Bug fixed !

Latest

Choose a tag to compare

@talhabilal-dev talhabilal-dev released this 27 Oct 17:32
· 1 commit to main since this release

🐛 Bug Fixes & Reliability Improvements

Project Name Validation Consistency

  • Fixed inconsistencies between prompt and CLI flag validation for project names.
  • Both CLI and interactive prompts now consistently require lowercase letters, numbers, hyphens, and underscores only.
  • Updated cliArgs.ts validation to align with prompt rules—no more confusing validation errors between input methods!

Async File Operations

  • Added missing await keywords to all relevant writeFile operations:
    • setupMongoDb.ts: Database config file creation
    • setupSql.ts: MySQL config file creation
    • setupEnv.ts: Environment file creation (.env, env.config)
  • Ensures all files are fully written before proceeding, preventing race conditions and improving scaffolding reliability.

TypeScript Type Safety

  • Replaced all any types with a proper EnvironmentConfig interface for environment config files.
  • Added a comprehensive interface definition including all supported environment variables.
  • Generated TypeScript projects now benefit from:
    • Full type safety in environment configuration
    • Improved IDE autocomplete and compile-time error checks
  • Updates in both src/types/index.ts and src/tasks/setupEnv.ts.

Fastify Route Generation for PostgreSQL

  • Fixed an issue where PostgreSQL + Fastify projects generated Express-style routes.
  • Now generates Fastify plugin-based routes using correct async patterns and typings.
  • Added a framework parameter to setupPostgresPrisma so route generation matches the selected framework.
  • Fastify routes use the async plugin pattern (not Express Router).
  • Routes are registered in index.ts using fastify.register().
  • Updated: setupPostgresPrisma.ts, init.ts, and configureIndex.ts.

Silent Mode Implementation

  • Fixed --silent CLI flag to actually suppress all non-error output.
  • Introduced a global silent mode in logger utilities.
  • Added setSilentMode() to control logging behavior.
  • All loggers now respect silent mode—errors are always shown.
  • Improved CI/CD and automation compatibility with true silent execution.
  • Updated: logger.ts, bin/index.ts, commands/init.ts.

Thank you for your feedback and bug reports—your input helps us deliver a rock-solid project generator!

Full Changelog: v2.3.0...v2.6.1

Full Changelog: v2.3.0...v2.6.1