Skip to content

Commit

Permalink
fix: migrate from forked file-type to original (#192)
Browse files Browse the repository at this point in the history
* fix: migrate from forked file-type to original

* chore: fix deps after moving content-type-parser
  • Loading branch information
SgtPooki authored Mar 10, 2025
1 parent 0d63018 commit 28320e1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/verified-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@
"@libp2p/webrtc": "^5.1.0",
"@libp2p/websockets": "^9.1.5",
"@multiformats/dns": "^1.0.6",
"@sgtpooki/file-type": "^1.0.1",
"cborg": "^4.2.8",
"file-type": "^20.4.0",
"hashlru": "^2.3.0",
"helia": "^5.2.1",
"interface-blockstore": "^5.3.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/verified-fetch/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
*
* ```typescript
* import { createVerifiedFetch } from '@helia/verified-fetch'
* import { fileTypeFromBuffer } from '@sgtpooki/file-type'
* import { fileTypeFromBuffer } from 'file-type'
*
* const fetch = await createVerifiedFetch({
* gateways: ['https://trustless-gateway.link'],
Expand Down
2 changes: 1 addition & 1 deletion packages/verified-fetch/src/utils/content-type-parser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { logger } from '@libp2p/logger'
import { fileTypeFromBuffer } from '@sgtpooki/file-type'
import { fileTypeFromBuffer } from 'file-type'

const log = logger('helia:verified-fetch:content-type-parser')

Expand Down
4 changes: 2 additions & 2 deletions packages/verified-fetch/test/content-type-parser.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { unixfs } from '@helia/unixfs'
import { stop } from '@libp2p/interface'
import { fileTypeFromBuffer } from '@sgtpooki/file-type'
import { expect } from 'aegir/chai'
import { fileTypeFromBuffer } from 'file-type'
import { filetypemime } from 'magic-bytes.js'
import { CID } from 'multiformats/cid'
import Sinon from 'sinon'
Expand Down Expand Up @@ -110,7 +110,7 @@ describe('content-type-parser', () => {
expect(resp.headers.get('content-type')).to.equal('text/plain')
})

it('supports @sgtpooki/file-type as a contentTypeParser', async () => {
it('supports file-type as a contentTypeParser', async () => {
verifiedFetch = new VerifiedFetch({
helia
}, {
Expand Down

0 comments on commit 28320e1

Please sign in to comment.