GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore: use jsdoc for static code analysis by Uzlopak · Pull Request #147 · fastify/fast-uri

Conversation

@Uzlopak

@Uzlopak Uzlopak commented Aug 19, 2025

Copy link
Copy Markdown
Contributor

@zekth

I added jsdoc for static code analysis. I see some problematic code smells

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Fdawgs reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Uzlopak added 5 commits August 19, 2025 11:53
@Uzlopak
chore: use jsdoc for static code analysis
492d179
@Uzlopak
simplify
8cb132f
@Uzlopak
improve stringArrayToHexStripped
8351063
@Uzlopak
add benchmark
04c90f4
@Uzlopak
use nonSimpleDomain with regex
0faad45
@Uzlopak
Uzlopak force-pushed the use-jsdoc branch from 6ed06be to 0faad45 Compare August 19, 2025 16:36
@Uzlopak
extract isUUID to utils.js
ade3ba0
@Fdawgs

Fdawgs commented Aug 19, 2025

Copy link
Copy Markdown
Member

Only commenting to say I'm happy to see JSDoc tags! Always handy with IntelliSense.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Uzlopak
improve ipv6
91e2b90
@zekth

zekth commented Aug 19, 2025

Copy link
Copy Markdown
Member

We do need to update the benchmarks also

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

zekth
zekth reviewed Aug 19, 2025
View reviewed changes
Comment thread index.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Uzlopak added 3 commits August 20, 2025 09:31
@Uzlopak
fix perf regression
23de2d3
@Uzlopak
avoid to lowercase
b17132f
@Uzlopak
add benchmarks for equal
486f4c0
@Uzlopak

Uzlopak commented Aug 20, 2025

Copy link
Copy Markdown
Contributor Author

benchmarks seem to be the same. some improvements in IPv6, and also some other not significant up and downs.

before:

