playwright-core 1.58.0-alpha-2025-12-10 → 1.58.0-alpha-2025-12-11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
4
4
 
5
5
  This 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.
6
6
 
7
- - @lowire/loop@0.0.6 (https://github.com/pavelfeldman/lowire)
7
+ - @lowire/loop@0.0.7 (https://github.com/pavelfeldman/lowire)
8
8
  - @modelcontextprotocol/sdk@1.24.2 (https://github.com/modelcontextprotocol/typescript-sdk)
9
9
  - accepts@2.0.0 (https://github.com/jshttp/accepts)
10
10
  - agent-base@7.1.4 (https://github.com/TooTallNate/proxy-agents)
@@ -135,7 +135,7 @@ This project incorporates components from the projects listed below. The origina
135
135
  - zod-to-json-schema@3.25.0 (https://github.com/StefanTerdell/zod-to-json-schema)
136
136
  - zod@3.25.76 (https://github.com/colinhacks/zod)
137
137
 
138
- %% @lowire/loop@0.0.6 NOTICES AND INFORMATION BEGIN HERE
138
+ %% @lowire/loop@0.0.7 NOTICES AND INFORMATION BEGIN HERE
139
139
  =========================================
140
140
  Apache License
141
141
  Version 2.0, January 2004
@@ -339,7 +339,7 @@ Apache License
339
339
  See the License for the specific language governing permissions and
340
340
  limitations under the License.
341
341
  =========================================
342
- END OF @lowire/loop@0.0.6 AND INFORMATION
342
+ END OF @lowire/loop@0.0.7 AND INFORMATION
343
343
 
344
344
  %% @modelcontextprotocol/sdk@1.24.2 NOTICES AND INFORMATION BEGIN HERE
345
345
  =========================================
package/browsers.json CHANGED
@@ -17,14 +17,14 @@
17
17
  },
18
18
  {
19
19
  "name": "chromium-tip-of-tree",
20
- "revision": "1389",
20
+ "revision": "1390",
21
21
  "installByDefault": false,
22
22
  "browserVersion": "144.0.7559.3",
23
23
  "title": "Chrome Canary for Testing"
24
24
  },
25
25
  {
26
26
  "name": "chromium-tip-of-tree-headless-shell",
27
- "revision": "1389",
27
+ "revision": "1390",
28
28
  "installByDefault": false,
29
29
  "browserVersion": "144.0.7559.3",
30
30
  "title": "Chrome Canary Headless Shell"
@@ -62,11 +62,9 @@ class Browser extends import_channelOwner.ChannelOwner {
62
62
  context._onClose();
63
63
  await this._channel.disconnectFromReusedContext({ reason });
64
64
  }
65
- async _innerNewContext(options = {}, forReuse) {
66
- options = this._browserType._playwright.selectors._withSelectorOptions({
67
- ...this._browserType._playwright._defaultContextOptions,
68
- ...options
69
- });
65
+ async _innerNewContext(userOptions = {}, forReuse) {
66
+ const options = this._browserType._playwright.selectors._withSelectorOptions(userOptions);
67
+ await this._instrumentation.runBeforeCreateBrowserContext(options);
70
68
  const contextOptions = await (0, import_browserContext.prepareBrowserContextParams)(this._platform, options);
71
69
  const response = forReuse ? await this._channel.newContextForReuse(contextOptions) : await this._channel.newContext(contextOptions);
72
70
  const context = import_browserContext.BrowserContext.from(response.context);
@@ -73,13 +73,13 @@ class BrowserType extends import_channelOwner.ChannelOwner {
73
73
  return await this._serverLauncher.launchServer(options);
74
74
  }
75
75
  async launchPersistentContext(userDataDir, options = {}) {
76
- const logger = options.logger || this._playwright._defaultLaunchOptions?.logger;
77
76
  (0, import_assert.assert)(!options.port, "Cannot specify a port without launching as a server.");
78
77
  options = this._playwright.selectors._withSelectorOptions({
79
78
  ...this._playwright._defaultLaunchOptions,
80
- ...this._playwright._defaultContextOptions,
81
79
  ...options
82
80
  });
81
+ await this._instrumentation.runBeforeCreateBrowserContext(options);
82
+ const logger = options.logger || this._playwright._defaultLaunchOptions?.logger;
83
83
  const contextParams = await (0, import_browserContext.prepareBrowserContextParams)(this._platform, options);
84
84
  const persistentParams = {
85
85
  ...contextParams,
@@ -39,10 +39,8 @@ class APIRequest {
39
39
  this._playwright = playwright;
40
40
  }
41
41
  async newContext(options = {}) {
42
- options = {
43
- ...this._playwright._defaultContextOptions,
44
- ...options
45
- };
42
+ options = { ...options };
43
+ await this._playwright._instrumentation.runBeforeCreateRequestContext(options);
46
44
  const storageState = typeof options.storageState === "string" ? JSON.parse(await this._playwright._platform.fs().promises.readFile(options.storageState, "utf8")) : options.storageState;
47
45
  const context = APIRequestContext.from((await this._playwright._channel.newRequest({
48
46
  ...options,