Skip to content

fix(prompts): rename BASE_DETAILS prompt ID to JAVASCRIPT_BASE_DETAILS - #1531

Merged
travi merged 1 commit into
betafrom
fix/javascript-base-details-id-collision
Aug 16, 2026
Merged

fix(prompts): rename BASE_DETAILS prompt ID to JAVASCRIPT_BASE_DETAILS#1531
travi merged 1 commit into
betafrom
fix/javascript-base-details-id-collision

Conversation

@travi

Copy link
Copy Markdown
Member

Summary

@form8ion/project already uses the literal prompt ID BASE_DETAILS for its own base-details prompt. Any consumer composing this package's scaffolder with @form8ion/project's -- as @form8ion/eslint-config-extender does -- shares a single dependencies.prompt function across both:

  • one wrapper answers @form8ion/project's own prompts
  • another (baked into this package's plugin) answers this package's prompts and delegates the unforced remainder back to the same base dependencies.prompt

Both delegation paths land on the identical function, which then gets called twice with id === 'BASE_DETAILS' -- once for project's fields (name/description/visibility/license) and once for this package's remaining fields (author/scope/package-manager/dialect) -- with genuinely different questions payloads a caller can't distinguish by ID alone. Confirmed empirically:

project.promptConstants.ids.BASE_DETAILS// "BASE_DETAILS"javascript.promptConstants.ids.BASE_DETAILS// "BASE_DETAILS"

Change

@form8ion/project's BASE_DETAILS is the more foundational, language-agnostic prompt, used by every project type regardless of language. This package's own base-details prompt is javascript-specific, so it renames instead: BASE_DETAILS -> JAVASCRIPT_BASE_DETAILS. Same direction as the MONOREPO_DETAILS -> PACKAGE_DETAILS rename just made in @form8ion/add-package-to-monorepo for the same naming-specificity concern.

⚠️ Breaking change: the BASE_DETAILS prompt ID and matching questionNames group key are renamed to JAVASCRIPT_BASE_DETAILS. See the commit's BREAKING CHANGE footer.

Verification

  • npm run test:unit:base -- 110 files, 327 tests passing, 100% coverage
  • npm run test:integration:base -- 80 scenarios, 1050 steps passing
  • node example.js -- runs clean
  • npx eslint . -- clean
  • Verified via the real npm test pre-commit hook (husky), not bypassed

🤖 Generated with Claude Code

`@form8ion/project` already uses the literal prompt ID `BASE_DETAILS` for its
own base-details prompt. Any consumer composing this package's scaffolder
with `@form8ion/project`'s (as `@form8ion/eslint-config-extender` does)
shares a single `dependencies.prompt` function across both -- one wrapped to
answer `@form8ion/project`'s own prompts, another (baked into this package's
plugin) wrapped to answer this package's prompts and delegate the remainder
back to the same base `dependencies.prompt`. Both delegation paths land on
the identical function, which then gets called twice with
`id === 'BASE_DETAILS'` -- once for project's fields
(name/description/visibility/license) and once for this package's remaining
fields (author/scope/package-manager/dialect) -- with genuinely different
`questions` payloads a caller can't distinguish by ID alone.
`@form8ion/project`'s `BASE_DETAILS` is the more foundational,
language-agnostic prompt, used by every project type regardless of language.
This package's own base-details prompt is javascript-specific, so it renames instead:
`BASE_DETAILS` -> `JAVASCRIPT_BASE_DETAILS`, matching the same
direction as `MONOREPO_DETAILS` -> `PACKAGE_DETAILS` in
`@form8ion/add-package-to-monorepo` for the same naming-specificity concern.
BREAKING CHANGE: the `BASE_DETAILS` prompt ID (and matching `questionNames`
group key) is renamed to `JAVASCRIPT_BASE_DETAILS`. Callers providing a
`prompt` dependency that switches on `promptConstants.ids.BASE_DETAILS` need
to switch on `promptConstants.ids.JAVASCRIPT_BASE_DETAILS` instead, and read
question names from `promptConstants.questionNames.JAVASCRIPT_BASE_DETAILS`.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@codecov

codecovBot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (75cc215) to head (cb64f5f).

Additional details and impacted files

Impacted file tree graph

@@ Coverage Diff @@## beta #1531 +/- ##
=========================================
Coverage 100.00% 100.00% =========================================
Files 108 108 Lines 365 365 =========================================
Hits 365 365 
FlagCoverage Δ
unit100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing linesCoverage Δ
src/prompts/conditionals.js100.00% <100.00%> (ø)
src/prompts/question-names.js100.00% <ø> (ø)
src/prompts/questions.js100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@travi
travi merged commit 12dcd0f into betaAug 16, 2026
9 checks passed
@travi
travi deleted the fix/javascript-base-details-id-collision branch August 16, 2026 04:10
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 16.0.0-beta.22 🎉

The release is available on:

Your semantic-release bot 📦🚀

travi added a commit to form8ion/eslint-config-extender that referenced this pull request Aug 16, 2026
`@form8ion/javascript`@v16.0.0-beta.22 renamed its `BASE_DETAILS` prompt ID to
`JAVASCRIPT_BASE_DETAILS` (form8ion/javascript#1531), resolving the collision
with `@form8ion/project`'s own `BASE_DETAILS` ID this package's v16 migration
surfaced.
Update the internal `ids.BASE_DETAILS` reference in `javascript-answers-prompt.js`
accordingly, and switch the integration fixture and `example.js` back to
explicit per-prompt `case` handling now that the collision is gone -- the
flat question-name-matching workaround (`Object.fromEntries(questions.map(...))`)
is no longer needed.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
travi added a commit to form8ion/eslint-config-extender that referenced this pull request Aug 16, 2026
`@form8ion/javascript`@v16.0.0-beta.22 renamed its `BASE_DETAILS` prompt ID to
`JAVASCRIPT_BASE_DETAILS` (form8ion/javascript#1531), resolving the collision
with `@form8ion/project`'s own `BASE_DETAILS` ID this package's v16 migration
surfaced.
Update the internal `ids.BASE_DETAILS` reference in `javascript-answers-prompt.js`
accordingly, and switch the integration fixture and `example.js` back to
explicit per-prompt `case` handling now that the collision is gone -- the
flat question-name-matching workaround (`Object.fromEntries(questions.map(...))`)
is no longer needed.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@travi