-
Notifications
You must be signed in to change notification settings - Fork 570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: simplify creation of fetch error
#2327
Conversation
* Fix default fetch parameters * Preserve existing behavior with 300 second timeout if not defined * Add test for 300 second timeout as default * Cleanup old unused tests * Simplify how fetch utilizes timeouts from agent
* wpt: make runner more resilient * wpt: cleaner exit, hopefully
* Make test pass in v19.x Signed-off-by: Matteo Collina <hello@matteocollina.com> * fixup Signed-off-by: Matteo Collina <hello@matteocollina.com> * enable v19 Signed-off-by: Matteo Collina <hello@matteocollina.com> * fixup Signed-off-by: Matteo Collina <hello@matteocollina.com> * fixup Signed-off-by: Matteo Collina <hello@matteocollina.com> * github CI timeout Signed-off-by: Matteo Collina <hello@matteocollina.com> Signed-off-by: Matteo Collina <hello@matteocollina.com>
Signed-off-by: Matteo Collina <hello@matteocollina.com> fix #1890
* feat: expose content-type parser * fix: add docs
Bumps [sinon](https://github.com/sinonjs/sinon) from 15.2.0 to 16.1.0. - [Release notes](https://github.com/sinonjs/sinon/releases) - [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md) - [Commits](sinonjs/sinon@v15.2.0...v16.1.0) --- updated-dependencies: - dependency-name: sinon dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: respect Node.js flag * add test * cleaner test * fix test * update docs * revert empty space * remove already default value * add * don't use `globalThis.fetch` to pass test in Node.js 16 * add test under `test/fetch` * fix lint * import from `undici-fetch` * use correct paths, use `request` for pure undici test * fix Node.js 14 test
fetch error
fetch error
A few things:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should be landing this without bumping a major.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## next #2327 +/- ##
==========================================
- Coverage 90.34% 85.42% -4.93%
==========================================
Files 70 76 +6
Lines 6038 6867 +829
==========================================
+ Hits 5455 5866 +411
- Misses 583 1001 +418
☔ View full report in Codecov by Sentry. |
Changed the branch but it seems |
@KhafraDev thanks for your comment. I've adjusted As for changes in README, I didn't get the point with dropping support for node v16.8. If it is critical for this MR, please elaborate 🙂 |
This commit should target the |
I merged |
error.cause was added in node v16.9, at least according to mdn. On node v16.8, which is currently supported by undici, the error message will be completely useless with this change, essentially dropping support for it IMO. |
// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options | ||
// https://www.w3.org/TR/CSP2/#source-list-syntax | ||
// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1 | ||
const parseHashWithOptions = /((?<algo>sha256|sha384|sha512)-(?<hash>[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i |
Check warning
Code scanning / CodeQL
Overly permissive regular expression range Medium
You are right - |
I've created a new clean MR for the changes #2347. This one got glutted |
Simplify creation of
fetch error
This relates to the way how
fetch error
is created.TypeError
acceptcause
in constructor, soObject.assign
can be removed.