Skip to content

Commit

Permalink
refactor: internal cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Nov 23, 2023
1 parent 2c4f1f8 commit e21e19e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"main": "build/index.js",
"type": "module",
"files": [
"build"
"build",
"!build/bin",
"!build/tests",
"!build/tests_helpers"
],
"engines": {
"node": ">=18.16.0"
Expand All @@ -21,8 +24,8 @@
"test": "cross-env NODE_DEBUG=adonisjs:bodyparser c8 npm run quick:test",
"clean": "del-cli build",
"typecheck": "tsc --noEmit",
"compile": "npm run lint && npm run clean && tsup-node && npm run build:types",
"build:types": "tsc --emitDeclarationOnly --declaration",
"precompile": "npm run lint && npm run clean",
"compile": "tsup-node && tsc --emitDeclarationOnly --declaration",
"build": "npm run compile",
"release": "np",
"version": "npm run build",
Expand Down Expand Up @@ -143,6 +146,7 @@
"clean": true,
"format": "esm",
"dts": false,
"sourcemap": true,
"target": "esnext"
}
}
2 changes: 1 addition & 1 deletion tests/body_parser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
import { Multipart } from '../src/multipart/main.js'
import { MultipartFile } from '../src/multipart/file.js'
import { BodyParserMiddlewareFactory } from '../factories/middleware_factory.js'
import { packageFilePath, packageFileSize, unicornFilePath } from '../test_helpers/main.js'
import { packageFilePath, packageFileSize, unicornFilePath } from '../tests_helpers/main.js'

test.group('BodyParser Middleware', () => {
test('do not parse get requests', async ({ assert }) => {
Expand Down
8 changes: 4 additions & 4 deletions tests/multipart.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import supertest from 'supertest'
import { test } from '@japa/runner'
import { createServer } from 'node:http'
import { fileURLToPath } from 'node:url'
import { createWriteStream } from 'node:fs'
import string from '@poppinss/utils/string'
import { ensureDir, pathExists } from 'fs-extra'
import fileGenerator from '@poppinss/file-generator'
import {
RequestFactory,
Expand All @@ -29,10 +32,7 @@ import {
packageFileSize,
unicornFilePath,
unicornNoExtFilePath,
} from '../test_helpers/main.js'
import string from '@poppinss/utils/string'
import { ensureDir, pathExists } from 'fs-extra'
import { createWriteStream } from 'node:fs'
} from '../tests_helpers/main.js'

const BASE_URL = new URL('./tmp/', import.meta.url)
const BASE_PATH = fileURLToPath(BASE_URL)
Expand Down
2 changes: 1 addition & 1 deletion tests/stream_file.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { join } from 'node:path'
import { test } from '@japa/runner'
import { fileURLToPath } from 'node:url'

import { retry } from '../test_helpers/main.js'
import { retry } from '../tests_helpers/main.js'
import { streamFile } from '../src/multipart/stream_file.js'

const BASE_URL = new URL('./tmp/', import.meta.url)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
"rootDir": "./",
"outDir": "./build"
}
}
}

0 comments on commit e21e19e

Please sign in to comment.