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

@cypress/vite-dev-server

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cypress/vite-dev-server - npm Package Compare versions

Comparing version 3.2.0 to 3.3.0

dist/plugins/sourcemap.d.ts

21

dist/plugins/cypress.js

@@ -75,23 +75,2 @@ "use strict";

},
transform(code, id, options) {
try {
if (/\.js$/i.test(id) && !/\/\/# sourceMappingURL=/i.test(code)) {
// The Vite dev server and plugins automatically transpile TS and JSX files, which results in sourcemaps being generated
// and included in output. However, Vite serves up `esnext`-compliant Javascript which means many JS files won't be
// transpiled and won't supply a sourcemap - this prevents Cypress from providing codeFrames in the event of an error.
//
// A sourcemap is generated by Vite for JS files (just not included) which is in effect an "identity" sourcemap mapping
// 1-to-1 to the output file. We can grab this and pass it along as a sourcemap we want Vite to embed into the output,
// giving Cypress a sourcemap to use for codeFrame lookups.
// @see https://rollupjs.org/guide/en/#thisgetcombinedsourcemap
return {
code,
map: this.getCombinedSourcemap(),
};
}
}
catch (_err) {
debug('Failed to propagate sourcemap for %s: %o', id, _err);
}
},
handleHotUpdate: ({ server, file }) => {

@@ -98,0 +77,0 @@ debug('handleHotUpdate - file', file);

1

dist/plugins/index.d.ts
export * from './inspect';
export * from './cypress';
export * from './sourcemap';

@@ -6,1 +6,2 @@ "use strict";

tslib_1.__exportStar(require("./cypress"), exports);
tslib_1.__exportStar(require("./sourcemap"), exports);

@@ -0,3 +1,4 @@

import type { InlineConfig } from 'vite';
import type { ViteDevServerConfig } from './devServer';
import type { Vite } from './getVite';
export declare const createViteDevServerConfig: (config: ViteDevServerConfig, vite: Vite) => Promise<Record<string, any>>;
export declare const createViteDevServerConfig: (config: ViteDevServerConfig, vite: Vite) => Promise<InlineConfig>;

@@ -87,4 +87,12 @@ "use strict";

(0, index_1.CypressInspect)(config),
(0, index_1.CypressSourcemap)(config, vite),
].filter((p) => p != null),
};
if (config.cypressConfig.isTextTerminal) {
viteBaseConfig.server = Object.assign(Object.assign({}, (viteBaseConfig.server || {})), {
// Disable file watching and HMR when executing tests in `run` mode
watch: {
ignored: '**/*',
}, hmr: false });
}
let resolvedOverrides = {};

@@ -91,0 +99,0 @@ if (typeof viteOverrides === 'function') {

{
"name": "@cypress/vite-dev-server",
"version": "3.2.0",
"version": "3.3.0",
"description": "Launches Vite Dev Server for Component Testing",

@@ -5,0 +5,0 @@ "main": "index.js",

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