[pull] master from reactive:master#113
Merged
pull[bot] merged 9 commits intoerickirt:masterfrom Apr 5, 2026
Merged
Conversation
#3866) * fix(rest): Bundle path-to-regexp into ESM output for StackBlitz compat StackBlitz WebContainers fundamentally cannot resolve CJS named exports from path-to-regexp, regardless of import style (named, namespace, etc). Add a rollup ESM build (dist/esm/index.js) that bundles path-to-regexp directly, eliminating the CJS boundary. Point the "module" and "browser" export conditions to this bundled ESM output. CJS and React Native paths are unchanged. Reverts the namespace import workaround since it's no longer needed. Made-with: Cursor * fix(rest): Handle any number of chained CJS void-initializations in pathToRegexpESM The regex that strips CJS `exports.X = void 0` lines only matched exactly two chained assignments. TypeScript CJS output can chain all exports on one line (e.g. 7+ assignments). The old regex would leave the line intact, causing a ReferenceError in ESM where `exports` is undefined. Use `/^(?:exports\.\w+\s*=\s*)+void 0;\s*\n/gm` which matches one or more chained `exports.X =` followed by `void 0`. Co-authored-by: Nathaniel Tucker <me@ntucker.me> * fix(rest): dev script passes -w to babel instead of rollup The build:lib script chains babel && rollup. When dev ran 'run build:lib -w', the -w flag was appended to the last command (rollup), so babel never watched for changes. Fix by inlining the babel command directly in the dev script. Co-authored-by: Nathaniel Tucker <me@ntucker.me> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
… parsing (#3868) * feat(rest): add content property for response parsing and binary auto-detection Add a 'content' string property to RestEndpoint that controls response parsing ('json' | 'blob' | 'text' | 'arrayBuffer' | 'stream'), infers return types via ContentTypeMap, and constrains schema compatibility via ContentSchemaGuard -- all without explicit generic parameters. When content is not set, auto-detect binary Content-Types using a compact regex and return response.blob() instead of corrupting data via .text(). Runtime schema check throws when binary content is used with a normalizable schema, matching the existing pattern in parseResponse. Co-authored-by: natmaster <natmaster@gmail.com> * test(rest): add runtime and type tests for content property and binary auto-detection Runtime tests: content: blob/text/json dispatch, schema check throw, 204 handling, extend/subclass propagation, and auto-detection for image/png, application/octet-stream, application/pdf, text/plain, application/json, application/xml, and missing Content-Type. Type tests: return type inference (Blob, string, ArrayBuffer, ReadableStream), schema constraint errors, extend type propagation, process priority over content, subclass pattern. Co-authored-by: natmaster <natmaster@gmail.com> * docs(rest): document content property, update file download examples Add content section to RestEndpoint.md with table of values, return types, and file download example. Update parseResponse section to reference content and auto-detection. Simplify network-transform.md file download guide to use content: 'blob' as primary pattern. Co-authored-by: natmaster <natmaster@gmail.com> * changeset: add content property to RestEndpoint Co-authored-by: natmaster <natmaster@gmail.com> * refactor(rest): simplify parseResponse for smaller bundle size - Extract shared jsonResponse() helper, eliminating duplicated response.json().catch() block - Move content+schema incompatibility check behind NODE_ENV guard (TypeScript already prevents this at compile time; normalization would catch it at runtime regardless) - Replace array allocation ['string','undefined'].includes() with direct typeof comparisons - Combine content: 'json' into the ternary with response[content]() Co-authored-by: natmaster <natmaster@gmail.com> * fix: resolve lint and prettier formatting issues Co-authored-by: natmaster <natmaster@gmail.com> * test: add missing test cases from validation review, add v0.17 blog post Runtime tests: content: 'arrayBuffer', content: 'stream', auto-detect for audio/mpeg, video/mp4, font/woff2. Type tests: explicit schema: undefined with content: 'blob', switch from blob back to json via extend(), content property typed on instance. Blog: draft v0.17 release post covering content property and binary auto-detection. Co-authored-by: natmaster <natmaster@gmail.com> * enhance: Early warn against schema + binary types * internal: Make feat addition a patch * fix: Bugbot * fix: single-line arrayBuffer schema constraint test for ts-expect-error Co-authored-by: natmaster <natmaster@gmail.com> * enhance: Edge case warning --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
…perties (#3875) * fix(normalizr): Use Object.keys() in deepClone to avoid inherited properties for...in iterates inherited properties, which could copy polluted Object.prototype entries. Object.keys() restricts to own enumerable properties only. Made-with: Cursor * internal: Add changeset for deepClone fix Made-with: Cursor
* internal(bench-react): Add V8 opt/deopt investigation Add BENCH_V8_TRACE and BENCH_V8_DEOPT env vars to the React benchmark runner. Trace mode uses launchServer to pipe Chromium's --trace-opt --trace-deopt output to v8-trace.log. Deopt mode passes --prof to write per-process V8 profiling logs to v8-logs/. Convenience scripts bench:trace and bench:deopt default to data-client small scenarios. Made-with: Cursor * fix: Bugbot * fix: Stale V8 logs corrupt "largest file" heuristic
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )