Skip to content

Commit

Permalink
fix import extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Nov 17, 2024
1 parent d25db7e commit 4c184f4
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions scripts/benchmarks/src/benchAddedFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
* benchmarks for them.
*/
import { existsSync } from 'node:fs'
import { getStagedFiles } from './getStagedFiles.js'
import type { BenchmarkReport } from './reporter.js'
import { runVitest } from './runner.js'
import { getStagedFiles } from './getStagedFiles.ts'
import type { BenchmarkReport } from './reporter.ts'
import { runVitest } from './runner.ts'

/**
* Given a target branch, run the benchmarks for any source files that have
Expand Down
2 changes: 1 addition & 1 deletion scripts/benchmarks/src/benchChangedFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export async function benchChangedFiles(
.replace(/\.ts$/, '.bench.ts')

if (existsSync(benchFile)) {
const { compareToBaseline } = await import('./compareToBaseline.js')
const { compareToBaseline } = await import('./compareToBaseline.ts')

const changed = await compareToBaseline(
targetBranch,
Expand Down
4 changes: 2 additions & 2 deletions scripts/benchmarks/src/compareToBaseline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import * as esbuild from 'esbuild'
import { execa } from 'execa'
import fs from 'node:fs/promises'
import { Project, SyntaxKind } from 'ts-morph'
import { dedent } from './dedent'
import { normalizeIdentifiers } from './normalizeIdentifiers'
import { dedent } from './dedent.ts'
import { normalizeIdentifiers } from './normalizeIdentifiers.ts'

export async function compareToBaseline(
baseRef: string,
Expand Down
4 changes: 2 additions & 2 deletions scripts/benchmarks/src/normalizeIdentifiers.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, it } from 'vitest'
import { dedent } from './dedent'
import { normalizeIdentifiers } from './normalizeIdentifiers'
import { dedent } from './dedent.ts'
import { normalizeIdentifiers } from './normalizeIdentifiers.ts'

describe('normalizeIdentifiers', () => {
it('should normalize identifiers in a simple code snippet', () => {
Expand Down
2 changes: 1 addition & 1 deletion scripts/bundle-impact/src/dedent.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isArray } from '../../../src/typed/isArray.ts'
import { isArray } from 'radashi/typed/isArray.ts'

/**
* Remove indentation from a string. The given string is expected to
Expand Down
2 changes: 1 addition & 1 deletion scripts/prerelease-pr/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function main() {
prHeadRef: 'PR_HEAD_REF',
})

const { prerelease } = await import('./prerelease')
const { prerelease } = await import('./prerelease.ts')

await prerelease(args)
}
4 changes: 2 additions & 2 deletions scripts/publish-version/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ main()
async function main() {
const args = await parseArgs()

const { publishVersion, VALID_TAGS } = await import('./publishVersion')
const { publishVersion, VALID_TAGS } = await import('./publishVersion.ts')

if (args.tag && !VALID_TAGS.includes(args.tag)) {
console.error(`Error: --tag must be one of [${VALID_TAGS.join(', ')}]`)
Expand Down Expand Up @@ -42,7 +42,7 @@ async function parseArgs() {
process.exit(1)
}

type ValidTag = typeof import('./publishVersion').VALID_TAGS[number]
type ValidTag = typeof import('./publishVersion.ts').VALID_TAGS[number]

return {
push: !argv['no-push'],
Expand Down
4 changes: 2 additions & 2 deletions scripts/publish-version/src/publishVersion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import crypto from 'node:crypto'
import fs from 'node:fs/promises'
import { sift } from 'radashi/array/sift.ts'
import { glob } from 'tinyglobby'
import { dedent } from './dedent'
import { trackVersion } from './trackVersion'
import { dedent } from './dedent.ts'
import { trackVersion } from './trackVersion.ts'

export const VALID_TAGS = ['beta', 'next'] as const

Expand Down
2 changes: 1 addition & 1 deletion scripts/publish-version/src/trackVersion.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { supabase } from 'radashi-db/supabase.js'
import { supabase } from 'radashi-db/supabase.ts'

export async function trackVersion(
version: string,
Expand Down
2 changes: 1 addition & 1 deletion scripts/radashi-db/src/supabase.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createClient } from '@supabase/supabase-js'
import type { Database } from './supabase.types'
import type { Database } from './supabase.types.ts'

if (!process.env.SUPABASE_KEY) {
throw new Error('SUPABASE_KEY is not set')
Expand Down

0 comments on commit 4c184f4

Please sign in to comment.