Skip to content

Commit

Permalink
Remove unnecessary dependency read-chunk
Browse files Browse the repository at this point in the history
Signed-off-by: Anders Kaseorg <[email protected]>
  • Loading branch information
andersk committed Nov 7, 2024
1 parent a136e78 commit 95195ff
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 16 deletions.
6 changes: 0 additions & 6 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"devDependencies": {
"file-type": "^19.6.0",
"mocha": "^10.8.2",
"read-chunk": "^5.0.0",
"sass": "^1.80.6"
}
}
6 changes: 2 additions & 4 deletions tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import _ from 'underscore'
import assert from 'assert'

import * as sass from 'sass'
import { readChunkSync } from 'read-chunk'
import { fileTypeFromBuffer } from 'file-type'
import { fileTypeFromFile } from 'file-type'

import webfontsGenerator from '../src/index.js'

Expand Down Expand Up @@ -52,8 +51,7 @@ describe('webfont', function() {

var DETECTABLE = ['ttf', 'woff', 'woff2', 'eot']
if (_.contains(DETECTABLE, type)) {
var chunk = readChunkSync(filepath, { startPosition: 0, length: 262 })
var filetype = await fileTypeFromBuffer(chunk)
var filetype = await fileTypeFromFile(filepath)
assert.equal(type, filetype && filetype.ext, 'ttf filetype is correct')
}
}
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1065,11 +1065,6 @@ randombytes@^2.1.0:
dependencies:
safe-buffer "^5.1.0"

read-chunk@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/read-chunk/-/read-chunk-5.0.0.tgz#ed653bb18d89029bc076f7b981717c1b8b5b066b"
integrity sha512-kEiU3Y6ET/R1CEpS29aupxwGd19P4y3Y50x0CNFI5j8jowtgHBlNVLH/z5KjjBT5pxixIb7eTeIMJVKTm200cw==

readable-stream@^3.4.0:
version "3.6.2"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967"
Expand Down

0 comments on commit 95195ff

Please sign in to comment.