Skip to content

Commit

Permalink
fix: remove utf8-encoder package dependency (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
agazso authored Jan 28, 2021
1 parent 8851892 commit e5b9e12
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 12 deletions.
5 changes: 0 additions & 5 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 @@
"isomorphic-ws": "^4.0.1",
"js-sha3": "^0.8.0",
"tar-js": "^0.3.0",
"utf8-encoder": "^1.0.1",
"ws": "^7.4.1"
},
"devDependencies": {
Expand Down
4 changes: 0 additions & 4 deletions src/types/utf8-encoder.d.ts

This file was deleted.

3 changes: 1 addition & 2 deletions src/utils/tar.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Collection } from '../types'
import Tar from 'tar-js'
import * as utf8 from 'utf8-encoder'

// this is a workaround type so that we are able to pass in Uint8Arrays
// as string to `tar.append`
Expand All @@ -12,7 +11,7 @@ interface StringLike {
// converts a string to utf8 Uint8Array and returns it as a string-like
// object that `tar.append` accepts as path
function fixUnicodePath(path: string): StringLike {
const codes = utf8.fromString(path)
const codes = new TextEncoder().encode(path)

return {
length: codes.length,
Expand Down

0 comments on commit e5b9e12

Please sign in to comment.