Skip to content

Move DEFAULT_VERTEX_SOURCE / DEFAULT_FRAGMENT_SOURCE JSDoc from re-export to declaration site#406

Merged
ormidales merged 2 commits into
1.1.17from
copilot/fix-jsdoc-vertex-fragment-source
Apr 2, 2026
Merged

Move DEFAULT_VERTEX_SOURCE / DEFAULT_FRAGMENT_SOURCE JSDoc from re-export to declaration site#406
ormidales merged 2 commits into
1.1.17from
copilot/fix-jsdoc-vertex-fragment-source

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 2, 2026

@security annotations and usage docs for DEFAULT_VERTEX_SOURCE and DEFAULT_FRAGMENT_SOURCE were attached only to the re-export lines in index.ts, so "Go to Definition" in any IDE landed on an undocumented constant.

Changes

  • src/core/index.ts — Dropped the duplicate JSDoc blocks from the two separate re-exports; collapsed all three ./Material exports into one line:

    export { Material, DEFAULT_VERTEX_SOURCE, DEFAULT_FRAGMENT_SOURCE } from './Material';
  • tests/core-index.test.ts — Replaced the four tests asserting JSDoc on re-export lines with two tests matching the new contract: both constants appear in a combined export, and no @security text is duplicated in the barrel.

The full JSDoc (including @security) already existed at the declaration site in Material.ts and remains validated by material.test.ts.

Copilot AI changed the title [WIP] Fix JSDoc for DEFAULT_VERTEX_SOURCE and DEFAULT_FRAGMENT_SOURCE Move DEFAULT_VERTEX_SOURCE / DEFAULT_FRAGMENT_SOURCE JSDoc from re-export to declaration site Apr 2, 2026
Copilot AI requested a review from ormidales April 2, 2026 11:47
@ormidales ormidales added this to the v1.1.17 milestone Apr 2, 2026
@ormidales ormidales marked this pull request as ready for review April 2, 2026 12:20
Copilot AI review requested due to automatic review settings April 2, 2026 12:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Moves JSDoc (including @security guidance) for DEFAULT_VERTEX_SOURCE / DEFAULT_FRAGMENT_SOURCE from the barrel re-export in src/core/index.ts to the actual declaration site so IDE “Go to Definition” lands on documented constants.

Changes:

  • Collapses Material + default shader source exports into a single re-export line from ./Material.
  • Updates barrel-export tests to reflect the new expectation: combined export with no duplicated @security docs in index.ts.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/core/index.ts Replaces three separate ./Material exports (and duplicated JSDoc) with a single combined re-export.
tests/core-index.test.ts Adjusts tests to check for combined re-export and absence of duplicated @security docs in the barrel.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/core-index.test.ts
Comment thread tests/core-index.test.ts
@ormidales ormidales merged commit a88e374 into 1.1.17 Apr 2, 2026
6 checks passed
@ormidales ormidales deleted the copilot/fix-jsdoc-vertex-fragment-source branch April 2, 2026 12:45
Sign up for free to 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.

[PATCH] DEFAULT_VERTEX_SOURCE and DEFAULT_FRAGMENT_SOURCE carry JSDoc only in index.ts re-export, not at the source declaration

3 participants