fast-uri benchmark
┌─────────┬──────────────────────────────────────────┬──────────────────┬──────────────────┬────────────────────────┬────────────────────────┬─────────┐
│ (index) │ Task name                                │ Latency avg (ns) │ Latency med (ns) │ Throughput avg (ops/s) │ Throughput med (ops/s) │ Samples │
├─────────┼──────────────────────────────────────────┼──────────────────┼──────────────────┼────────────────────────┼────────────────────────┼─────────┤
│ 0       │ 'fast-uri: parse domain'                 │ '959.12 ± 0.69%' │ '887.00 ± 10.00' │ '1101542 ± 0.02%'      │ '1127396 ± 12855'      │ 1042620 │
│ 1       │ 'fast-uri: parse IPv4'                   │ '440.42 ± 0.23%' │ '414.00 ± 2.00'  │ '2392426 ± 0.01%'      │ '2415459 ± 11726'      │ 2270583 │
│ 2       │ 'fast-uri: parse IPv6'                   │ '1236.1 ± 1.79%' │ '1126.0 ± 10.00' │ '872635 ± 0.02%'       │ '888099 ± 7958'        │ 808968  │
│ 3       │ 'fast-uri: parse URN'                    │ '706.10 ± 0.24%' │ '661.00 ± 15.00' │ '1492341 ± 0.01%'      │ '1512859 ± 33569'      │ 1416234 │
│ 4       │ 'fast-uri: parse URN uuid'               │ '1004.3 ± 0.30%' │ '946.00 ± 13.00' │ '1049264 ± 0.01%'      │ '1057082 ± 14330'      │ 995700  │
│ 5       │ 'fast-uri: serialize URN uuid'           │ '821.82 ± 0.16%' │ '785.00 ± 12.00' │ '1260269 ± 0.01%'      │ '1273885 ± 19180'      │ 1216816 │
│ 6       │ 'fast-uri: serialize uri'                │ '1131.0 ± 2.79%' │ '1040.0 ± 14.00' │ '947776 ± 0.01%'       │ '961538 ± 13120'       │ 884154  │
│ 7       │ 'fast-uri: serialize long uri with dots' │ '1797.6 ± 0.38%' │ '1673.0 ± 19.00' │ '588667 ± 0.02%'       │ '597729 ± 6712'        │ 556292  │
│ 8       │ 'fast-uri: serialize IPv6'               │ '2448.9 ± 0.33%' │ '2289.0 ± 15.00' │ '430307 ± 0.02%'       │ '436872 ± 2844'        │ 408347  │
│ 9       │ 'fast-uri: serialize ws'                 │ '1094.8 ± 0.52%' │ '982.00 ± 20.00' │ '995730 ± 0.02%'       │ '1018330 ± 21171'      │ 913371  │
│ 10      │ 'fast-uri: resolve'                      │ '2282.9 ± 4.05%' │ '2072.0 ± 18.00' │ '475084 ± 0.03%'       │ '482625 ± 4229'        │ 438046  │
│ 11      │ 'fast-uri: equal'                        │ '4150.5 ± 2.11%' │ '3850.0 ± 29.00' │ '255865 ± 0.03%'       │ '259740 ± 1971'        │ 240936  │
└─────────┴──────────────────────────────────────────┴──────────────────┴──────────────────┴────────────────────────┴────────────────────────┴─────────┘
fast-uri benchmark
┌─────────┬──────────────────────────────────────────┬──────────────────┬──────────────────┬────────────────────────┬────────────────────────┬─────────┐
│ (index) │ Task name                                │ Latency avg (ns) │ Latency med (ns) │ Throughput avg (ops/s) │ Throughput med (ops/s) │ Samples │
├─────────┼──────────────────────────────────────────┼──────────────────┼──────────────────┼────────────────────────┼────────────────────────┼─────────┤
│ 0       │ 'fast-uri: parse domain'                 │ '947.79 ± 0.22%' │ '884.00 ± 11.00' │ '1111727 ± 0.01%'      │ '1131222 ± 14254'      │ 1055084 │
│ 1       │ 'fast-uri: parse IPv4'                   │ '414.08 ± 0.15%' │ '389.00 ± 4.00'  │ '2519662 ± 0.01%'      │ '2570694 ± 26709'      │ 2414972 │
│ 2       │ 'fast-uri: parse IPv6'                   │ '1090.9 ± 2.88%' │ '1002.0 ± 9.00'  │ '984654 ± 0.01%'       │ '998004 ± 9045'        │ 916703  │
│ 3       │ 'fast-uri: parse URN'                    │ '680.80 ± 4.04%' │ '638.00 ± 4.00'  │ '1552564 ± 0.01%'      │ '1567398 ± 9889'       │ 1468870 │
│ 4       │ 'fast-uri: parse URN uuid'               │ '951.88 ± 0.22%' │ '902.00 ± 7.00'  │ '1097902 ± 0.01%'      │ '1108647 ± 8671'       │ 1050550 │
│ 5       │ 'fast-uri: serialize URN uuid'           │ '779.36 ± 2.21%' │ '727.00 ± 7.00'  │ '1356446 ± 0.01%'      │ '1375516 ± 13118'      │ 1283106 │
│ 6       │ 'fast-uri: serialize uri'                │ '1158.5 ± 3.77%' │ '1053.0 ± 14.00' │ '936657 ± 0.01%'       │ '949668 ± 12460'       │ 863211  │
│ 7       │ 'fast-uri: serialize long uri with dots' │ '1821.1 ± 0.37%' │ '1683.0 ± 18.00' │ '583105 ± 0.02%'       │ '594177 ± 6424'        │ 549119  │
│ 8       │ 'fast-uri: serialize IPv6'               │ '2216.8 ± 0.52%' │ '2029.0 ± 34.00' │ '481667 ± 0.03%'       │ '492854 ± 8400'        │ 451094  │
│ 9       │ 'fast-uri: serialize ws'                 │ '1037.7 ± 2.05%' │ '962.00 ± 11.00' │ '1026297 ± 0.01%'      │ '1039501 ± 11752'      │ 963667  │
│ 10      │ 'fast-uri: resolve'                      │ '2218.5 ± 1.88%' │ '2032.0 ± 18.00' │ '483773 ± 0.03%'       │ '492126 ± 4321'        │ 450757  │
│ 11      │ 'fast-uri: equal'                        │ '4509.0 ± 0.40%' │ '4248.0 ± 31.00' │ '231792 ± 0.04%'       │ '235405 ± 1731'        │ 221777  │
└─────────┴──────────────────────────────────────────┴──────────────────┴──────────────────┴────────────────────────┴────────────────────────┴─────────┘
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Uzlopak
Uzlopak marked this pull request as ready for review August 20, 2025 10:57
@Uzlopak

