Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Jan 26, 2023
1 parent d28d7d4 commit 0e430a8
Show file tree
Hide file tree
Showing 25 changed files with 177 additions and 173 deletions.
2 changes: 1 addition & 1 deletion factories/http_context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import { Container } from '@adonisjs/fold'
import type { Logger } from '@adonisjs/logger'
import { LoggerFactory } from '@adonisjs/logger/test_factories/logger'
import { LoggerFactory } from '@adonisjs/logger/factories'

import { RequestFactory } from './request.js'
import { ResponseFactory } from './response.js'
Expand Down
2 changes: 1 addition & 1 deletion factories/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Socket } from 'node:net'
import proxyAddr from 'proxy-addr'
import type { Encryption } from '@adonisjs/encryption'
import { IncomingMessage, ServerResponse } from 'node:http'
import { EncryptionFactory } from '@adonisjs/encryption/test_factories/encryption'
import { EncryptionFactory } from '@adonisjs/encryption/factories'

import { Request } from '../src/request.js'
import { RequestConfig } from '../src/types/request.js'
Expand Down
2 changes: 1 addition & 1 deletion factories/response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import { Socket } from 'node:net'
import type { Encryption } from '@adonisjs/encryption'
import { IncomingMessage, ServerResponse } from 'node:http'
import { EncryptionFactory } from '@adonisjs/encryption/test_factories/encryption'
import { EncryptionFactory } from '@adonisjs/encryption/factories'

import { RouterFactory } from './router.js'
import { Response } from '../src/response.js'
Expand Down
8 changes: 5 additions & 3 deletions factories/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

import type { Encryption } from '@adonisjs/encryption'
import type { Application } from '@adonisjs/application'
import { AppFactory } from '@adonisjs/application/test_factories/app'
import { EncryptionFactory } from '@adonisjs/encryption/test_factories/encryption'
import { AppFactory } from '@adonisjs/application/factories'
import { EncryptionFactory } from '@adonisjs/encryption/factories'

import { Router } from '../src/router/main.js'
import { QsParserFactory } from './qs_parser_factory.js'
Expand All @@ -31,7 +31,9 @@ export class RouterFactory {
* Returns an instance of the application class
*/
#getApp() {
return this.#parameters.app || new AppFactory().create(new URL('./app/', import.meta.url))
return (
this.#parameters.app || new AppFactory().create(new URL('./app/', import.meta.url), () => {})
)
}

/**
Expand Down
8 changes: 5 additions & 3 deletions factories/server_factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import { Logger } from '@adonisjs/logger'
import { Emitter } from '@adonisjs/events'
import type { Encryption } from '@adonisjs/encryption'
import type { Application } from '@adonisjs/application'
import { AppFactory } from '@adonisjs/application/test_factories/app'
import { EncryptionFactory } from '@adonisjs/encryption/test_factories/encryption'
import { AppFactory } from '@adonisjs/application/factories'
import { EncryptionFactory } from '@adonisjs/encryption/factories'

import { Server } from '../src/server/main.js'
import { defineConfig } from '../src/define_config.js'
Expand Down Expand Up @@ -58,7 +58,9 @@ export class ServerFactory {
* Returns an instance of the application class
*/
#getApp() {
return this.#parameters.app || new AppFactory().create(new URL('./app/', import.meta.url))
return (
this.#parameters.app || new AppFactory().create(new URL('./app/', import.meta.url), () => {})
)
}

