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 setup-overrides script #5650

Closed

Conversation

hi-ogawa
Copy link
Contributor

@hi-ogawa hi-ogawa commented May 2, 2024

Description

This script could be useful to setup ecosystem-ci like environment locally.

Example:

By running the script from Vitest repo root,

npx tsx scripts/setup-overrides.ts /home/hiroshi/code/others/vitest-vscode/package.json

it will setup pnpm.overrides for all Vitest packages with file:... protocol.

  ...
  "pnpm": {
    "overrides": {
      "@vitest/browser": "file:/home/hiroshi/code/others/vitest/packages/browser",
      "@vitest/coverage-istanbul": "file:/home/hiroshi/code/others/vitest/packages/coverage-istanbul",
      "@vitest/coverage-v8": "file:/home/hiroshi/code/others/vitest/packages/coverage-v8",
      "@vitest/expect": "file:/home/hiroshi/code/others/vitest/packages/expect",
      "@vitest/runner": "file:/home/hiroshi/code/others/vitest/packages/runner",
      "@vitest/spy": "file:/home/hiroshi/code/others/vitest/packages/spy",
      "@vitest/snapshot": "file:/home/hiroshi/code/others/vitest/packages/snapshot",
      "@vitest/ui": "file:/home/hiroshi/code/others/vitest/packages/ui",
      "@vitest/utils": "file:/home/hiroshi/code/others/vitest/packages/utils",
      "vite-node": "file:/home/hiroshi/code/others/vitest/packages/vite-node",
      "vitest": "file:/home/hiroshi/code/others/vitest/packages/vitest",
      "@vitest/web-worker": "file:/home/hiroshi/code/others/vitest/packages/web-worker",
      "@vitest/ws-client": "file:/home/hiroshi/code/others/vitest/packages/ws-client"
    }
  }

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 May 2, 2024

Deploy Preview for fastidious-cascaron-4ded94 canceled.

Name Link
🔨 Latest commit 46a8739
🔍 Latest deploy log https://app.netlify.com/sites/fastidious-cascaron-4ded94/deploys/6632e3fb54b21e0008e5a2c5

@hi-ogawa hi-ogawa marked this pull request as ready for review May 2, 2024 01:14
@sheremet-va
Copy link
Member

I don't really understand what it does

@hi-ogawa
Copy link
Contributor Author

hi-ogawa commented May 2, 2024

This is probably something similar to https://github.com/vitest-dev/vitest-ecosystem-ci/blob/77c958abec2a16ebbb7066059008d102e927dfd2/utils.ts#L270-L277 I added an example in the PR description.

I don't know if there's an easier way, but I wanted to test #5646 locally on Vscode extension repo.

@sheremet-va
Copy link
Member

sheremet-va commented May 2, 2024

I don't know if there's an easier way, but I wanted to test #5646 locally on Vscode extension repo.

You can do this: https://vitest.dev/guide/#using-unreleased-commits

That's my go-to to test commits.

@hi-ogawa
Copy link
Contributor Author

hi-ogawa commented May 2, 2024

Aha, I wasn't aware of that one. Thanks, I'll try that next time!

@hi-ogawa hi-ogawa closed this May 2, 2024
@hi-ogawa hi-ogawa deleted the chore-setup-overrides-script branch May 2, 2024 08:58
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.

2 participants