Skip to content
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

@cypress/webpack-batteries-included-preprocessor doesn't include types #25997

Open
karlhorky opened this issue Mar 2, 2023 · 1 comment
Open
Labels
E2E Issue related to end-to-end testing type: enhancement Requested enhancement of existing feature

Comments

@karlhorky
Copy link
Contributor

Current behavior

  1. ✅ The webpack preprocessor @cypress/webpack-preprocessor includes TypeScript types
  2. ❌ The webpack preprocessor @cypress/webpack-batteries-included-preprocessor does not include TypeScript types

This means that imports of @cypress/webpack-batteries-included-preprocessor fail type checking:

cypress.config.ts

import webpackPreprocessor from '@cypress/webpack-batteries-included-preprocessor'; // ❌ Could not find a declaration file for module '@cypress/webpack-batteries-included-preprocessor'

Full error message:

Could not find a declaration file for module '@cypress/webpack-batteries-included-preprocessor'. '/Users/k/p/project/node_modules/@cypress/webpack-batteries-included-preprocessor/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/cypress__webpack-batteries-included-preprocessor` if it exists or add a new declaration (.d.ts) file containing `declare module '@cypress/webpack-batteries-included-preprocessor';`ts(7016)

Screenshot 2023-03-02 at 13 45 26

The package @types/cypress__webpack-batteries-included-preprocessor also does not exist in DefinitelyTyped.

Desired behavior

@cypress/webpack-batteries-included-preprocessor should have types

Test code to reproduce

cypress.config.ts

import webpackPreprocessor from '@cypress/webpack-batteries-included-preprocessor'; // ❌ Could not find a declaration file for module '@cypress/webpack-batteries-included-preprocessor'

Cypress Version

12.6.0

Node version

18.14.1

Operating System

macOS Ventura 13.2.1 (22D68)

Debug Logs

No response

Other

No response

@karlhorky
Copy link
Contributor Author

Oh I guess even a bigger problem: it is still on webpack 4 😱

@nagash77 nagash77 assigned mjhenkes and mike-plummer and unassigned mjhenkes Mar 2, 2023
@mike-plummer mike-plummer added type: enhancement Requested enhancement of existing feature E2E Issue related to end-to-end testing labels Mar 3, 2023
@lmiller1990 lmiller1990 removed their assignment Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2E Issue related to end-to-end testing type: enhancement Requested enhancement of existing feature
Projects
None yet
Development

No branches or pull requests

4 participants