Skip to content
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

feat: build with esbuild, apply source maps #392

Merged
merged 10 commits into from
Oct 22, 2024
Merged

feat: build with esbuild, apply source maps #392

merged 10 commits into from
Oct 22, 2024

Conversation

SgtPooki
Copy link
Member

@SgtPooki SgtPooki commented Oct 21, 2024

Title

feat: build with esbuild

Description

  • Removes webpack
  • builds with esbuild, adds source maps
  • NOTE: Code-splitting is not implemented at this time. SW imports break with code-splitting because we're missing magic that webpack was doing to convert imports to importScripts
    • If you have an old SW installed, the new sw that supports import statements will not work and will tell you "cannot use import statements". You must uninstall the old SW to get things working

Notes & open questions

The latest changes here are deployed to https://sw.sgtpooki.com

Potential TODO:

  • We may want to remove some fonts from the dist/ folder, but I don't believe they're being inlined.
  • Investigate firefox issue when splitting: true

dist size

╰─ ✔ ❯ du -h dist                                                                                            4.21   26.1G   65%   100%  ─╯
14M	dist

╰─ ✔ ❯ du -h dist/*.js                                                                                       4.21   26.2G   65%   100%  ─╯
196K	dist/ipfs-sw-index-J6NQTQUO.js
504K	dist/ipfs-sw-sw.js

╰─ ✔ ❯ du -h dist/*.css                                                                                      4.15   26.2G   65%   100%  ─╯
92K	dist/ipfs-sw-index-2QCJAGKE.css

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

Copy link
Member Author

@SgtPooki SgtPooki left a comment

Choose a reason for hiding this comment

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

self review

test/node.ts Outdated Show resolved Hide resolved
@SgtPooki
Copy link
Member Author

@2color This should make debugging problems with #391 more easy

src/service-worker-utils.ts Outdated Show resolved Hide resolved
@2color
Copy link
Member

2color commented Oct 22, 2024

I looked into removing hashes from outputs altogetherin #393, but then realised it's probably not worth it, as it will open the window to stale cache responses for sw assets from the service worker.

@2color
Copy link
Member

2color commented Oct 22, 2024

We may want to remove some fonts from the dist/ folder, but I don't believe they're being inlined.

Not only are they not inlined, we override the default styles so that they are never actually used.

/* ensure we don't fetch any external fonts */
.sans-serif { font-family: system-ui, sans-serif; }

Copy link
Member

@2color 2color left a comment

Choose a reason for hiding this comment

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

I tested this locally a fair bit. LGTM

@@ -20,7 +20,7 @@
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title><%= htmlWebpackPlugin.options.title %> | <%= htmlWebpackPlugin.options.version %></title>
<title>IPFS Service Worker Gateway | <%= GIT_VERSION %></title>
Copy link
Member Author

Choose a reason for hiding this comment

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

@2color thanks for this, i was planning to hit this today

