cache: 'pnpm'
- run: pnpm install
- run: pnpm pretest
+ # Rerun install to ensure the dependencies in the playground apps are resolved correctly
+ - run: pnpm install
- run: pnpm test
/* eslint-env node */
-/* eslint-disable @typescript-eslint/no-var-requires */
/// <reference types="cypress" />
// ***********************************************************
// This example plugins/index.js can be used to load plugins
/* eslint-env node */
-/* eslint-disable @typescript-eslint/no-var-requires */
/// <reference types="cypress" />
// ***********************************************************
// This example plugins/index.js can be used to load plugins
/* eslint-env node */
-/* eslint-disable @typescript-eslint/no-var-requires */
/// <reference types="cypress" />
// ***********************************************************
// This example plugins/index.js can be used to load plugins
/* eslint-env node */
-/* eslint-disable @typescript-eslint/no-var-requires */
/// <reference types="cypress" />
// ***********************************************************
// This example plugins/index.js can be used to load plugins
/* eslint-env node */
-/* eslint-disable @typescript-eslint/no-var-requires */
/// <reference types="cypress" />
// ***********************************************************
// This example plugins/index.js can be used to load plugins
/* eslint-env node */
-/* eslint-disable @typescript-eslint/no-var-requires */
/// <reference types="cypress" />
// ***********************************************************
// This example plugins/index.js can be used to load plugins
/* eslint-env node */
-/* eslint-disable @typescript-eslint/no-var-requires */
/// <reference types="cypress" />
// ***********************************************************
// This example plugins/index.js can be used to load plugins
/* eslint-env node */
-/* eslint-disable @typescript-eslint/no-var-requires */
+/// <reference types="node" />
/// <reference types="cypress" />
// ***********************************************************
-// This example plugins/index.js can be used to load plugins
+// This example plugins/index.ts can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)
-const { startDevServer } = require('@cypress/vite-dev-server')
+import { startDevServer } from '@cypress/vite-dev-server'
-/**
- * @type {Cypress.PluginConfig}
- */
-// eslint-disable-next-line no-unused-vars
-module.exports = (on, config) => {
+export default ((on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
on('dev-server:start', (options) => {
return startDevServer({ options })
})
return config
-}
+}) as Cypress.PluginConfig
/* eslint-env node */
-/* eslint-disable @typescript-eslint/no-var-requires */
+/// <reference types="node" />
/// <reference types="cypress" />
// ***********************************************************
-// This example plugins/index.js can be used to load plugins
+// This example plugins/index.ts can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)
-const { startDevServer } = require('@cypress/vite-dev-server')
+import { startDevServer } from '@cypress/vite-dev-server'
-/**
- * @type {Cypress.PluginConfig}
- */
-// eslint-disable-next-line no-unused-vars
-module.exports = (on, config) => {
+export default ((on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
on('dev-server:start', (options) => {
return startDevServer({ options })
})
return config
-}
+}) as Cypress.PluginConfig
/* eslint-env node */
-/* eslint-disable @typescript-eslint/no-var-requires */
+/// <reference types="node" />
/// <reference types="cypress" />
// ***********************************************************
-// This example plugins/index.js can be used to load plugins
+// This example plugins/index.ts can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)
-const { startDevServer } = require('@cypress/vite-dev-server')
+import { startDevServer } from '@cypress/vite-dev-server'
-/**
- * @type {Cypress.PluginConfig}
- */
-// eslint-disable-next-line no-unused-vars
-module.exports = (on, config) => {
+export default ((on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
on('dev-server:start', (options) => {
return startDevServer({ options })
})
return config
-}
+}) as Cypress.PluginConfig
/* eslint-env node */
-/* eslint-disable @typescript-eslint/no-var-requires */
+/// <reference types="node" />
/// <reference types="cypress" />
// ***********************************************************
-// This example plugins/index.js can be used to load plugins
+// This example plugins/index.ts can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)
-const { startDevServer } = require('@cypress/vite-dev-server')
+import { startDevServer } from '@cypress/vite-dev-server'
-/**
- * @type {Cypress.PluginConfig}
- */
-// eslint-disable-next-line no-unused-vars
-module.exports = (on, config) => {
+export default ((on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
on('dev-server:start', (options) => {
return startDevServer({ options })
})
return config
-}
+}) as Cypress.PluginConfig
/* eslint-env node */
-/* eslint-disable @typescript-eslint/no-var-requires */
+/// <reference types="node" />
/// <reference types="cypress" />
// ***********************************************************
-// This example plugins/index.js can be used to load plugins
+// This example plugins/index.ts can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)
-const { startDevServer } = require('@cypress/vite-dev-server')
+import { startDevServer } from '@cypress/vite-dev-server'
-/**
- * @type {Cypress.PluginConfig}
- */
-// eslint-disable-next-line no-unused-vars
-module.exports = (on, config) => {
+export default ((on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
on('dev-server:start', (options) => {
return startDevServer({ options })
})
return config
-}
+}) as Cypress.PluginConfig
/* eslint-env node */
-/* eslint-disable @typescript-eslint/no-var-requires */
+/// <reference types="node" />
/// <reference types="cypress" />
// ***********************************************************
-// This example plugins/index.js can be used to load plugins
+// This example plugins/index.ts can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)
-const { startDevServer } = require('@cypress/vite-dev-server')
+import { startDevServer } from '@cypress/vite-dev-server'
-/**
- * @type {Cypress.PluginConfig}
- */
-// eslint-disable-next-line no-unused-vars
-module.exports = (on, config) => {
+export default ((on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
on('dev-server:start', (options) => {
return startDevServer({ options })
})
return config
-}
+}) as Cypress.PluginConfig
/* eslint-env node */
-/* eslint-disable @typescript-eslint/no-var-requires */
+/// <reference types="node" />
/// <reference types="cypress" />
// ***********************************************************
-// This example plugins/index.js can be used to load plugins
+// This example plugins/index.ts can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)
-const { startDevServer } = require('@cypress/vite-dev-server')
+import { startDevServer } from '@cypress/vite-dev-server'
-/**
- * @type {Cypress.PluginConfig}
- */
-// eslint-disable-next-line no-unused-vars
-module.exports = (on, config) => {
+export default ((on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
on('dev-server:start', (options) => {
return startDevServer({ options })
})
return config
-}
+}) as Cypress.PluginConfig
/* eslint-env node */
-/* eslint-disable @typescript-eslint/no-var-requires */
+/// <reference types="node" />
/// <reference types="cypress" />
// ***********************************************************
-// This example plugins/index.js can be used to load plugins
+// This example plugins/index.ts can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)
-const { startDevServer } = require('@cypress/vite-dev-server')
+import { startDevServer } from '@cypress/vite-dev-server'
-/**
- * @type {Cypress.PluginConfig}
- */
-// eslint-disable-next-line no-unused-vars
-module.exports = (on, config) => {
+export default ((on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
on('dev-server:start', (options) => {
return startDevServer({ options })
})
return config
-}
+}) as Cypress.PluginConfig
/* eslint-env node */
-/* eslint-disable @typescript-eslint/no-var-requires */
/// <reference types="cypress" />
// ***********************************************************
// This example plugins/index.js can be used to load plugins
const stats = fs.statSync(src)
if (stats.isDirectory()) {
+ // skip node_module
+ if (path.basename(src) === 'node_modules') {
+ return
+ }
+
// if it's a directory, render its subdirectories and files recursively
fs.mkdirSync(dest, { recursive: true })
for (const file of fs.readdirSync(src)) {