From 35bf933c44d534ff39048b28ee112cbc5390d857 Mon Sep 17 00:00:00 2001 From: AtofStryker Date: Mon, 18 Nov 2024 15:24:02 -0500 Subject: [PATCH 1/4] pull support for JIT from vite since it doesn't have an affect for end users or performance (webpack only) [run ci] rebase this --- cli/types/cypress.d.ts | 2 +- npm/vite-dev-server/src/plugins/cypress.ts | 7 +++- npm/vite-dev-server/src/resolveConfig.ts | 4 +-- .../test/resolveConfig.spec.ts | 35 ------------------- .../src/CypressCTWebpackPlugin.ts | 2 +- .../src/makeWebpackConfig.ts | 7 ++-- .../test/devServer-e2e.spec.ts | 4 ++- ...ner-ct.experimentalJustInTimeCompile.cy.ts | 1 + .../src/data/ProjectLifecycleManager.ts | 16 ++++----- .../src/sources/ProjectDataSource.ts | 19 ++-------- packages/server/lib/modes/run.ts | 6 ++-- .../server/lib/plugins/child/dev-server.js | 4 +-- packages/server/lib/plugins/dev-server.js | 8 ++--- packages/server/lib/socket-base.ts | 2 +- .../experimental-JIT/webpack/README.md | 2 +- .../webpack/webpack.config.js | 1 + system-tests/test/experimental_jit.spec.ts | 5 +-- 17 files changed, 45 insertions(+), 80 deletions(-) diff --git a/cli/types/cypress.d.ts b/cli/types/cypress.d.ts index df37c5ff054f..5b92811c3531 100644 --- a/cli/types/cypress.d.ts +++ b/cli/types/cypress.d.ts @@ -3117,7 +3117,7 @@ declare namespace Cypress { * Allows for just-in-time compiling of a component test, which will only compile assets related to the component. * This results in a smaller bundle under test, reducing resource constraints on a given machine. This option is recommended * for users with large component testing projects and those who are running into webpack 'chunk load error' issues. - * Supported for vite and webpack. For component testing only. + * Supported for webpack-dev-server only. For component testing only. * @see https://on.cypress.io/experiments#Configuration */ experimentalJustInTimeCompile: boolean diff --git a/npm/vite-dev-server/src/plugins/cypress.ts b/npm/vite-dev-server/src/plugins/cypress.ts index 25bf7c9a5a28..80ebf9f5483e 100644 --- a/npm/vite-dev-server/src/plugins/cypress.ts +++ b/npm/vite-dev-server/src/plugins/cypress.ts @@ -42,7 +42,12 @@ export const Cypress = ( // eslint-disable-next-line no-restricted-syntax let loader = fs.readFileSync(INIT_FILEPATH, 'utf8') - devServerEvents.on('dev-server:specs:changed', (specs: Spec[]) => { + devServerEvents.on('dev-server:specs:changed', ({ specs, options }: { specs: Spec[], options?: { neededForJustInTimeCompile: boolean }}) => { + if (options?.neededForJustInTimeCompile) { + // if an option is needed for just in time compile, no-op as this isn't supported in vite + return + } + debug(`dev-server:secs:changed: ${specs.map((spec) => spec.relative)}`) specsPathsSet = getSpecsPathsSet(specs) }) diff --git a/npm/vite-dev-server/src/resolveConfig.ts b/npm/vite-dev-server/src/resolveConfig.ts index 10dfd5259290..549982f8652e 100644 --- a/npm/vite-dev-server/src/resolveConfig.ts +++ b/npm/vite-dev-server/src/resolveConfig.ts @@ -65,7 +65,6 @@ export const createViteDevServerConfig = async (config: ViteDevServerConfig, vit function makeCypressViteConfig (config: ViteDevServerConfig, vite: Vite): InlineConfig | InlineConfig { const { cypressConfig: { - experimentalJustInTimeCompile, port, projectRoot, devServerPublicPathRoute, @@ -129,8 +128,7 @@ function makeCypressViteConfig (config: ViteDevServerConfig, vite: Vite): Inline port: vitePort, host: '127.0.0.1', // Disable file watching and HMR when executing tests in `run` mode - // if experimentalJustInTimeCompile is configured, we need to watch for file changes as the spec entries are going to be updated per test in run mode - ...(isTextTerminal && !experimentalJustInTimeCompile + ...(isTextTerminal ? { watch: { ignored: '**/*' }, hmr: false } : {}), }, diff --git a/npm/vite-dev-server/test/resolveConfig.spec.ts b/npm/vite-dev-server/test/resolveConfig.spec.ts index 0963a5ccd95e..7c73136b71c1 100644 --- a/npm/vite-dev-server/test/resolveConfig.spec.ts +++ b/npm/vite-dev-server/test/resolveConfig.spec.ts @@ -109,40 +109,5 @@ describe('resolveConfig', function () { expect(viteConfig.server?.hmr).to.be.undefined }) }) - - describe('experimentalJustInTimeCompile', () => { - let viteDevServerConfig: ViteDevServerConfig - - beforeEach(async () => { - const projectRoot = await scaffoldSystemTestProject(`vite${version}-inspect`) - - viteDevServerConfig = getViteDevServerConfig(projectRoot) - viteDevServerConfig.cypressConfig.experimentalJustInTimeCompile = true - }) - - describe('open mode', () => { - beforeEach(() => { - viteDevServerConfig.cypressConfig.isTextTerminal = false - }) - - it('enables hmr and watching', async () => { - const viteConfig = await createViteDevServerConfig(viteDevServerConfig, discoveredVite) - - expect(viteConfig.server.watch).to.be.undefined - }) - }) - - describe('run mode', () => { - beforeEach(() => { - viteDevServerConfig.cypressConfig.isTextTerminal = true - }) - - it('enables hmr and watching', async () => { - const viteConfig = await createViteDevServerConfig(viteDevServerConfig, discoveredVite) - - expect(viteConfig.server.watch).to.be.undefined - }) - }) - }) }) }) diff --git a/npm/webpack-dev-server/src/CypressCTWebpackPlugin.ts b/npm/webpack-dev-server/src/CypressCTWebpackPlugin.ts index 9a8c8e5a382a..c80f3ab8c294 100644 --- a/npm/webpack-dev-server/src/CypressCTWebpackPlugin.ts +++ b/npm/webpack-dev-server/src/CypressCTWebpackPlugin.ts @@ -108,7 +108,7 @@ export class CypressCTWebpackPlugin { * * See https://github.com/cypress-io/cypress/issues/24398 */ - private onSpecsChange = async (specs: Cypress.Cypress['spec'][]) => { + private onSpecsChange = async ({ specs, options }: { specs: Cypress.Cypress['spec'][], options?: { neededForJustInTimeCompile: boolean}}) => { if (!this.compilation || _.isEqual(specs, this.files)) { return } diff --git a/npm/webpack-dev-server/src/makeWebpackConfig.ts b/npm/webpack-dev-server/src/makeWebpackConfig.ts index d428fe68ea25..2995b752b8c8 100644 --- a/npm/webpack-dev-server/src/makeWebpackConfig.ts +++ b/npm/webpack-dev-server/src/makeWebpackConfig.ts @@ -75,15 +75,18 @@ export async function makeWebpackConfig ( ) { let userWebpackConfig = config.devServerConfig.webpackConfig const frameworkWebpackConfig = config.frameworkConfig as Partial + const { cypressConfig: { projectRoot, supportFile, + experimentalJustInTimeCompile, }, - specs: files, framework, } = config.devServerConfig + config.devServerConfig.specs = experimentalJustInTimeCompile ? [] : config.devServerConfig.specs + if (!userWebpackConfig && !frameworkWebpackConfig) { debug('Not user or framework webpack config received. Trying to automatically source it') @@ -121,7 +124,7 @@ export async function makeWebpackConfig ( ) debug(`User passed in user and framework webpack config with values %o`, userAndFrameworkWebpackConfig) - debug(`New webpack entries %o`, files) + debug(`New webpack entries %o`, config.devServerConfig.specs) debug(`Project root`, projectRoot) debug(`Support file`, supportFile) diff --git a/npm/webpack-dev-server/test/devServer-e2e.spec.ts b/npm/webpack-dev-server/test/devServer-e2e.spec.ts index 4ab871743c34..cf6d3c863a73 100644 --- a/npm/webpack-dev-server/test/devServer-e2e.spec.ts +++ b/npm/webpack-dev-server/test/devServer-e2e.spec.ts @@ -190,7 +190,9 @@ describe('#devServer', () => { const oldmtime = fs.statSync(cypressConfig.indexHtmlFile).mtimeMs await once(devServerEvents, 'dev-server:compile:success') - devServerEvents.emit('dev-server:specs:changed', [newSpec]) + devServerEvents.emit('dev-server:specs:changed', { + specs: [newSpec], + }) await once(devServerEvents, 'dev-server:compile:success') const updatedmtime = fs.statSync(cypressConfig.indexHtmlFile).mtimeMs diff --git a/packages/app/cypress/e2e/runner/runner-ct.experimentalJustInTimeCompile.cy.ts b/packages/app/cypress/e2e/runner/runner-ct.experimentalJustInTimeCompile.cy.ts index c3223f5e0baf..2a5186642d53 100644 --- a/packages/app/cypress/e2e/runner/runner-ct.experimentalJustInTimeCompile.cy.ts +++ b/packages/app/cypress/e2e/runner/runner-ct.experimentalJustInTimeCompile.cy.ts @@ -5,6 +5,7 @@ type ProjectDirs = typeof fixtureDirs const EXPERIMENTAL_JIT_DIR: ProjectDirs[number] = 'experimental-JIT' const PROJECTS: {bundler: 'vite' | 'webpack'}[] = [ + // when running for vite, experimentalJustInTimeCompile=true is set but is a no-op for vite since JIT compiling is not supported in vite { bundler: 'vite' }, { bundler: 'webpack' }, ] diff --git a/packages/data-context/src/data/ProjectLifecycleManager.ts b/packages/data-context/src/data/ProjectLifecycleManager.ts index c46d10b5161d..387032590921 100644 --- a/packages/data-context/src/data/ProjectLifecycleManager.ts +++ b/packages/data-context/src/data/ProjectLifecycleManager.ts @@ -239,14 +239,14 @@ export class ProjectLifecycleManager { const span = telemetry.startSpan({ name: 'dataContext:ct:startDevServer' }) /** - * We need to start the dev server in the ProjectLifecycleManager when: - * 1. GA component testing is running so we can compile the dev server will all specs matching the specPattern - * 2. experimentalJustInTimeCompile is enabled. In this case, we start a dev server - * with an empty specs list to initially compile the support file and related dependencies in order to hopefully - * leverage the dev server cache for recompiling for when we actually have a spec to add to the dev server entry. - */ - const specsToStartDevServer = finalConfig.experimentalJustInTimeCompile ? [] : this.ctx.project.specs - const devServerOptions = await this.ctx._apis.projectApi.getDevServer().start({ specs: specsToStartDevServer, config: finalConfig }) + * We need to start the dev server in the ProjectLifecycleManager when: + * 1. GA component testing is running so we can compile the dev server will all specs matching the specPattern + * 2. experimentalJustInTimeCompile is enabled (for webpack-dev-server). In this case, we start a dev server + * with an empty specs list to initially compile the support file and related dependencies in order to hopefully + * leverage the dev server cache for recompiling for when we actually have a spec to add to the dev server entry. + * The empty specs are handled within the @cypress/webpack-dev-server package as this has no impact on vite. + */ + const devServerOptions = await this.ctx._apis.projectApi.getDevServer().start({ specs: this.ctx.project.specs, config: finalConfig }) // If we received a cypressConfig.port we want to null it out // because we propagated it into the devServer.port and it is diff --git a/packages/data-context/src/sources/ProjectDataSource.ts b/packages/data-context/src/sources/ProjectDataSource.ts index ca7088f2ffcd..8476c15c6f2c 100644 --- a/packages/data-context/src/sources/ProjectDataSource.ts +++ b/packages/data-context/src/sources/ProjectDataSource.ts @@ -382,22 +382,9 @@ export class ProjectDataSource { additionalIgnorePattern, }) - try { - const config = await this.ctx.project.getConfig() - - // If running the experimentalJustInTimeCompile for CT, - // ignore this watcher since we only handle one spec at a time and do not need to recompile any time the file system changes. - if (config.experimentalJustInTimeCompile && testingType === 'component') { - this.ctx.actions.project.refreshSpecs(specs) - - // If no differences are found, we do not need to emit events - return - } - } catch (e) { - // for cy-in-cy tests the config is the second instance of cypress isn't considered initialized yet. - // in this case since we only need it for experimental JIT in open mode, swallow the error - } - + // with JIT, since we are unable to deterministically determine the dev-server in use, the test will recompile + // any time the spec directory has contents added/removed. This means a recompile when it is not needed, but this should + // only be applicable in open mode and seldomly experienced. if (_.isEqual(this.specs, specs)) { this.ctx.actions.project.refreshSpecs(specs) diff --git a/packages/server/lib/modes/run.ts b/packages/server/lib/modes/run.ts index db70e790eb7a..8ed0f2c57d3a 100644 --- a/packages/server/lib/modes/run.ts +++ b/packages/server/lib/modes/run.ts @@ -826,8 +826,10 @@ async function runSpecs (options: { config: Cfg, browser: Browser, sys: any, hea // If in run mode, we need to update the dev server with our spec. // in open mode, this happens in the browser through the web socket, but we do it here in run mode - // to try and have it happen as early as possible to make the test run as fast as possible - await ctx._apis.projectApi.getDevServer().updateSpecs([spec]) + // to try and have it happen as early as possible to make the test run as fast as possible. + // NOTE: this is a no-op for @cypress/vite-dev-server and only applies to @cypress/webpack-dev-server + // since just-in-time compile does not apply to vite. + await ctx._apis.projectApi.getDevServer().updateSpecs([spec], { neededForJustInTimeCompile: true }) } } diff --git a/packages/server/lib/plugins/child/dev-server.js b/packages/server/lib/plugins/child/dev-server.js index c82b06050e86..140016fb8df9 100644 --- a/packages/server/lib/plugins/child/dev-server.js +++ b/packages/server/lib/plugins/child/dev-server.js @@ -5,8 +5,8 @@ const wrap = (ipc, invoke, ids, args) => { const [options] = args const devServerEvents = new EE() - ipc.on('dev-server:specs:changed', (specs) => { - devServerEvents.emit('dev-server:specs:changed', specs) + ipc.on('dev-server:specs:changed', (specsAndOptions) => { + devServerEvents.emit('dev-server:specs:changed', specsAndOptions) }) devServerEvents.on('dev-server:compile:success', ({ specFile } = {}) => { diff --git a/packages/server/lib/plugins/dev-server.js b/packages/server/lib/plugins/dev-server.js index d304766381a7..cfcc7c913273 100644 --- a/packages/server/lib/plugins/dev-server.js +++ b/packages/server/lib/plugins/dev-server.js @@ -8,8 +8,8 @@ const errors = require('../errors') const baseEmitter = new EE() plugins.registerHandler((ipc) => { - baseEmitter.on('dev-server:specs:changed', (specs) => { - ipc.send('dev-server:specs:changed', specs) + baseEmitter.on('dev-server:specs:changed', (specsAndOptions) => { + ipc.send('dev-server:specs:changed', specsAndOptions) }) ipc.on('dev-server:compile:success', ({ specFile } = {}) => { @@ -29,8 +29,8 @@ const API = { return plugins.execute('dev-server:start', { specs, config }) }, - updateSpecs (specs) { - baseEmitter.emit('dev-server:specs:changed', specs) + updateSpecs (specs, options) { + baseEmitter.emit('dev-server:specs:changed', { specs, options }) }, close () { diff --git a/packages/server/lib/socket-base.ts b/packages/server/lib/socket-base.ts index 0d9b844ea745..f16efef1e7d7 100644 --- a/packages/server/lib/socket-base.ts +++ b/packages/server/lib/socket-base.ts @@ -394,7 +394,7 @@ export class SocketBase { // update the dev server with the spec running debug(`updating CT dev-server with spec: ${spec.relative}`) // @ts-expect-error - await devServer.updateSpecs([spec]) + await devServer.updateSpecs([spec], { neededForJustInTimeCompile: true }) return socket.emit('dev-server:on-spec-updated') }) diff --git a/system-tests/projects/experimental-JIT/webpack/README.md b/system-tests/projects/experimental-JIT/webpack/README.md index da8c46801f21..e7f6ead2393e 100644 --- a/system-tests/projects/experimental-JIT/webpack/README.md +++ b/system-tests/projects/experimental-JIT/webpack/README.md @@ -1 +1 @@ -yarn cypress:run --project=/Users/bill/Repositories/ct-webpack-test --component \ No newline at end of file +yarn cypress:run --project=./cypress/system-tests/projects/experimental-JIT --component \ No newline at end of file diff --git a/system-tests/projects/experimental-JIT/webpack/webpack.config.js b/system-tests/projects/experimental-JIT/webpack/webpack.config.js index 2a6f5285ed60..cbdee057474c 100644 --- a/system-tests/projects/experimental-JIT/webpack/webpack.config.js +++ b/system-tests/projects/experimental-JIT/webpack/webpack.config.js @@ -5,6 +5,7 @@ module.exports = ({ mode } = { mode: 'production' }) => { mode, // so we don't get variable module output when comparing snapshots in system-tests stats: 'errors-only', + // stats: 'normal', // if debugging JIT resolve: { extensions: ['.js', '.ts', '.jsx', '.tsx'], alias: { diff --git a/system-tests/test/experimental_jit.spec.ts b/system-tests/test/experimental_jit.spec.ts index ff625018e5e5..f6b17df23904 100644 --- a/system-tests/test/experimental_jit.spec.ts +++ b/system-tests/test/experimental_jit.spec.ts @@ -20,6 +20,7 @@ const getAllMatches = (source, regex) => { describe('component testing: experimentalJustInTimeCompile', function () { systemTests.setup() + // makes sure experimentalJustInTimeCompile=true has no affect on how vite compiles files. systemTests.it('vite@5', { project: 'experimental-JIT/vite', testingType: 'component', @@ -41,8 +42,8 @@ describe('component testing: experimentalJustInTimeCompile', function () { // expect 1 server to be created expect(totalServersSamePort).to.equal(1) - // expect each component compiled individually - expect(totalComponentsCompiledSeparately).to.equal(3) + // expect each component to be compiled all together (no JIT support for vite) + expect(totalComponentsCompiledSeparately).to.equal(0) }, }) From ec10ba17e718c62aef25f2304372108a564062bb Mon Sep 17 00:00:00 2001 From: AtofStryker Date: Mon, 18 Nov 2024 15:47:46 -0500 Subject: [PATCH 2/4] remove the experimentalJIT flag and make it GA (default still false) [run ci] --- cli/types/cypress.d.ts | 16 +++---- .../src/makeDefaultWebpackConfig.ts | 6 +-- .../src/makeWebpackConfig.ts | 4 +- .../test/makeWebpackConfig.spec.ts | 4 +- ...y.ts => runner-ct.justInTimeCompile.cy.ts} | 8 ++-- packages/app/src/runner/index.ts | 4 +- .../config/__snapshots__/index.spec.ts.js | 6 +-- packages/config/src/options.ts | 24 ++++++----- packages/config/test/project/utils.spec.ts | 42 ++++++++++++------- .../src/data/ProjectLifecycleManager.ts | 2 +- .../EXPERIMENTAL_JIT_COMPILE_REMOVED.html | 40 ++++++++++++++++++ ...ESTING.html => JIT_COMPONENT_TESTING.html} | 4 +- packages/errors/src/errors.ts | 12 ++++-- .../test/unit/visualSnapshotErrors_spec.ts | 7 +++- .../frontend-shared/src/locales/en-US.json | 4 -- packages/graphql/schemas/schema.graphql | 3 +- packages/server/lib/experiments.ts | 2 - packages/server/lib/modes/run.ts | 8 ++-- packages/types/src/config.ts | 2 +- system-tests/__snapshots__/results_spec.ts.js | 2 +- .../vite/cypress.config.js | 2 +- .../vite/cypress/support/component-index.html | 0 .../vite/cypress/support/component.js | 0 .../vite/package.json | 0 .../vite/src/Component-1.cy.jsx | 0 .../vite/src/Component-1.jsx | 0 .../vite/src/Component-2.cy.jsx | 0 .../vite/src/Component-2.jsx | 0 .../vite/src/Component-3.cy.jsx | 0 .../vite/src/Component-3.jsx | 0 .../vite/vite.config.js | 0 .../vite/yarn.lock | 0 .../webpack/README.md | 0 .../webpack/cypress.config.js | 2 +- .../cypress/support/component-index.html | 0 .../webpack/cypress/support/component.js | 0 .../webpack/package.json | 0 .../webpack/src/Component-1.cy.jsx | 0 .../webpack/src/Component-1.jsx | 0 .../webpack/src/Component-2.cy.jsx | 0 .../webpack/src/Component-2.jsx | 0 .../webpack/src/Component-3.cy.jsx | 0 .../webpack/src/Component-3.jsx | 0 .../webpack/webpack.config.js | 0 .../webpack/yarn.lock | 0 ..._jit.spec.ts => justInTimeCompile_spec.ts} | 10 ++--- 46 files changed, 135 insertions(+), 79 deletions(-) rename packages/app/cypress/e2e/runner/{runner-ct.experimentalJustInTimeCompile.cy.ts => runner-ct.justInTimeCompile.cy.ts} (75%) create mode 100644 packages/errors/__snapshot-html__/EXPERIMENTAL_JIT_COMPILE_REMOVED.html rename packages/errors/__snapshot-html__/{EXPERIMENTAL_JIT_COMPONENT_TESTING.html => JIT_COMPONENT_TESTING.html} (68%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/vite/cypress.config.js (73%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/vite/cypress/support/component-index.html (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/vite/cypress/support/component.js (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/vite/package.json (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/vite/src/Component-1.cy.jsx (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/vite/src/Component-1.jsx (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/vite/src/Component-2.cy.jsx (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/vite/src/Component-2.jsx (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/vite/src/Component-3.cy.jsx (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/vite/src/Component-3.jsx (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/vite/vite.config.js (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/vite/yarn.lock (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/webpack/README.md (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/webpack/cypress.config.js (74%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/webpack/cypress/support/component-index.html (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/webpack/cypress/support/component.js (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/webpack/package.json (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/webpack/src/Component-1.cy.jsx (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/webpack/src/Component-1.jsx (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/webpack/src/Component-2.cy.jsx (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/webpack/src/Component-2.jsx (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/webpack/src/Component-3.cy.jsx (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/webpack/src/Component-3.jsx (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/webpack/webpack.config.js (100%) rename system-tests/projects/{experimental-JIT => justInTimeCompile}/webpack/yarn.lock (100%) rename system-tests/test/{experimental_jit.spec.ts => justInTimeCompile_spec.ts} (87%) diff --git a/cli/types/cypress.d.ts b/cli/types/cypress.d.ts index 5b92811c3531..aa20d620ad50 100644 --- a/cli/types/cypress.d.ts +++ b/cli/types/cypress.d.ts @@ -3113,14 +3113,6 @@ declare namespace Cypress { * @default null */ experimentalSkipDomainInjection: string[] | null - /** - * Allows for just-in-time compiling of a component test, which will only compile assets related to the component. - * This results in a smaller bundle under test, reducing resource constraints on a given machine. This option is recommended - * for users with large component testing projects and those who are running into webpack 'chunk load error' issues. - * Supported for webpack-dev-server only. For component testing only. - * @see https://on.cypress.io/experiments#Configuration - */ - experimentalJustInTimeCompile: boolean /** * Enables AST-based JS/HTML rewriting. This may fix issues caused by the existing regex-based JS/HTML replacement algorithm. * @default false @@ -3141,6 +3133,14 @@ declare namespace Cypress { * @default false */ experimentalMemoryManagement: boolean + /** + * Allows for just-in-time compiling of a component test, which will only compile assets related to the component. + * This results in a smaller bundle under test, reducing resource constraints on a given machine. This option is recommended + * for users with large component testing projects and those who are running into webpack 'chunk load error' issues. + * Supported for webpack-dev-server only. For component testing only. + * @see https://on.cypress.io/experiments#Configuration + */ + justInTimeCompile: boolean /** * Number of times to retry a failed test. * If a number is set, tests will retry in both runMode and openMode. diff --git a/npm/webpack-dev-server/src/makeDefaultWebpackConfig.ts b/npm/webpack-dev-server/src/makeDefaultWebpackConfig.ts index 30bed4e005e8..61574d0d1c6f 100644 --- a/npm/webpack-dev-server/src/makeDefaultWebpackConfig.ts +++ b/npm/webpack-dev-server/src/makeDefaultWebpackConfig.ts @@ -17,7 +17,7 @@ export function makeCypressWebpackConfig ( const { devServerConfig: { cypressConfig: { - experimentalJustInTimeCompile, + justInTimeCompile, port, projectRoot, devServerPublicPathRoute, @@ -100,8 +100,8 @@ export function makeCypressWebpackConfig ( } as any if (isRunMode) { - // if experimentalJustInTimeCompile is configured, we need to watch for file changes as the spec entries are going to be updated per test - const ignored = experimentalJustInTimeCompile ? /node_modules/ : '**/*' + // if justInTimeCompile is configured, we need to watch for file changes as the spec entries are going to be updated per test + const ignored = justInTimeCompile ? /node_modules/ : '**/*' // Disable file watching when executing tests in `run` mode finalConfig.watchOptions = { diff --git a/npm/webpack-dev-server/src/makeWebpackConfig.ts b/npm/webpack-dev-server/src/makeWebpackConfig.ts index 2995b752b8c8..9a892be952a3 100644 --- a/npm/webpack-dev-server/src/makeWebpackConfig.ts +++ b/npm/webpack-dev-server/src/makeWebpackConfig.ts @@ -80,12 +80,12 @@ export async function makeWebpackConfig ( cypressConfig: { projectRoot, supportFile, - experimentalJustInTimeCompile, + justInTimeCompile, }, framework, } = config.devServerConfig - config.devServerConfig.specs = experimentalJustInTimeCompile ? [] : config.devServerConfig.specs + config.devServerConfig.specs = justInTimeCompile ? [] : config.devServerConfig.specs if (!userWebpackConfig && !frameworkWebpackConfig) { debug('Not user or framework webpack config received. Trying to automatically source it') diff --git a/npm/webpack-dev-server/test/makeWebpackConfig.spec.ts b/npm/webpack-dev-server/test/makeWebpackConfig.spec.ts index bd26bfa38659..0e232c52d161 100644 --- a/npm/webpack-dev-server/test/makeWebpackConfig.spec.ts +++ b/npm/webpack-dev-server/test/makeWebpackConfig.spec.ts @@ -392,7 +392,7 @@ describe('makeWebpackConfig', () => { }) }) - describe('experimentalJustInTimeCompile', () => { + describe('justInTimeCompile', () => { let devServerConfig: WebpackDevServerConfig const WEBPACK_MATRIX: { @@ -419,7 +419,7 @@ describe('makeWebpackConfig', () => { cypressConfig: { projectRoot: '.', devServerPublicPathRoute: '/test-public-path', - experimentalJustInTimeCompile: true, + justInTimeCompile: true, baseUrl: null, } as Cypress.PluginConfigOptions, webpackConfig: { diff --git a/packages/app/cypress/e2e/runner/runner-ct.experimentalJustInTimeCompile.cy.ts b/packages/app/cypress/e2e/runner/runner-ct.justInTimeCompile.cy.ts similarity index 75% rename from packages/app/cypress/e2e/runner/runner-ct.experimentalJustInTimeCompile.cy.ts rename to packages/app/cypress/e2e/runner/runner-ct.justInTimeCompile.cy.ts index 2a5186642d53..1e003516c0e7 100644 --- a/packages/app/cypress/e2e/runner/runner-ct.experimentalJustInTimeCompile.cy.ts +++ b/packages/app/cypress/e2e/runner/runner-ct.justInTimeCompile.cy.ts @@ -2,18 +2,18 @@ import type { fixtureDirs } from '@tooling/system-tests' type ProjectDirs = typeof fixtureDirs -const EXPERIMENTAL_JIT_DIR: ProjectDirs[number] = 'experimental-JIT' +const JIT_DIR: ProjectDirs[number] = 'justInTimeCompile' const PROJECTS: {bundler: 'vite' | 'webpack'}[] = [ - // when running for vite, experimentalJustInTimeCompile=true is set but is a no-op for vite since JIT compiling is not supported in vite + // when running for vite, justInTimeCompile=true is set but is a no-op for vite since JIT compiling is not supported in vite { bundler: 'vite' }, { bundler: 'webpack' }, ] for (const { bundler } of PROJECTS) { - const PROJECT_NAME = `${EXPERIMENTAL_JIT_DIR}/${bundler}` + const PROJECT_NAME = `${JIT_DIR}/${bundler}` - describe(`CT experimentalJustInTimeCompile: ${bundler}`, { viewportWidth: 1500, defaultCommandTimeout: 30000 }, () => { + describe(`CT justInTimeCompile: ${bundler}`, { viewportWidth: 1500, defaultCommandTimeout: 30000 }, () => { const visitComponentSpecAndVerifyPass = (specNumber: number) => { cy.contains(`Component-${specNumber}.cy.jsx`).click() cy.waitForSpecToFinish(undefined) diff --git a/packages/app/src/runner/index.ts b/packages/app/src/runner/index.ts index b150604e09bd..7e360f1535be 100644 --- a/packages/app/src/runner/index.ts +++ b/packages/app/src/runner/index.ts @@ -445,8 +445,8 @@ async function executeSpec (spec: SpecFile, isRerun: boolean = false) { } if (window.__CYPRESS_TESTING_TYPE__ === 'component') { - if (config.experimentalJustInTimeCompile && !config.isTextTerminal) { - // If running with experimentalJustInTimeCompile enabled and in open mode, + if (config.justInTimeCompile && !config.isTextTerminal) { + // If running with justInTimeCompile enabled and in open mode, // send a signal to the dev server to load the spec before running // since the spec and related resources are not yet compiled. await updateDevServerWithSpec(spec) diff --git a/packages/config/__snapshots__/index.spec.ts.js b/packages/config/__snapshots__/index.spec.ts.js index 9d6ca3731f71..1772bbc563d9 100644 --- a/packages/config/__snapshots__/index.spec.ts.js +++ b/packages/config/__snapshots__/index.spec.ts.js @@ -39,7 +39,6 @@ exports['config/src/index .getDefaultValues returns list of public config keys 1 'experimentalMemoryManagement': false, 'experimentalModifyObstructiveThirdPartyCode': false, 'experimentalSkipDomainInjection': null, - 'experimentalJustInTimeCompile': false, 'experimentalOriginDependencies': false, 'experimentalSourceRewriting': false, 'experimentalSingleTabRunMode': false, @@ -49,6 +48,7 @@ exports['config/src/index .getDefaultValues returns list of public config keys 1 'fixturesFolder': 'cypress/fixtures', 'excludeSpecPattern': '*.hot-update.js', 'includeShadowDom': false, + 'justInTimeCompile': false, 'keystrokeDelay': 0, 'modifyObstructiveCode': true, 'numTestsKeptInMemory': 50, @@ -129,7 +129,6 @@ exports['config/src/index .getDefaultValues returns list of public config keys f 'experimentalMemoryManagement': false, 'experimentalModifyObstructiveThirdPartyCode': false, 'experimentalSkipDomainInjection': null, - 'experimentalJustInTimeCompile': false, 'experimentalOriginDependencies': false, 'experimentalSourceRewriting': false, 'experimentalSingleTabRunMode': false, @@ -139,6 +138,7 @@ exports['config/src/index .getDefaultValues returns list of public config keys f 'fixturesFolder': 'cypress/fixtures', 'excludeSpecPattern': '*.hot-update.js', 'includeShadowDom': false, + 'justInTimeCompile': false, 'keystrokeDelay': 0, 'modifyObstructiveCode': true, 'numTestsKeptInMemory': 50, @@ -215,7 +215,6 @@ exports['config/src/index .getPublicConfigKeys returns list of public config key 'experimentalMemoryManagement', 'experimentalModifyObstructiveThirdPartyCode', 'experimentalSkipDomainInjection', - 'experimentalJustInTimeCompile', 'experimentalOriginDependencies', 'experimentalSourceRewriting', 'experimentalSingleTabRunMode', @@ -225,6 +224,7 @@ exports['config/src/index .getPublicConfigKeys returns list of public config key 'fixturesFolder', 'excludeSpecPattern', 'includeShadowDom', + 'justInTimeCompile', 'keystrokeDelay', 'modifyObstructiveCode', 'numTestsKeptInMemory', diff --git a/packages/config/src/options.ts b/packages/config/src/options.ts index c9e4d9e7702d..c5dea74e930d 100644 --- a/packages/config/src/options.ts +++ b/packages/config/src/options.ts @@ -231,12 +231,6 @@ const driverConfigOptions: Array = [ validation: validate.isNullOrArrayOfStrings, isExperimental: true, requireRestartOnChange: 'server', - }, { - name: 'experimentalJustInTimeCompile', - defaultValue: false, - validation: validate.isBoolean, - isExperimental: true, - requireRestartOnChange: 'server', }, { name: 'experimentalOriginDependencies', defaultValue: false, @@ -290,6 +284,11 @@ const driverConfigOptions: Array = [ defaultValue: false, validation: validate.isBoolean, overrideLevel: 'any', + }, { + name: 'justInTimeCompile', + defaultValue: false, + validation: validate.isBoolean, + requireRestartOnChange: 'server', }, { name: 'keystrokeDelay', defaultValue: 0, @@ -632,6 +631,11 @@ export const breakingOptions: Readonly = [ errorKey: 'EXPERIMENTAL_SAMESITE_REMOVED', isWarning: true, }, { + name: 'experimentalJustInTimeCompile', + errorKey: 'EXPERIMENTAL_JIT_COMPILE_REMOVED', + isWarning: true, + }, + { name: 'experimentalNetworkStubbing', errorKey: 'EXPERIMENTAL_NETWORK_STUBBING_REMOVED', isWarning: true, @@ -736,8 +740,8 @@ export const breakingRootOptions: Array = [ testingTypes: ['e2e'], }, { - name: 'experimentalJustInTimeCompile', - errorKey: 'EXPERIMENTAL_JIT_COMPONENT_TESTING', + name: 'justInTimeCompile', + errorKey: 'JIT_COMPONENT_TESTING', isWarning: false, testingTypes: ['component'], }, @@ -756,8 +760,8 @@ export const testingTypeBreakingOptions: { e2e: Array, component isWarning: false, }, { - name: 'experimentalJustInTimeCompile', - errorKey: 'EXPERIMENTAL_JIT_COMPONENT_TESTING', + name: 'justInTimeCompile', + errorKey: 'JIT_COMPONENT_TESTING', isWarning: false, }, ], diff --git a/packages/config/test/project/utils.spec.ts b/packages/config/test/project/utils.spec.ts index ffa0f49001b0..ad5db967fe2a 100644 --- a/packages/config/test/project/utils.spec.ts +++ b/packages/config/test/project/utils.spec.ts @@ -969,6 +969,16 @@ describe('config/src/project/utils', () => { expect(warning).to.be.calledWith('EXPERIMENTAL_SAMESITE_REMOVED') }) + it('warns if experimentalJustInTimeCompile is passed', async function () { + const warning = sinon.spy(errors, 'warning') + + await this.defaults('experimentalJustInTimeCompile', true, { + experimentalJustInTimeCompile: true, + }) + + expect(warning).to.be.calledWith('EXPERIMENTAL_JIT_COMPILE_REMOVED') + }) + it('warns if experimentalSessionSupport is passed', async function () { const warning = sinon.spy(errors, 'warning') @@ -1057,10 +1067,10 @@ describe('config/src/project/utils', () => { defaultCommandTimeout: { value: 4000, from: 'default' }, downloadsFolder: { value: 'cypress/downloads', from: 'default' }, env: {}, + excludeSpecPattern: { value: '*.hot-update.js', from: 'default' }, execTimeout: { value: 60000, from: 'default' }, experimentalModifyObstructiveThirdPartyCode: { value: false, from: 'default' }, experimentalSkipDomainInjection: { value: null, from: 'default' }, - experimentalJustInTimeCompile: { value: false, from: 'default' }, experimentalCspAllowList: { value: false, from: 'default' }, experimentalInteractiveRunEvents: { value: false, from: 'default' }, experimentalMemoryManagement: { value: false, from: 'default' }, @@ -1073,8 +1083,8 @@ describe('config/src/project/utils', () => { fileServerFolder: { value: '', from: 'default' }, fixturesFolder: { value: 'cypress/fixtures', from: 'default' }, hosts: { value: null, from: 'default' }, - excludeSpecPattern: { value: '*.hot-update.js', from: 'default' }, includeShadowDom: { value: false, from: 'default' }, + justInTimeCompile: { value: false, from: 'default' }, isInteractive: { value: true, from: 'default' }, keystrokeDelay: { value: 0, from: 'default' }, modifyObstructiveCode: { value: true, from: 'default' }, @@ -1153,19 +1163,6 @@ describe('config/src/project/utils', () => { clientCertificates: { value: [], from: 'default' }, defaultCommandTimeout: { value: 4000, from: 'default' }, downloadsFolder: { value: 'cypress/downloads', from: 'default' }, - execTimeout: { value: 60000, from: 'default' }, - experimentalModifyObstructiveThirdPartyCode: { value: false, from: 'default' }, - experimentalSkipDomainInjection: { value: null, from: 'default' }, - experimentalJustInTimeCompile: { value: false, from: 'default' }, - experimentalCspAllowList: { value: false, from: 'default' }, - experimentalInteractiveRunEvents: { value: false, from: 'default' }, - experimentalMemoryManagement: { value: false, from: 'default' }, - experimentalOriginDependencies: { value: false, from: 'default' }, - experimentalRunAllSpecs: { value: false, from: 'default' }, - experimentalSingleTabRunMode: { value: false, from: 'default' }, - experimentalStudio: { value: false, from: 'default' }, - experimentalSourceRewriting: { value: false, from: 'default' }, - experimentalWebKitSupport: { value: false, from: 'default' }, env: { foo: { value: 'foo', @@ -1188,11 +1185,24 @@ describe('config/src/project/utils', () => { from: 'env', }, }, + excludeSpecPattern: { value: '*.hot-update.js', from: 'default' }, + execTimeout: { value: 60000, from: 'default' }, + experimentalModifyObstructiveThirdPartyCode: { value: false, from: 'default' }, + experimentalSkipDomainInjection: { value: null, from: 'default' }, + experimentalCspAllowList: { value: false, from: 'default' }, + experimentalInteractiveRunEvents: { value: false, from: 'default' }, + experimentalMemoryManagement: { value: false, from: 'default' }, + experimentalOriginDependencies: { value: false, from: 'default' }, + experimentalRunAllSpecs: { value: false, from: 'default' }, + experimentalSingleTabRunMode: { value: false, from: 'default' }, + experimentalStudio: { value: false, from: 'default' }, + experimentalSourceRewriting: { value: false, from: 'default' }, + experimentalWebKitSupport: { value: false, from: 'default' }, fileServerFolder: { value: '', from: 'default' }, fixturesFolder: { value: 'cypress/fixtures', from: 'default' }, hosts: { value: null, from: 'default' }, - excludeSpecPattern: { value: '*.hot-update.js', from: 'default' }, includeShadowDom: { value: false, from: 'default' }, + justInTimeCompile: { value: false, from: 'default' }, isInteractive: { value: true, from: 'default' }, keystrokeDelay: { value: 0, from: 'default' }, modifyObstructiveCode: { value: true, from: 'default' }, diff --git a/packages/data-context/src/data/ProjectLifecycleManager.ts b/packages/data-context/src/data/ProjectLifecycleManager.ts index 387032590921..547232fdfefc 100644 --- a/packages/data-context/src/data/ProjectLifecycleManager.ts +++ b/packages/data-context/src/data/ProjectLifecycleManager.ts @@ -241,7 +241,7 @@ export class ProjectLifecycleManager { /** * We need to start the dev server in the ProjectLifecycleManager when: * 1. GA component testing is running so we can compile the dev server will all specs matching the specPattern - * 2. experimentalJustInTimeCompile is enabled (for webpack-dev-server). In this case, we start a dev server + * 2. justInTimeCompile is enabled (for webpack-dev-server). In this case, we start a dev server * with an empty specs list to initially compile the support file and related dependencies in order to hopefully * leverage the dev server cache for recompiling for when we actually have a spec to add to the dev server entry. * The empty specs are handled within the @cypress/webpack-dev-server package as this has no impact on vite. diff --git a/packages/errors/__snapshot-html__/EXPERIMENTAL_JIT_COMPILE_REMOVED.html b/packages/errors/__snapshot-html__/EXPERIMENTAL_JIT_COMPILE_REMOVED.html new file mode 100644 index 000000000000..bf1e39768bf7 --- /dev/null +++ b/packages/errors/__snapshot-html__/EXPERIMENTAL_JIT_COMPILE_REMOVED.html @@ -0,0 +1,40 @@ + + + + + + + + + + + +
The experimentalJustInTimeCompile configuration option was removed in Cypress version 14.0.0.
+A new justInTimeCompile configuration option is available and is now false by default.
+You can safely remove this option from your config.
+
\ No newline at end of file diff --git a/packages/errors/__snapshot-html__/EXPERIMENTAL_JIT_COMPONENT_TESTING.html b/packages/errors/__snapshot-html__/JIT_COMPONENT_TESTING.html similarity index 68% rename from packages/errors/__snapshot-html__/EXPERIMENTAL_JIT_COMPONENT_TESTING.html rename to packages/errors/__snapshot-html__/JIT_COMPONENT_TESTING.html index e7ed5e722e49..d503011487dc 100644 --- a/packages/errors/__snapshot-html__/EXPERIMENTAL_JIT_COMPONENT_TESTING.html +++ b/packages/errors/__snapshot-html__/JIT_COMPONENT_TESTING.html @@ -34,7 +34,5 @@ -
The experimentalJustInTimeCompile experiment is currently only supported for Component Testing.
-
-If you have feedback about the experiment, please join the discussion here: http://on.cypress.io/just-in-time-compile
+    
The justInTimeCompile configuration is only supported for Component Testing.
 
\ No newline at end of file diff --git a/packages/errors/src/errors.ts b/packages/errors/src/errors.ts index ebe72e54a6c0..f7145d4e4832 100644 --- a/packages/errors/src/errors.ts +++ b/packages/errors/src/errors.ts @@ -1239,6 +1239,12 @@ export const AllCypressErrors = { You can safely remove this option from your config.` }, + EXPERIMENTAL_JIT_COMPILE_REMOVED: () => { + return errTemplate`\ + The ${fmt.highlight(`experimentalJustInTimeCompile`)} configuration option was removed in ${fmt.cypressVersion(`14.0.0`)}. + A new ${fmt.highlightSecondary(`justInTimeCompile`)} configuration option is available and is now ${fmt.highlightSecondary(`false`)} by default. + You can safely remove this option from your config.` + }, // TODO: verify configFile is absolute path // TODO: make this relative path, not absolute EXPERIMENTAL_COMPONENT_TESTING_REMOVED: (arg1: {configFile: string}) => { @@ -1338,11 +1344,9 @@ export const AllCypressErrors = { ${fmt.code(code)}` }, - EXPERIMENTAL_JIT_COMPONENT_TESTING: () => { + JIT_COMPONENT_TESTING: () => { return errTemplate`\ - The ${fmt.highlight(`experimentalJustInTimeCompile`)} experiment is currently only supported for Component Testing. - - If you have feedback about the experiment, please join the discussion here: http://on.cypress.io/just-in-time-compile` + The ${fmt.highlight(`justInTimeCompile`)} configuration is only supported for Component Testing.` }, EXPERIMENTAL_USE_DEFAULT_DOCUMENT_DOMAIN_E2E_ONLY: () => { const code = errPartial` diff --git a/packages/errors/test/unit/visualSnapshotErrors_spec.ts b/packages/errors/test/unit/visualSnapshotErrors_spec.ts index 9c3a912dadc9..d8bb963e9dd9 100644 --- a/packages/errors/test/unit/visualSnapshotErrors_spec.ts +++ b/packages/errors/test/unit/visualSnapshotErrors_spec.ts @@ -1151,6 +1151,11 @@ describe('visual error templates', () => { default: [], } }, + EXPERIMENTAL_JIT_COMPILE_REMOVED: () => { + return { + default: [], + } + }, EXPERIMENTAL_COMPONENT_TESTING_REMOVED: () => { return { default: [{ configFile: '/path/to/cypress.config.js' }], @@ -1277,7 +1282,7 @@ describe('visual error templates', () => { default: [{ name: 'indexHtmlFile', configFile: '/path/to/cypress.config.js.ts' }], } }, - EXPERIMENTAL_JIT_COMPONENT_TESTING: () => { + JIT_COMPONENT_TESTING: () => { return { default: [], } diff --git a/packages/frontend-shared/src/locales/en-US.json b/packages/frontend-shared/src/locales/en-US.json index 6f384698bf44..446e788f9293 100644 --- a/packages/frontend-shared/src/locales/en-US.json +++ b/packages/frontend-shared/src/locales/en-US.json @@ -605,10 +605,6 @@ "name": "Single tab run mode", "description": "Runs all component specs in a single tab, trading spec isolation for faster run mode execution." }, - "experimentalJustInTimeCompile": { - "name": "Just-In-Time compiling", - "description": "Enables Just-In-Time (JIT) compiling for component testing, which will only compile assets related to the spec before the spec is run. Currently supported for Vite and Webpack." - }, "experimentalSourceRewriting": { "name": "Source rewriting", "description": "Enables AST-based JS/HTML rewriting. This may fix issues caused by the existing regex-based JS/HTML replacement algorithm. See [#5273](https://github.com/cypress-io/cypress/issues/5273) for details." diff --git a/packages/graphql/schemas/schema.graphql b/packages/graphql/schemas/schema.graphql index 8427aee9f060..49cf4d22d40a 100644 --- a/packages/graphql/schemas/schema.graphql +++ b/packages/graphql/schemas/schema.graphql @@ -1186,7 +1186,7 @@ enum ErrorTypeEnum { ERROR_READING_FILE ERROR_WRITING_FILE EXPERIMENTAL_COMPONENT_TESTING_REMOVED - EXPERIMENTAL_JIT_COMPONENT_TESTING + EXPERIMENTAL_JIT_COMPILE_REMOVED EXPERIMENTAL_NETWORK_STUBBING_REMOVED EXPERIMENTAL_ORIGIN_DEPENDENCIES_E2E_ONLY EXPERIMENTAL_RUN_ALL_SPECS_E2E_ONLY @@ -1219,6 +1219,7 @@ enum ErrorTypeEnum { INVALID_CYPRESS_INTERNAL_ENV INVALID_REPORTER_NAME INVOKED_BINARY_OUTSIDE_NPM_MODULE + JIT_COMPONENT_TESTING LEGACY_CONFIG_ERROR_DURING_MIGRATION LEGACY_CONFIG_FILE MIGRATION_ALREADY_OCURRED diff --git a/packages/server/lib/experiments.ts b/packages/server/lib/experiments.ts index f8607a07f7a6..27d2274c9fdf 100644 --- a/packages/server/lib/experiments.ts +++ b/packages/server/lib/experiments.ts @@ -52,7 +52,6 @@ interface StringValues { */ const _summaries: StringValues = { experimentalInteractiveRunEvents: 'Allows listening to the `before:run`, `after:run`, `before:spec`, and `after:spec` events in the plugins file during interactive mode.', - experimentalJustInTimeCompile: 'Just-In-Time compiling', experimentalModifyObstructiveThirdPartyCode: 'Applies `modifyObstructiveCode` to third party `.html` and `.js`, removes subresource integrity, and modifies the user agent in Electron.', experimentalSkipDomainInjection: 'Disables setting document.domain to the document\'s super domain on injection.', experimentalSourceRewriting: 'Enables AST-based JS/HTML rewriting. This may fix issues caused by the existing regex-based JS/HTML replacement algorithm.', @@ -76,7 +75,6 @@ const _summaries: StringValues = { */ const _names: StringValues = { experimentalInteractiveRunEvents: 'Interactive Mode Run Events', - experimentalJustInTimeCompile: 'Enables Just-In-Time (JIT) compiling for component testing, which will only compile assets related to the spec before the spec is run. Currently supported for Vite and Webpack.', experimentalModifyObstructiveThirdPartyCode: 'Modify Obstructive Third Party Code', experimentalSkipDomainInjection: 'Use Default document.domain', experimentalSingleTabRunMode: 'Single Tab Run Mode', diff --git a/packages/server/lib/modes/run.ts b/packages/server/lib/modes/run.ts index 8ed0f2c57d3a..c3b45421c4ed 100644 --- a/packages/server/lib/modes/run.ts +++ b/packages/server/lib/modes/run.ts @@ -421,7 +421,7 @@ async function listenForProjectEnd (project: ProjectBase, exit: boolean): Promis project.once('end', (results) => { debug('project ended with results %O', results) // If the project ends and the spec is skipped, treat the run as cancelled - // as we do not want to update the dev server unnecessarily for experimentalJustInTimeCompile. + // as we do not want to update the dev server unnecessarily for justInTimeCompile. if (results?.skippedSpec) { isRunCancelled = true } @@ -814,13 +814,13 @@ async function runSpecs (options: { config: Cfg, browser: Browser, sys: any, hea printResults.displaySpecHeader(spec.relativeToCommonRoot, index + 1, length, estimated) } - const isExperimentalJustInTimeCompile = options.testingType === 'component' && config.experimentalJustInTimeCompile + const isJustInTimeCompile = options.testingType === 'component' && config.justInTimeCompile // Only update the dev server if the run is not cancelled - if (isExperimentalJustInTimeCompile) { + if (isJustInTimeCompile) { if (isRunCancelled) { // TODO: this logic to skip updating the dev-server on cancel needs a system-test before the feature goes generally available. - debug(`isExperimentalJustInTimeCompile=true and run is cancelled. Not updating dev server with spec ${spec.absolute}.`) + debug(`isJustInTimeCompile=true and run is cancelled. Not updating dev server with spec ${spec.absolute}.`) } else { const ctx = require('@packages/data-context').getCtx() diff --git a/packages/types/src/config.ts b/packages/types/src/config.ts index d2498d982634..2f886303facd 100644 --- a/packages/types/src/config.ts +++ b/packages/types/src/config.ts @@ -30,7 +30,7 @@ export interface FullConfig extends Partial - & Pick // TODO: Figure out how to type this better. + & Pick // TODO: Figure out how to type this better. export interface SettingsOptions { testingType?: 'component' |'e2e' diff --git a/system-tests/__snapshots__/results_spec.ts.js b/system-tests/__snapshots__/results_spec.ts.js index 5945b4bff6e8..2407e997dc79 100644 --- a/system-tests/__snapshots__/results_spec.ts.js +++ b/system-tests/__snapshots__/results_spec.ts.js @@ -26,7 +26,6 @@ exports['module api and after:run results'] = ` "experimentalMemoryManagement": false, "experimentalModifyObstructiveThirdPartyCode": false, "experimentalSkipDomainInjection": null, - "experimentalJustInTimeCompile": false, "experimentalOriginDependencies": false, "experimentalSourceRewriting": false, "experimentalSingleTabRunMode": false, @@ -36,6 +35,7 @@ exports['module api and after:run results'] = ` "fixturesFolder": "/path/to/fixturesFolder", "excludeSpecPattern": "*.hot-update.js", "includeShadowDom": false, + "justInTimeCompile": false, "keystrokeDelay": 0, "modifyObstructiveCode": true, "numTestsKeptInMemory": 0, diff --git a/system-tests/projects/experimental-JIT/vite/cypress.config.js b/system-tests/projects/justInTimeCompile/vite/cypress.config.js similarity index 73% rename from system-tests/projects/experimental-JIT/vite/cypress.config.js rename to system-tests/projects/justInTimeCompile/vite/cypress.config.js index ce96c524dc61..ea1d6007034a 100644 --- a/system-tests/projects/experimental-JIT/vite/cypress.config.js +++ b/system-tests/projects/justInTimeCompile/vite/cypress.config.js @@ -1,6 +1,6 @@ module.exports = { component: { - experimentalJustInTimeCompile: true, + justInTimeCompile: true, devServer: { framework: 'react', bundler: 'vite', diff --git a/system-tests/projects/experimental-JIT/vite/cypress/support/component-index.html b/system-tests/projects/justInTimeCompile/vite/cypress/support/component-index.html similarity index 100% rename from system-tests/projects/experimental-JIT/vite/cypress/support/component-index.html rename to system-tests/projects/justInTimeCompile/vite/cypress/support/component-index.html diff --git a/system-tests/projects/experimental-JIT/vite/cypress/support/component.js b/system-tests/projects/justInTimeCompile/vite/cypress/support/component.js similarity index 100% rename from system-tests/projects/experimental-JIT/vite/cypress/support/component.js rename to system-tests/projects/justInTimeCompile/vite/cypress/support/component.js diff --git a/system-tests/projects/experimental-JIT/vite/package.json b/system-tests/projects/justInTimeCompile/vite/package.json similarity index 100% rename from system-tests/projects/experimental-JIT/vite/package.json rename to system-tests/projects/justInTimeCompile/vite/package.json diff --git a/system-tests/projects/experimental-JIT/vite/src/Component-1.cy.jsx b/system-tests/projects/justInTimeCompile/vite/src/Component-1.cy.jsx similarity index 100% rename from system-tests/projects/experimental-JIT/vite/src/Component-1.cy.jsx rename to system-tests/projects/justInTimeCompile/vite/src/Component-1.cy.jsx diff --git a/system-tests/projects/experimental-JIT/vite/src/Component-1.jsx b/system-tests/projects/justInTimeCompile/vite/src/Component-1.jsx similarity index 100% rename from system-tests/projects/experimental-JIT/vite/src/Component-1.jsx rename to system-tests/projects/justInTimeCompile/vite/src/Component-1.jsx diff --git a/system-tests/projects/experimental-JIT/vite/src/Component-2.cy.jsx b/system-tests/projects/justInTimeCompile/vite/src/Component-2.cy.jsx similarity index 100% rename from system-tests/projects/experimental-JIT/vite/src/Component-2.cy.jsx rename to system-tests/projects/justInTimeCompile/vite/src/Component-2.cy.jsx diff --git a/system-tests/projects/experimental-JIT/vite/src/Component-2.jsx b/system-tests/projects/justInTimeCompile/vite/src/Component-2.jsx similarity index 100% rename from system-tests/projects/experimental-JIT/vite/src/Component-2.jsx rename to system-tests/projects/justInTimeCompile/vite/src/Component-2.jsx diff --git a/system-tests/projects/experimental-JIT/vite/src/Component-3.cy.jsx b/system-tests/projects/justInTimeCompile/vite/src/Component-3.cy.jsx similarity index 100% rename from system-tests/projects/experimental-JIT/vite/src/Component-3.cy.jsx rename to system-tests/projects/justInTimeCompile/vite/src/Component-3.cy.jsx diff --git a/system-tests/projects/experimental-JIT/vite/src/Component-3.jsx b/system-tests/projects/justInTimeCompile/vite/src/Component-3.jsx similarity index 100% rename from system-tests/projects/experimental-JIT/vite/src/Component-3.jsx rename to system-tests/projects/justInTimeCompile/vite/src/Component-3.jsx diff --git a/system-tests/projects/experimental-JIT/vite/vite.config.js b/system-tests/projects/justInTimeCompile/vite/vite.config.js similarity index 100% rename from system-tests/projects/experimental-JIT/vite/vite.config.js rename to system-tests/projects/justInTimeCompile/vite/vite.config.js diff --git a/system-tests/projects/experimental-JIT/vite/yarn.lock b/system-tests/projects/justInTimeCompile/vite/yarn.lock similarity index 100% rename from system-tests/projects/experimental-JIT/vite/yarn.lock rename to system-tests/projects/justInTimeCompile/vite/yarn.lock diff --git a/system-tests/projects/experimental-JIT/webpack/README.md b/system-tests/projects/justInTimeCompile/webpack/README.md similarity index 100% rename from system-tests/projects/experimental-JIT/webpack/README.md rename to system-tests/projects/justInTimeCompile/webpack/README.md diff --git a/system-tests/projects/experimental-JIT/webpack/cypress.config.js b/system-tests/projects/justInTimeCompile/webpack/cypress.config.js similarity index 74% rename from system-tests/projects/experimental-JIT/webpack/cypress.config.js rename to system-tests/projects/justInTimeCompile/webpack/cypress.config.js index 1e564e2aab2c..89aeead60ac4 100644 --- a/system-tests/projects/experimental-JIT/webpack/cypress.config.js +++ b/system-tests/projects/justInTimeCompile/webpack/cypress.config.js @@ -1,6 +1,6 @@ module.exports = { component: { - experimentalJustInTimeCompile: true, + justInTimeCompile: true, devServer: { framework: 'react', bundler: 'webpack', diff --git a/system-tests/projects/experimental-JIT/webpack/cypress/support/component-index.html b/system-tests/projects/justInTimeCompile/webpack/cypress/support/component-index.html similarity index 100% rename from system-tests/projects/experimental-JIT/webpack/cypress/support/component-index.html rename to system-tests/projects/justInTimeCompile/webpack/cypress/support/component-index.html diff --git a/system-tests/projects/experimental-JIT/webpack/cypress/support/component.js b/system-tests/projects/justInTimeCompile/webpack/cypress/support/component.js similarity index 100% rename from system-tests/projects/experimental-JIT/webpack/cypress/support/component.js rename to system-tests/projects/justInTimeCompile/webpack/cypress/support/component.js diff --git a/system-tests/projects/experimental-JIT/webpack/package.json b/system-tests/projects/justInTimeCompile/webpack/package.json similarity index 100% rename from system-tests/projects/experimental-JIT/webpack/package.json rename to system-tests/projects/justInTimeCompile/webpack/package.json diff --git a/system-tests/projects/experimental-JIT/webpack/src/Component-1.cy.jsx b/system-tests/projects/justInTimeCompile/webpack/src/Component-1.cy.jsx similarity index 100% rename from system-tests/projects/experimental-JIT/webpack/src/Component-1.cy.jsx rename to system-tests/projects/justInTimeCompile/webpack/src/Component-1.cy.jsx diff --git a/system-tests/projects/experimental-JIT/webpack/src/Component-1.jsx b/system-tests/projects/justInTimeCompile/webpack/src/Component-1.jsx similarity index 100% rename from system-tests/projects/experimental-JIT/webpack/src/Component-1.jsx rename to system-tests/projects/justInTimeCompile/webpack/src/Component-1.jsx diff --git a/system-tests/projects/experimental-JIT/webpack/src/Component-2.cy.jsx b/system-tests/projects/justInTimeCompile/webpack/src/Component-2.cy.jsx similarity index 100% rename from system-tests/projects/experimental-JIT/webpack/src/Component-2.cy.jsx rename to system-tests/projects/justInTimeCompile/webpack/src/Component-2.cy.jsx diff --git a/system-tests/projects/experimental-JIT/webpack/src/Component-2.jsx b/system-tests/projects/justInTimeCompile/webpack/src/Component-2.jsx similarity index 100% rename from system-tests/projects/experimental-JIT/webpack/src/Component-2.jsx rename to system-tests/projects/justInTimeCompile/webpack/src/Component-2.jsx diff --git a/system-tests/projects/experimental-JIT/webpack/src/Component-3.cy.jsx b/system-tests/projects/justInTimeCompile/webpack/src/Component-3.cy.jsx similarity index 100% rename from system-tests/projects/experimental-JIT/webpack/src/Component-3.cy.jsx rename to system-tests/projects/justInTimeCompile/webpack/src/Component-3.cy.jsx diff --git a/system-tests/projects/experimental-JIT/webpack/src/Component-3.jsx b/system-tests/projects/justInTimeCompile/webpack/src/Component-3.jsx similarity index 100% rename from system-tests/projects/experimental-JIT/webpack/src/Component-3.jsx rename to system-tests/projects/justInTimeCompile/webpack/src/Component-3.jsx diff --git a/system-tests/projects/experimental-JIT/webpack/webpack.config.js b/system-tests/projects/justInTimeCompile/webpack/webpack.config.js similarity index 100% rename from system-tests/projects/experimental-JIT/webpack/webpack.config.js rename to system-tests/projects/justInTimeCompile/webpack/webpack.config.js diff --git a/system-tests/projects/experimental-JIT/webpack/yarn.lock b/system-tests/projects/justInTimeCompile/webpack/yarn.lock similarity index 100% rename from system-tests/projects/experimental-JIT/webpack/yarn.lock rename to system-tests/projects/justInTimeCompile/webpack/yarn.lock diff --git a/system-tests/test/experimental_jit.spec.ts b/system-tests/test/justInTimeCompile_spec.ts similarity index 87% rename from system-tests/test/experimental_jit.spec.ts rename to system-tests/test/justInTimeCompile_spec.ts index f6b17df23904..6b23270bc0ee 100644 --- a/system-tests/test/experimental_jit.spec.ts +++ b/system-tests/test/justInTimeCompile_spec.ts @@ -17,12 +17,12 @@ const getAllMatches = (source, regex) => { return matches } -describe('component testing: experimentalJustInTimeCompile', function () { +describe('component testing: justInTimeCompile', function () { systemTests.setup() - // makes sure experimentalJustInTimeCompile=true has no affect on how vite compiles files. + // makes sure justInTimeCompile=true has no affect on how vite compiles files. systemTests.it('vite@5', { - project: 'experimental-JIT/vite', + project: 'justInTimeCompile/vite', testingType: 'component', browser: 'electron', expectedExitCode: 0, @@ -48,7 +48,7 @@ describe('component testing: experimentalJustInTimeCompile', function () { }) systemTests.it('webpack@5', { - project: 'experimental-JIT/webpack', + project: 'justInTimeCompile/webpack', testingType: 'component', browser: 'electron', expectedExitCode: 0, @@ -60,7 +60,7 @@ describe('component testing: experimentalJustInTimeCompile', function () { }, }) const serverPortRegex = /Component testing webpack server 5 started on port 8080/g - const componentsCompiledSeparatelyRegex = /experimental-JIT\/webpack\/src\/Component\-[1-3].cy.jsx/g + const componentsCompiledSeparatelyRegex = /justInTimeCompile\/webpack\/src\/Component\-[1-3].cy.jsx/g const totalServersSamePort = getAllMatches(stderr, serverPortRegex).length const totalComponentsCompiledSeparately = getAllMatches(stderr, componentsCompiledSeparatelyRegex).length From 4cb796642cbfe3b8c8913e60d4a56613c97bea82 Mon Sep 17 00:00:00 2001 From: AtofStryker Date: Tue, 19 Nov 2024 09:29:57 -0500 Subject: [PATCH 3/4] enable justInTimeCompile by default [run ci] --- .circleci/cache-version.txt | 2 +- .circleci/workflows.yml | 10 +-- cli/CHANGELOG.md | 3 + .../config/__snapshots__/index.spec.ts.js | 5 +- packages/config/src/options.ts | 2 +- packages/config/test/project/utils.spec.ts | 4 +- .../EXPERIMENTAL_JIT_COMPILE_REMOVED.html | 2 +- packages/errors/src/errors.ts | 2 +- system-tests/__snapshots__/protocol_spec.js | 40 +++++------ system-tests/__snapshots__/results_spec.ts.js | 2 +- .../webpack_dev_server_fresh_spec.ts.js | 70 +++++++++---------- 11 files changed, 73 insertions(+), 69 deletions(-) diff --git a/.circleci/cache-version.txt b/.circleci/cache-version.txt index 07249903be9c..d4f6a7e0bc38 100644 --- a/.circleci/cache-version.txt +++ b/.circleci/cache-version.txt @@ -1,3 +1,3 @@ # Bump this version to force CI to re-create the cache from scratch. -11-07-24-react-16-17-removal +11-18-24-jit diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 1e29a0dc3da1..224a0aac7408 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -30,7 +30,7 @@ mainBuildFilters: &mainBuildFilters - /^release\/\d+\.\d+\.\d+$/ # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - 'update-v8-snapshot-cache-on-develop' - - 'breaking/remove_react_16_17_merge_react18_harness_upstream' + - 'feat/make_JIT_compile_GA' - 'publish-binary' # usually we don't build Mac app - it takes a long time @@ -42,7 +42,7 @@ macWorkflowFilters: &darwin-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'breaking/remove_react_16_17_merge_react18_harness_upstream', << pipeline.git.branch >> ] + - equal: [ 'feat/make_JIT_compile_GA', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -53,7 +53,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'breaking/remove_react_16_17_merge_react18_harness_upstream', << pipeline.git.branch >> ] + - equal: [ 'feat/make_JIT_compile_GA', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -76,7 +76,7 @@ windowsWorkflowFilters: &windows-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'breaking/remove_react_16_17_merge_react18_harness_upstream', << pipeline.git.branch >> ] + - equal: [ 'feat/make_JIT_compile_GA', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -152,7 +152,7 @@ commands: name: Set environment variable to determine whether or not to persist artifacts command: | echo "Setting SHOULD_PERSIST_ARTIFACTS variable" - echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "breaking/remove_react_16_17_merge_react18_harness_upstream" ]]; then + echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "feat/make_JIT_compile_GA" ]]; then export SHOULD_PERSIST_ARTIFACTS=true fi' >> "$BASH_ENV" # You must run `setup_should_persist_artifacts` command and be using bash before running this command diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index e44a356981d5..c87c5418fef1 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -15,6 +15,9 @@ _Released 12/3/2024 (PENDING)_ - The undocumented methods `Cypress.backend('firefox:force:gc')` and `Cypress.backend('log:memory:pressure')` were removed. Addresses [#30222](https://github.com/cypress-io/cypress/issues/30222). - Upgraded bundled Node.js version from `18.17.0` to `20.18.0`. Addresses [#29547](https://github.com/cypress-io/cypress/issues/29547). - It is no longer possible to make a `fetch` or `XMLHttpRequest` request from the `about:blank` page in Electron (i.e. `cy.window().then((win) => win.fetch('')`). You must use `cy.request` instead or perform some form of initial navigation via `cy.visit()`. Addressed in [#29547](https://github.com/cypress-io/cypress/pull/30394). +- The + `experimentalJustInTimeCompile` + configuration option for component testing has been replaced with a `justInTimeCompile` option that is `true` by default. This option will only compile resources directly related to your spec, compiling them 'just-in-time' before spec execution. This should result in improved memory management and performance for component tests in `cypress open` and `cypress run` modes, in particular for large component testing suites. `justInTimeCompile` is now only supported for [`webpack`](https://www.npmjs.com/package/webpack). Addresses [#30234](https://github.com/cypress-io/cypress/issues/30234). Addressed in [#30402](https://github.com/cypress-io/cypress/pull/30402). - `@cypress/webpack-dev-server` no longer supports `webpack-dev-server` version 3. Additionally, `@cypress/webpack-dev-server` now ships with `webpack-dev-server` version 5 by default. `webpack-dev-server` version 4 will need to be installed along side Cypress if you are still using `webpack` version 4. Addresses [#29308](https://github.com/cypress-io/cypress/issues/29308), [#30347](https://github.com/cypress-io/cypress/issues/30347), and [#30141](https://github.com/cypress-io/cypress/issues/30141). - `@cypress/vite-dev-server` no longer supports `vite` versions 2 and 3. Addresses [#29377](https://github.com/cypress-io/cypress/issues/29377) and [#29378](https://github.com/cypress-io/cypress/issues/29378). - Cypress Component Testing no longer supports `React` versions 16 and 17. Addresses [#29607](https://github.com/cypress-io/cypress/issues/29607). diff --git a/packages/config/__snapshots__/index.spec.ts.js b/packages/config/__snapshots__/index.spec.ts.js index 1772bbc563d9..c51ddf661b74 100644 --- a/packages/config/__snapshots__/index.spec.ts.js +++ b/packages/config/__snapshots__/index.spec.ts.js @@ -3,6 +3,7 @@ exports['config/src/index .getBreakingKeys returns list of breaking config keys 'componentFolder', 'experimentalComponentTesting', 'experimentalGetCookiesSameSite', + 'experimentalJustInTimeCompile', 'experimentalNetworkStubbing', 'experimentalRunEvents', 'experimentalSessionSupport', @@ -48,7 +49,7 @@ exports['config/src/index .getDefaultValues returns list of public config keys 1 'fixturesFolder': 'cypress/fixtures', 'excludeSpecPattern': '*.hot-update.js', 'includeShadowDom': false, - 'justInTimeCompile': false, + 'justInTimeCompile': true, 'keystrokeDelay': 0, 'modifyObstructiveCode': true, 'numTestsKeptInMemory': 50, @@ -138,7 +139,7 @@ exports['config/src/index .getDefaultValues returns list of public config keys f 'fixturesFolder': 'cypress/fixtures', 'excludeSpecPattern': '*.hot-update.js', 'includeShadowDom': false, - 'justInTimeCompile': false, + 'justInTimeCompile': true, 'keystrokeDelay': 0, 'modifyObstructiveCode': true, 'numTestsKeptInMemory': 50, diff --git a/packages/config/src/options.ts b/packages/config/src/options.ts index c5dea74e930d..eb923e5b32e0 100644 --- a/packages/config/src/options.ts +++ b/packages/config/src/options.ts @@ -286,7 +286,7 @@ const driverConfigOptions: Array = [ overrideLevel: 'any', }, { name: 'justInTimeCompile', - defaultValue: false, + defaultValue: true, validation: validate.isBoolean, requireRestartOnChange: 'server', }, { diff --git a/packages/config/test/project/utils.spec.ts b/packages/config/test/project/utils.spec.ts index ad5db967fe2a..6d72feca5616 100644 --- a/packages/config/test/project/utils.spec.ts +++ b/packages/config/test/project/utils.spec.ts @@ -1084,7 +1084,7 @@ describe('config/src/project/utils', () => { fixturesFolder: { value: 'cypress/fixtures', from: 'default' }, hosts: { value: null, from: 'default' }, includeShadowDom: { value: false, from: 'default' }, - justInTimeCompile: { value: false, from: 'default' }, + justInTimeCompile: { value: true, from: 'default' }, isInteractive: { value: true, from: 'default' }, keystrokeDelay: { value: 0, from: 'default' }, modifyObstructiveCode: { value: true, from: 'default' }, @@ -1202,7 +1202,7 @@ describe('config/src/project/utils', () => { fixturesFolder: { value: 'cypress/fixtures', from: 'default' }, hosts: { value: null, from: 'default' }, includeShadowDom: { value: false, from: 'default' }, - justInTimeCompile: { value: false, from: 'default' }, + justInTimeCompile: { value: true, from: 'default' }, isInteractive: { value: true, from: 'default' }, keystrokeDelay: { value: 0, from: 'default' }, modifyObstructiveCode: { value: true, from: 'default' }, diff --git a/packages/errors/__snapshot-html__/EXPERIMENTAL_JIT_COMPILE_REMOVED.html b/packages/errors/__snapshot-html__/EXPERIMENTAL_JIT_COMPILE_REMOVED.html index bf1e39768bf7..0b9be6897ffc 100644 --- a/packages/errors/__snapshot-html__/EXPERIMENTAL_JIT_COMPILE_REMOVED.html +++ b/packages/errors/__snapshot-html__/EXPERIMENTAL_JIT_COMPILE_REMOVED.html @@ -35,6 +35,6 @@
The experimentalJustInTimeCompile configuration option was removed in Cypress version 14.0.0.
-A new justInTimeCompile configuration option is available and is now false by default.
+A new justInTimeCompile configuration option is available and is now true by default.
 You can safely remove this option from your config.
 
\ No newline at end of file diff --git a/packages/errors/src/errors.ts b/packages/errors/src/errors.ts index f7145d4e4832..b2a799bed413 100644 --- a/packages/errors/src/errors.ts +++ b/packages/errors/src/errors.ts @@ -1242,7 +1242,7 @@ export const AllCypressErrors = { EXPERIMENTAL_JIT_COMPILE_REMOVED: () => { return errTemplate`\ The ${fmt.highlight(`experimentalJustInTimeCompile`)} configuration option was removed in ${fmt.cypressVersion(`14.0.0`)}. - A new ${fmt.highlightSecondary(`justInTimeCompile`)} configuration option is available and is now ${fmt.highlightSecondary(`false`)} by default. + A new ${fmt.highlightSecondary(`justInTimeCompile`)} configuration option is available and is now ${fmt.highlightSecondary(`true`)} by default. You can safely remove this option from your config.` }, // TODO: verify configFile is absolute path diff --git a/system-tests/__snapshots__/protocol_spec.js b/system-tests/__snapshots__/protocol_spec.js index a02d58d96745..af5bb16c8091 100644 --- a/system-tests/__snapshots__/protocol_spec.js +++ b/system-tests/__snapshots__/protocol_spec.js @@ -6242,7 +6242,7 @@ exports['component events - experimentalSingleTabRunMode: true'] = ` "line": 94, "column": 17, "whitespace": " ", - "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-1.js:17:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" + "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-0.js:17:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" }, "currentRetry": 0, "retries": 0, @@ -6272,7 +6272,7 @@ exports['component events - experimentalSingleTabRunMode: true'] = ` "line": 94, "column": 17, "whitespace": " ", - "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-1.js:22:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" + "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-0.js:22:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" }, "currentRetry": 0, "retries": 0, @@ -6418,7 +6418,7 @@ exports['component events - experimentalSingleTabRunMode: true'] = ` "line": 94, "column": 17, "whitespace": " ", - "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-1.js:17:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" + "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-0.js:17:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" }, "final": true, "currentRetry": 0, @@ -6468,7 +6468,7 @@ exports['component events - experimentalSingleTabRunMode: true'] = ` "line": 94, "column": 17, "whitespace": " ", - "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-1.js:22:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" + "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-0.js:22:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" }, "final": true, "currentRetry": 0, @@ -6610,7 +6610,7 @@ exports['component events - experimentalSingleTabRunMode: true'] = ` "line": 94, "column": 17, "whitespace": " ", - "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-1.js:17:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" + "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-0.js:17:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" }, "final": true, "currentRetry": 0, @@ -6656,7 +6656,7 @@ exports['component events - experimentalSingleTabRunMode: true'] = ` "line": 94, "column": 17, "whitespace": " ", - "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-1.js:22:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" + "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-0.js:22:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" }, "final": true, "currentRetry": 0, @@ -6693,7 +6693,7 @@ exports['component events - experimentalSingleTabRunMode: true'] = ` "line": 94, "column": 17, "whitespace": " ", - "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addSuite (cypress:///../driver/src/cypress/mocha.ts:488:86)\\n at Suite.create (cypress:///../driver/node_modules/mocha/lib/suite.js:33:10)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:123:27)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at ./src/components/HelloEarth.cy.jsx (http://localhost:2121/__cypress/src/spec-0.js:16:1)\\n at Function.__webpack_require__ (http://localhost:2121/__cypress/src/main.js:114:42)" + "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addSuite (cypress:///../driver/src/cypress/mocha.ts:488:86)\\n at Suite.create (cypress:///../driver/node_modules/mocha/lib/suite.js:33:10)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:123:27)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at ./src/components/HelloEarth.cy.jsx (http://localhost:2121/__cypress/src/spec-0.js:16:1)\\n at Function.__webpack_require__ (http://localhost:2121/__cypress/src/main.js:108:42)" }, "retries": -1, "_slow": 250, @@ -6796,7 +6796,7 @@ exports['component events - experimentalSingleTabRunMode: true'] = ` "line": 94, "column": 17, "whitespace": " ", - "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addSuite (cypress:///../driver/src/cypress/mocha.ts:488:86)\\n at Suite.create (cypress:///../driver/node_modules/mocha/lib/suite.js:33:10)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:123:27)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at ./src/components/HelloMars.cy.jsx (http://localhost:2121/__cypress/src/spec-1.js:16:1)\\n at Function.__webpack_require__ (http://localhost:2121/__cypress/src/main.js:114:42)" + "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addSuite (cypress:///../driver/src/cypress/mocha.ts:488:86)\\n at Suite.create (cypress:///../driver/node_modules/mocha/lib/suite.js:33:10)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:123:27)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at ./src/components/HelloMars.cy.jsx (http://localhost:2121/__cypress/src/spec-0.js:16:1)\\n at Function.__webpack_require__ (http://localhost:2121/__cypress/src/main.js:108:42)" }, "retries": -1, "_slow": 250, @@ -6818,7 +6818,7 @@ exports['component events - experimentalSingleTabRunMode: true'] = ` "line": 94, "column": 17, "whitespace": " ", - "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-1.js:17:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" + "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-0.js:17:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" }, "currentRetry": 0, "retries": -1, @@ -6849,7 +6849,7 @@ exports['component events - experimentalSingleTabRunMode: true'] = ` "line": 94, "column": 17, "whitespace": " ", - "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-1.js:22:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" + "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-0.js:22:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" }, "currentRetry": 0, "retries": -1, @@ -8060,7 +8060,7 @@ exports['component events - experimentalSingleTabRunMode: false'] = ` "line": 94, "column": 17, "whitespace": " ", - "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-1.js:17:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" + "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-0.js:17:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" }, "currentRetry": 0, "retries": 0, @@ -8090,7 +8090,7 @@ exports['component events - experimentalSingleTabRunMode: false'] = ` "line": 94, "column": 17, "whitespace": " ", - "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-1.js:22:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" + "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-0.js:22:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" }, "currentRetry": 0, "retries": 0, @@ -8236,7 +8236,7 @@ exports['component events - experimentalSingleTabRunMode: false'] = ` "line": 94, "column": 17, "whitespace": " ", - "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-1.js:17:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" + "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-0.js:17:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" }, "final": true, "currentRetry": 0, @@ -8286,7 +8286,7 @@ exports['component events - experimentalSingleTabRunMode: false'] = ` "line": 94, "column": 17, "whitespace": " ", - "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-1.js:22:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" + "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-0.js:22:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" }, "final": true, "currentRetry": 0, @@ -8428,7 +8428,7 @@ exports['component events - experimentalSingleTabRunMode: false'] = ` "line": 94, "column": 17, "whitespace": " ", - "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-1.js:17:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" + "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-0.js:17:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" }, "final": true, "currentRetry": 0, @@ -8474,7 +8474,7 @@ exports['component events - experimentalSingleTabRunMode: false'] = ` "line": 94, "column": 17, "whitespace": " ", - "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-1.js:22:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" + "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-0.js:22:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" }, "final": true, "currentRetry": 0, @@ -8511,7 +8511,7 @@ exports['component events - experimentalSingleTabRunMode: false'] = ` "line": 94, "column": 17, "whitespace": " ", - "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addSuite (cypress:///../driver/src/cypress/mocha.ts:488:86)\\n at Suite.create (cypress:///../driver/node_modules/mocha/lib/suite.js:33:10)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:123:27)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at ./src/components/HelloEarth.cy.jsx (http://localhost:2121/__cypress/src/spec-0.js:16:1)\\n at Function.__webpack_require__ (http://localhost:2121/__cypress/src/main.js:114:42)" + "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addSuite (cypress:///../driver/src/cypress/mocha.ts:488:86)\\n at Suite.create (cypress:///../driver/node_modules/mocha/lib/suite.js:33:10)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:123:27)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at ./src/components/HelloEarth.cy.jsx (http://localhost:2121/__cypress/src/spec-0.js:16:1)\\n at Function.__webpack_require__ (http://localhost:2121/__cypress/src/main.js:108:42)" }, "retries": -1, "_slow": 250, @@ -8614,7 +8614,7 @@ exports['component events - experimentalSingleTabRunMode: false'] = ` "line": 94, "column": 17, "whitespace": " ", - "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addSuite (cypress:///../driver/src/cypress/mocha.ts:488:86)\\n at Suite.create (cypress:///../driver/node_modules/mocha/lib/suite.js:33:10)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:123:27)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at ./src/components/HelloMars.cy.jsx (http://localhost:2121/__cypress/src/spec-1.js:16:1)\\n at Function.__webpack_require__ (http://localhost:2121/__cypress/src/main.js:114:42)" + "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addSuite (cypress:///../driver/src/cypress/mocha.ts:488:86)\\n at Suite.create (cypress:///../driver/node_modules/mocha/lib/suite.js:33:10)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:123:27)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at ./src/components/HelloMars.cy.jsx (http://localhost:2121/__cypress/src/spec-0.js:16:1)\\n at Function.__webpack_require__ (http://localhost:2121/__cypress/src/main.js:108:42)" }, "retries": -1, "_slow": 250, @@ -8636,7 +8636,7 @@ exports['component events - experimentalSingleTabRunMode: false'] = ` "line": 94, "column": 17, "whitespace": " ", - "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-1.js:17:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" + "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-0.js:17:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" }, "currentRetry": 0, "retries": -1, @@ -8667,7 +8667,7 @@ exports['component events - experimentalSingleTabRunMode: false'] = ` "line": 94, "column": 17, "whitespace": " ", - "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-1.js:22:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" + "stack": "Error\\n at Object.getInvocationDetails (cypress:///../driver/src/cypress/stack_utils.ts:94:17)\\n at Suite.addTest (cypress:///../driver/src/cypress/mocha.ts:462:85)\\n at context.it.context.specify (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:88:13)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)\\n at Suite. (http://localhost:2121/__cypress/src/spec-0.js:22:3)\\n at Object.create (cypress:///../driver/node_modules/mocha/lib/interfaces/common.js:140:19)\\n at context.describe.context.context (cypress:///../driver/node_modules/mocha/lib/interfaces/bdd.js:41:27)\\n at createRunnable (cypress:///../driver/src/cypress/mocha.ts:126:31)\\n at eval (cypress:///../driver/src/cypress/mocha.ts:187:14)" }, "currentRetry": 0, "retries": -1, diff --git a/system-tests/__snapshots__/results_spec.ts.js b/system-tests/__snapshots__/results_spec.ts.js index 2407e997dc79..1b948a5e51fc 100644 --- a/system-tests/__snapshots__/results_spec.ts.js +++ b/system-tests/__snapshots__/results_spec.ts.js @@ -35,7 +35,7 @@ exports['module api and after:run results'] = ` "fixturesFolder": "/path/to/fixturesFolder", "excludeSpecPattern": "*.hot-update.js", "includeShadowDom": false, - "justInTimeCompile": false, + "justInTimeCompile": true, "keystrokeDelay": 0, "modifyObstructiveCode": true, "numTestsKeptInMemory": 0, diff --git a/system-tests/__snapshots__/webpack_dev_server_fresh_spec.ts.js b/system-tests/__snapshots__/webpack_dev_server_fresh_spec.ts.js index 7b34077206c8..6e8cd889fdd4 100644 --- a/system-tests/__snapshots__/webpack_dev_server_fresh_spec.ts.js +++ b/system-tests/__snapshots__/webpack_dev_server_fresh_spec.ts.js @@ -124,17 +124,6 @@ exports['@cypress/webpack-dev-server / react / executes all of the tests for web Running: App.cy.jsx (1 of 9) -ERROR in ./src/AppCompilationError.cy.jsx -Module build failed (from [..]): -SyntaxError: /foo/bar/.projects/webpack4_wds4-react/src/AppCompilationError.cy.jsx: Unexpected token, expected "," (8:0) - - 6 | cy.get('h1').contains('Hello World') - 7 | } -> 8 | }) - | ^ - 9 | - [stack trace lines] - ✓ renders hello world ✓ renders background @@ -161,6 +150,17 @@ SyntaxError: /foo/bar/.projects/webpack4_wds4-react/src/AppCompilationError.cy.j Running: AppCompilationError.cy.jsx (2 of 9) +ERROR in ./src/AppCompilationError.cy.jsx +Module build failed (from [..]): +SyntaxError: /foo/bar/.projects/webpack4_wds4-react/src/AppCompilationError.cy.jsx: Unexpected token, expected "," (8:0) + + 6 | cy.get('h1').contains('Hello World') + 7 | } +> 8 | }) + | ^ + 9 | + [stack trace lines] + 1) An uncaught error was detected outside of a test @@ -562,18 +562,6 @@ exports['@cypress/webpack-dev-server / react / executes all of the tests for web ──────────────────────────────────────────────────────────────────────────────────────────────────── Running: App.cy.jsx (1 of 9) -ERROR in ./src/AppCompilationError.cy.jsx -Module build failed (from [..]): -SyntaxError: /foo/bar/.projects/webpack5_wds4-react/src/AppCompilationError.cy.jsx: Unexpected token, expected "," (8:0) - - 6 | cy.get('h1').contains('Hello World') - 7 | } -> 8 | }) - | ^ - 9 | - [stack trace lines] - -webpack compiled with 1 error ✓ renders hello world @@ -600,6 +588,18 @@ webpack compiled with 1 error ──────────────────────────────────────────────────────────────────────────────────────────────────── Running: AppCompilationError.cy.jsx (2 of 9) +ERROR in ./src/AppCompilationError.cy.jsx +Module build failed (from [..]): +SyntaxError: /foo/bar/.projects/webpack5_wds4-react/src/AppCompilationError.cy.jsx: Unexpected token, expected "," (8:0) + + 6 | cy.get('h1').contains('Hello World') + 7 | } +> 8 | }) + | ^ + 9 | + [stack trace lines] + +webpack compiled with 1 error 1) An uncaught error was detected outside of a test @@ -1002,18 +1002,6 @@ exports['@cypress/webpack-dev-server / react / executes all of the tests for web ──────────────────────────────────────────────────────────────────────────────────────────────────── Running: App.cy.jsx (1 of 9) -ERROR in ./src/AppCompilationError.cy.jsx -Module build failed (from [..]): -SyntaxError: /foo/bar/.projects/webpack5_wds5-react/src/AppCompilationError.cy.jsx: Unexpected token, expected "," (8:0) - - 6 | cy.get('h1').contains('Hello World') - 7 | } -> 8 | }) - | ^ - 9 | - [stack trace lines] - -webpack compiled with 1 error ✓ renders hello world @@ -1040,6 +1028,18 @@ webpack compiled with 1 error ──────────────────────────────────────────────────────────────────────────────────────────────────── Running: AppCompilationError.cy.jsx (2 of 9) +ERROR in ./src/AppCompilationError.cy.jsx +Module build failed (from [..]): +SyntaxError: /foo/bar/.projects/webpack5_wds5-react/src/AppCompilationError.cy.jsx: Unexpected token, expected "," (8:0) + + 6 | cy.get('h1').contains('Hello World') + 7 | } +> 8 | }) + | ^ + 9 | + [stack trace lines] + +webpack compiled with 1 error 1) An uncaught error was detected outside of a test From 4726c08bc0fee319a9d49b66685e687f11b28e5c Mon Sep 17 00:00:00 2001 From: AtofStryker Date: Thu, 21 Nov 2024 14:20:10 -0500 Subject: [PATCH 4/4] chore: bump cache [run ci] --- .circleci/cache-version.txt | 2 +- .circleci/workflows.yml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/cache-version.txt b/.circleci/cache-version.txt index d4f6a7e0bc38..a57213f7e263 100644 --- a/.circleci/cache-version.txt +++ b/.circleci/cache-version.txt @@ -1,3 +1,3 @@ # Bump this version to force CI to re-create the cache from scratch. -11-18-24-jit +11-21-24 diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 224a0aac7408..e1cd082c6054 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -30,7 +30,7 @@ mainBuildFilters: &mainBuildFilters - /^release\/\d+\.\d+\.\d+$/ # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - 'update-v8-snapshot-cache-on-develop' - - 'feat/make_JIT_compile_GA' + - 'build-binary-placeholder' - 'publish-binary' # usually we don't build Mac app - it takes a long time @@ -42,7 +42,7 @@ macWorkflowFilters: &darwin-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'feat/make_JIT_compile_GA', << pipeline.git.branch >> ] + - equal: [ 'build-binary-placeholder', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -53,7 +53,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'feat/make_JIT_compile_GA', << pipeline.git.branch >> ] + - equal: [ 'build-binary-placeholder', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -76,7 +76,7 @@ windowsWorkflowFilters: &windows-workflow-filters - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - - equal: [ 'feat/make_JIT_compile_GA', << pipeline.git.branch >> ] + - equal: [ 'build-binary-placeholder', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ value: << pipeline.git.branch >> @@ -152,7 +152,7 @@ commands: name: Set environment variable to determine whether or not to persist artifacts command: | echo "Setting SHOULD_PERSIST_ARTIFACTS variable" - echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "feat/make_JIT_compile_GA" ]]; then + echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "build-binary-placeholder" ]]; then export SHOULD_PERSIST_ARTIFACTS=true fi' >> "$BASH_ENV" # You must run `setup_should_persist_artifacts` command and be using bash before running this command