Skip to content

chore: add minimal built-ins back in to @cypress/webpack-batteries-included-preprocessor #31815

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 17, 2025

Conversation

AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented Jun 2, 2025

  • Closes N/A

Additional details

After removing all the webpack 4 built-ins from Cypress 15, We realized that some built-ins should likely be shipped with @cypress/webpack-batteries-included-preprocessor in order to not make the change as disruptive. These built-ins are the commonly used node built-ins from observation and happen to be buffer, path, process, os, and stream

Steps to test

Should now work where process and buffer are used.

How has the user experience changed?

Should make the change less disruptive if using any of the above built ins. Otherwise, no change is realized to the end user

PR Tasks

Copy link

cypress bot commented Jun 2, 2025

cypress    Run #63100

Run Properties:  status check passed Passed #63100  •  git commit 70453bdbd3: chore: add process to built in test
Project cypress
Branch Review feat/add_built_ins_minimal
Run status status check passed Passed #63100
Run duration 16m 52s
Commit git commit 70453bdbd3: chore: add process to built in test
Committer Bill Glesias
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 2
Tests that did not run due to a developer annotating a test with .skip  Pending 27
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 768
View all changes introduced in this branch ↗︎
UI Coverage  62.34%
  Untested elements 27  
  Tested elements 48  
Accessibility  96.16%
  Failed rules  0 critical   4 serious   1 moderate   0 minor
  Failed elements 121  

@AtofStryker AtofStryker self-assigned this Jun 4, 2025
@AtofStryker
Copy link
Contributor Author

The test-binary-against-recipes is going to fail because @cypress/webpack-batteries-included-preprocessor is lacking the crypto built-in, which we intentionally removed due to a security vulnerability with elliptic( see #31039 and PR #31738). If we install the current @cypress/webpack-batteries-included-preprocessor on npm inside example recipes, the built-in is provided and we don't need to configure it, which we don't want long term. I'd prefer we fix the test when @cypress/webpack-batteries-included-preprocessor releases the breaking change version. I added this step to the Cypress 15 release steps.

@AtofStryker AtofStryker mentioned this pull request Jun 5, 2025
23 tasks
expect(require('os')).to.be.eql({})
expect(require('path')).to.be.eql({})
expect(require('os')).to.be.an('object').and.have.property('platform')
expect(require('path')).to.be.an('object').and.have.property('join')
expect(require('perf_hooks')).to.eql({})
expect(require('punycode')).to.be.eql({})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AtofStryker No test for process?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jennifer-shehane I think it was just missing. added in 70453bd

@AtofStryker AtofStryker merged commit 49f64e7 into release/15.0.0 Jun 17, 2025
115 of 123 checks passed
@AtofStryker AtofStryker deleted the feat/add_built_ins_minimal branch June 17, 2025 21:38
cypress-app-bot pushed a commit that referenced this pull request Jun 17, 2025
… to `@cypress/webpack-batteries-included-preprocessor` (#31815)
cypress-app-bot pushed a commit that referenced this pull request Jun 17, 2025
…o `@cypress/webpack-batteries-included-preprocessor` (#31815)
cypress-app-bot pushed a commit that referenced this pull request Jun 17, 2025
… to `@cypress/webpack-batteries-included-preprocessor` (#31815)
cypress-app-bot pushed a commit that referenced this pull request Jun 17, 2025
…o `@cypress/webpack-batteries-included-preprocessor` (#31815)
cypress-app-bot pushed a commit that referenced this pull request Jun 17, 2025
… to `@cypress/webpack-batteries-included-preprocessor` (#31815)
cypress-app-bot pushed a commit that referenced this pull request Jun 17, 2025
…o `@cypress/webpack-batteries-included-preprocessor` (#31815)
jennifer-shehane pushed a commit that referenced this pull request Jun 18, 2025
* chore: updating v8 snapshot cache

* index on release/15.0.0: 49f64e7 chore: add minimal built-ins back in to `@cypress/webpack-batteries-included-preprocessor`  (#31815)

---------

Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
jennifer-shehane pushed a commit that referenced this pull request Jun 18, 2025
* chore: updating v8 snapshot cache

* index on release/15.0.0: 49f64e7 chore: add minimal built-ins back in to `@cypress/webpack-batteries-included-preprocessor`  (#31815)

---------

Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
jennifer-shehane pushed a commit that referenced this pull request Jun 18, 2025
* chore: updating v8 snapshot cache

* index on release/15.0.0: 49f64e7 chore: add minimal built-ins back in to `@cypress/webpack-batteries-included-preprocessor`  (#31815)

---------

Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants