Skip to content

Conversation

@wooffie
Copy link
Contributor

@wooffie wooffie commented Aug 15, 2025

In library a lot parse->serialize->parse->serialize calls. But while using parse call as argument we don't check error field. It's not bad, but I found one place that can shoot. Check added testcase.

Uncaught TypeError: Cannot read properties of undefined (reading 'toLowerCase')
    at Object.urnSerialize [as serialize] (/src/node_modules/fast-uri/lib/schemes.js:102:33)
    at serialize (/src/node_modules/fast-uri/index.js:123:63)
    at Object.equal (/src/node_modules/fast-uri/index.js:84:12)

Checklist

@wooffie
Copy link
Contributor Author

wooffie commented Aug 15, 2025

For now I found only one place. Let's discuss what to do with it, defaulting nid for 'err' is just to pass tests.

Copy link
Member

@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about setting 'err' but lgtm

@gurgunday gurgunday requested review from Uzlopak and zekth August 18, 2025 09:26
@wooffie
Copy link
Contributor Author

wooffie commented Aug 18, 2025

Not sure about setting 'err' but lgtm

Hi!

I'm absolutely agree with you, I just add it for highlight place of error and not fail at new testcase. We can discuss how to handle this error and what to do here

@wooffie wooffie requested review from Eomm and gurgunday August 20, 2025 07:13
@zekth
Copy link
Member

zekth commented Aug 23, 2025

@wooffie can you rebase your branch? Lot of changes happenned lately

@wooffie wooffie force-pushed the fix-lack-of-checks branch from 870c64f to ff368ca Compare August 25, 2025 07:09
Copy link
Member

@zekth zekth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. thanks ✌️

Copy link
Contributor

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Uzlopak Uzlopak merged commit 4f8cdd1 into fastify:main Aug 25, 2025
34 checks passed
@wooffie
Copy link
Contributor Author

wooffie commented Aug 25, 2025

Can you, please, tell when new version for npm will be released?
@zekth @Uzlopak

@Uzlopak
Copy link
Contributor

Uzlopak commented Aug 25, 2025

It is anticipated to be released asap.

mergify bot added a commit to ArcadeData/arcadedb that referenced this pull request Oct 12, 2025
…n /studio [skip ci]

Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.0.6 to 3.1.0.
Release notes

