rsnext/test/e2e/app-dir/crypto-globally-available/app
Balázs Orbán 88a033fa1f
chore: expose globalThis.crypto when not available (#48941)
### What?

Exposing `globalThis.crypto`, based on [Node.js' WebCrypto
API](https://nodejs.org/api/globals.html#crypto_1)

### Why?

Similar to `fetch`, `crypto` is a popular API that is currently not
available on `globalThis` in all active Node.js versions yet.

This can help library authors to create runtime-agnostic packages.

### How?

Node.js already has the WebCrypto API that can be imported, we just
expose it on `globalThis` in Node.js versions where this is not
available.

Closes NEXT-1063

[Slack
thread](https://vercel.slack.com/archives/C03KAR5DCKC/p1681821510191059)
2023-04-28 11:18:55 +02:00
..
handler chore: expose globalThis.crypto when not available (#48941) 2023-04-28 11:18:55 +02:00
layout.tsx chore: expose globalThis.crypto when not available (#48941) 2023-04-28 11:18:55 +02:00
page.tsx chore: expose globalThis.crypto when not available (#48941) 2023-04-28 11:18:55 +02:00