Socket
Socket
Sign inDemoInstall

msw

Package Overview
Dependencies
Maintainers
1
Versions
258
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

msw - npm Package Compare versions

Comparing version 2.2.13 to 2.2.14

lib/core/GraphQLHandler-COiPfZ8k.d.ts

2

lib/core/getResponse.d.ts

@@ -1,2 +0,2 @@

import { R as RequestHandler } from './HttpResponse-vQNlixkj.js';
import { R as RequestHandler } from './HttpResponse-B07UKAkU.js';
import './typeUtils.js';

@@ -3,0 +3,0 @@

import { DocumentNode } from 'graphql';
import { c as RequestHandlerOptions, a as ResponseResolver } from './HttpResponse-vQNlixkj.js';
import { a as GraphQLQuery, b as GraphQLVariables, e as GraphQLHandlerNameSelector, G as GraphQLHandler, f as GraphQLResolverExtras, g as GraphQLResponseBody } from './GraphQLHandler-bom2Dn82.js';
import { c as RequestHandlerOptions, a as ResponseResolver } from './HttpResponse-B07UKAkU.js';
import { a as GraphQLQuery, b as GraphQLVariables, e as GraphQLHandlerNameSelector, G as GraphQLHandler, f as GraphQLResolverExtras, g as GraphQLResponseBody } from './GraphQLHandler-COiPfZ8k.js';
import { Path } from './utils/matching/matchRequestUrl.js';

@@ -5,0 +5,0 @@ import './typeUtils.js';

import 'graphql';
import '../HttpResponse-vQNlixkj.js';
import '../HttpResponse-B07UKAkU.js';
import '../utils/matching/matchRequestUrl.js';
export { E as ExpectedOperationTypeNode, G as GraphQLHandler, l as GraphQLHandlerInfo, e as GraphQLHandlerNameSelector, d as GraphQLJsonRequestBody, a as GraphQLQuery, c as GraphQLRequestBody, m as GraphQLRequestParsedResult, f as GraphQLResolverExtras, g as GraphQLResponseBody, b as GraphQLVariables, n as isDocumentNode } from '../GraphQLHandler-bom2Dn82.js';
export { E as ExpectedOperationTypeNode, G as GraphQLHandler, l as GraphQLHandlerInfo, e as GraphQLHandlerNameSelector, d as GraphQLJsonRequestBody, a as GraphQLQuery, c as GraphQLRequestBody, m as GraphQLRequestParsedResult, f as GraphQLResolverExtras, g as GraphQLResponseBody, b as GraphQLVariables, n as isDocumentNode } from '../GraphQLHandler-COiPfZ8k.js';
import '../typeUtils.js';

@@ -1,2 +0,2 @@

import { g as RequestHandlerDefaultInfo, R as RequestHandler, a as ResponseResolver, c as RequestHandlerOptions, i as ResponseResolutionContext } from '../HttpResponse-vQNlixkj.js';
import { g as RequestHandlerDefaultInfo, R as RequestHandler, a as ResponseResolver, c as RequestHandlerOptions, i as ResponseResolutionContext } from '../HttpResponse-B07UKAkU.js';
import { Path, Match, PathParams } from '../utils/matching/matchRequestUrl.js';

@@ -3,0 +3,0 @@ import '../typeUtils.js';

@@ -1,2 +0,2 @@

export { A as AsyncResponseResolverReturnType, D as DefaultBodyType, d as DefaultRequestMultipartBody, J as JsonBodyType, M as MaybeAsyncResponseResolverReturnType, R as RequestHandler, m as RequestHandlerArgs, g as RequestHandlerDefaultInfo, n as RequestHandlerExecutionResult, k as RequestHandlerInternalInfo, c as RequestHandlerOptions, a as ResponseResolver, l as ResponseResolverInfo, b as ResponseResolverReturnType } from '../HttpResponse-vQNlixkj.js';
export { A as AsyncResponseResolverReturnType, D as DefaultBodyType, d as DefaultRequestMultipartBody, J as JsonBodyType, M as MaybeAsyncResponseResolverReturnType, R as RequestHandler, m as RequestHandlerArgs, g as RequestHandlerDefaultInfo, n as RequestHandlerExecutionResult, k as RequestHandlerInternalInfo, c as RequestHandlerOptions, a as ResponseResolver, l as ResponseResolverInfo, b as ResponseResolverReturnType } from '../HttpResponse-B07UKAkU.js';
import '../typeUtils.js';

@@ -1,2 +0,2 @@

import { D as DefaultBodyType, c as RequestHandlerOptions, a as ResponseResolver } from './HttpResponse-vQNlixkj.js';
import { D as DefaultBodyType, c as RequestHandlerOptions, a as ResponseResolver } from './HttpResponse-B07UKAkU.js';
import { HttpHandler, HttpRequestResolverExtras } from './handlers/HttpHandler.js';

@@ -3,0 +3,0 @@ import { PathParams, Path } from './utils/matching/matchRequestUrl.js';

