Skip to content

Commit 1e98c9b

Browse files
committed
refactor: small code cleanup
1 parent 31f3674 commit 1e98c9b

File tree

9 files changed

+16
-25
lines changed

9 files changed

+16
-25
lines changed

bin/japa_types.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

bin/test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { configure, processCLIArgs, run } from '@japa/runner'
21
import { assert } from '@japa/assert'
32
import { spec, dot } from '@japa/runner/reporters'
3+
import { configure, processCLIArgs, run } from '@japa/runner'
44

55
/*
66
|--------------------------------------------------------------------------
@@ -24,6 +24,7 @@ configure({
2424
list: [spec(), dot()],
2525
},
2626
})
27+
2728
/*
2829
|--------------------------------------------------------------------------
2930
| Run tests

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
"files": [
1111
"build",
1212
"!build/bin",
13-
"!build/tests",
14-
"!build/tests_helpers"
13+
"!build/tests"
1514
],
1615
"exports": {
17-
".": "./build/index.js"
16+
".": "./build/index.js",
17+
"./types": "./build/src/types.js"
1818
},
1919
"scripts": {
2020
"pretest": "npm run lint",
@@ -57,10 +57,8 @@
5757
},
5858
"peerDependencies": {
5959
"@japa/assert": "^2.0.0 || ^3.0.0 || ^4.0.0",
60-
"@japa/runner": "^3.0.0"
60+
"@japa/runner": "^3.0.0 || ^4.0.0"
6161
},
62-
"author": "virk,japa",
63-
"license": "MIT",
6462
"homepage": "https://github.com/japa/file-system#readme",
6563
"repository": {
6664
"type": "git",
@@ -74,13 +72,16 @@
7472
"test",
7573
"file-system"
7674
],
75+
"author": "Harminder Virk <[email protected]>",
76+
"license": "MIT",
7777
"publishConfig": {
7878
"access": "public",
7979
"provenance": true
8080
},
8181
"tsup": {
8282
"entry": [
83-
"./index.ts"
83+
"./index.ts",
84+
"./src/types.ts"
8485
],
8586
"outDir": "./build",
8687
"clean": true,

src/file_system.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import Macroable from '@poppinss/macroable'
1313
import { readdirpPromise, type EntryInfo } from 'readdirp'
1414
import { access, mkdir, readFile, rm, stat, writeFile } from 'node:fs/promises'
1515
import {
16-
type StatOptions,
17-
type WriteFileOptions,
1816
constants,
1917
RmOptions,
18+
type StatOptions,
19+
type WriteFileOptions,
2020
MakeDirectoryOptions,
2121
} from 'node:fs'
2222

src/types.ts

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

1010
import { WriteFileOptions } from 'node:fs'
11-
1211
export type { EntryInfo } from 'readdirp'
12+
1313
export type JSONFileOptions = WriteFileOptions & {
1414
spaces?: number | string
1515
replacer?: (this: any, key: string, value: any) => any

tests/assert_dir.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import { Assert } from '@japa/assert'
1313
import { rm, mkdir } from 'node:fs/promises'
1414

1515
import '../src/assert.js'
16+
import { BASE_PATH } from './helpers.js'
1617
import { FileSystem } from '../src/file_system.js'
17-
import { BASE_PATH } from '../tests_helpers/index.js'
1818

1919
test.group('Assert | dirExists', (group) => {
2020
group.each.setup(() => {

tests/assert_file.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import { Assert } from '@japa/assert'
1212
import { rm } from 'node:fs/promises'
1313

1414
import '../src/assert.js'
15+
import { BASE_PATH } from './helpers.js'
1516
import { FileSystem } from '../src/file_system.js'
16-
import { BASE_PATH } from '../tests_helpers/index.js'
1717

1818
test.group('Assert | fileExists', (group) => {
1919
group.each.setup(() => {

tests/fs.spec.ts

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

1010
import { test } from '@japa/runner'
1111
import { rm } from 'node:fs/promises'
12+
import { BASE_PATH } from './helpers.js'
1213
import { FileSystem } from '../src/file_system.js'
13-
import { BASE_PATH } from '../tests_helpers/index.js'
1414

1515
test.group('File system', (group) => {
1616
group.each.setup(() => {
File renamed without changes.

0 commit comments

Comments
 (0)