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

Plugins need to know the Cypress version running #6352

Closed
bahmutov opened this issue Feb 6, 2020 · 4 comments · Fixed by #7925
Closed

Plugins need to know the Cypress version running #6352

bahmutov opened this issue Feb 6, 2020 · 4 comments · Fixed by #7925
Assignees
Labels
type: enhancement Requested enhancement of existing feature

Comments

@bahmutov
Copy link
Contributor

bahmutov commented Feb 6, 2020

Cypress v4

We don't include the Cypress version in the config passed to the plugins, but it would be really nice, especially to handle breaking changes.

@jennifer-shehane
Copy link
Member

Oh, right, can’t use Cypress.version here 🤔

@jennifer-shehane jennifer-shehane added type: enhancement Requested enhancement of existing feature stage: ready for work The issue is reproducible and in scope labels Feb 7, 2020
@cypress-bot cypress-bot bot added stage: work in progress and removed stage: ready for work The issue is reproducible and in scope labels Jul 9, 2020
@sainthkh
Copy link
Contributor

sainthkh commented Jul 9, 2020

@jennifer-shehane

It's because they're loaded differently.


Runner is loaded here.

return this.server.open(cfg, this, options.onError, options.onWarning)

And version is added here:

config.version = pkg.version


But the plugin is loaded here:

return this._initPlugins(cfg, options)

Because of that, version is not added to the config object.


Fixed the issue at #7925

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jul 22, 2020

The code for this is done in cypress-io/cypress#7925, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot cypress-bot bot removed the stage: needs review The PR code is done & tested, needs review label Jul 22, 2020
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Aug 3, 2020

Released in 4.12.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v4.12.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Aug 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement Requested enhancement of existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants