Skip to content

Commit 5bd2e2f

Browse files
committed
chore: update dependencies
1 parent 323aad2 commit 5bd2e2f

File tree

6 files changed

+60
-51
lines changed

6 files changed

+60
-51
lines changed

package.json

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,49 +18,51 @@
1818
"type": "module",
1919
"scripts": {
2020
"pretest": "npm run lint",
21-
"test": "cross-env NODE_DEBUG=japa:plugin-adonisjs c8 npm run quick:test",
22-
"lint": "eslint .",
23-
"format": "prettier --write .",
21+
"test": "cross-env NODE_DEBUG=adonisjs:http c8 npm run quick:test",
2422
"typecheck": "tsc --noEmit",
2523
"clean": "del-cli build",
2624
"precompile": "npm run lint && npm run clean",
2725
"compile": "tsup-node && tsc --emitDeclarationOnly --declaration",
2826
"build": "npm run compile",
27+
"prebenchmark": "npm run build",
28+
"benchmark": "node benchmarks/index.js",
29+
"release": "release-it",
2930
"version": "npm run build",
31+
"format": "prettier --write .",
3032
"prepublishOnly": "npm run build",
31-
"release": "release-it",
32-
"quick:test": "node --import=ts-node-maintained/register/esm --enable-source-maps bin/test.ts"
33+
"lint": "eslint",
34+
"quick:test": "node --import=@poppinss/ts-exec --enable-source-maps bin/test.ts",
35+
"docs": "typedoc"
3336
},
3437
"devDependencies": {
35-
"@adonisjs/core": "^6.17.1",
36-
"@adonisjs/eslint-config": "^2.0.0-beta.7",
37-
"@adonisjs/prettier-config": "^1.4.0",
38-
"@adonisjs/tsconfig": "^1.4.0",
39-
"@japa/api-client": "^3.0.3",
40-
"@japa/assert": "^4.0.1",
38+
"@adonisjs/core": "^7.0.0-next.0",
39+
"@adonisjs/eslint-config": "^3.0.0-next.1",
40+
"@adonisjs/prettier-config": "^1.4.5",
41+
"@adonisjs/tsconfig": "^2.0.0-next.0",
42+
"@japa/api-client": "^3.1.0",
43+
"@japa/assert": "^4.1.1",
4144
"@japa/browser-client": "^2.1.1",
42-
"@japa/runner": "^4.1.0",
43-
"@release-it/conventional-changelog": "^10.0.0",
44-
"@swc/core": "^1.10.7",
45-
"@types/node": "^22.10.5",
45+
"@japa/runner": "^4.4.0",
46+
"@poppinss/ts-exec": "^1.4.1",
47+
"@release-it/conventional-changelog": "^10.0.1",
48+
"@types/node": "^24.3.1",
4649
"c8": "^10.1.3",
47-
"cross-env": "^7.0.3",
50+
"cross-env": "^10.0.0",
4851
"del-cli": "^6.0.0",
49-
"eslint": "^9.18.0",
52+
"eslint": "^9.35.0",
5053
"get-port": "^7.1.0",
51-
"playwright": "^1.49.1",
52-
"prettier": "^3.4.2",
53-
"release-it": "^18.1.1",
54-
"ts-node-maintained": "^10.9.4",
55-
"tsup": "^8.3.5",
56-
"typescript": "^5.7.3"
54+
"playwright": "^1.55.0",
55+
"prettier": "^3.6.2",
56+
"release-it": "^19.0.4",
57+
"tsup": "^8.5.0",
58+
"typescript": "^5.9.2"
5759
},
5860
"peerDependencies": {
59-
"@adonisjs/core": "^6.17.0",
60-
"@japa/api-client": "^2.0.3 || ^3.0.0",
61+
"@adonisjs/core": "^7.0.0-next.0",
62+
"@japa/api-client": "^3.0.0",
6163
"@japa/browser-client": "^2.0.3",
62-
"@japa/runner": "^3.1.2 || ^4.0.0",
63-
"playwright": "^1.42.1"
64+
"@japa/runner": "^4.0.0",
65+
"playwright": "^1.55.0"
6466
},
6567
"peerDependenciesMeta": {
6668
"@japa/api-client": {
@@ -73,6 +75,12 @@
7375
"optional": true
7476
}
7577
},
78+
"keywords": [
79+
"plugin-adonisjs",
80+
"japa-plugin"
81+
],
82+
"license": "MIT",
83+
"author": "Harminder Virk <[email protected]>",
7684
"homepage": "https://github.com/japa/plugin-adonisjs#readme",
7785
"repository": {
7886
"type": "git",
@@ -81,12 +89,6 @@
8189
"bugs": {
8290
"url": "https://github.com/japa/plugin-adonisjs/issues"
8391
},
84-
"keywords": [
85-
"plugin-adonisjs",
86-
"japa-plugin"
87-
],
88-
"author": "Harminder Virk <[email protected]>",
89-
"license": "MIT",
9092
"publishConfig": {
9193
"access": "public",
9294
"provenance": true

src/extend_api_client.ts

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

10-
import './types/extended.js'
11-
import { CookieClient } from '@adonisjs/core/http'
10+
import { type CookieClient } from '@adonisjs/core/http'
1211
import { ApiClient, ApiRequest } from '@japa/api-client'
1312

13+
import './types/extended.js'
1414
import debug from './debug.js'
1515

1616
/**

src/extend_browser_client.ts

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

10-
import './types/extended.js'
11-
import { CookieOptions } from 'playwright'
12-
import { CookieClient } from '@adonisjs/core/http'
10+
import { type CookieOptions } from 'playwright'
11+
import { type CookieClient } from '@adonisjs/core/http'
1312
import { decoratorsCollection } from '@japa/browser-client'
1413
import type { Decorator } from '@japa/browser-client/types'
1514

15+
import './types/extended.js'
1616
import debug from './debug.js'
1717

1818
/**

src/extend_context.ts

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

10-
import './types/extended.js'
11-
import { Repl } from '@adonisjs/core/repl'
12-
import type { Router } from '@adonisjs/core/http'
10+
import { type Repl } from '@adonisjs/core/repl'
1311
import { TestContext } from '@japa/runner/core'
12+
import type { Router } from '@adonisjs/core/http'
1413

14+
import './types/extended.js'
1515
import debug from './debug.js'
1616

1717
export function extendContext(router: Router, repl: Repl) {
@@ -30,8 +30,9 @@ export function extendContext(router: Router, repl: Repl) {
3030
})
3131
}
3232

33-
TestContext.macro('route', function (this: TestContext, routeIdentifier, params?, options?) {
34-
return router.makeUrl(routeIdentifier, params, options)
33+
TestContext.macro('route', function (this: TestContext, ...args) {
34+
const [identifier, params, options] = args as any[]
35+
return (router.urlBuilder.urlFor as any)(identifier, params, options)
3536
})
3637

3738
TestContext.getter('repl', function (this: TestContext) {

src/types/extended.ts

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

10-
import { Cookie } from 'playwright'
11-
import type { MakeUrlOptions } from '@adonisjs/core/types/http'
10+
import { type Cookie } from 'playwright'
11+
import type {
12+
RoutesList,
13+
URLOptions,
14+
LookupList,
15+
GetRoutesForMethod,
16+
RouteBuilderArguments,
17+
} from '@adonisjs/core/types/http'
1218

1319
declare module '@japa/runner/core' {
1420
export interface TestContext {
1521
/**
1622
* Create URL for a pre-registered route
1723
*/
18-
route(
19-
routeIdentifier: string,
20-
params?: any[] | Record<string, any>,
21-
options?: MakeUrlOptions
24+
route<Identifier extends keyof GetRoutesForMethod<RoutesList, 'GET'> & string>(
25+
...args: RoutesList extends LookupList
26+
? RouteBuilderArguments<Identifier, RoutesList['GET'][Identifier], URLOptions>
27+
: []
2228
): string
2329

2430
repl: {

tests_helpers/bootstrap.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
import getPort from 'get-port'
1111
import { getActiveTest } from '@japa/runner'
1212
import { IgnitorFactory } from '@adonisjs/core/factories'
13-
import { AppEnvironments } from '@adonisjs/core/types/app'
13+
import { type AppEnvironments } from '@adonisjs/core/types/app'
1414
import type { ApplicationService } from '@adonisjs/core/types'
15-
import { IncomingMessage, ServerResponse, createServer } from 'node:http'
15+
import { type IncomingMessage, type ServerResponse, createServer } from 'node:http'
1616

1717
/**
1818
* Create a HTTP server to handle request

0 commit comments

Comments
 (0)