Skip to content

Commit f043b74

Browse files
Bump @cloudflare/unenv-preset to 2.3.1 (#8675)
Co-authored-by: Carmen Popoviciu <[email protected]>
1 parent a18155f commit f043b74

File tree

4 files changed

+23
-8
lines changed

4 files changed

+23
-8
lines changed

.changeset/green-donuts-run.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"wrangler": patch
3+
---
4+
5+
Bump `@cloudflare/unenv-preset` to 2.3.1
6+
7+
Use the workerd native implementation of `createSecureContext` and `checkServerIdentity` from `node:tls`. The functions have been implemented in `cloudflare/workerd#3754`.

fixtures/nodejs-hybrid-app/src/index.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,16 @@ async function testTls() {
208208
assert.strictEqual(typeof tls.connect, "function");
209209
assert.strictEqual(typeof tls.TLSSocket, "function");
210210
assert.strictEqual(typeof tls.checkServerIdentity, "function");
211-
assert.strictEqual(typeof tls.createSecureContext, "function");
211+
assert.strictEqual(
212+
tls.checkServerIdentity("a.com", { subject: { CN: "a.com" } }),
213+
undefined
214+
);
212215
assert.strictEqual(typeof tls.SecureContext, "function");
216+
assert.strictEqual(typeof tls.createSecureContext, "function");
217+
assert.strictEqual(
218+
tls.createSecureContext({}) instanceof tls.SecureContext,
219+
true
220+
);
213221

214222
return new Response("OK");
215223
}

packages/wrangler/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
},
7171
"dependencies": {
7272
"@cloudflare/kv-asset-handler": "workspace:*",
73-
"@cloudflare/unenv-preset": "2.3.0",
73+
"@cloudflare/unenv-preset": "2.3.1",
7474
"blake3-wasm": "2.1.5",
7575
"esbuild": "catalog:default",
7676
"miniflare": "workspace:*",

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)