@@ -1,2 +0,2 @@

export { f as HttpResponse, H as HttpResponseInit, S as StrictRequest, e as StrictResponse } from './HttpResponse-vQNlixkj.js';
export { f as HttpResponse, H as HttpResponseInit, S as StrictRequest, e as StrictResponse } from './HttpResponse-B07UKAkU.js';
import './typeUtils.js';
export { SetupApi } from './SetupApi.js';
export { A as AsyncResponseResolverReturnType, D as DefaultBodyType, d as DefaultRequestMultipartBody, f as HttpResponse, H as HttpResponseInit, J as JsonBodyType, R as RequestHandler, c as RequestHandlerOptions, a as ResponseResolver, b as ResponseResolverReturnType, S as StrictRequest, e as StrictResponse } from './HttpResponse-vQNlixkj.js';
export { A as AsyncResponseResolverReturnType, D as DefaultBodyType, d as DefaultRequestMultipartBody, f as HttpResponse, H as HttpResponseInit, J as JsonBodyType, R as RequestHandler, c as RequestHandlerOptions, a as ResponseResolver, b as ResponseResolverReturnType, S as StrictRequest, e as StrictResponse } from './HttpResponse-B07UKAkU.js';
export { HttpRequestHandler, HttpResponseResolver, http } from './http.js';
export { HttpHandler, HttpMethods, HttpRequestParsedResult, RequestQuery } from './handlers/HttpHandler.js';
export { GraphQLRequestHandler, GraphQLResponseResolver, graphql } from './graphql.js';
export { G as GraphQLHandler, d as GraphQLJsonRequestBody, a as GraphQLQuery, c as GraphQLRequestBody, b as GraphQLVariables, P as ParsedGraphQLRequest } from './GraphQLHandler-bom2Dn82.js';
export { G as GraphQLHandler, d as GraphQLJsonRequestBody, a as GraphQLQuery, c as GraphQLRequestBody, b as GraphQLVariables, P as ParsedGraphQLRequest } from './GraphQLHandler-COiPfZ8k.js';
export { Match, Path, PathParams, matchRequestUrl } from './utils/matching/matchRequestUrl.js';

@@ -8,0 +8,0 @@ export { HandleRequestOptions, handleRequest } from './utils/handleRequest.js';

@@ -1,2 +0,2 @@

import { e as StrictResponse } from './HttpResponse-vQNlixkj.js';
import { e as StrictResponse } from './HttpResponse-B07UKAkU.js';
import './typeUtils.js';

@@ -3,0 +3,0 @@

import { EventMap, Emitter } from 'strict-event-emitter';
import { R as RequestHandler, g as RequestHandlerDefaultInfo } from './HttpResponse-vQNlixkj.js';
import { R as RequestHandler, g as RequestHandlerDefaultInfo } from './HttpResponse-B07UKAkU.js';
import { LifeCycleEventEmitter } from './sharedOptions.js';

@@ -4,0 +4,0 @@ import { Disposable } from './utils/internal/Disposable.js';

@@ -1,2 +0,2 @@

export { h as HandlersExecutionResult, i as ResponseResolutionContext, j as executeHandlers } from '../HttpResponse-vQNlixkj.js';
export { h as HandlersExecutionResult, i as ResponseResolutionContext, j as executeHandlers } from '../HttpResponse-B07UKAkU.js';
import '../typeUtils.js';
import { Emitter } from 'strict-event-emitter';
import { h as HandlersExecutionResult, R as RequestHandler } from '../HttpResponse-vQNlixkj.js';
import { h as HandlersExecutionResult, R as RequestHandler } from '../HttpResponse-B07UKAkU.js';
import { SharedOptions, LifeCycleEventsMap } from '../sharedOptions.js';

@@ -4,0 +4,0 @@ import { RequiredDeep } from '../typeUtils.js';

@@ -1,2 +0,2 @@

import { H as HttpResponseInit } from '../../HttpResponse-vQNlixkj.js';
import { H as HttpResponseInit } from '../../HttpResponse-B07UKAkU.js';
import '../../typeUtils.js';

@@ -3,0 +3,0 @@

import 'graphql';
export { j as GraphQLMultipartRequestBody, i as GraphQLParsedOperationsMap, h as ParsedGraphQLQuery, P as ParsedGraphQLRequest, p as parseDocumentNode, k as parseGraphQLRequest } from '../../GraphQLHandler-bom2Dn82.js';
import '../../HttpResponse-vQNlixkj.js';
export { j as GraphQLMultipartRequestBody, i as GraphQLParsedOperationsMap, h as ParsedGraphQLQuery, P as ParsedGraphQLRequest, p as parseDocumentNode, k as parseGraphQLRequest } from '../../GraphQLHandler-COiPfZ8k.js';
import '../../HttpResponse-B07UKAkU.js';
import '../../typeUtils.js';
import '../matching/matchRequestUrl.js';

