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

[Bug]: 1.46.0 (TypeScript) - custom fixtures extend no longer chainable? #32056

Closed
halljus opened this issue Aug 7, 2024 · 0 comments · Fixed by #32066
Closed

[Bug]: 1.46.0 (TypeScript) - custom fixtures extend no longer chainable? #32056

halljus opened this issue Aug 7, 2024 · 0 comments · Fixed by #32066

Comments

@halljus
Copy link

halljus commented Aug 7, 2024

Version

1.46.0

Steps to reproduce

  1. Clone my repo at https://github.com/halljus/playwright-bug-repro (deleted now that issue is closed)
  2. Run npm install
  3. Run npm run typecheck
  4. Observe TypeScript errors that parameters passed to a test.extend that is a child of an extend without a generic type parameter are typed as any.

Expected behavior

I expect parameters passed to a child extend<MyFixtures> with a test.extend parent to be fully typed as they were prior to v1.46.0.

image

Actual behavior

As of v1.46.0, any extend<MyFixtures> with a generic type parameter that follow a parent test.extend without a generic type parameter will receive untyped arguments (they'll be of type any).

image

Additional context

I can "fix" this by moving the extend without the generic type parameter AFTER the extend<MyFixtures>, but a) it worked before, and b) I'm not sure if that's equivalent behavior.

Environment

System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 13th Gen Intel(R) Core(TM) i5-1345U
    Memory: 39.83 GB / 63.64 GB
  Binaries:
    Node: 20.13.1 - ~\AppData\Local\nvs\default\node.EXE
    npm: 10.8.2 - ~\AppData\Local\nvs\default\npm.CMD
  IDEs:
    VSCode: 1.92.0 - C:\Users\user\AppData\Local\Programs\Microsoft VS Code\bin\code.CMD
  Languages:
    Bash: 5.1.16 - C:\WINDOWS\system32\bash.EXE
  npmPackages:
    @playwright/test: 1.46.0 => 1.46.0
@yury-s yury-s added the v1.47 label Aug 7, 2024
@dgozman dgozman closed this as completed in f24e46c Aug 8, 2024
dgozman added a commit to dgozman/playwright that referenced this issue Aug 8, 2024
… support TS 5.5

Regressed in microsoft#31532. The TS5.5 changes broke chaining of `extend`s where
the first `extend` did not specify any type arguments.

Fixes microsoft#32056.
dgozman added a commit that referenced this issue Aug 8, 2024
…TS 5.5 (#32080)

Regressed in #31532. The TS5.5 changes broke chaining of `extend`s where
the first `extend` did not specify any type arguments.

Fixes #32056.
kodiakhq bot referenced this issue in cloudquery/cloudquery Sep 1, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@playwright/test](https://playwright.dev) ([source](https://togithub.com/microsoft/playwright)) | devDependencies | patch | [`1.46.0` -> `1.46.1`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.46.0/1.46.1) |
| [@playwright/test](https://playwright.dev) ([source](https://togithub.com/microsoft/playwright)) | devDependencies | minor | [`1.45.3` -> `1.46.1`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.45.3/1.46.1) |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>microsoft/playwright (@&#8203;playwright/test)</summary>

### [`v1.46.1`](https://togithub.com/microsoft/playwright/releases/tag/v1.46.1)

[Compare Source](https://togithub.com/microsoft/playwright/compare/v1.46.0...v1.46.1)

##### Highlights

[https://github.com/microsoft/playwright/issues/32004](https://togithub.com/microsoft/playwright/issues/32004) - \[REGRESSION]: Client Certificates don't work with Microsoft IIS[https://github.com/microsoft/playwright/issues/32004](https://togithub.com/microsoft/playwright/issues/32004)4 - \[REGRESSION]: Websites stall on TLS handshake errors when using Client Certificate[https://github.com/microsoft/playwright/issues/32146](https://togithub.com/microsoft/playwright/issues/32146)46 - \[BUG]: Credential scanners warn about internal socks-proxy TLS certificat[https://github.com/microsoft/playwright/issues/32056](https://togithub.com/microsoft/playwright/issues/32056)056 - \[REGRESSION]: 1.46.0 (TypeScript) - custom fixtures extend no longer chaina[https://github.com/microsoft/playwright/issues/32070](https://togithub.com/microsoft/playwright/issues/32070)2070 - \[Bug]: --only-changed flag and project dependen[https://github.com/microsoft/playwright/issues/32188](https://togithub.com/microsoft/playwright/issues/32188)32188 - \[Bug]: --only-changed with shallow clone throws "unknown revision" error

##### Browser Versions

-   Chromium 128.0.6613.18
-   Mozilla Firefox 128.0
-   WebKit 18.0

This version was also tested against the following stable channels:

-   Google Chrome 127
-   Microsoft Edge 127

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the month" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants