Skip to content

[SCAL-338917] chore: rename @version placeholder <TBD> to %NEXT_SDK_VERSION% - #751

Merged
jitendra-bhati-ts merged 2 commits into
mainfrom
SCAL-338917-unique-version-placeholder
Nov 16, 2026
Merged

jitendra-bhati-ts merged 2 commits into
mainfrom
SCAL-338917-unique-version-placeholder

Conversation

@jitendra-bhati-ts

@jitendra-bhati-ts jitendra-bhati-ts commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Jira: SCAL-338917

Follow-up to #676

The problem

The release bump replaces the @version placeholder with the version being cut. That placeholder was <TBD>, matched case-insensitively. <TBD> is a word people write on their own ("not decided yet"), so a tag like @version SDK: <TBD> could get stamped with the next release even when the author never meant it to be resolved.

The fix

The placeholder is now %NEXT_SDK_VERSION%, matched exactly and case-sensitively:

/**
 * @version SDK: %NEXT_SDK_VERSION% | ThoughtSpot Cloud: 26.10.0.cl
 */

It's defined once (PLACEHOLDER_TOKEN in scripts/resolve-version-placeholders.js), and the replace pattern, the format check and every message are built from it. Near misses such as %next_sdk_version% or a missing % fail as malformed instead of being rewritten.

A leftover <TBD> anywhere on a @version line is now its own blocking problem (LEGACY_PLACEHOLDER) in lint, resolve and publish, with a hint that says what to write instead:

↳ the <TBD> placeholder was renamed — write %NEXT_SDK_VERSION% for the SDK version, and a real ThoughtSpot release (or '*') for the ThoughtSpot half

The release rewrite never touches a <TBD>.

Publish is blocked while a placeholder is unresolved

publishToNPM now runs npm run check-versions as its own step, before npm publish. If a PR with %NEXT_SDK_VERSION% merges after the release bump, the publish fails at that step, naming the file and line and saying to re-run bump-version-and-pr. The same check already ran inside npm publish via prepublishOnly; this makes it a visible step instead of a line in the publish log. Pre-releases still only warn about a pending SDK placeholder.

Notes for review

  • One src change. [SCAL-351825] Add isProgrammaticFilterParameterUpdateEnabled flag #746 merged a new @version SDK: <TBD> (src/types.ts, isProgrammaticFilterParameterUpdateEnabled) after this branch was cut, and the new check failed it on this PR. It's migrated to %NEXT_SDK_VERSION%. Everything older was already resolved by the v1.54.1 release.
  • No transition period. Old <TBD> tags fail rather than being accepted alongside the new token, because accepting both keeps the ambiguity this removes. Open PRs [SCAL-349233] Add DataAppEmbed and enableDataApps #734 and SCAL-349735: Ability to load a specific conversation #739 still use <TBD> and will need to rename it.
  • Kept a rule that a plain swap would have lost. SCAL-338917 chore: resolve @version SDK placeholders automatically at release time #676 always blocked <TBD> on the ThoughtSpot side. With the token changed, SDK: 1.54.0 | ThoughtSpot: <TBD> would have started passing, so the legacy check covers both sides.
  • Plain string matching. The placeholder is found with includes and resolved with replaceAll, so there's no global-RegExp lastIndex state to reset. The token is escaped in the one pattern that still needs it, the SDK format check.
  • Renamed TBD_THOUGHTSPOT to PLACEHOLDER_THOUGHTSPOT (internal to the script).
  • Docs. Contributing.md, CLAUDE.md and the comments in bumpVersion.yml / pr-checks.yml now use the new token.
  • Tests. 65 script tests (was 53). New ones cover repeat checks of the same line, the exact match, lowercase and missing-% spellings, <TBD> on either side, the rename hint in --lint output, and resolve leaving a <TBD> file untouched.

@jitendra-bhati-ts
jitendra-bhati-ts requested a review from a team as a code owner November 16, 2026 08:38

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request renames the version placeholder from <TBD> to %NEXT_SDK_VERSION% across documentation, scripts, and tests, and adds validation to reject the legacy <TBD> placeholder. The reviewer suggests improving the placeholder detection and replacement logic in scripts/resolve-version-placeholders.js by utilizing standard string methods like includes and replaceAll instead of regular expressions, given the Node.js 18.x requirement. Additionally, the reviewer recommends validating the entire codebase for blocking issues before performing any file writes to ensure transactional safety.

Comment thread scripts/resolve-version-placeholders.js Resolved
@pkg-pr-new

pkg-pr-new Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@thoughtspot/visual-embed-sdk@751

commit: 0fdb85b

…ERSION%

<TBD> is a common abbreviation and was matched case-insensitively, so
the release bump could stamp a version onto a tag nobody meant to
resolve. The placeholder is now %NEXT_SDK_VERSION%, matched exactly.

A leftover <TBD> anywhere on a @Version line now blocks lint, resolve
and publish with a rename hint, so PRs on the old convention fail
loudly instead of slipping through. Docs and workflow comments updated.
Add an explicit check-versions step to publishToNPM, before npm publish,
so a release fails by name if a %NEXT_SDK_VERSION% is still unresolved
(e.g. a PR with one merged after the release bump).

Match the placeholder with includes/replaceAll instead of a global
RegExp, removing the lastIndex reset, and escape the token in the SDK
format pattern. Migrate the <TBD> tag added on main by #746.
@jitendra-bhati-ts
jitendra-bhati-ts force-pushed the SCAL-338917-unique-version-placeholder branch from 478228a to 0fdb85b Compare November 16, 2026 09:25
@jitendra-bhati-ts
jitendra-bhati-ts merged commit 19376d3 into main Nov 16, 2026
17 checks passed
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