@@ -1,2 +0,2 @@

import { d as DefaultRequestMultipartBody } from '../../HttpResponse-vQNlixkj.js';
import { d as DefaultRequestMultipartBody } from '../../HttpResponse-B07UKAkU.js';
import '../../typeUtils.js';

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

import { R as RequestHandler, g as RequestHandlerDefaultInfo, c as RequestHandlerOptions } from '../../HttpResponse-vQNlixkj.js';
import { R as RequestHandler, g as RequestHandlerDefaultInfo, c as RequestHandlerOptions } from '../../HttpResponse-B07UKAkU.js';
import '../../typeUtils.js';

@@ -3,0 +3,0 @@

@@ -28,3 +28,3 @@ "use strict";

const url = new URL(request.url);
const publicUrl = (0, import_toPublicUrl.toPublicUrl)(url);
const publicUrl = (0, import_toPublicUrl.toPublicUrl)(url) + url.search;
const unhandledRequestMessage = `intercepted a request without a matching request handler:

@@ -31,0 +31,0 @@

@@ -11,3 +11,3 @@ /* eslint-disable */

const PACKAGE_VERSION = '2.2.13'
const PACKAGE_VERSION = '2.2.14'
const INTEGRITY_CHECKSUM = '26357c79639bfa20d64c0efca2a87423'

@@ -14,0 +14,0 @@ const IS_MOCKED_RESPONSE = Symbol('isMockedResponse')

{
"name": "msw",
"version": "2.2.13",
"version": "2.2.14",
"description": "Seamless REST/GraphQL API mocking library for browser and Node.js.",

@@ -8,3 +8,3 @@ "main": "./lib/core/index.js",

"types": "./lib/core/index.d.ts",
"packageManager": "pnpm@7.12.2",
"packageManager": "pnpm@8.15.6",
"exports": {

@@ -18,4 +18,8 @@ ".": {

"./browser": {
"types": "./lib/browser/index.d.ts",
"browser": {
"require": "./lib/browser/index.js",
"import": "./lib/browser/index.mjs"
},
"node": null,
"types": "./lib/browser/index.d.ts",
"require": "./lib/browser/index.js",

@@ -26,4 +30,8 @@ "import": "./lib/browser/index.mjs",

"./node": {
"types": "./lib/node/index.d.ts",
"node": {
"require": "./lib/node/index.js",
"import": "./lib/node/index.mjs"
},
"browser": null,
"types": "./lib/node/index.d.ts",
"require": "./lib/node/index.js",

@@ -34,4 +42,8 @@ "import": "./lib/node/index.mjs",

"./native": {
"types": "./lib/native/index.d.ts",
"react-native": {
"require": "./lib/native/index.js",
"import": "./lib/native/index.mjs"
},
"browser": null,
"types": "./lib/native/index.d.ts",
"require": "./lib/native/index.js",

@@ -38,0 +50,0 @@ "import": "./lib/native/index.mjs",

@@ -10,6 +10,6 @@ /**

const fixtures = {
warningWithoutSuggestions: `\
warningWithoutSuggestions: (url = `/api`) => `\
[MSW] Warning: intercepted a request without a matching request handler:
• GET /api
• GET ${url}

@@ -50,3 +50,5 @@ If you still wish to intercept this unhandled request, please create a request handler for it.

expect(console.warn).toHaveBeenCalledWith(fixtures.warningWithoutSuggestions)
expect(console.warn).toHaveBeenCalledWith(
fixtures.warningWithoutSuggestions(),
)
})

@@ -108,3 +110,5 @@

expect(console.warn).toHaveBeenCalledWith(fixtures.warningWithoutSuggestions)
expect(console.warn).toHaveBeenCalledWith(
fixtures.warningWithoutSuggestions(),
)
})

@@ -123,1 +127,23 @@

})
test('prints with a relative URL and search params', async () => {
await onUnhandledRequest(
new Request(new URL('http://localhost/api?foo=boo')),
'warn',
)
expect(console.warn).toHaveBeenCalledWith(
fixtures.warningWithoutSuggestions(`/api?foo=boo`),
)
})
test('prints with an absolute URL and search params', async () => {
await onUnhandledRequest(
new Request(new URL('https://mswjs.io/api?foo=boo')),
'warn',
)
expect(console.warn).toHaveBeenCalledWith(
fixtures.warningWithoutSuggestions(`https://mswjs.io/api?foo=boo`),
)
})

@@ -25,3 +25,3 @@ import { toPublicUrl } from './toPublicUrl'

const url = new URL(request.url)
const publicUrl = toPublicUrl(url)
const publicUrl = toPublicUrl(url) + url.search

@@ -28,0 +28,0 @@ const unhandledRequestMessage = `intercepted a request without a matching request handler:\n\n \u2022 ${request.method} ${publicUrl}\n\nIf you still wish to intercept this unhandled request, please create a request handler for it.\nRead more: https://mswjs.io/docs/getting-started/mocks`

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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