Skip to content

Commit 2701c3c

Browse files
Merge pull request #11 from solid/update-deps
Update dependencies
2 parents a2e2b21 + b55a38c commit 2701c3c

File tree

8 files changed

+1379
-1412
lines changed

8 files changed

+1379
-1412
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ sudo: false
22

33
language: node_js
44

5-
node_js: "8.10"
5+
node_js: "12"
66

77
script: npm run test

package-lock.json

Lines changed: 1339 additions & 1404 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"build-dist": "webpack --progress",
1515
"dist": "npm run build-dist",
1616
"prepare": "npm run build-dist",
17-
"test": "mocha test",
17+
"test": "mocha --recursive test",
1818
"jsdoc": "jsdoc -c jsdoc.json -r"
1919
},
2020
"repository": {
@@ -46,16 +46,16 @@
4646
"dependencies": {
4747
"@sinonjs/text-encoding": "^0.7.1",
4848
"base64url": "^3.0.1",
49-
"isomorphic-webcrypto": "^2.3.2"
49+
"isomorphic-webcrypto": "^2.3.6"
5050
},
5151
"devDependencies": {
5252
"babel-cli": "^6.26.0",
5353
"babel-preset-env": "^1.7.0",
5454
"chai": "^4.2.0",
5555
"chai-as-promised": "^7.1.1",
5656
"dirty-chai": "^2.0.1",
57-
"mocha": "^6.2.2",
58-
"webpack": "^4.41.2",
59-
"webpack-cli": "^3.3.10"
57+
"mocha": "^8.0.1",
58+
"webpack": "^4.44.0",
59+
"webpack-cli": "^3.3.12"
6060
}
6161
}

src/algorithms/RSASSA-PKCS1-v1_5.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @ignore
66
*/
77
const base64url = require('base64url')
8-
const crypto = require('isomorphic-webcrypto')
8+
let crypto = require('../crypto')
99
const TextEncoder = require('../text-encoder')
1010

1111
/**

src/crypto.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const imported = require('isomorphic-webcrypto')
2+
3+
module.exports = (imported.default ? imported.default : imported)

src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/**
22
* @module JSON Object Signing and Encryption (JOSE)
33
*/
4+
const crypto = require('./crypto')
45
const JWA = require('./jose/JWA')
56
const JWK = require('./jose/JWK')
67
const JWKSet = require('./jose/JWKSet')
@@ -11,6 +12,7 @@ const JWS = require('./jose/JWS')
1112
* Export
1213
*/
1314
module.exports = {
15+
crypto,
1416
JWA,
1517
JWK,
1618
JWKSet,

test/cryptoSpec.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
'use strict'
2+
3+
/**
4+
* Test dependencies
5+
*/
6+
const chai = require('chai')
7+
const chaiAsPromised = require('chai-as-promised')
8+
9+
/**
10+
* Assertions
11+
*/
12+
chai.should()
13+
chai.use(chaiAsPromised)
14+
let expect = chai.expect
15+
16+
/**
17+
* Code under test
18+
*/
19+
const Index = require('../src/')
20+
21+
/**
22+
* Tests
23+
*/
24+
describe('Index', () => {
25+
it('exports crypto', () => {
26+
return Object.keys(Index.crypto).should.deep.equal(['subtle'])
27+
})
28+
})

test/mocha.opts

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)