Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore(deps): bump hono to 4.12.5 and @hono/node-server to 1.19.11 (#39531)
Dmitry Gozmana21a17052b92
diff --git a/package-lock.json b/package-lock.jsonindex 728681d41e..bf0748c694 100644--- a/package-lock.json+++ b/package-lock.json@@ -1000,9 +1000,9 @@}},"node_modules/@hono/node-server": {- "version": "1.19.9",- "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.9.tgz",- "integrity": "sha512-vHL6w3ecZsky+8P5MD+eFfaGTyCeOHUIFYMGpQGbrBTSmNNoxv0if69rEZ5giu36weC5saFuznL411gRX7bJDw==",+ "version": "1.19.11",+ "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.11.tgz",+ "integrity": "sha512-dr8/3zEaB+p0D2n/IUrlPF1HZm586qgJNXK1a9fhg/PzdtkK7Ksd5l312tJX2yBuALqDYBlG20QEbayqPyxn+g==","dev": true,"license": "MIT","engines": {@@ -4883,9 +4883,9 @@}},"node_modules/hono": {- "version": "4.12.2",- "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.2.tgz",- "integrity": "sha512-gJnaDHXKDayjt8ue0n8Gs0A007yKXj4Xzb8+cNjZeYsSzzwKc0Lr+OZgYwVfB0pHfUs17EPoLvrOsEaJ9mj+Tg==",+ "version": "4.12.5",+ "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.5.tgz",+ "integrity": "sha512-3qq+FUBtlTHhtYxbxheZgY8NIFnkkC/MR8u5TTsr7YZ3wixryQ3cCwn3iZbg8p8B88iDBBAYSfZDS75t8MN7Vg==","dev": true,"license": "MIT","engines": {diff --git a/packages/playwright-core/ThirdPartyNotices.txt b/packages/playwright-core/ThirdPartyNotices.txtindex cbe39c8e84..339918d781 100644--- a/packages/playwright-core/ThirdPartyNotices.txt+++ b/packages/playwright-core/ThirdPartyNotices.txt@@ -4,7 +4,7 @@ THIRD-PARTY SOFTWARE NOTICES AND INFORMATIONThis project incorporates components from the projects listed below. The original copyright notices and the licenses under which Microsoft received such components are set forth below. Microsoft reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise.-- @hono/[email protected] (https://github.com/honojs/node-server)+- @hono/[email protected] (https://github.com/honojs/node-server)- @lowire/[email protected] (https://github.com/pavelfeldman/lowire)- @modelcontextprotocol/[email protected] (https://github.com/modelcontextprotocol/typescript-sdk)- [email protected] (https://github.com/jshttp/accepts)@@ -61,7 +61,7 @@ This project incorporates components from the projects listed below. The origina- [email protected] (https://github.com/isaacs/node-graceful-fs)- [email protected] (https://github.com/inspect-js/has-symbols)- [email protected] (https://github.com/inspect-js/hasOwn)-- [email protected] (https://github.com/honojs/hono)+- [email protected] (https://github.com/honojs/hono)- [email protected] (https://github.com/jshttp/http-errors)- [email protected] (https://github.com/TooTallNate/proxy-agents)- [email protected] (https://github.com/pillarjs/iconv-lite)@@ -139,367 +139,31 @@ This project incorporates components from the projects listed below. The origina- [email protected] (https://github.com/StefanTerdell/zod-to-json-schema)- [email protected] (https://github.com/colinhacks/zod)-%% @hono/[email protected] NOTICES AND INFORMATION BEGIN HERE+%% @hono/[email protected] NOTICES AND INFORMATION BEGIN HERE=========================================-# Node.js Adapter for Hono--This adapter `@hono/node-server` allows you to run your Hono application on Node.js.-Initially, Hono wasn't designed for Node.js, but with this adapter, you can now use Hono on Node.js.-It utilizes web standard APIs implemented in Node.js version 18 or higher.--## Benchmarks--Hono is 3.5 times faster than Express.--Express:--```txt-$ bombardier -d 10s --fasthttp http://localhost:3000/--Statistics Avg Stdev Max- Reqs/sec 16438.94 1603.39 19155.47- Latency 7.60ms 7.51ms 559.89ms- HTTP codes:- 1xx - 0, 2xx - 164494, 3xx - 0, 4xx - 0, 5xx - 0- others - 0- Throughput: 4.55MB/s-```--Hono + `@hono/node-server`:--```txt-$ bombardier -d 10s --fasthttp http://localhost:3000/--Statistics Avg Stdev Max- Reqs/sec 58296.56 5512.74 74403.56- Latency 2.14ms 1.46ms 190.92ms- HTTP codes:- 1xx - 0, 2xx - 583059, 3xx - 0, 4xx - 0, 5xx - 0- others - 0- Throughput: 12.56MB/s-```--## Requirements--It works on Node.js versions greater than 18.x. The specific required Node.js versions are as follows:--- 18.x => 18.14.1+-- 19.x => 19.7.0+-- 20.x => 20.0.0+--Essentially, you can simply use the latest version of each major release.--## Installation--You can install it from the npm registry with `npm` command:--```sh-npm install @hono/node-server-```--Or use `yarn`:--```sh-yarn add @hono/node-server-```--## Usage--Just import `@hono/node-server` at the top and write the code as usual.-The same code that runs on Cloudflare Workers, Deno, and Bun will work.--```ts-import { serve } from '@hono/node-server'-import { Hono } from 'hono'--const app = new Hono()-app.get('/', (c) => c.text('Hono meets Node.js'))--serve(app, (info) => {- console.log(`Listening on http://localhost:${info.port}`) // Listening on http://localhost:3000-})-```--For example, run it using `ts-node`. Then an HTTP server will be launched. The default port is `3000`.--```sh-ts-node ./index.ts-```--Open `http://localhost:3000` with your browser.--## Options--### `port`--```ts-serve({- fetch: app.fetch,- port: 8787, // Port number, default is 3000-})-```--### `createServer`--```ts-import { createServer } from 'node:https'-import fs from 'node:fs'--//...--serve({- fetch: app.fetch,- createServer: createServer,- serverOptions: {- key: fs.readFileSync('test/fixtures/keys/agent1-key.pem'),- cert: fs.readFileSync('test/fixtures/keys/agent1-cert.pem'),- },-})-```--### `overrideGlobalObjects`--The default value is `true`. The Node.js Adapter rewrites the global Request/Response and uses a lightweight Request/Response to improve performance. If you don't want to do that, set `false`.--```ts-serve({- fetch: app.fetch,- overrideGlobalObjects: false,-})-```--### `autoCleanupIncoming`--The default value is `true`. The Node.js Adapter automatically cleans up (explicitly call `destroy()` method) if application is not finished to consume the incoming request. If you don't want to do that, set `false`.--If the application accepts connections from arbitrary clients, this cleanup must be done otherwise incomplete requests from clients may cause the application to stop responding. If your application only accepts connections from trusted clients, such as in a reverse proxy environment and there is no process that returns a response without reading the body of the POST request all the way through, you can improve performance by setting it to `false`.--```ts-serve({- fetch: app.fetch,- autoCleanupIncoming: false,-})-```--## Middleware--Most built-in middleware also works with Node.js.-Read [the documentation](https://hono.dev/middleware/builtin/basic-auth) and use the Middleware of your liking.--```ts-import { serve } from '@hono/node-server'-import { Hono } from 'hono'-import { prettyJSON } from 'hono/pretty-json'--const app = new Hono()--app.get('*', prettyJSON())-app.get('/', (c) => c.json({ 'Hono meets': 'Node.js' }))--serve(app)-```--## Serve Static Middleware--Use Serve Static Middleware that has been created for Node.js.--```ts-import { serveStatic } from '@hono/node-server/serve-static'--//...--app.use('/static/*', serveStatic({ root: './' }))-```--If using a relative path, `root` will be relative to the current working directory from which the app was started.--This can cause confusion when running your application locally.--Imagine your project structure is:--```-my-hono-project/- src/- index.ts- static/- index.html-```--Typically, you would run your app from the project's root directory (`my-hono-project`),-so you would need the following code to serve the `static` folder:--```ts-app.use('/static/*', serveStatic({ root: './static' }))-```--Notice that `root` here is not relative to `src/index.ts`, rather to `my-hono-project`.--### Options--#### `rewriteRequestPath`--If you want to serve files in `./.foojs` with the request path `/__foo/*`, you can write like the following.--```ts-app.use(- '/__foo/*',- serveStatic({- root: './.foojs/',- rewriteRequestPath: (path: string) => path.replace(/^\/__foo/, ''),- })-)-```--#### `onFound`--You can specify handling when the requested file is found with `onFound`.--```ts-app.use(- '/static/*',- serveStatic({- // ...- onFound: (_path, c) => {- c.header('Cache-Control', `public, immutable, max-age=31536000`)- },- })-)-```--#### `onNotFound`--The `onNotFound` is useful for debugging. You can write a handle for when a file is not found.--```ts-app.use(- '/static/*',- serveStatic({- root: './non-existent-dir',- onNotFound: (path, c) => {- console.log(`${path} is not found, request to ${c.req.path}`)- },- })-)-```--#### `precompressed`--The `precompressed` option checks if files with extensions like `.br` or `.gz` are available and serves them based on the `Accept-Encoding` header. It prioritizes Brotli, then Zstd, and Gzip. If none are available, it serves the original file.--```ts-app.use(- '/static/*',- serveStatic({- precompressed: true,- })-)-```--## ConnInfo Helper--You can use the [ConnInfo Helper](https://hono.dev/docs/helpers/conninfo) by importing `getConnInfo` from `@hono/node-server/conninfo`.--```ts-import { getConnInfo } from '@hono/node-server/conninfo'--app.get('/', (c) => {- const info = getConnInfo(c) // info is `ConnInfo`- return c.text(`Your remote address is ${info.remote.address}`)-})-```--## Accessing Node.js API--You can access the Node.js API from `c.env` in Node.js. For example, if you want to specify a type, you can write the following.--```ts-import { serve } from '@hono/node-server'-import type { HttpBindings } from '@hono/node-server'-import { Hono } from 'hono'--const app = new Hono<{ Bindings: HttpBindings }>()--app.get('/', (c) => {- return c.json({- remoteAddress: c.env.incoming.socket.remoteAddress,- })-})--serve(app)-```--The APIs that you can get from `c.env` are as follows.--```ts-type HttpBindings = {- incoming: IncomingMessage- outgoing: ServerResponse-}--type Http2Bindings = {- incoming: Http2ServerRequest- outgoing: Http2ServerResponse-}-```--## Direct response from Node.js API--You can directly respond to the client from the Node.js API.-In that case, the response from Hono should be ignored, so return `RESPONSE_ALREADY_SENT`.--> [!NOTE]-> This feature can be used when migrating existing Node.js applications to Hono, but we recommend using Hono's API for new applications.--```ts-import { serve } from '@hono/node-server'-import type { HttpBindings } from '@hono/node-server'-import { RESPONSE_ALREADY_SENT } from '@hono/node-server/utils/response'-import { Hono } from 'hono'--const app = new Hono<{ Bindings: HttpBindings }>()--app.get('/', (c) => {- const { outgoing } = c.env- outgoing.writeHead(200, { 'Content-Type': 'text/plain' })- outgoing.end('Hello World\n')-- return RESPONSE_ALREADY_SENT-})--serve(app)-```--## Listen to a UNIX domain socket--You can configure the HTTP server to listen to a UNIX domain socket instead of a TCP port.--```ts-import { createAdaptorServer } from '@hono/node-server'--// ...--const socketPath ='/tmp/example.sock'--const server = createAdaptorServer(app)-server.listen(socketPath, () => {- console.log(`Listening on ${socketPath}`)-})-```--## Related projects--- Hono - <https://hono.dev>-- Hono GitHub repository - <https://github.com/honojs/hono>+MIT License-## Author+Copyright (c) 2022 - present, Yusuke Wada and Hono contributors-Yusuke Wada <https://github.com/yusukebe>+Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:-## License+The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.-MIT+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.=========================================-END OF @hono/[email protected] AND INFORMATION+END OF @hono/[email protected] AND INFORMATION%% @lowire/[email protected] NOTICES AND INFORMATION BEGIN HERE=========================================@@ -2146,7 +1810,7 @@ SOFTWARE.=========================================END OF [email protected] AND INFORMATION-%% [email protected] NOTICES AND INFORMATION BEGIN HERE+%% [email protected] NOTICES AND INFORMATION BEGIN HERE=========================================MIT License@@ -2170,7 +1834,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.=========================================-END OF [email protected] AND INFORMATION+END OF [email protected] AND INFORMATION%% [email protected] NOTICES AND INFORMATION BEGIN HERE=========================================diff --git a/packages/playwright-core/bundles/mcp/package-lock.json b/packages/playwright-core/bundles/mcp/package-lock.jsonindex 97d02480d6..bf97081852 100644--- a/packages/playwright-core/bundles/mcp/package-lock.json+++ b/packages/playwright-core/bundles/mcp/package-lock.json@@ -15,9 +15,9 @@}},"node_modules/@hono/node-server": {- "version": "1.19.9",- "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.9.tgz",- "integrity": "sha512-vHL6w3ecZsky+8P5MD+eFfaGTyCeOHUIFYMGpQGbrBTSmNNoxv0if69rEZ5giu36weC5saFuznL411gRX7bJDw==",+ "version": "1.19.11",+ "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.11.tgz",+ "integrity": "sha512-dr8/3zEaB+p0D2n/IUrlPF1HZm586qgJNXK1a9fhg/PzdtkK7Ksd5l312tJX2yBuALqDYBlG20QEbayqPyxn+g==","license": "MIT","engines": {"node": ">=18.14.1"@@ -576,9 +576,9 @@}},"node_modules/hono": {- "version": "4.12.2",- "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.2.tgz",- "integrity": "sha512-gJnaDHXKDayjt8ue0n8Gs0A007yKXj4Xzb8+cNjZeYsSzzwKc0Lr+OZgYwVfB0pHfUs17EPoLvrOsEaJ9mj+Tg==",+ "version": "4.12.5",+ "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.5.tgz",+ "integrity": "sha512-3qq+FUBtlTHhtYxbxheZgY8NIFnkkC/MR8u5TTsr7YZ3wixryQ3cCwn3iZbg8p8B88iDBBAYSfZDS75t8MN7Vg==","license": "MIT","engines": {"node": ">=16.9.0"