Skip to content

Commit 11da475

Browse files
committed
chore: fixes
1 parent def7cd5 commit 11da475

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,4 @@ jobs:
3131
uses: CodSpeedHQ/action@v3
3232
with:
3333
run: pnpm bench
34-
token: ${{ secrets.CODSPEED_TOKEN }}
3534
- uses: codecov/codecov-action@v5

benchmark/utils.bench.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { bench, describe } from 'vitest'
22
import { isJS, isCSS, getAsType, parseResource } from '../src/utils'
3+
import { extname } from 'node:path'
34

45
// Sample file names for testing
56
const jsFiles = [
@@ -59,7 +60,8 @@ describe('File Type Detection Benchmarks', () => {
5960
describe('Asset Type Detection Benchmarks', () => {
6061
bench('getAsType on mixed files', () => {
6162
for (const file of mixedFiles) {
62-
const ext = file.replace(/\?.*/, '').split('.').pop() || ''
63+
const base = file.split('?', 1)[0]
64+
const ext = extname(base).slice(1)
6365
getAsType(ext)
6466
}
6567
})

0 commit comments

Comments
 (0)