forked from vitejs/vite
-
-
Notifications
You must be signed in to change notification settings - Fork 1
fix: HEAD request Content-Type for JS files in transform middleware #11
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
Closed
Closed
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
09612fc
chore: add copilot agent configs
sapphi-red 52514d5
Initial plan
Copilot d88195a
Fix HEAD request Content-Type for JS files in transform middleware
Copilot 7a1fc7d
Update tests to be more reliable and fix integration test setup
Copilot c4638d5
Move HEAD request tests from middleware unit tests to resolve e2e tests
Copilot 6443766
refactor: address feedback on HEAD request tests
Copilot 8faeb85
address feedback: remove test file, clean up comments and tests
Copilot 600bc33
Apply suggestion
sapphi-red File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| This is a TypeScript project that implements a frontend build tooling called Vite. Please follow these guidelines when contributing: | ||
|
|
||
| ## Code Standards | ||
|
|
||
| ### Required Before Each Commit | ||
|
|
||
| - Run `pnpm run lint` to ensure that your code adheres the code standards. | ||
| - Run `pnpm run format` to format your code. | ||
|
|
||
| ### Development Flow | ||
|
|
||
| - Build: `pnpm run build` | ||
| - Test: `pnpm run test` (uses Vitest and Playwright) | ||
|
|
||
| ## Repository Structure | ||
|
|
||
| - `docs/`: Documentation. | ||
| - `packages/create-vite`: Contains the source code for the `create-vite` command. | ||
| - `packages/plugin-legacy`: Contains the source code for `@vitejs/plugin-legacy`. | ||
| - `packages/vite`: Contains the source code for the Vite core. | ||
| - `playground/`: E2E tests | ||
|
|
||
| ## Key Guidelines | ||
|
|
||
| 1. Follow TypeScript best practices. | ||
| 2. Maintain existing code structure and organization. | ||
| 3. Write tests for new functionality. Prefer uni tests if it can be tested without using mocks. | ||
| 4. Never write comments that explain what the code does. Instead, write comments that explain why the code does what it does. | ||
| 5. Suggest changes to the documentation if public API changes are made. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| paths: | ||
| - .github/workflows/copilot-setup-steps.yml | ||
| pull_request: | ||
| paths: | ||
| - .github/workflows/copilot-setup-steps.yml | ||
|
|
||
| jobs: | ||
| copilot-setup-steps: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install pnpm | ||
| uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | ||
|
|
||
| - name: Set node version to 22 | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
| cache: "pnpm" | ||
|
|
||
| - name: Install deps | ||
| run: pnpm install | ||
|
|
||
| # Install playwright's binary under custom directory to cache | ||
| - name: (non-windows) Set Playwright path and Get playwright version | ||
| if: runner.os != 'Windows' | ||
| run: | | ||
| echo "PLAYWRIGHT_BROWSERS_PATH=$HOME/.cache/playwright-bin" >> $GITHUB_ENV | ||
| PLAYWRIGHT_VERSION="$(pnpm ls --depth 0 --json -w playwright-chromium | jq --raw-output '.[0].devDependencies["playwright-chromium"].version')" | ||
| echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV | ||
| - name: (windows) Set Playwright path and Get playwright version | ||
| if: runner.os == 'Windows' | ||
| run: | | ||
| echo "PLAYWRIGHT_BROWSERS_PATH=$HOME\.cache\playwright-bin" >> $env:GITHUB_ENV | ||
| $env:PLAYWRIGHT_VERSION="$(pnpm ls --depth 0 --json -w playwright-chromium | jq --raw-output '.[0].devDependencies["playwright-chromium"].version')" | ||
| echo "PLAYWRIGHT_VERSION=$env:PLAYWRIGHT_VERSION" >> $env:GITHUB_ENV | ||
|
|
||
| - name: Install Playwright | ||
| # does not need to explicitly set chromium after https://github.com/microsoft/playwright/issues/14862 is solved | ||
| run: pnpm playwright install chromium |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| /* Simple CSS for HEAD request testing */ | ||
| body { | ||
| margin: 0; | ||
| padding: 0; | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.