Nnodejs

nodejs/tls-create-secure-pair-to-tls-socket

Handle DEP0064 by transforming `createSecurePair` to `TLSSocket`

transformationmigrationtlscreateSecurePairTLSSocket
Public
1 executions
Run locally
npx codemod @nodejs/tls-create-secure-pair-to-tls-socket
Documentation

tls.createSecurePair deprecation DEP0064

This recipe transforms the usage from the deprecated createSecurePair() to TLSSocket().

See DEP0064.

Examples

1) Basic createSecurePair usage

diff

2) Namespace import (CJS)

diff

3) With server context

diff

4) ESM named import

diff

5) ESM namespace import

diff

6) Mixed usage with other TLS functions

diff

7) ESM default import

diff

8) ESM dynamic import (assignment)

diff

9) ESM dynamic import (thenable)

diff

Ready to contribute?

Build your own codemod and share it with the community.