Skip to content

Commit

Permalink
enable justInTimeCompile by default [run ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
AtofStryker committed Nov 18, 2024
1 parent 2e83679 commit 5a37a5e
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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('<some-url>')`). 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).
Expand Down
4 changes: 2 additions & 2 deletions packages/config/__snapshots__/index.spec.ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +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,
'justInTimeCompile': true,
'keystrokeDelay': 0,
'modifyObstructiveCode': true,
'numTestsKeptInMemory': 50,
Expand Down Expand Up @@ -138,7 +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,
'justInTimeCompile': true,
'keystrokeDelay': 0,
'modifyObstructiveCode': true,
'numTestsKeptInMemory': 50,
Expand Down
2 changes: 1 addition & 1 deletion packages/config/src/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ const driverConfigOptions: Array<DriverConfigOption> = [
requireRestartOnChange: 'server',
}, {
name: 'justInTimeCompile',
defaultValue: false,
defaultValue: true,
validation: validate.isBoolean,
requireRestartOnChange: 'server',
}, {
Expand Down
4 changes: 2 additions & 2 deletions packages/config/test/project/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand Down Expand Up @@ -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' },
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/errors/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion system-tests/__snapshots__/results_spec.ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ exports['module api and after:run results'] = `
"experimentalMemoryManagement": false,
"experimentalModifyObstructiveThirdPartyCode": false,
"experimentalSkipDomainInjection": null,
"justInTimeCompile": false,
"justInTimeCompile": true,
"experimentalOriginDependencies": false,
"experimentalSourceRewriting": false,
"experimentalSingleTabRunMode": false,
Expand Down

0 comments on commit 5a37a5e

Please sign in to comment.