Skip to content

Commit

Permalink
chore: fix production history (#445)
Browse files Browse the repository at this point in the history
* 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] <[email protected]>
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 <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: Daniel N <[email protected]>
Co-authored-by: Russell Dempsey <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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] <[email protected]>
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] <[email protected]>
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] <[email protected]>
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] <[email protected]>
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] <[email protected]>
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 <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: Daniel N <[email protected]>
Co-authored-by: Russell Dempsey <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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] <[email protected]>
Co-authored-by: Russell Dempsey <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel N <[email protected]>
Co-authored-by: Daniel Norman <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Marcin Rataj <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel N <[email protected]>
Co-authored-by: Daniel Norman <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Marcin Rataj <[email protected]>
  • Loading branch information
6 people authored Nov 13, 2024
1 parent b43ff32 commit a39980f
Show file tree
Hide file tree
Showing 6 changed files with 189 additions and 42 deletions.
48 changes: 31 additions & 17 deletions .github/workflows/auto-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Auto release PR

on:
push:
branches:
- main
- staging
tags:
- '*'
workflow_dispatch:

permissions:
contents: write # to create release
Expand All @@ -13,37 +13,51 @@ permissions:
jobs:
# from https://github.com/peter-evans/create-pull-request/blob/main/docs/examples.md#keep-a-branch-up-to-date-with-another
productionRelease:
if: github.ref == 'refs/heads/staging'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: production
- name: Create PR from staging to production
- name: Fetch all tags
run: git fetch --tags
- name: Get latest tag
id: get_latest_tag
run: echo "tag=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_OUTPUT
- name: Checkout latest tag
run: git checkout ${{ steps.get_latest_tag.outputs.tag }}
- name: Ensure production-release branch points to latest tag
run: |
git fetch origin main:main
git reset --hard main
git checkout -B production-release ${{ steps.get_latest_tag.outputs.tag }}
git push origin production-release --force
- name: Create Pull Request
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
uses: peter-evans/[email protected]
with:
base: production
branch: production-release
title: 'chore: Merge staging into production'
body: 'This PR merges commits from staging into production.'
title: 'chore: Point production to release ${{ steps.get_latest_tag.outputs.tag }}'
body: 'This PR points the production branch to release ${{ steps.get_latest_tag.outputs.tag }}.'

stagingRelease:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: staging
- name: Create PR from main to staging
- name: Fetch all tags
run: git fetch --tags
- name: Get latest tag
id: get_latest_tag
run: echo "tag=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_OUTPUT
- name: Checkout latest tag
run: git checkout ${{ steps.get_latest_tag.outputs.tag }}
- name: Ensure staging-release branch points to latest tag
run: |
git fetch origin main:main
git reset --hard main
git checkout -B staging-release ${{ steps.get_latest_tag.outputs.tag }}
git push origin staging-release --force
- name: Create Pull Request
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
uses: peter-evans/[email protected]
with:
base: staging
branch: staging-release
title: 'chore: Merge main into staging'
body: 'This PR merges commits from main into staging.'
title: 'chore: point staging to release ${{ steps.get_latest_tag.outputs.tag }}'
body: 'This PR points the staging branch to release ${{ steps.get_latest_tag.outputs.tag }}.'
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## [1.6.0](https://github.com/ipfs/service-worker-gateway/compare/v1.5.0...v1.6.0) (2024-11-11)


### Features

* delegated routing request deduplication and caching ([90c48a0](https://github.com/ipfs/service-worker-gateway/commit/90c48a070e2316bb83bf97400c9ae07d8ac4acc8))

## [1.5.0](https://github.com/ipfs/service-worker-gateway/compare/v1.4.1...v1.5.0) (2024-11-05)


### Features

* add blake3 hasher ([#421](https://github.com/ipfs/service-worker-gateway/issues/421)) ([6270acd](https://github.com/ipfs/service-worker-gateway/commit/6270acd2696417afe2b61803278f461636c3a69a))


### Bug Fixes

* apply dns resolvers corectly ([#412](https://github.com/ipfs/service-worker-gateway/issues/412)) ([ba0ede9](https://github.com/ipfs/service-worker-gateway/commit/ba0ede9f3c050f20adf5cd391818d332e9b301b8))
* force use of latest multiaddr-to-uri ([#409](https://github.com/ipfs/service-worker-gateway/issues/409)) ([4915b34](https://github.com/ipfs/service-worker-gateway/commit/4915b346cb64514e47102de32aec74a88e67cd5e))

## [1.4.1](https://github.com/ipfs/service-worker-gateway/compare/v1.4.0...v1.4.1) (2024-10-25)


Expand Down
139 changes: 119 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "helia-service-worker-gateway",
"version": "1.4.1",
"version": "1.6.0",
"private": true,
"type": "module",
"description": "An IPFS Gateway that uses @helia/verified-fetch in a Service Worker to fetch content",
Expand Down Expand Up @@ -42,7 +42,7 @@
"@chainsafe/libp2p-noise": "^16.0.0",
"@chainsafe/libp2p-yamux": "^7.0.1",
"@helia/block-brokers": "^4.0.1",
"@helia/delegated-routing-v1-http-api-client": "^4.1.1",
"@helia/delegated-routing-v1-http-api-client": "^4.2.0",
"@helia/http": "^2.0.1",
"@helia/interface": "^5.0.0",
"@helia/routers": "^2.1.0",
Expand All @@ -56,11 +56,12 @@
"@libp2p/websockets": "^9.0.11",
"@libp2p/webtransport": "^5.0.16",
"@multiformats/dns": "^1.0.6",
"@noble/hashes": "^1.5.0",
"@sgtpooki/file-type": "^1.0.1",
"helia": "^5.1.0",
"ipfs-css": "^1.4.0",
"libp2p": "^2.2.1",
"multiformats": "^13.1.0",
"multiformats": "^13.3.1",
"react": "^18.3.0",
"react-dom": "^18.3.1",
"tachyons": "^4.12.0"
Expand All @@ -80,12 +81,12 @@
"glob": "^10.3.12",
"http-server": "^14.1.1",
"ipfsd-ctl": "^13.0.0",
"kubo": "^0.27.0",
"kubo": "^0.31.0",
"kubo-rpc-client": "^5.0.2",
"npm-run-all": "^4.1.5",
"patch-package": "^8.0.0",
"playwright": "^1.45.3",
"rimraf": "^5.0.5"
"rimraf": "^6.0.1"
},
"sideEffects": [
"*.css"
Expand Down
8 changes: 8 additions & 0 deletions src/lib/blake3.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { blake3 as b3 } from '@noble/hashes/blake3'
import { from } from 'multiformats/hashes/hasher'

export const blake3 = from({
name: 'blake3',
code: 0x1e, // Code for blake3 from https://github.com/multiformats/multicodec/blob/352d05ad430713088e867216152725f581387bc8/table.csv#L21
encode: (input) => b3(input)
})
Loading

0 comments on commit a39980f

Please sign in to comment.