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

chore: remove pkg/driver //@ts-nocheck part 2 #19483

Merged
merged 19 commits into from
Jan 11, 2022

Conversation

sainthkh
Copy link
Contributor

User facing changelog

N/A. It's just removing // @ts-nocheck comments and defining types to avoid type errors.

Additional details

  • Why was this change necessary? => To make pkg/driver files more type-safe.
  • What is affected by this change? => N/A
  • Any implementation details to explain? => N/A

How has the user experience changed?

N/A

PR Tasks

  • [na] Have tests been added/updated?
  • [na] Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • [na] Has a PR for user-facing changes been opened in cypress-documentation?
  • [na] Have API changes been updated in the type definitions?
  • [na] Have new configuration options been added to the cypress.schema.json?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Dec 27, 2021

Thanks for taking the time to open a PR!

@sainthkh sainthkh marked this pull request as ready for review December 29, 2021 01:24
@sainthkh sainthkh requested a review from a team as a code owner December 29, 2021 01:24
@sainthkh sainthkh requested review from jennifer-shehane and removed request for a team December 29, 2021 01:24
@jennifer-shehane jennifer-shehane requested review from AtofStryker and tbiethman and removed request for jennifer-shehane January 3, 2022 18:39
if (!count) {
count = (counts[type] += 1)
count = (counts![type] += 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

For other TS newbies curious what this ! is doing: Non-null assertion operator

@@ -91,7 +89,7 @@ export default (Commands, Cypress, cy, state) => {
}

Commands.addAll({
ng (type, selector, options = {}) {
ng (type, selector, options: any = {}) {
Copy link
Contributor

@tbiethman tbiethman Jan 5, 2022

Choose a reason for hiding this comment

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

It might be worth adding an explicit type for options if we are reading properties off of it. Or is this represented in the types already?

Edit: Based on your other changes, might need a TODO here.

@@ -134,13 +132,15 @@ export default function (Commands, Cypress, cy, state) {

Commands.addAll({ type: 'assertion', prevSubject: true }, {
should () {
// Casted to `any` to pass all arguments
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: The past tense of cast is cast. My lint spellchecker doesn't flag 'casted' as an unknown word, though 🤷‍♂️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to this answer, casted was used in Middle English and can be used when it's used for cast in programming context.

But I changed all casted to cast anyway.

Copy link

Choose a reason for hiding this comment

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

How do I get this done?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@finda841 In this PR, there's nothing you can do because I've finished all the suggested changes. If you want to help develop Cypress, you can find ready-for-work issues here.

tbiethman
tbiethman previously approved these changes Jan 5, 2022
Copy link
Contributor

@AtofStryker AtofStryker left a comment

Choose a reason for hiding this comment

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

I just had a few questions and suggestions but otherwise looks like some solid progress!

packages/driver/src/cy/actionability.ts Show resolved Hide resolved
packages/driver/src/cy/actionability.ts Show resolved Hide resolved
packages/driver/src/cy/commands/agents.ts Show resolved Hide resolved
packages/driver/src/cy/commands/angular.ts Show resolved Hide resolved
packages/driver/src/cy/commands/asserting.ts Outdated Show resolved Hide resolved
packages/driver/src/cy/commands/clock.ts Outdated Show resolved Hide resolved
packages/driver/src/cy/commands/debugging.ts Outdated Show resolved Hide resolved
@@ -104,7 +103,8 @@ export default (Commands, Cypress, cy, state, config) => {
return subject
},

debug (subject, options = {}) {
// TODO: change `any` to Loggable
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// TODO: change `any` to Loggable
// TODO: change the options type from `any` to `Loggable`.

packages/driver/src/cy/listeners.ts Show resolved Hide resolved
packages/driver/src/cy/commands/aliasing.ts Outdated Show resolved Hide resolved
@BlueWinds
Copy link
Contributor

I'm wondering if for future PRs like this, it might be good to target them at the 10.0-release branch rather than develop. I know the component testing team has added some additional types to cypress, and as we approach releasing that branch, anything we can do to lessen the burden of merging develop -> 10.0 will make their lives easier.

Don't need to rebase / retarget these changes, just something to think about for future PRs.

tbiethman
tbiethman previously approved these changes Jan 6, 2022
AtofStryker
AtofStryker previously approved these changes Jan 6, 2022
packages/driver/src/cy/actionability.ts Show resolved Hide resolved
packages/driver/src/cy/commands/clock.ts Outdated Show resolved Hide resolved
@sainthkh sainthkh dismissed stale reviews from AtofStryker and tbiethman via 0043826 January 9, 2022 23:44
@sainthkh sainthkh force-pushed the remove-driver-no-check-part-2 branch from 152e6df to 0043826 Compare January 9, 2022 23:44
@AtofStryker AtofStryker self-requested a review January 10, 2022 18:23
@tbiethman tbiethman merged commit ea531b7 into cypress-io:develop Jan 11, 2022
mschile added a commit that referenced this pull request Jan 18, 2022
commit d8fa85d
Author: Chris Breiding <chrisbreiding@users.noreply.github.com>
Date:   Fri Jan 14 09:48:43 2022 -0500

    chore: Fix a couple multi-domain bugs (#19698)

commit 2e5fbad
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Jan 13 11:44:35 2022 -0500

    fix types issue

commit cc08d12
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Jan 13 09:56:31 2022 -0500

    fix issues after merge

commit 8e0770f
Merge: 2ee9893 d87711e
Author: Chris Breiding <chrisbreiding@gmail.com>
Date:   Thu Jan 13 09:31:25 2022 -0500

    Merge branch 'develop' into feature-multidomain

commit d87711e
Merge: 576519e f22e3ca
Author: Brian Barrow <briancbarrow@gmail.com>
Date:   Wed Jan 12 16:41:35 2022 +0000

    Merge branch 'master' into develop

commit f22e3ca
Author: Brian Barrow <briancbarrow@gmail.com>
Date:   Wed Jan 12 09:40:48 2022 -0700

    Fixed Vue README links in Global Components section (#19550)

commit 576519e
Author: Pascal Gafner <gafner.pascal@gmail.com>
Date:   Wed Jan 12 15:52:26 2022 +0100

    fix: use util.getEnv to handle environment variables set with npm (#19560)

    Co-authored-by: Matt Henkes <mjhenkes@gmail.com>
    Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>

commit 0382768
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue Jan 11 21:35:43 2022 +0000

    chore(deps): update dependency electron to v15.3.4 🌟 (#19657)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 1305cca
Author: Lachlan Miller <lachlan.miller.1990@outlook.com>
Date:   Wed Jan 12 07:10:14 2022 +1000

    fix: rename specs to correctly match convention (#19641)

    * fix: rename specs to correctly match convention

    * Remove underscore from TESTFILES glob pattern

    Co-authored-by: Zach Bloomquist <github@chary.us>

commit c45a240
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Tue Jan 11 12:59:14 2022 -0800

    fix(deps): update dependency node-forge to v1 [security] (#19635)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit ea531b7
Author: Kukhyeon Heo <sainthkh@naver.com>
Date:   Wed Jan 12 00:37:05 2022 +0900

    chore: remove pkg/driver //@ts-nocheck part 2 (#19483)

    * listeners.ts

    * chainer.ts

    * command.ts

    * actionability.ts

    * inspect.ts

    * agents.ts

    * aliasing.ts

    * angular.ts

    * asserting.ts

    * clock.ts files

    * commands.ts

    * debugging.ts

    * fix comment.

    * roll back change.

    * Fix.

    * fix

    * Casted to cast.

    * Feedback changes.

    * fix any.

commit 513074e
Author: Josh Wooding <12938082+joshwooding@users.noreply.github.com>
Date:   Tue Jan 11 15:34:01 2022 +0000

    fix: overflow clip to prevent selector header from disapearing (#18649) (#19646)

    Co-authored-by: Tim Griesser <tgriesser10@gmail.com>

commit b8ccf12
Merge: 2071575 d227420
Author: Ryan Manuel <ryanm@cypress.io>
Date:   Mon Jan 10 15:38:23 2022 -0600

    Merge branch 'develop'

commit d227420
Author: Ryan Manuel <ryanm@cypress.io>
Date:   Mon Jan 10 15:34:34 2022 -0600

    release 9.2.1 [skip ci]

commit 5d1dce6
Author: Ryan Manuel <ryanm@cypress.io>
Date:   Mon Jan 10 13:01:12 2022 -0600

    Merge master to dev

commit 4818a21
Author: Juan Julián Merelo Guervós <jjmerelo@gmail.com>
Date:   Mon Jan 10 19:52:32 2022 +0100

    fix: update cli-table dependency to fix broken colors.js (#19622)

    Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
    Co-authored-by: Ryan Manuel <ryanm@cypress.io>

commit 2071575
Author: semantic-release-bot <semantic-release-bot@martynus.net>
Date:   Mon Jan 10 11:23:17 2022 -0500

    chore: release @cypress/react-v5.12.1

    [skip ci]

commit 3f85a04
Merge: 642ec41 6304fd7
Author: Zachary Williams <ZachJW34@gmail.com>
Date:   Mon Jan 10 16:02:22 2022 +0000

    Merge branch 'master' into develop

commit 6304fd7
Author: Zachary Williams <ZachJW34@gmail.com>
Date:   Mon Jan 10 10:01:27 2022 -0600

    fix: check resolvedNodePath for Next.js 12 guard (#19604)

commit 10e3e0a
Author: semantic-release-bot <semantic-release-bot@martynus.net>
Date:   Tue Dec 21 14:35:12 2021 -0500

    chore: release @cypress/react-v5.12.0

    [skip ci]
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.

5 participants