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: Missed types for PW in 'Advanced Example Project' boilerplate in WebStorm 2024.2 Kali Linux 2024.2 #990

Open
sir-alex opened this issue Dec 2, 2024 · 3 comments
Labels
bug Something isn't working tbd To be discussed with stakeholders.

Comments

@sir-alex
Copy link

sir-alex commented Dec 2, 2024

Node.js version

18.18.0

NPM version

9.8.1

@checkly/cli version

4.14.0

Steps to reproduce

npm create checkly
All default options selected with TS and "'Advanced Example Project'" + deps installation

open created projects in WebStorm 2024.2 running on Kali Linux 2024.2 LTS

What is expected?

PW types are expected to be available in IDE after default project installation

What is actually happening?

PW types are not available for IDE due to missed PW dependency in default package.json

image

Any additional comments?

To use PR types, I currently need to install them manually as described in ReadMe. It would be fantastic if they were included by default when creating a project with the CLI since PW files coming with CLI create command it is expected that types will be available out of the box.
Thank you in advance — you're building an amazing product!

@sir-alex sir-alex added the bug Something isn't working label Dec 2, 2024
@sorccu
Copy link
Collaborator

sorccu commented Dec 10, 2024

Hi @sir-alex

I agree that this would be nice to have.

It seems that this particular issue is actually covered in the example project README files: https://github.com/checkly/checkly-cli/blob/75797f3761c7a419c7e074610e7494323de5618b/examples/advanced-project/README.md#adding-and-running-playwrighttest

While the original reasoning is unknown to me, as I have only very recently taken over the CLI, I believe the idea here has been that since you should match @playwright/test to the version available in your chosen runtime, it has probably been left out on purpose. It would likely be a better OOTB experience to just include the dependency anyway, with a version that matches the latest stable runtime, and include instructions to change the version when needed.

@sorccu sorccu added the tbd To be discussed with stakeholders. label Dec 10, 2024
@sir-alex
Copy link
Author

Hi @sorccu
Yes, I noticed the reference in the README about additional installation for this package, and I mentioned it in the original ticket description. From my perspective, it’s reasonable to expect that a project should work without extra setup right out of the CLI. This behavior aligns with expectations: what comes from an official blueprint should work out of the box.

Since Playwright (PW) tests are included in the official blueprint, it would be logical for the CLI to handle the necessary dependencies. This could be done as part of the main installation process or through a separate post-install script that logs errors differently.

Regarding the version-lock functionality you mentioned, most major package managers are quite advanced in handling this. It would be much safer to include PW as a dependency with a locked version to ensure compatibility with the current Checkly version. I’d recommend including it and locking the version. Let me know if you’d like me to create a PR for this.

By the way, it would be great to support PW as a library, not just playwright/test, since there are cases where this is necessary. Additionally, I’m really missing native support for Python and Java, which are significant parts of the PW community. Are there any plans to support Python or Java as PW does out of the box, or at least at the level of a transpiler?

@sir-alex
Copy link
Author

Since Checkly has a core dependency like Playwright (PW), I would suggest locking the PW version in the dependencies. For major Checkly releases, a CLI solution could be provided to handle migrations in a seamless way, accompanied by a detailed migration guide. This approach would be similar to what Angular CLI does, ensuring a smooth upgrade path while maintaining compatibility and minimizing disruptions for users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tbd To be discussed with stakeholders.
Projects
None yet
Development

No branches or pull requests

2 participants