/**
Expand Down
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
"author": "virk,adonisjs",
"license": "MIT",
"devDependencies": {
"@adonisjs/application": "^6.8.1-0",
"@adonisjs/config": "^4.1.4-0",
"@adonisjs/encryption": "^5.1.1-0",
"@adonisjs/events": "^8.4.4-0",
"@adonisjs/fold": "^9.9.1-0",
"@adonisjs/logger": "^5.4.0-0",
"@adonisjs/application": "^7.0.0-0",
"@adonisjs/config": "^4.2.0-0",
"@adonisjs/encryption": "^5.1.2-0",
"@adonisjs/events": "^8.4.5-0",
"@adonisjs/fold": "^9.9.2-0",
"@adonisjs/logger": "^5.4.1-0",
"@commitlint/cli": "^17.4.2",
"@commitlint/config-conventional": "^17.4.2",
"@fastify/middie": "^8.1.0",
Expand All @@ -54,7 +54,7 @@
"@japa/run-failed-tests": "^1.1.0",
"@japa/runner": "^2.2.2",
"@japa/spec-reporter": "^1.3.2",
"@swc/core": "^1.3.27",
"@swc/core": "^1.3.29",
"@types/accepts": "^1.3.5",
"@types/content-disposition": "^0.5.5",
"@types/cookie": "^0.5.1",
Expand Down Expand Up @@ -97,12 +97,12 @@
"@poppinss/macroable": "^1.0.0-0",
"@poppinss/matchit": "^3.1.2",
"@poppinss/middleware": "^3.1.0",
"@poppinss/utils": "^6.4.0-0",
"@poppinss/utils": "^6.5.0-0",
"@sindresorhus/is": "^5.3.0",
"accepts": "^1.3.8",
"content-disposition": "^0.5.4",
"cookie": "^0.5.0",
"cuid": "^2.1.8",
"cuid": "^3.0.0",
"destroy": "^1.2.0",
"encodeurl": "^1.0.2",
"etag": "^1.8.1",
Expand All @@ -117,11 +117,11 @@
"youch": "^3.2.2"
},
"peerDependencies": {
"@adonisjs/application": "^6.8.1-0",
"@adonisjs/encryption": "^5.1.1-0",
"@adonisjs/events": "^8.4.4-0",
"@adonisjs/fold": "^9.9.1-0",
"@adonisjs/logger": "^5.4.0-0"
"@adonisjs/application": "^7.0.0-0",
"@adonisjs/encryption": "^5.1.2-0",
"@adonisjs/events": "^8.4.5-0",
"@adonisjs/fold": "^9.9.2-0",
"@adonisjs/logger": "^5.4.1-0"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion tests/cookies/client.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import { test } from '@japa/runner'
import { EncryptionFactory } from '@adonisjs/encryption/test_factories/encryption'
import { EncryptionFactory } from '@adonisjs/encryption/factories'

import { CookieClient } from '../../src/cookies/client.js'

Expand Down
2 changes: 1 addition & 1 deletion tests/cookies/drivers/encrypted.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

import { test } from '@japa/runner'
import { EncryptionFactory } from '@adonisjs/encryption/test_factories/encryption'
import { EncryptionFactory } from '@adonisjs/encryption/factories'
import { pack, unpack, canUnpack } from '../../../src/cookies/drivers/encrypted.js'

const encryption = new EncryptionFactory().create()
Expand Down
2 changes: 1 addition & 1 deletion tests/cookies/drivers/signed.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

import { test } from '@japa/runner'
import { EncryptionFactory } from '@adonisjs/encryption/test_factories/encryption'
import { EncryptionFactory } from '@adonisjs/encryption/factories'
import { pack, unpack, canUnpack } from '../../../src/cookies/drivers/signed.js'

const encryption = new EncryptionFactory().create()
Expand Down
2 changes: 1 addition & 1 deletion tests/cookies/parser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

import { test } from '@japa/runner'
import { EncryptionFactory } from '@adonisjs/encryption/test_factories/encryption'
import { EncryptionFactory } from '@adonisjs/encryption/factories'

import { CookieParser } from '../../src/cookies/parser.js'
import { CookieSerializer } from '../../src/cookies/serializer.js'
Expand Down
2 changes: 1 addition & 1 deletion tests/cookies/serializer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import { test } from '@japa/runner'
import { base64, MessageBuilder } from '@poppinss/utils'
import { EncryptionFactory } from '@adonisjs/encryption/test_factories/encryption'
import { EncryptionFactory } from '@adonisjs/encryption/factories'

import { CookieSerializer } from '../../src/cookies/serializer.js'

Expand Down
2 changes: 1 addition & 1 deletion tests/exceptions/exception_handler.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import { test } from '@japa/runner'
import { Exception } from '@poppinss/utils'
import { LoggerFactory } from '@adonisjs/logger/test_factories/logger'
import { LoggerFactory } from '@adonisjs/logger/factories'

import { errors, HttpContext } from '../../index.js'
import { HttpContextFactory } from '../../factories/http_context.js'
Expand Down
2 changes: 1 addition & 1 deletion tests/http_context/local_storage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

import { test } from '@japa/runner'
import { HttpContext } from '../../src/http_context/main.js'
import { asyncLocalStorage } from '../../src/http_context/local_storage.js'
import { HttpContextFactory } from '../../factories/http_context.js'
import { asyncLocalStorage } from '../../src/http_context/local_storage.js'

test.group('Http context | local storage', () => {
test('get http context inside a local storage scope', async ({ assert }) => {
Expand Down
6 changes: 3 additions & 3 deletions tests/redirect.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
import supertest from 'supertest'
import { test } from '@japa/runner'
import { createServer } from 'node:http'
import { AppFactory } from '@adonisjs/application/test_factories/app'
import { EncryptionFactory } from '@adonisjs/encryption/test_factories/encryption'
import { AppFactory } from '@adonisjs/application/factories'
import { EncryptionFactory } from '@adonisjs/encryption/factories'

import { RouterFactory } from '../factories/router.js'
import { ResponseFactory } from '../factories/response.js'

const BASE_URL = new URL('./app/', import.meta.url)

const app = new AppFactory().create(BASE_URL)
const app = new AppFactory().create(BASE_URL, () => {})
const encryption = new EncryptionFactory().create()
const router = new RouterFactory().merge({ app, encryption }).create()

Expand Down
2 changes: 1 addition & 1 deletion tests/request.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { createCertificate } from 'pem'
import { createServer } from 'node:http'
import Middleware from '@poppinss/middleware'
import { createServer as httpsServer } from 'node:https'
import { EncryptionFactory } from '@adonisjs/encryption/test_factories/encryption'
import { EncryptionFactory } from '@adonisjs/encryption/factories'

import { RequestFactory } from '../factories/request.js'
import { CookieSerializer } from '../src/cookies/serializer.js'
Expand Down
4 changes: 2 additions & 2 deletions tests/response.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import status from 'http-status-codes'
import { Readable } from 'node:stream'
import { fileURLToPath } from 'node:url'
import { createServer } from 'node:http'
import { AppFactory } from '@adonisjs/application/factories'
import { createWriteStream, createReadStream } from 'node:fs'
import { AppFactory } from '@adonisjs/application/test_factories/app'
import { EncryptionFactory } from '@adonisjs/encryption/test_factories/encryption'
import { EncryptionFactory } from '@adonisjs/encryption/factories'

import { Response } from '../src/response.js'
import { CookieParser } from '../src/cookies/parser.js'
Expand Down
8 changes: 4 additions & 4 deletions tests/router/brisk.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
*/

