Skip to content

fix(cli): add defensive type guard to parseDimension to prevent runtime crashes#107

Closed
SyedaQurratAI wants to merge 1 commit into
google-labs-code:mainfrom
SyedaQurratAI:fix-parse-dimension-crash
Closed

fix(cli): add defensive type guard to parseDimension to prevent runtime crashes#107
SyedaQurratAI wants to merge 1 commit into
google-labs-code:mainfrom
SyedaQurratAI:fix-parse-dimension-crash

Conversation

@SyedaQurratAI

Copy link
Copy Markdown
Contributor

Fixes #106

@SyedaQurratAI

Copy link
Copy Markdown
Contributor Author

The local tests pass (272 passed), but conformance.test.ts fails and times out due to a 404 network resolution error on @terrazzo/token-types@^2.4.0 from npm registry. This seems to be an upstream environment issue.

@davideast

Copy link
Copy Markdown
Collaborator

Thank you @SyedaQurratAI! I fixed the terrazo issue so this should hopefully pass.

@davideast

Copy link
Copy Markdown
Collaborator

Hey @SyedaQurratAI, thank you for jumping on this. I just realized that this is already fixed. Your earlier PR #79 added the type guard to parseDimensionParts, which is the right place for it since all callers benefit from the check there. That fix was on main but hadn't been published yet when #106 was filed. We just shipped it in v0.3.0 (PR #108), so the published build now includes your fix.

Going to close this one since the issue is resolved. Please let me know if I'm mistaken though! Thank you for both contributions!

@davideast davideast closed this Jun 15, 2026
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.

v0.2.0 published build crashes with "raw.match is not a function" — parseDimensionParts missing type guard

2 participants