Skip to content

Commit 770b8f6

Browse files
committed
refactor: use .ts file extension for relative imports
1 parent 93e16a8 commit 770b8f6

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

factories/encryption.ts

Lines changed: 2 additions & 2 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-
import { Encryption } from '../src/encryption.js'
11-
import type { EncryptionOptions } from '../src/types.js'
10+
import { Encryption } from '../src/encryption.ts'
11+
import type { EncryptionOptions } from '../src/types.ts'
1212

1313
/**
1414
* Encryption factory is used to generate encryption class instances for

factories/main.ts

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

10-
export { EncryptionFactory } from './encryption.js'
10+
export { EncryptionFactory } from './encryption.ts'

index.ts

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

10-
export * as errors from './src/errors.js'
11-
export { Encryption } from './src/encryption.js'
10+
export * as errors from './src/errors.ts'
11+
export { Encryption } from './src/encryption.ts'

src/encryption.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import base64 from '@poppinss/utils/base64'
1212
import { MessageBuilder } from '@poppinss/utils'
1313
import { createHash, createCipheriv, createDecipheriv } from 'node:crypto'
1414

15-
import { Hmac } from './hmac.js'
16-
import * as errors from './errors.js'
17-
import type { EncryptionOptions } from './types.js'
18-
import { MessageVerifier } from './message_verifier.js'
15+
import { Hmac } from './hmac.ts'
16+
import * as errors from './errors.ts'
17+
import type { EncryptionOptions } from './types.ts'
18+
import { MessageVerifier } from './message_verifier.ts'
1919

2020
/**
2121
* The encryption class allows encrypting and decrypting values using `aes-256-cbc` or `aes-128-cbc`

src/message_verifier.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import base64 from '@poppinss/utils/base64'
1212
import { MessageBuilder } from '@poppinss/utils'
1313
import { RuntimeException } from '@poppinss/utils/exception'
1414

15-
import { Hmac } from './hmac.js'
15+
import { Hmac } from './hmac.ts'
1616

1717
/**
1818
* Message verifier is similar to the encryption. However, the actual payload

tests/encryption.spec.ts

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

1010
import { test } from '@japa/runner'
1111
import { Secret } from '@poppinss/utils'
12-
import { Encryption } from '../src/encryption.js'
12+
import { Encryption } from '../src/encryption.ts'
1313

1414
const SECRET = 'averylongradom32charactersstring'
1515

tests/message_verifier.spec.ts

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

1010
import { test } from '@japa/runner'
1111
import base64 from '@poppinss/utils/base64'
12-
import { MessageVerifier } from '../src/message_verifier.js'
12+
import { MessageVerifier } from '../src/message_verifier.ts'
1313

1414
const SECRET = 'averylongradom32charactersstring'
1515

0 commit comments

Comments
 (0)