cypress-vite
Advanced tools
Comparing version 1.3.2 to 1.4.0
@@ -0,7 +1,10 @@ | ||
import { InlineConfig } from 'vite'; | ||
type FileObject = Cypress.FileObject; | ||
type CypressPreprocessor = (file: FileObject) => string | Promise<string>; | ||
type CypressPreprocessor = (file: FileObject) => Promise<string>; | ||
/** | ||
* Cypress preprocessor for running e2e tests using vite. | ||
* | ||
* @param {string} userConfigPath | ||
* @param {InlineConfig | string} config - Vite config object, or path to user | ||
* Vite config file for backwards compatibility | ||
* @example | ||
@@ -15,4 +18,4 @@ * setupNodeEvents(on) { | ||
*/ | ||
declare function vitePreprocessor(userConfigPath?: string): CypressPreprocessor; | ||
declare function vitePreprocessor(userConfig?: InlineConfig | string): CypressPreprocessor; | ||
export { vitePreprocessor as default }; |
{ | ||
"name": "cypress-vite", | ||
"version": "1.3.2", | ||
"version": "1.4.0", | ||
"description": "Run Cypress specs using Vite", | ||
@@ -59,2 +59,3 @@ "author": "Mohammad Ataei", | ||
"dependencies": { | ||
"chokidar": "^3.5.3", | ||
"debug": "^4.3.4" | ||
@@ -61,0 +62,0 @@ }, |
@@ -75,4 +75,3 @@ # cypress-vite | ||
You can simply pass the `vitePreprocessor` function the path to your Vite config | ||
file: | ||
You can pass a Vite config to the `vitePreprocessor` function: | ||
@@ -89,3 +88,6 @@ ```typescript | ||
'file:preprocessor', | ||
vitePreprocessor(path.resolve(__dirname, './vite.config.ts')), | ||
vitePreprocessor({ | ||
configFile: path.resolve(__dirname, './vite.config.ts'), | ||
mode: 'development', | ||
}), | ||
) | ||
@@ -92,0 +94,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
115
9598
3
141
+ Addedchokidar@^3.5.3
+ Addedanymatch@3.1.3(transitive)
+ Addedbinary-extensions@2.3.0(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedchokidar@3.6.0(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedis-binary-path@2.1.0(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addednormalize-path@3.0.0(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedreaddirp@3.6.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)