forked from Klaveness-Digital/cypress-cucumber-preprocessor
-
-
Notifications
You must be signed in to change notification settings - Fork 153
Closed
Description
Current behavior
Something was changed in esbuild version 0.18.14, that makes it incompatible with cypress-cucumber-preprocessor's createEsbuildPlugin method, which causes the esbuild-ts example build to fail.
Desired behavior
The esbuild-ts example should build succesfully. Preferably by making cypress-cucumber-preprocessor compatible with the newest version of esbuild (which is currently 0.19.0)
Test code to reproduce
The issue can be reproduced like this from the example code in this repository:
% git clone [email protected]:badeball/cypress-cucumber-preprocessor.git
% cd cypress-cucumber-preprocessor/examples/esbuild-ts
% npm install
% npx tsc
cypress.config.ts:16:17 - error TS2322: Type 'import("/private/tmp/cypress-cucumber-preprocessor/examples/esbuild-ts/node_modules/@badeball/cypress-cucumber-preprocessor/node_modules/esbuild/lib/main").Plugin' is not assignable to type 'import("/private/tmp/cypress-cucumber-preprocessor/examples/esbuild-ts/node_modules/esbuild/lib/main").Plugin'.
Types of property 'setup' are incompatible.
Type '(build: import("/private/tmp/cypress-cucumber-preprocessor/examples/esbuild-ts/node_modules/@badeball/cypress-cucumber-preprocessor/node_modules/esbuild/lib/main").PluginBuild) => void | Promise<...>' is not assignable to type '(build: import("/private/tmp/cypress-cucumber-preprocessor/examples/esbuild-ts/node_modules/esbuild/lib/main").PluginBuild) => void | Promise<void>'.
Types of parameters 'build' and 'build' are incompatible.
Type 'import("/private/tmp/cypress-cucumber-preprocessor/examples/esbuild-ts/node_modules/esbuild/lib/main").PluginBuild' is not assignable to type 'import("/private/tmp/cypress-cucumber-preprocessor/examples/esbuild-ts/node_modules/@badeball/cypress-cucumber-preprocessor/node_modules/esbuild/lib/main").PluginBuild'.
The types of 'initialOptions.loader' are incompatible between these types.
Type '{ [ext: string]: import("/private/tmp/cypress-cucumber-preprocessor/examples/esbuild-ts/node_modules/esbuild/lib/main").Loader; }' is not assignable to type '{ [ext: string]: import("/private/tmp/cypress-cucumber-preprocessor/examples/esbuild-ts/node_modules/@badeball/cypress-cucumber-preprocessor/node_modules/esbuild/lib/main").Loader; }'.
'string' index signatures are incompatible.
Type 'import("/private/tmp/cypress-cucumber-preprocessor/examples/esbuild-ts/node_modules/esbuild/lib/main").Loader' is not assignable to type 'import("/private/tmp/cypress-cucumber-preprocessor/examples/esbuild-ts/node_modules/@badeball/cypress-cucumber-preprocessor/node_modules/esbuild/lib/main").Loader'.
Type '"local-css"' is not assignable to type 'Loader'.
16 plugins: [createEsbuildPlugin(config)],
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error in cypress.config.ts:16
Versions
- Cypress version: 12.17.3
- Preprocessor version: 18.0.3
- Node version: v18.17.0
Checklist
- I've read the FAQ.
- I've read instructions for logging issues.
- I'm not using
[email protected](package name has changed and it is no longer the most recent version, see #689).
mwitty, PeterRistMHP and YakovL
Metadata
Metadata
Assignees
Labels
No labels