Skip to content

Commit

Permalink
fix: Tree-shake codecs
Browse files Browse the repository at this point in the history
This avoids importing all the rest of @47ng/codec,
such as hex and other conversion helpers.
  • Loading branch information
franky47 committed Mar 13, 2020
1 parent c0addd6 commit 43aeff9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"ci": "run-s test build"
},
"dependencies": {
"@47ng/codec": "^0.4.0",
"@47ng/codec": "^0.5.0",
"tweetnacl": "^1.0.3"
},
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import nacl from 'tweetnacl'
import { utf8, b64 } from '@47ng/codec'
import utf8 from '@47ng/codec/dist/utf8'
import b64 from '@47ng/codec/dist/b64'

// --

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# yarn lockfile v1


"@47ng/codec@^0.4.0":
version "0.4.0"
resolved "https://registry.yarnpkg.com/@47ng/codec/-/codec-0.4.0.tgz#27322699f285d8ce6dfa124f7785b7c70570cffa"
integrity sha512-3PBp7/MQHaukgmsAm2+++sQ14zg3ywJjkCJwbiw8W16ZR7CTsDw18IRRaeze3U2DanOeg7ImTTFaIdvTaUhMxA==
"@47ng/codec@^0.5.0":
version "0.5.0"
resolved "https://registry.yarnpkg.com/@47ng/codec/-/codec-0.5.0.tgz#28294e5c76170ed9a1403a5bbbb9e129c11b94ce"
integrity sha512-k/+OCuagLqv52RLrbzrRv+4qL68Y/1xm1EGu4N0nUXTjzVHZ6YQmo/aWNDAChcL+CP+fyNq1BDqLttHDzbfzSA==
dependencies:
"@stablelib/base64" "^1.0.0"
"@stablelib/hex" "^1.0.0"
Expand Down

0 comments on commit 43aeff9

Please sign in to comment.