Skip to content

Commit 0d36dfa

Browse files
Switch to a maintained text-encoder lib.
1 parent ab1ee4a commit 0d36dfa

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

package-lock.json

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
},
4545
"homepage": "https://github.com/solid/jose#README",
4646
"dependencies": {
47+
"@sinonjs/text-encoding": "^0.7.1",
4748
"base64url": "^3.0.0",
48-
"isomorphic-webcrypto": "^2.3.2",
49-
"text-encoding": "^0.7.0"
49+
"isomorphic-webcrypto": "^2.3.2"
5050
},
5151
"devDependencies": {
5252
"babel-cli": "^6.26.0",

src/text-encoder/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
const TextEncoder = global.TextEncoder
22
? global.TextEncoder // browser
3-
: require('text-encoding').TextEncoder // node shim
3+
: require('@sinonjs/text-encoding').TextEncoder // node shim
44
module.exports = TextEncoder

test/algorithms/HMACSpec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ let expect = chai.expect
1515
* Code under test
1616
*/
1717
const HMAC = require('../../src/algorithms/HMAC')
18-
const {TextEncoder} = require('text-encoding')
18+
const {TextEncoder} = require('@sinonjs/text-encoding')
1919
const crypto = require('isomorphic-webcrypto')
2020
const base64url = require('base64url')
2121

webpack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
module: {
1515
},
1616
externals: {
17-
'text-encoding': 'TextEncoder',
17+
'@sinonjs/text-encoding': 'TextEncoder',
1818
'isomorphic-webcrypto': 'crypto'
1919
},
2020
devtool: 'source-map'

0 commit comments

Comments
 (0)