Validate DocumentIdentifier arguments in API - #64079
Merged
Andrew Branch (andrewbranch) merged 2 commits intoAug 28, 2026
Merged
Validate DocumentIdentifier arguments in API#64079Andrew Branch (andrewbranch) merged 2 commits into
Andrew Branch (andrewbranch) merged 2 commits into
Conversation
Co-authored-by: andrewbranch <3277153+andrewbranch@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix TypeError from path.js for invalid DocumentIdentifier
Validate DocumentIdentifier arguments in API
Aug 28, 2026
Andrew Branch (andrewbranch)
approved these changes
Aug 28, 2026
Andrew Branch (andrewbranch)
marked this pull request as ready for review
August 28, 2026 19:22
Copilot started reviewing on behalf of
Andrew Branch (andrewbranch)
August 28, 2026 19:22
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds clear runtime validation for malformed DocumentIdentifier values and expands URI support across file-based APIs.
Changes:
- Validate identifier shape in
resolveFileName. - Accept URI identifiers in transpilation and metadata APIs.
- Add synchronous and asynchronous regression coverage.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/typescript/src/api/proto.ts |
Adds identifier validation and descriptive errors. |
packages/typescript/src/api/async/api.ts |
Adds URI support to file-based async APIs. |
packages/typescript/src/api/sync/api.ts |
Mirrors async API changes in generated sync APIs. |
packages/typescript/test/async/api.test.ts |
Tests async validation and URI handling. |
packages/typescript/test/sync/api.test.ts |
Mirrors coverage for synchronous APIs. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Jake Bailey (jakebailey)
approved these changes
Aug 28, 2026
Andrew Branch (andrewbranch)
deleted the
copilot/fix-invalid-documentidentifier-typeerror
branch
August 28, 2026 20:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Invalid
DocumentIdentifierobjects produced an internalpath.jserror instead of identifying the malformed argument.Changes
resolveFileNameand report their received shape.DocumentIdentifierconsistently in transpile-from-file and source-file metadata APIs.