New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

msw

Package Overview
Dependencies
Maintainers
1
Versions
278
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 0.13.1 to 0.14.0

lib/esm.js

8

config/constants.js

@@ -5,10 +5,8 @@ const path = require('path')

const SERVICE_WORKER_SOURCE_PATH = path.resolve(
__dirname,
'../src',
'mockServiceWorker.js',
process.cwd(),
'src/mockServiceWorker.js',
)
const SERVICE_WORKER_BUILD_PATH = path.resolve(
__dirname,
'..',
process.cwd(),
path.dirname(packageJson.main),

@@ -15,0 +13,0 @@ path.basename(SERVICE_WORKER_SOURCE_PATH),

@@ -10,3 +10,3 @@ /**

const INTEGRITY_CHECKSUM = '874336b2b901d48e917e961411e8161e'
const INTEGRITY_CHECKSUM = 'dcff59cce1b1cf75d9d30c0b6a63fdba'
const bypassHeaderName = 'x-msw-bypass'

@@ -74,2 +74,8 @@

// Opening the DevTools triggers the "only-if-cached" request
// that cannot be handled by the worker. Bypass such requests.
if (request.cache === 'only-if-cached' && request.mode !== 'same-origin') {
return
}
event.respondWith(

@@ -76,0 +82,0 @@ new Promise(async (resolve) => {

{
"name": "msw",
"version": "0.13.1",
"version": "0.14.0",
"description": "Client-side API mocking using Service Workers.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"main": "lib/umd.js",
"module": "lib/esm.js",
"types": "lib/types",
"bin": {

@@ -11,4 +12,5 @@ "msw": "cli/msw.js"

"scripts": {
"start": "cross-env NODE_ENV=development webpack --watch",
"build": "cross-env NODE_ENV=production webpack",
"start": "cross-env NODE_ENV=development rollup -c rollup.config.ts -w",
"clean": "rimraf lib",
"build": "yarn clean && cross-env NODE_ENV=production rollup -c rollup.config.ts",
"test": "yarn test:unit && yarn test:integration",

@@ -37,4 +39,3 @@ "test:unit": "cross-env BABEL_ENV=test jest --runInBand",

"graphql": "^15.0.0",
"node-match-path": "^0.3.1",
"ramda": "^0.27.0",
"node-match-path": "^0.4.2",
"statuses": "^2.0.0",

@@ -46,2 +47,6 @@ "yargs": "^15.3.1"

"@babel/preset-env": "^7.9.5",
"@rollup/plugin-commonjs": "^11.1.0",
"@rollup/plugin-json": "^4.0.3",
"@rollup/plugin-node-resolve": "^7.1.3",
"@rollup/plugin-replace": "^2.3.2",
"@types/cookie": "^0.3.3",

@@ -64,2 +69,5 @@ "@types/jest": "^25.2.1",

"regenerator-runtime": "^0.13.5",
"rimraf": "^3.0.2",
"rollup": "^2.6.1",
"rollup-plugin-typescript2": "^0.27.0",
"ts-jest": "^25.4.0",

@@ -66,0 +74,0 @@ "ts-loader": "^7.0.1",

@@ -61,3 +61,3 @@ <p align="center">

```bash
$ touch mock.js
$ touch mocks.js
```

@@ -64,0 +64,0 @@

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