Skip to content

Commit

Permalink
wip: repro with 18983
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Jan 13, 2025
1 parent 9f1bc80 commit cf257b1
Show file tree
Hide file tree
Showing 4 changed files with 165 additions and 365 deletions.
3 changes: 2 additions & 1 deletion examples/repro/src/basic.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { expect, test } from 'vitest'
import { squared } from './basic'
import { squared, cube } from './basic'

Check failure on line 2 in examples/repro/src/basic.test.ts

View workflow job for this annotation

GitHub Actions / Lint: node-latest, ubuntu-latest

Expected "cube" to come before "squared"

test('repro', () => {
expect(squared(2)).toBe(4)
expect(cube(2)).toBe(8)
})
1 change: 1 addition & 0 deletions examples/repro/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default defineConfig({
{
name: 'repro',
transform(code, id, _options) {
if (1) return;

Check failure on line 14 in examples/repro/vite.config.ts

View workflow job for this annotation

GitHub Actions / Lint: node-latest, ubuntu-latest

Expect newline after if

Check failure on line 14 in examples/repro/vite.config.ts

View workflow job for this annotation

GitHub Actions / Lint: node-latest, ubuntu-latest

Expected { after 'if' condition

Check failure on line 14 in examples/repro/vite.config.ts

View workflow job for this annotation

GitHub Actions / Lint: node-latest, ubuntu-latest

Extra semicolon
if (id.endsWith('/basic.ts')) {
const output = new MagicString(code)
output.prepend(`function prepended(){};`)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"tinyglobby": "^0.2.10",
"tsx": "^4.19.2",
"typescript": "^5.7.2",
"vite": "^5.4.0",
"vite": "https://pkg.pr.new/vite@18983",
"vitest": "workspace:*",
"zx": "^8.2.4"
},
Expand Down
Loading

0 comments on commit cf257b1

Please sign in to comment.