import { test } from '@japa/runner'
import { AppFactory } from '@adonisjs/application/test_factories/app'
import { AppFactory } from '@adonisjs/application/factories'
import { BriskRoute } from '../../src/router/brisk.js'

const BASE_URL = new URL('./app/', import.meta.url)

test.group('Brisk Route', () => {
test('define handler for the route', ({ assert }) => {
const app = new AppFactory().create(BASE_URL)
const app = new AppFactory().create(BASE_URL, () => {})

const brisk = new BriskRoute(app, [], {
pattern: '/',
Expand All @@ -36,7 +36,7 @@ test.group('Brisk Route', () => {
})

test('define handler after calling the redirect method', ({ assert }) => {
const app = new AppFactory().create(BASE_URL)
const app = new AppFactory().create(BASE_URL, () => {})

const brisk = new BriskRoute(app, [], {
pattern: '/',
Expand All @@ -47,7 +47,7 @@ test.group('Brisk Route', () => {
})

test('define handler after calling the redirectToPath method', ({ assert }) => {
const app = new AppFactory().create(BASE_URL)
const app = new AppFactory().create(BASE_URL, () => {})

const brisk = new BriskRoute(app, [], {
pattern: '/',
Expand Down
24 changes: 12 additions & 12 deletions tests/router/execute.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import { test } from '@japa/runner'
import { moduleImporter } from '@adonisjs/fold'
import type { NextFn } from '@poppinss/middleware/types'
import { AppFactory } from '@adonisjs/application/test_factories/app'
import { AppFactory } from '@adonisjs/application/factories'

import { Route } from '../../src/router/route.js'
import type { HttpContext } from '../../src/http_context/main.js'
Expand All @@ -24,7 +24,7 @@ test.group('Route | execute', () => {
assert.plan(2)

const stack: string[] = []
const app = new AppFactory().create(BASE_URL)
const app = new AppFactory().create(BASE_URL, () => {})
await app.init()

const context = new HttpContextFactory().create()
Expand All @@ -50,7 +50,7 @@ test.group('Route | execute', () => {
assert.plan(3)

const stack: string[] = []
const app = new AppFactory().create(BASE_URL)
const app = new AppFactory().create(BASE_URL, () => {})
await app.init()

const resolver = app.container.createResolver()
Expand Down Expand Up @@ -81,7 +81,7 @@ test.group('Route | execute', () => {

test('execute route controller specified as lazy import', async ({ assert }) => {
const stack: string[] = []
const app = new AppFactory().create(BASE_URL)
const app = new AppFactory().create(BASE_URL, () => {})
await app.init()

const resolver = app.container.createResolver()
Expand Down Expand Up @@ -128,7 +128,7 @@ test.group('Route | execute', () => {

test('execute route controller specified as a class constructor', async ({ assert }) => {
const stack: string[] = []
const app = new AppFactory().create(BASE_URL)
const app = new AppFactory().create(BASE_URL, () => {})
await app.init()

const resolver = app.container.createResolver()
Expand Down Expand Up @@ -171,7 +171,7 @@ test.group('Route | execute', () => {
assert.plan(4)

const stack: string[] = []
const app = new AppFactory().create(BASE_URL)
const app = new AppFactory().create(BASE_URL, () => {})
await app.init()

const context = new HttpContextFactory().create()
Expand Down Expand Up @@ -210,7 +210,7 @@ test.group('Route | execute', () => {
assert.plan(3)

const stack: string[] = []
const app = new AppFactory().create(BASE_URL)
const app = new AppFactory().create(BASE_URL, () => {})
await app.init()

const context = new HttpContextFactory().create()
Expand Down Expand Up @@ -246,7 +246,7 @@ test.group('Route | execute', () => {
assert.plan(6)

const stack: string[] = []
const app = new AppFactory().create(BASE_URL)
const app = new AppFactory().create(BASE_URL, () => {})
await app.init()

class BodyParserMiddleware {
Expand Down Expand Up @@ -313,7 +313,7 @@ test.group('Route | execute', () => {
assert.plan(3)

const stack: string[] = []
const app = new AppFactory().create(BASE_URL)
const app = new AppFactory().create(BASE_URL, () => {})
await app.init()

class BodyParserMiddleware {
Expand Down Expand Up @@ -375,7 +375,7 @@ test.group('Route | execute', () => {

test('catch global middleware exceptions', async ({ assert }) => {
const stack: string[] = []
const app = new AppFactory().create(BASE_URL)
const app = new AppFactory().create(BASE_URL, () => {})
await app.init()

class BodyParserMiddleware {
Expand Down Expand Up @@ -440,7 +440,7 @@ test.group('Route | execute', () => {

test('catch route handler exceptions', async ({ assert }) => {
const stack: string[] = []
const app = new AppFactory().create(BASE_URL)
const app = new AppFactory().create(BASE_URL, () => {})
await app.init()

class BodyParserMiddleware {
Expand Down Expand Up @@ -504,7 +504,7 @@ test.group('Route | execute', () => {

test('pass arguments to the named middleware', async ({ assert }) => {
const stack: any[] = []
const app = new AppFactory().create(BASE_URL)
const app = new AppFactory().create(BASE_URL, () => {})
await app.init()

class AclMiddleware {
Expand Down
Loading

0 comments on commit 0e430a8

Please sign in to comment.