Deprecations
murbanowicz opened this issue · 3 comments
murbanowicz commented
(node:1133) [DEP0091] DeprecationWarning: crypto.DEFAULT_ENCODING is deprecated.
(node:1133) [DEP0010] DeprecationWarning: crypto.createCredentials is deprecated. Use tls.createSecureContext instead.
(node:1133) [DEP0011] DeprecationWarning: crypto.Credentials is deprecated. Use tls.SecureContext instead.[root]
Are you aware of this?
levino commented
No I am not. But it is kind of a non-issue as this is not really a security related package. I am grateful for your PR though and will review it shortly.
levino commented
When the tests run in CI I do not get any warnings like this.
#!/bin/bash -eo pipefail
npm install
npm WARN deprecated @types/koa-jwt@3.3.0: This is a stub types definition for koa-jwt (https://github.com/koajs/jwt). koa-jwt provides its own type definitions, so you don't need @types/koa-jwt installed!
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN ts-jest@22.4.6 requires a peer of jest@^22.4.0 || ^22.5.0-alpha.1 || ^23.0.0-alpha.1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
added 655 packages in 9.001s
#!/bin/bash -eo pipefail
npm run test
> mock-jwks@0.1.9 test /root/project
> tape -r ts-node/register '**/__tests__/**/*.{js,ts}'
TAP version 13
# Tests for JWKS being correctly consumed by jwks-rsa client
# should get the correct key from the jwks endpoint
ok 1 (unnamed assert)
# should verify a token with the public key from the JWKS
ok 2 (unnamed assert)
# Tests for jwt creation
# should sign a jwt
ok 3 should be truthy
ok 4 should be truthy
# Testing the private key creation for mocking
# should create a private key
ok 5 should be truthy
# should create a signed certificate from a keypair
ok 6 should be truthy
# should create a JWKS from a keypair
ok 7 should be truthy
# Some tests for authentication for our api
# should not get access without correct token
ok 8 should be equal
# should get access with mock token when jwksMock is running
ok 9 should be equal
# should not get access with mock token when jwksMock is not running
ok 10 should be equal
# Another example with a non-auth0-style jkwsUri
ok 11 should be equal
1..11
# tests 11
# pass 11
# ok
Please tell me:
- Which command are you using?
- Which node version are you using?
levino commented