Skip to content

Commit 33713b4

Browse files
committed
refactor: use .ts file extension for relative imports
1 parent f7daa82 commit 33713b4

20 files changed

+42
-42
lines changed

configure.ts

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

1010
import type Configure from '@adonisjs/core/commands/configure'
11-
import { stubsRoot } from './stubs/main.js'
11+
import { stubsRoot } from './stubs/main.ts'
1212

1313
/**
1414
* Configures the package

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 { configure } from './configure.js'
11-
export * as errors from './src/errors.js'
12-
export { stubsRoot } from './stubs/main.js'
13-
export { defineConfig } from './src/define_config.js'
14-
export { cspKeywords } from './src/guards/csp/keywords.js'
10+
export { configure } from './configure.ts'
11+
export * as errors from './src/errors.ts'
12+
export { stubsRoot } from './stubs/main.ts'
13+
export { defineConfig } from './src/define_config.ts'
14+
export { cspKeywords } from './src/guards/csp/keywords.ts'

providers/shield_provider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
import type { ApplicationService } from '@adonisjs/core/types'
1111

12-
import type { ShieldConfig } from '../src/types.js'
13-
import ShieldMiddleware from '../src/shield_middleware.js'
12+
import type { ShieldConfig } from '../src/types.ts'
13+
import ShieldMiddleware from '../src/shield_middleware.ts'
1414

1515
/**
1616
* Provider to register shield middleware

src/define_config.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 type { ShieldConfig } from './types.js'
10+
import type { ShieldConfig } from './types.ts'
1111

1212
/**
1313
* Define shield configuration

src/guards/csp/keywords.ts

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

1010
import type { ServerResponse, IncomingMessage } from 'node:http'
1111

12-
import type { ValueOf } from '../../types.js'
12+
import type { ValueOf } from '../../types.ts'
1313
import type { ContentSecurityPolicyOptions } from '../../helmet-csp.cts'
1414

1515
/**

src/guards/csp/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
import string from '@adonisjs/core/helpers/string'
1414
import { type HttpContext } from '@adonisjs/core/http'
1515

16-
import { noop } from '../../noop.js'
17-
import { cspKeywords } from './keywords.js'
18-
import type { CspOptions } from '../../types.js'
16+
import { noop } from '../../noop.ts'
17+
import { cspKeywords } from './keywords.ts'
18+
import type { CspOptions } from '../../types.ts'
1919
import { helmetMiddleware } from '../../helmet-csp.cts'
2020

2121
/**

src/guards/csrf.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ import type { Edge } from 'edge.js'
1515
import type { HttpContext } from '@adonisjs/core/http'
1616
import type { Encryption } from '@adonisjs/core/encryption'
1717

18-
import debug from '../debug.js'
19-
import { noop } from '../noop.js'
20-
import type { CsrfOptions } from '../types.js'
21-
import { E_BAD_CSRF_TOKEN } from '../errors.js'
18+
import debug from '../debug.ts'
19+
import { noop } from '../noop.ts'
20+
import type { CsrfOptions } from '../types.ts'
21+
import { E_BAD_CSRF_TOKEN } from '../errors.ts'
2222

2323
/**
2424
* A class to encapsulate the logic of verifying and generating

src/guards/frame_guard.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
import { type HttpContext } from '@adonisjs/core/http'
1111

12-
import { noop } from '../noop.js'
13-
import { type XFrameOptions } from '../types.js'
12+
import { noop } from '../noop.ts'
13+
import { type XFrameOptions } from '../types.ts'
1414

1515
const ALLOWED_ACTIONS = ['DENY', 'ALLOW-FROM', 'SAMEORIGIN']
1616

src/guards/hsts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
import string from '@adonisjs/core/helpers/string'
1111
import type { HttpContext } from '@adonisjs/core/http'
1212

13-
import { noop } from '../noop.js'
14-
import type { HstsOptions } from '../types.js'
13+
import { noop } from '../noop.ts'
14+
import type { HstsOptions } from '../types.ts'
1515

1616
const DEFAULT_MAX_AGE = 180 * 24 * 60 * 60
1717

src/guards/main.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 { hstsFactory } from './hsts.js'
11-
export { csrfFactory } from './csrf.js'
12-
export { cspFactory } from './csp/main.js'
13-
export { noSniffFactory } from './no_sniff.js'
14-
export { frameGuardFactory } from './frame_guard.js'
10+
export { hstsFactory } from './hsts.ts'
11+
export { csrfFactory } from './csrf.ts'
12+
export { cspFactory } from './csp/main.ts'
13+
export { noSniffFactory } from './no_sniff.ts'
14+
export { frameGuardFactory } from './frame_guard.ts'

0 commit comments

Comments
 (0)