@SgtPooki SgtPooki merged commit 2b26bd6 into main Oct 22, 2024
16 checks passed
@SgtPooki SgtPooki deleted the feat/use-esbuild branch October 22, 2024 14:44
@SgtPooki SgtPooki mentioned this pull request Oct 22, 2024
3 tasks
2color added a commit that referenced this pull request Oct 22, 2024
* origin/main:
  feat: build with esbuild, apply source maps (#392)
2color added a commit that referenced this pull request Oct 25, 2024
* fix: remove auto-reload config and default to true (#319)

* fix: remove auto-reload config and default to true

* test: fix ci layout test

* test: fix some playwright tests

* test: fix firefox e2e tests

* test: fix first-hit e2e tests

* chore: code cleanup self review

* deps(dev): bump playwright from 1.45.0 to 1.45.3 (#331)

Bumps [playwright](https://github.com/microsoft/playwright) from 1.45.0 to 1.45.3.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](microsoft/playwright@v1.45.0...v1.45.3)

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: build with esbuild, apply source maps (#392)

* feat: use esbuild for building

* feat: remove webpack

* test: fix e2e tests

* chore: remove timeout only required on my network

* chore: remove copyfiles

* chore: suggestions from self code review

* fix: use code-splitting

* fix: firefox doesn't like ESM service workers

* fix: remove type in sw registration

* feat: add git version into index.html

---------

Co-authored-by: Daniel N <2color@users.noreply.github.com>

* fix: service worker logs are visible again (#395)

* fix: service worker logs are visible again

* chore: self pr suggestion

* fix: remove fonts from dist folder (#394)

* fix: remove fonts from dist folder

* chore: install http-server for playwright

* fix: use more ipfs-sw prefixes (#396)

* fix: use enable from @libp2p/logger (#398)

* feat: add p2p retrieval option (#391)

* feat: add config toggle for p2p retrieval

* deps: add helia and bump verified fetch

* feat: load p2p helia

* chore: remove console.log

* feat: try to make recursive gateways optional

* fixup! feat: add config toggle for p2p retrieval

* chore: aegir lint --fix

* chore: install missing deps

* feat: use esbuild for building

* feat: remove webpack

* test: fix e2e tests

* chore: remove timeout only required on my network

* chore: remove copyfiles

* chore: suggestions from self code review

* fix: gateways null when loading sw

* fix: use code-splitting

* fix: firefox doesn't like ESM service workers

* fix: remove type in sw registration

* feat: add git version into index.html

* Revert "feat: try to make recursive gateways optional"

This reverts commit eba97a4.

* fix: bug returning an array with 1 el

* ui: improve contrast for disabled toggle

* feat: add granular config options

* test: fix config layout test

* deps: add missing deps

* fix: unused deps

* fix: make toggles smaller

* fix: avoid setting defaults in inputs

* feat: allow a single router for now

* chore: rename to get verified fetch

* feat: reorder config

* feat: add additional title

* fix: break config UI into sections

* chore: output localhost as listening host

* fix: allow multiple routers

see #402

* fix: run validation onblur to allow editing

* fix: log config as string

otherwise it's not viewable in the console

* feat: add ipip-484 filtering to delegated router

* chore: more left padding on input section

Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>

---------

Co-authored-by: Daniel N <2color@users.noreply.github.com>
Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel N <2color@users.noreply.github.com>
2color added a commit that referenced this pull request Oct 29, 2024
* fix: remove auto-reload config and default to true (#319)

* fix: remove auto-reload config and default to true

* test: fix ci layout test

* test: fix some playwright tests

* test: fix firefox e2e tests

* test: fix first-hit e2e tests

* chore: code cleanup self review

* deps(dev): bump playwright from 1.45.0 to 1.45.3 (#331)

Bumps [playwright](https://github.com/microsoft/playwright) from 1.45.0 to 1.45.3.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](microsoft/playwright@v1.45.0...v1.45.3)

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: build with esbuild, apply source maps (#392)

* feat: use esbuild for building

* feat: remove webpack

* test: fix e2e tests

* chore: remove timeout only required on my network

* chore: remove copyfiles

* chore: suggestions from self code review

* fix: use code-splitting

* fix: firefox doesn't like ESM service workers

* fix: remove type in sw registration

* feat: add git version into index.html

---------

Co-authored-by: Daniel N <2color@users.noreply.github.com>

* fix: service worker logs are visible again (#395)

* fix: service worker logs are visible again

* chore: self pr suggestion

* fix: remove fonts from dist folder (#394)

* fix: remove fonts from dist folder

* chore: install http-server for playwright

* fix: use more ipfs-sw prefixes (#396)

* fix: use enable from @libp2p/logger (#398)

* feat: add p2p retrieval option (#391)

* feat: add config toggle for p2p retrieval

* deps: add helia and bump verified fetch

* feat: load p2p helia

* chore: remove console.log

* feat: try to make recursive gateways optional

* fixup! feat: add config toggle for p2p retrieval

* chore: aegir lint --fix

* chore: install missing deps

* feat: use esbuild for building

* feat: remove webpack

* test: fix e2e tests

* chore: remove timeout only required on my network

* chore: remove copyfiles

* chore: suggestions from self code review

* fix: gateways null when loading sw

* fix: use code-splitting

* fix: firefox doesn't like ESM service workers

* fix: remove type in sw registration

* feat: add git version into index.html

* Revert "feat: try to make recursive gateways optional"

This reverts commit eba97a4.

* fix: bug returning an array with 1 el

* ui: improve contrast for disabled toggle

* feat: add granular config options

* test: fix config layout test

* deps: add missing deps

* fix: unused deps

* fix: make toggles smaller

* fix: avoid setting defaults in inputs

* feat: allow a single router for now

* chore: rename to get verified fetch

* feat: reorder config

* feat: add additional title

* fix: break config UI into sections

* chore: output localhost as listening host

* fix: allow multiple routers

see #402

* fix: run validation onblur to allow editing

* fix: log config as string

otherwise it's not viewable in the console

* feat: add ipip-484 filtering to delegated router

* chore: more left padding on input section

Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>

---------

Co-authored-by: Daniel N <2color@users.noreply.github.com>
Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>

* chore(main): release 1.4.0 (#334)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: support discovery of /tls/../ws|http  providers (#405)

* fix: support direct retrieval from /tls/sni/../ws
* fix: safelist multiaddrs with /tls
* fix: include /tls/../http in addition to /https
* chore: reference someguy issue

---------

Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>

* chore(main): release 1.4.1 (#407)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* deps: update helia and libp2p (#408)

Co-authored-by: Daniel N <2color@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel N <2color@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
SgtPooki added a commit that referenced this pull request Nov 4, 2024
* fix: remove auto-reload config and default to true (#319)

* fix: remove auto-reload config and default to true

* test: fix ci layout test

* test: fix some playwright tests

* test: fix firefox e2e tests

* test: fix first-hit e2e tests

* chore: code cleanup self review

* deps(dev): bump playwright from 1.45.0 to 1.45.3 (#331)

Bumps [playwright](https://github.com/microsoft/playwright) from 1.45.0 to 1.45.3.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](microsoft/playwright@v1.45.0...v1.45.3)

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: build with esbuild, apply source maps (#392)

* feat: use esbuild for building

* feat: remove webpack

* test: fix e2e tests

* chore: remove timeout only required on my network

* chore: remove copyfiles

* chore: suggestions from self code review

* fix: use code-splitting

* fix: firefox doesn't like ESM service workers

* fix: remove type in sw registration

* feat: add git version into index.html

---------

Co-authored-by: Daniel N <2color@users.noreply.github.com>

* fix: service worker logs are visible again (#395)

* fix: service worker logs are visible again

* chore: self pr suggestion

* fix: remove fonts from dist folder (#394)

* fix: remove fonts from dist folder

* chore: install http-server for playwright

* fix: use more ipfs-sw prefixes (#396)

* fix: use enable from @libp2p/logger (#398)

* feat: add p2p retrieval option (#391)

* feat: add config toggle for p2p retrieval

* deps: add helia and bump verified fetch

* feat: load p2p helia

* chore: remove console.log

* feat: try to make recursive gateways optional

* fixup! feat: add config toggle for p2p retrieval

* chore: aegir lint --fix

* chore: install missing deps

* feat: use esbuild for building

* feat: remove webpack

* test: fix e2e tests

* chore: remove timeout only required on my network

* chore: remove copyfiles

* chore: suggestions from self code review

* fix: gateways null when loading sw

* fix: use code-splitting

* fix: firefox doesn't like ESM service workers

* fix: remove type in sw registration

* feat: add git version into index.html

* Revert "feat: try to make recursive gateways optional"

This reverts commit eba97a4.

* fix: bug returning an array with 1 el

* ui: improve contrast for disabled toggle

* feat: add granular config options

* test: fix config layout test

* deps: add missing deps

* fix: unused deps

* fix: make toggles smaller

* fix: avoid setting defaults in inputs

* feat: allow a single router for now

* chore: rename to get verified fetch

* feat: reorder config

* feat: add additional title

* fix: break config UI into sections

* chore: output localhost as listening host

* fix: allow multiple routers

see https://github.com/ipfs/service-worker-gateway/discussions/402

* fix: run validation onblur to allow editing

* fix: log config as string

otherwise it's not viewable in the console

* feat: add ipip-484 filtering to delegated router

* chore: more left padding on input section

Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>

---------

Co-authored-by: Daniel N <2color@users.noreply.github.com>
Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>

* chore(main): release 1.4.0 (#334)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: support discovery of /tls/../ws|http  providers (#405)

* fix: support direct retrieval from /tls/sni/../ws
* fix: safelist multiaddrs with /tls
* fix: include /tls/../http in addition to /https
* chore: reference someguy issue

---------

Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>

* chore(main): release 1.4.1 (#407)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* deps: update helia and libp2p (#408)

Co-authored-by: Daniel N <2color@users.noreply.github.com>

* fix: force use of latest multiaddr-to-uri (#409)

* fix: force use of latest multiaddr-to-uri

* chore: don't specify latest multiaddr-to-uri in package.json

* fix: apply dns resolvers corectly (#412)

Co-authored-by: Daniel N <2color@users.noreply.github.com>

* deps: update kubo-rpc-client (#417)

* chore: auto-pr workflow for staging/prod PRs

* chore: fix auto-release-pr workflow

* chore: fix auto-release-pr workflow PR titles

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel N <2color@users.noreply.github.com>
Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
SgtPooki added a commit that referenced this pull request Nov 13, 2024
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

chore: Merge staging into production (#420)

* fix: remove auto-reload config and default to true (#319)

* fix: remove auto-reload config and default to true

* test: fix ci layout test

* test: fix some playwright tests

* test: fix firefox e2e tests

* test: fix first-hit e2e tests

* chore: code cleanup self review

* deps(dev): bump playwright from 1.45.0 to 1.45.3 (#331)

Bumps [playwright](https://github.com/microsoft/playwright) from 1.45.0 to 1.45.3.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](microsoft/playwright@v1.45.0...v1.45.3)

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: build with esbuild, apply source maps (#392)

* feat: use esbuild for building

* feat: remove webpack

* test: fix e2e tests

* chore: remove timeout only required on my network

* chore: remove copyfiles

* chore: suggestions from self code review

* fix: use code-splitting

* fix: firefox doesn't like ESM service workers

* fix: remove type in sw registration

* feat: add git version into index.html

---------

Co-authored-by: Daniel N <2color@users.noreply.github.com>

* fix: service worker logs are visible again (#395)

* fix: service worker logs are visible again

* chore: self pr suggestion

* fix: remove fonts from dist folder (#394)

* fix: remove fonts from dist folder

* chore: install http-server for playwright

* fix: use more ipfs-sw prefixes (#396)

* fix: use enable from @libp2p/logger (#398)

* feat: add p2p retrieval option (#391)

* feat: add config toggle for p2p retrieval

* deps: add helia and bump verified fetch

* feat: load p2p helia

* chore: remove console.log

* feat: try to make recursive gateways optional

* fixup! feat: add config toggle for p2p retrieval

* chore: aegir lint --fix

* chore: install missing deps

* feat: use esbuild for building

* feat: remove webpack

* test: fix e2e tests

* chore: remove timeout only required on my network

* chore: remove copyfiles

* chore: suggestions from self code review

* fix: gateways null when loading sw

* fix: use code-splitting

* fix: firefox doesn't like ESM service workers

* fix: remove type in sw registration

* feat: add git version into index.html

* Revert "feat: try to make recursive gateways optional"

This reverts commit eba97a4.

* fix: bug returning an array with 1 el

* ui: improve contrast for disabled toggle

* feat: add granular config options

* test: fix config layout test

* deps: add missing deps

* fix: unused deps

* fix: make toggles smaller

* fix: avoid setting defaults in inputs

* feat: allow a single router for now

* chore: rename to get verified fetch

* feat: reorder config

* feat: add additional title

* fix: break config UI into sections

* chore: output localhost as listening host

* fix: allow multiple routers

see #402

* fix: run validation onblur to allow editing

* fix: log config as string

otherwise it's not viewable in the console

* feat: add ipip-484 filtering to delegated router

* chore: more left padding on input section

Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>

---------

Co-authored-by: Daniel N <2color@users.noreply.github.com>
Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>

* chore(main): release 1.4.0 (#334)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: support discovery of /tls/../ws|http  providers (#405)

* fix: support direct retrieval from /tls/sni/../ws
* fix: safelist multiaddrs with /tls
* fix: include /tls/../http in addition to /https
* chore: reference someguy issue

---------

Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>

* chore(main): release 1.4.1 (#407)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* deps: update helia and libp2p (#408)

Co-authored-by: Daniel N <2color@users.noreply.github.com>

* fix: force use of latest multiaddr-to-uri (#409)

* fix: force use of latest multiaddr-to-uri

* chore: don't specify latest multiaddr-to-uri in package.json

* fix: apply dns resolvers corectly (#412)

Co-authored-by: Daniel N <2color@users.noreply.github.com>

* deps: update kubo-rpc-client (#417)

* chore: auto-pr workflow for staging/prod PRs

* chore: fix auto-release-pr workflow

* chore: fix auto-release-pr workflow PR titles

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel N <2color@users.noreply.github.com>
Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
SgtPooki added a commit that referenced this pull request Nov 13, 2024
* fix: remove auto-reload config and default to true (#319)

* fix: remove auto-reload config and default to true

* test: fix ci layout test

* test: fix some playwright tests

* test: fix firefox e2e tests

* test: fix first-hit e2e tests

* chore: code cleanup self review

* deps(dev): bump playwright from 1.45.0 to 1.45.3 (#331)

Bumps [playwright](https://github.com/microsoft/playwright) from 1.45.0 to 1.45.3.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](microsoft/playwright@v1.45.0...v1.45.3)

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: build with esbuild, apply source maps (#392)

* feat: use esbuild for building

* feat: remove webpack

* test: fix e2e tests

* chore: remove timeout only required on my network

* chore: remove copyfiles

* chore: suggestions from self code review

* fix: use code-splitting

* fix: firefox doesn't like ESM service workers

* fix: remove type in sw registration

* feat: add git version into index.html

---------

Co-authored-by: Daniel N <2color@users.noreply.github.com>

* fix: service worker logs are visible again (#395)

* fix: service worker logs are visible again

* chore: self pr suggestion

* fix: remove fonts from dist folder (#394)

* fix: remove fonts from dist folder

* chore: install http-server for playwright

* fix: use more ipfs-sw prefixes (#396)

* fix: use enable from @libp2p/logger (#398)

* feat: add p2p retrieval option (#391)

* feat: add config toggle for p2p retrieval

* deps: add helia and bump verified fetch

* feat: load p2p helia

* chore: remove console.log

* feat: try to make recursive gateways optional

* fixup! feat: add config toggle for p2p retrieval

* chore: aegir lint --fix

* chore: install missing deps

* feat: use esbuild for building

* feat: remove webpack

* test: fix e2e tests

* chore: remove timeout only required on my network

* chore: remove copyfiles

* chore: suggestions from self code review

* fix: gateways null when loading sw

* fix: use code-splitting

* fix: firefox doesn't like ESM service workers

* fix: remove type in sw registration

* feat: add git version into index.html

* Revert "feat: try to make recursive gateways optional"

This reverts commit eba97a4.

* fix: bug returning an array with 1 el

* ui: improve contrast for disabled toggle

* feat: add granular config options

* test: fix config layout test

* deps: add missing deps

* fix: unused deps

* fix: make toggles smaller

* fix: avoid setting defaults in inputs

* feat: allow a single router for now

* chore: rename to get verified fetch

* feat: reorder config

* feat: add additional title

* fix: break config UI into sections

* chore: output localhost as listening host

* fix: allow multiple routers

see #402

* fix: run validation onblur to allow editing

* fix: log config as string

otherwise it's not viewable in the console

* feat: add ipip-484 filtering to delegated router

* chore: more left padding on input section

Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>

---------

Co-authored-by: Daniel N <2color@users.noreply.github.com>
Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>

* chore(main): release 1.4.0 (#334)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: support discovery of /tls/../ws|http  providers (#405)

* fix: support direct retrieval from /tls/sni/../ws
* fix: safelist multiaddrs with /tls
* fix: include /tls/../http in addition to /https
* chore: reference someguy issue

---------

Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>

* chore(main): release 1.4.1 (#407)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* deps: update helia and libp2p (#408)

Co-authored-by: Daniel N <2color@users.noreply.github.com>

* fix: force use of latest multiaddr-to-uri (#409)

* fix: force use of latest multiaddr-to-uri

* chore: don't specify latest multiaddr-to-uri in package.json

* fix: apply dns resolvers corectly (#412)

Co-authored-by: Daniel N <2color@users.noreply.github.com>

* deps: update kubo-rpc-client (#417)

* chore: auto-pr workflow for staging/prod PRs

* chore: fix auto-release-pr workflow

* chore: fix auto-release-pr workflow PR titles

* feat: add blake3 hasher (#421)

* feat: add blake3 hasher

* chore: add comment about code

---------

Co-authored-by: Daniel N <2color@users.noreply.github.com>

* deps(dev): bump rimraf from 5.0.7 to 6.0.1 (#324)

Bumps [rimraf](https://github.com/isaacs/rimraf) from 5.0.7 to 6.0.1.
- [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md)
- [Commits](isaacs/rimraf@v5.0.7...v6.0.1)

---
updated-dependencies:
- dependency-name: rimraf
  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>

* chore: release PRs use exact commits and linear history

* chore: attempt to point release branches at tags

* chore: enable workflow dispatch for auto-release-pr

* chore(main): release 1.5.0 (#410)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore: replace set-output with GITHUB_OUTPUT

see https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/\#examples

* chore: auto-release-pr triggers on new tags

* chore: remove branch check and put tag name in pr

* chore: do not force push to staging or prod on every tag...

* chore: ensure the base branch is set in auto-release-pr

* deps: bump multiformats from 13.3.0 to 13.3.1 (#416)

Bumps [multiformats](https://github.com/multiformats/js-multiformats) from 13.3.0 to 13.3.1.
- [Release notes](https://github.com/multiformats/js-multiformats/releases)
- [Changelog](https://github.com/multiformats/js-multiformats/blob/master/CHANGELOG.md)
- [Commits](multiformats/js-multiformats@v13.3.0...v13.3.1)

---
updated-dependencies:
- dependency-name: multiformats
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* deps(dev): bump kubo from 0.27.0 to 0.31.0 (#390)

Bumps [kubo](https://github.com/ipfs/npm-kubo) from 0.27.0 to 0.31.0.
- [Commits](ipfs/npm-kubo@v0.27.0...v0.31.0)

---
updated-dependencies:
- dependency-name: kubo
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: delegated routing request deduplication and caching

Bumps [@helia/delegated-routing-v1-http-api-client](https://github.com/ipfs/helia-delegated-routing-v1-http-api) from 4.1.1 to 4.2.0.
- [Release notes](https://github.com/ipfs/helia-delegated-routing-v1-http-api/releases)
- [Changelog](https://github.com/ipfs/helia-delegated-routing-v1-http-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ipfs/helia-delegated-routing-v1-http-api/compare/@helia/delegated-routing-v1-http-api-client-4.1.1...@helia/delegated-routing-v1-http-api-client-4.2.0)

---
updated-dependencies:
- dependency-name: "@helia/delegated-routing-v1-http-api-client"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(main): release 1.6.0 (#436)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

chore: Merge staging into production (#420)

* fix: remove auto-reload config and default to true (#319)

* fix: remove auto-reload config and default to true

* test: fix ci layout test

* test: fix some playwright tests

* test: fix firefox e2e tests

* test: fix first-hit e2e tests

* chore: code cleanup self review

* deps(dev): bump playwright from 1.45.0 to 1.45.3 (#331)

Bumps [playwright](https://github.com/microsoft/playwright) from 1.45.0 to 1.45.3.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](microsoft/playwright@v1.45.0...v1.45.3)

---
updated-dependencies:
- dependency-name: playwright
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: build with esbuild, apply source maps (#392)

* feat: use esbuild for building

* feat: remove webpack

* test: fix e2e tests

* chore: remove timeout only required on my network

* chore: remove copyfiles

* chore: suggestions from self code review

* fix: use code-splitting

* fix: firefox doesn't like ESM service workers

* fix: remove type in sw registration

* feat: add git version into index.html

---------

Co-authored-by: Daniel N <2color@users.noreply.github.com>

* fix: service worker logs are visible again (#395)

* fix: service worker logs are visible again

* chore: self pr suggestion

* fix: remove fonts from dist folder (#394)

* fix: remove fonts from dist folder

* chore: install http-server for playwright

* fix: use more ipfs-sw prefixes (#396)

* fix: use enable from @libp2p/logger (#398)

* feat: add p2p retrieval option (#391)

* feat: add config toggle for p2p retrieval

* deps: add helia and bump verified fetch

* feat: load p2p helia

* chore: remove console.log

* feat: try to make recursive gateways optional

* fixup! feat: add config toggle for p2p retrieval

* chore: aegir lint --fix

* chore: install missing deps

* feat: use esbuild for building

* feat: remove webpack

* test: fix e2e tests

* chore: remove timeout only required on my network

* chore: remove copyfiles

* chore: suggestions from self code review

* fix: gateways null when loading sw

* fix: use code-splitting

* fix: firefox doesn't like ESM service workers

* fix: remove type in sw registration

* feat: add git version into index.html

* Revert "feat: try to make recursive gateways optional"

This reverts commit eba97a4.

* fix: bug returning an array with 1 el

* ui: improve contrast for disabled toggle

* feat: add granular config options

* test: fix config layout test

* deps: add missing deps

* fix: unused deps

* fix: make toggles smaller

* fix: avoid setting defaults in inputs

* feat: allow a single router for now

* chore: rename to get verified fetch

* feat: reorder config

* feat: add additional title

* fix: break config UI into sections

* chore: output localhost as listening host

* fix: allow multiple routers

see #402

* fix: run validation onblur to allow editing

* fix: log config as string

otherwise it's not viewable in the console

* feat: add ipip-484 filtering to delegated router

* chore: more left padding on input section

Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>

---------

Co-authored-by: Daniel N <2color@users.noreply.github.com>
Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>

* chore(main): release 1.4.0 (#334)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: support discovery of /tls/../ws|http  providers (#405)

* fix: support direct retrieval from /tls/sni/../ws
* fix: safelist multiaddrs with /tls
* fix: include /tls/../http in addition to /https
* chore: reference someguy issue

---------

Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>

* chore(main): release 1.4.1 (#407)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* deps: update helia and libp2p (#408)

Co-authored-by: Daniel N <2color@users.noreply.github.com>

* fix: force use of latest multiaddr-to-uri (#409)

* fix: force use of latest multiaddr-to-uri

* chore: don't specify latest multiaddr-to-uri in package.json

* fix: apply dns resolvers corectly (#412)

Co-authored-by: Daniel N <2color@users.noreply.github.com>

* deps: update kubo-rpc-client (#417)

* chore: auto-pr workflow for staging/prod PRs

* chore: fix auto-release-pr workflow

* chore: fix auto-release-pr workflow PR titles

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel N <2color@users.noreply.github.com>
Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel N <2color@users.noreply.github.com>
Co-authored-by: Daniel Norman <1992255+2color@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
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.

2 participants