Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@playwright/experimental-ct-core

Package Overview
Dependencies
Maintainers
4
Versions
966
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@playwright/experimental-ct-core - npm Package Compare versions

Comparing version 1.49.0-alpha-2024-11-11 to 1.49.0-alpha-2024-11-12

19

lib/router.js

@@ -41,6 +41,14 @@ "use strict";

}
function isMswRequestPassthrough(headers) {
var _headers$get;
if (headers.get('x-msw-intention') === 'bypass') return true;
// After MSW v2.6.4
// https://github.com/mswjs/msw/commit/2fa98c327acc51189f87789d9155c4ec57be2299
if ((_headers$get = headers.get('accept')) !== null && _headers$get !== void 0 && _headers$get.includes('msw/passthrough')) return true;
return false;
}
async function globalFetch(...args) {
if (args[0] && args[0] instanceof Request) {
const request = args[0];
if (request.headers.get('x-msw-intention') === 'bypass') {
if (isMswRequestPassthrough(request.headers)) {
const cookieHeaders = await Promise.all([...currentlyInterceptingInContexts.keys()].map(async context => {

@@ -55,3 +63,10 @@ const cookies = await context.cookies(request.url);

headers.set('cookie', cookieHeaders[0]);
headers.delete('x-msw-intention');
{
var _headers$get2;
// pre 2.6.4
headers.delete('x-msw-intention');
// post 2.6.4
const accept = (_headers$get2 = headers.get('accept')) === null || _headers$get2 === void 0 ? void 0 : _headers$get2.split(',').filter(h => !h.includes('msw/')).join(',');
if (accept) headers.set('accept', accept);else headers.delete('accept');
}
args[0] = new Request(request.clone(), {

@@ -58,0 +73,0 @@ headers

6

package.json
{
"name": "@playwright/experimental-ct-core",
"version": "1.49.0-alpha-2024-11-11",
"version": "1.49.0-alpha-2024-11-12",
"description": "Playwright Component Testing Helpers",

@@ -29,6 +29,6 @@ "repository": {

"dependencies": {
"playwright-core": "1.49.0-alpha-2024-11-11",
"playwright-core": "1.49.0-alpha-2024-11-12",
"vite": "^5.2.8",
"playwright": "1.49.0-alpha-2024-11-11"
"playwright": "1.49.0-alpha-2024-11-12"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc