Skip to content

Conversation

JackDra
Copy link
Contributor

@JackDra JackDra commented Apr 1, 2022

contributes to #4478

As noted on #4478. We still need to wait for playwright to release the current @playwright/test@next version.

Summary

Playwright file when building with typescript requires the playwright.config file to have extension .ts.
This PR adds replaces the single +playwright folder with 2 folders +playwright+typescript and +playwright-typescript, where the +typescript file has its playwright.config file with extension .ts.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

I have manually tested by doing:

cd packages/create-svelte
node bin.js

Then following the prompts to make a app.

  • Selecting playwright with no typescript produces playwright.config.js in the created app directory
  • Selecting playwright with typescript produces playwright.config.ts in the created app directory

I also ran the actual test suite in each of the created folders:

npm install
npm run test

For the typescript + playwright, I had to do the extra step get the next version of playwright:

npm install @playwright/test@next
npm install
npm run test

There are no tests in the packages/create-svelte currently.
I'm happy to look into adding tests to ensure all the required files are created depending on the users input?...

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpx changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

Playwrite file when building with typescript
requires the playwrite.config file to have extension .ts
@changeset-bot
Copy link

changeset-bot bot commented Apr 1, 2022

⚠️ No Changeset found

Latest commit: 875fd4a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Rich-Harris
Copy link
Member

Thanks. If we're going to do this, we may as well just automatically install the next version for TypeScript users. I'll open an issue reminding us to remove that once 1.21 is released

@illright
Copy link
Contributor

I don't think this is resolved. When I create a new SvelteKit project (pnpm create svelte@next, Skeleton + TS + No ESLint + No Prettier + Playwright), it still generates a playwright.config.js instead of .ts, which doesn't work. Also I had to up the Playwright version manually.

Are these changes not released yet, perhaps?

@JackDra
Copy link
Contributor Author

JackDra commented Apr 10, 2022

Are these changes not released yet, perhaps?

Yeah, the latest release of "create-svelte" was:
https://github.com/sveltejs/kit/releases/tag/create-svelte%402.0.0-next.127
which was 20 days ago, this PR was merged 9 days ago

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.

3 participants