Skip to content

Commit be53828

Browse files
committed
refactor: use .ts file extension for relative imports
1 parent 9b2a030 commit be53828

File tree

14 files changed

+23
-23
lines changed

14 files changed

+23
-23
lines changed

examples/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* file that was distributed with this source code.
88
*/
99

10-
import { Env } from '../src/env.js'
10+
import { Env } from '../src/env.ts'
1111

1212
const validator = Env.rules({
1313
PORT: Env.schema.number(),

index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
* file that was distributed with this source code.
88
*/
99

10-
export { Env } from './src/env.js'
11-
export { EnvParser } from './src/parser.js'
12-
export { EnvLoader } from './src/loader.js'
13-
export * as errors from './src/errors.js'
14-
export { EnvProcessor } from './src/processor.js'
10+
export { Env } from './src/env.ts'
11+
export { EnvParser } from './src/parser.ts'
12+
export { EnvLoader } from './src/loader.ts'
13+
export * as errors from './src/errors.ts'
14+
export { EnvProcessor } from './src/processor.ts'

src/editor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import splitLines from 'split-lines'
1111
import lodash from '@poppinss/utils/lodash'
1212
import { writeFile } from 'node:fs/promises'
1313

14-
import { EnvLoader } from './loader.js'
14+
import { EnvLoader } from './loader.ts'
1515

1616
/**
1717
* Environment editor for managing and modifying .env files.

src/env.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
import { schema as envSchema } from '@poppinss/validator-lite'
1111
import type { ValidateFn } from '@poppinss/validator-lite/types'
1212

13-
import { EnvParser } from './parser.js'
14-
import { EnvValidator } from './validator.js'
15-
import { EnvProcessor } from './processor.js'
13+
import { EnvParser } from './parser.ts'
14+
import { EnvValidator } from './validator.ts'
15+
import { EnvProcessor } from './processor.ts'
1616

1717
/**
1818
* A wrapper over "process.env" with types information.

src/loader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { fileURLToPath } from 'node:url'
1111
import { readFile } from 'node:fs/promises'
1212
import { isAbsolute, join } from 'node:path'
1313

14-
import debug from './debug.js'
14+
import debug from './debug.ts'
1515

1616
/**
1717
* Read the contents of one or more dot-env files. Following is how the files

src/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import dotenv, { type DotenvParseOutput } from 'dotenv'
1111
import { type EnvIdentifierCallback } from './types.ts'
12-
import { E_IDENTIFIER_ALREADY_DEFINED } from './errors.js'
12+
import { E_IDENTIFIER_ALREADY_DEFINED } from './errors.ts'
1313
import { readFile } from 'node:fs/promises'
1414
import { RuntimeException } from '@poppinss/utils/exception'
1515

src/processor.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
* file that was distributed with this source code.
88
*/
99

10-
import debug from './debug.js'
11-
import { EnvParser } from './parser.js'
12-
import { EnvLoader } from './loader.js'
10+
import debug from './debug.ts'
11+
import { EnvParser } from './parser.ts'
12+
import { EnvLoader } from './loader.ts'
1313

1414
/**
1515
* Env processors loads, parses and process environment variables.

src/validator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import type { Exception } from '@poppinss/utils/exception'
1111
import type { ValidateFn } from '@poppinss/validator-lite/types'
1212

13-
import { E_INVALID_ENV_VARIABLES } from './errors.js'
13+
import { E_INVALID_ENV_VARIABLES } from './errors.ts'
1414

1515
/**
1616
* Exposes the API to validate environment variables against a

tests/editor.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import { join } from 'node:path'
1111
import { test } from '@japa/runner'
1212

13-
import { EnvEditor } from '../src/editor.js'
13+
import { EnvEditor } from '../src/editor.ts'
1414

1515
test.group('Env editor | files to modify', () => {
1616
test('add key-value pair to dot-env files', async ({ assert, fs }) => {

tests/env.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99

1010
import { test } from '@japa/runner'
11-
import { Env } from '../src/env.js'
11+
import { Env } from '../src/env.ts'
1212

1313
test.group('Env', (group) => {
1414
group.each.teardown(() => {

0 commit comments

Comments
 (0)