Uzlopak commented Aug 20, 2025

Copy link
Copy Markdown
Contributor Author

If we would put everything into one file - index.js, lib/utils.js and lib/schemes.js => fast-uri.js then we can actually create the types via typescript automatically from the jsdoc.

I did this in https://github.com/pinojs/dateformat

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Uzlopak
use singular
9a91343
zekth
zekth approved these changes Aug 20, 2025
View reviewed changes

@zekth zekth left a comment

Copy link
Copy Markdown
Member

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.

Nice!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Uzlopak reacted with rocket emoji
All reactions
  • 🚀 1 reaction
@Uzlopak
Uzlopak merged commit eedf840 into main Aug 20, 2025
mergify Bot added a commit to ArcadeData/arcadedb that referenced this pull request Oct 12, 2025
@mergify
chore(studio-deps-dev)(deps-dev): bump fast-uri from 3.0.6 to 3.1.0 i…
220bff1
…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://redirect.github.com/fastify/fast-uri/pull/126)
> * chore(test) remove .gitkeep by [`@​Fdawgs`](https://github.com/Fdawgs) in [fastify/fast-uri#128](https://redirect.github.com/fastify/fast-uri/pull/128)
> * ci(ci): set job permissions by [`@​Fdawgs`](https://github.com/Fdawgs) in [fastify/fast-uri#129](https://redirect.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://redirect.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://redirect.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://redirect.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://redirect.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://redirect.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://redirect.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://redirect.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://redirect.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://redirect.github.com/fastify/fast-uri/pull/140)
> * chore: remove uri-js by [`@​Uzlopak`](https://github.com/Uzlopak) in [fastify/fast-uri#142](https://redirect.github.com/fastify/fast-uri/pull/142)
> * chore: replace benchmark with tinybench by [`@​Uzlopak`](https://github.com/Uzlopak) in [fastify/fast-uri#143](https://redirect.github.com/fastify/fast-uri/pull/143)
> * fix: ipv4 is never normalized by [`@​Uzlopak`](https://github.com/Uzlopak) in [fastify/fast-uri#144](https://redirect.github.com/fastify/fast-uri/pull/144)
> * feat: add browser testing by [`@​Uzlopak`](https://github.com/Uzlopak) in [fastify/fast-uri#146](https://redirect.github.com/fastify/fast-uri/pull/146)
> * Update README.md by [`@​zekth`](https://github.com/zekth) in [fastify/fast-uri#145](https://redirect.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://redirect.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://redirect.github.com/fastify/fast-uri/pull/141)
>
> New Contributors
> ----------------
>
> * [`@​wooffie`](https://github.com/wooffie) made their first contribution in [fastify/fast-uri#140](https://redirect.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://redirect.github.com/fastify/fast-uri/issues/141))
* [`eedf840`](fastify/fast-uri@eedf840) chore: use jsdoc for static code analysis ([#147](https://redirect.github.com/fastify/fast-uri/issues/147))
* [`fbf4545`](fastify/fast-uri@fbf4545) Update README.md ([#145](https://redirect.github.com/fastify/fast-uri/issues/145))
* [`56b0c74`](fastify/fast-uri@56b0c74) feat: add browser testing ([#146](https://redirect.github.com/fastify/fast-uri/issues/146))
* [`ee22a06`](fastify/fast-uri@ee22a06) fix: ipv4 is never normalized ([#144](https://redirect.github.com/fastify/fast-uri/issues/144))
* [`509dd94`](fastify/fast-uri@509dd94) chore: replace benchmark with tinybench ([#143](https://redirect.github.com/fastify/fast-uri/issues/143))
* [`7a16582`](fastify/fast-uri@7a16582) chore: remove uri-js ([#142](https://redirect.github.com/fastify/fast-uri/issues/142))
* [`f0160b0`](fastify/fast-uri@f0160b0) fix(lib/utils): simpler algorithm for removeDotSegments ([#140](https://redirect.github.com/fastify/fast-uri/issues/140))
* [`14d12da`](fastify/fast-uri@14d12da) chore(license): update date ranges; standardise style ([#138](https://redirect.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.
@github-actions

github-actions Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@zekth zekth zekth approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@Uzlopak @Fdawgs @zekth
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.