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: add typecheck and workspace examples #5006

Merged
merged 9 commits into from
Jan 20, 2024

Conversation

hi-ogawa
Copy link
Contributor

@hi-ogawa hi-ogawa commented Jan 19, 2024

Description

I'm not sure if these examples are worth inclusion in the official list, but I thought having this somewhere would be convenient to quickly spawn reproduction on stackblitz for issue authors and also for maintainers.

todo

  • docs
  • readme pnpm docs:examples

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. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

Copy link

netlify bot commented Jan 19, 2024

Deploy Preview for fastidious-cascaron-4ded94 ready!

Name Link
🔨 Latest commit 2f60fa4
🔍 Latest deploy log https://app.netlify.com/sites/fastidious-cascaron-4ded94/deploys/65ab30363ce12d00085d6534
😎 Deploy Preview https://deploy-preview-5006--fastidious-cascaron-4ded94.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@hi-ogawa hi-ogawa changed the title chore: add typecheck and workspace templates chore: add typecheck and workspace examples Jan 19, 2024
@hi-ogawa hi-ogawa marked this pull request as ready for review January 19, 2024 05:30
Copy link
Member

@AriPerkkio AriPerkkio left a comment

Choose a reason for hiding this comment

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

There's quite many changes in lockfile. 🤔
I've usually just manually picked the needed changes from there are staged them line-by-line.

Otherwise this looks good to me. It would be great if we had these runnable examples (Stackblitz links) in configuration documentation directly.

@hi-ogawa
Copy link
Contributor Author

There's quite many changes in lockfile. 🤔 I've usually just manually picked the needed changes from there are staged them line-by-line.

Ah, I didn't know that. I've been just pushing everything after pnpm i. Also now looking at the lock file, I might be installing different version of @types/node. Let me check that as well.

It would be great if we had these runnable examples (Stackblitz links) in configuration documentation directly.

Yeah, that would be nice. Since there is already a full list here https://vitest.dev/guide/#examples, so maybe putting internal links from guide pages (https://vitest.dev/guide/testing-types.html and https://vitest.dev/guide/workspace.html) to https://vitest.dev/guide/#examples is enough?

Copy link
Member

@sheremet-va sheremet-va left a comment

Choose a reason for hiding this comment

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

Good idea 👍

@@ -22,3 +22,5 @@
| `vitesse` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/vitesse) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/vitesse?initialPath=__vitest__/) |
| `vue-jsx` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/vue-jsx) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/vue-jsx?initialPath=__vitest__/) |
| `vue` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/vue) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/vue?initialPath=__vitest__/) |
| `typecheck` | [GitHub](https://github.com/vitest-dev/vitest/tree/main/examples/typecheck) | [Play Online](https://stackblitz.com/fork/github/vitest-dev/vitest/tree/main/examples/typecheck?initialPath=__vitest__/) |
Copy link
Member

Choose a reason for hiding this comment

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

Did you use a generator for that from scripts folder? I think generator sorts it by name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. I didn't know there is pnpm docs:examples script. It looks like the last "marko" one was also added manually e75dabb

docs/guide/testing-types.md Outdated Show resolved Hide resolved
@hi-ogawa hi-ogawa removed the CONFLICT label Jan 20, 2024
@sheremet-va sheremet-va merged commit 36bc699 into vitest-dev:main Jan 20, 2024
16 of 19 checks passed
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