*Sourced from [fast-uri's releases](https://github.com/fastify/fast-uri/releases).*

> v3.1.0
> ------
>
> What's Changed
> --------------
>
> * ci: remove master branch support by [`@​Fdawgs`](https://github.com/Fdawgs) in [fastify/fast-uri#126](https://github.com/fastify/fast-uri/pull/126)
> * chore(test) remove .gitkeep by [`@​Fdawgs`](https://github.com/Fdawgs) in [fastify/fast-uri#128](https://github.com/fastify/fast-uri/pull/128)
> * ci(ci): set job permissions by [`@​Fdawgs`](https://github.com/Fdawgs) in [fastify/fast-uri#129](https://github.com/fastify/fast-uri/pull/129)
> * ci: set permissions at workflow level by [`@​Fdawgs`](https://github.com/Fdawgs) in [fastify/fast-uri#131](https://github.com/fastify/fast-uri/pull/131)
> * ci: set workflow permissions to read-only by default by [`@​Fdawgs`](https://github.com/Fdawgs) in [fastify/fast-uri#132](https://github.com/fastify/fast-uri/pull/132)
> * ci(ci): restore job level permissions by [`@​Fdawgs`](https://github.com/Fdawgs) in [fastify/fast-uri#133](https://github.com/fastify/fast-uri/pull/133)
> * build(deps-dev): bump tsd from 0.31.2 to 0.32.0 by [`@​dependabot`](https://github.com/dependabot)[bot] in [fastify/fast-uri#134](https://github.com/fastify/fast-uri/pull/134)
> * ci(ci): pin actions to commit-hash by [`@​Fdawgs`](https://github.com/Fdawgs) in [fastify/fast-uri#135](https://github.com/fastify/fast-uri/pull/135)
> * ci: add node 24 to test matrix by [`@​Fdawgs`](https://github.com/Fdawgs) in [fastify/fast-uri#136](https://github.com/fastify/fast-uri/pull/136)
> * ci: use tags for immutable github actions by [`@​Fdawgs`](https://github.com/Fdawgs) in [fastify/fast-uri#137](https://github.com/fastify/fast-uri/pull/137)
> * chore(license): update date ranges; standardise style by [`@​Fdawgs`](https://github.com/Fdawgs) in [fastify/fast-uri#138](https://github.com/fastify/fast-uri/pull/138)
> * fix(lib/utils): simpler algorithm for removeDotSegments by [`@​wooffie`](https://github.com/wooffie) in [fastify/fast-uri#140](https://github.com/fastify/fast-uri/pull/140)
> * chore: remove uri-js by [`@​Uzlopak`](https://github.com/Uzlopak) in [fastify/fast-uri#142](https://github.com/fastify/fast-uri/pull/142)
> * chore: replace benchmark with tinybench by [`@​Uzlopak`](https://github.com/Uzlopak) in [fastify/fast-uri#143](https://github.com/fastify/fast-uri/pull/143)
> * fix: ipv4 is never normalized by [`@​Uzlopak`](https://github.com/Uzlopak) in [fastify/fast-uri#144](https://github.com/fastify/fast-uri/pull/144)
> * feat: add browser testing by [`@​Uzlopak`](https://github.com/Uzlopak) in [fastify/fast-uri#146](https://github.com/fastify/fast-uri/pull/146)
> * Update README.md by [`@​zekth`](https://github.com/zekth) in [fastify/fast-uri#145](https://github.com/fastify/fast-uri/pull/145)
> * chore: use jsdoc for static code analysis by [`@​Uzlopak`](https://github.com/Uzlopak) in [fastify/fast-uri#147](https://github.com/fastify/fast-uri/pull/147)
> * fix(lib/schemes/urn): check nid for undefined by [`@​wooffie`](https://github.com/wooffie) in [fastify/fast-uri#141](https://github.com/fastify/fast-uri/pull/141)
>
> New Contributors
> ----------------
>
> * [`@​wooffie`](https://github.com/wooffie) made their first contribution in [fastify/fast-uri#140](https://github.com/fastify/fast-uri/pull/140)
>
> **Full Changelog**: <fastify/fast-uri@v3.0.6...v3.1.0>


Commits

* [`2d08e68`](fastify/fast-uri@2d08e68) v3.1.0
* [`4f8cdd1`](fastify/fast-uri@4f8cdd1) fix(lib/schemes/urn): check nid for undefined ([#141](https://github.com/fastify/fast-uri/issues/141))
* [`eedf840`](fastify/fast-uri@eedf840) chore: use jsdoc for static code analysis ([#147](https://github.com/fastify/fast-uri/issues/147))
* [`fbf4545`](fastify/fast-uri@fbf4545) Update README.md ([#145](https://github.com/fastify/fast-uri/issues/145))
* [`56b0c74`](fastify/fast-uri@56b0c74) feat: add browser testing ([#146](https://github.com/fastify/fast-uri/issues/146))
* [`ee22a06`](fastify/fast-uri@ee22a06) fix: ipv4 is never normalized ([#144](https://github.com/fastify/fast-uri/issues/144))
* [`509dd94`](fastify/fast-uri@509dd94) chore: replace benchmark with tinybench ([#143](https://github.com/fastify/fast-uri/issues/143))
* [`7a16582`](fastify/fast-uri@7a16582) chore: remove uri-js ([#142](https://github.com/fastify/fast-uri/issues/142))
* [`f0160b0`](fastify/fast-uri@f0160b0) fix(lib/utils): simpler algorithm for removeDotSegments ([#140](https://github.com/fastify/fast-uri/issues/140))
* [`14d12da`](fastify/fast-uri@14d12da) chore(license): update date ranges; standardise style ([#138](https://github.com/fastify/fast-uri/issues/138))
* Additional commits viewable in [compare view](fastify/fast-uri@v3.0.6...v3.1.0)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=fast-uri&package-manager=npm\_and\_yarn&previous-version=3.0.6&new-version=3.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
You can trigger a rebase of this PR by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
> \*\*Note\*\*
> Automatic rebases have been disabled on this pull request as it has been open for over 30 days.
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.

5 participants