fix(caniuse): handle wf- prefixed web-features IDs#494
fix(caniuse): handle wf- prefixed web-features IDs#494marcoscaceres wants to merge 13 commits intomainfrom
Conversation
5ed688e to
b350086
Compare
There was a problem hiding this comment.
Pull request overview
Updates the caniuse feature lookup to better support caniuse’s newer wf- (web-features) identifiers and improves not-found responses.
Changes:
- Add fallback lookup logic that strips the
wf-prefix when an initial caniuse feature lookup fails. - Return a JSON 404 response from the
/caniuse/:featureroute with an actionable hint whenwf-is used. - Suppress logging for
ENOENT(missing feature file) while continuing to log other read/parse errors.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| routes/caniuse/lib/index.ts | Adds wf- fallback lookup and refines error logging for missing feature files. |
| routes/caniuse/feature.ts | Returns a structured JSON 404 with a wf--specific hint; removes an unused import. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b350086 to
49f7576
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b52481d to
08728e1
Compare
08728e1 to
43ab10e
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4e21c0a to
5aa29ab
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
When a caniuse feature lookup fails with a wf- prefix, strip the prefix and retry. Returns a clear 404 if no match is found. Closes #467
5aa29ab to
805a603
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… scripting' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Added Jasmine test coverage in commit
All 54 specs (14 new caniuse + 40 existing) pass. |
|
@copilot Can you review this and fix any issues that come up? |
|
@copilot can you confirm all your feedback has been addressed and resolved everything that has? Can you fix anything that wasn’t addressed and resolve those comments. |
All feedback has been addressed. Here's a complete summary: Security fixes
Logic improvements
Consistent JSON error shapes
Test coverage (all 55 specs pass, CI Tests ✅ CodeQL ✅)
|
|
@copilot Can you rebase this on main and resolve the merge conflicts? |
- Merges all recent main branch commits (TypeScript 6, baseline API, xref improvements, misc/cache tests, etc.) - Reverts deprecated GET /caniuse?feature= route to its original form per @sidvishnoi's review (route is deprecated, keep as-is) - Removes escape-html direct dependency (only needed for deprecated route changes that were reverted; still available as transitive dep of express) - Resolves merge conflicts in feature.ts and pnpm-lock.yaml Agent-Logs-Url: https://github.com/speced/respec-web-services/sessions/1c7aab3b-9248-4f65-950f-099f23b327e7
Done in commit |
|
@copilot can you fix the merge conflicts? |
Resolves conflict in routes/caniuse/feature.ts: keep JSON 500 error response (our improvement) over the old text/plain response from main. Co-authored-by: marcoscaceres <870154+marcoscaceres@users.noreply.github.com>
Fixed in commit |
Summary
wf-prefix and retry when caniuse feature lookup failsCloses #467