Skip to content

Commit 0c5da48

Browse files
committed
chore: restructure benchmarks source files to work with bundled build
1 parent 4fcbf6c commit 0c5da48

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@
88
*/
99

1010
import { createServer } from 'node:http'
11+
import { Logger } from '@adonisjs/logger'
1112
import { Emitter } from '@adonisjs/events'
1213
import { Encryption } from '@adonisjs/encryption'
1314
import { Application } from '@adonisjs/application'
1415

15-
import { defineConfig } from '../index.js'
16-
import { Server } from '../src/server/main.js'
17-
import { Logger } from '@adonisjs/logger'
16+
import { defineConfig, Server } from '../build/index.js'
1817

1918
const app = new Application(new URL('./', import.meta.url), {
2019
environment: 'web',
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@
88
*/
99

1010
import { join } from 'node:path'
11-
import { fork } from 'node:child_process'
12-
// @ts-expect-error
1311
import autocannon from 'autocannon'
12+
import { fork } from 'node:child_process'
1413
import { getDirname } from '@poppinss/utils'
1514

1615
function coolOff() {
1716
return new Promise((resolve) => setTimeout(resolve, 5000))
1817
}
1918

20-
function autocannonRun(opts: any): Promise<void> {
19+
function autocannonRun(opts) {
2120
return new Promise((resolve) => {
2221
const instance = autocannon(opts, () => {
2322
resolve()

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"compile": "npm run lint && npm run clean && tsup-node",
2424
"build": "npm run compile",
2525
"prebenchmark": "npm run build",
26-
"benchmark": "node --experimental-import-meta-resolve build/benchmarks/index.js",
26+
"benchmark": "node benchmarks/index.js",
2727
"release": "np",
2828
"version": "npm run build",
2929
"format": "prettier --write .",

0 commit comments

Comments
 (0)