Skip to content

Commit 8c81e8c

Browse files
committed
chore: wip
1 parent a1e7116 commit 8c81e8c

File tree

11 files changed

+24
-39
lines changed

11 files changed

+24
-39
lines changed

bun.lock

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,15 +1006,16 @@
10061006
"@stacksjs/development": "workspace:*",
10071007
"@stacksjs/path": "workspace:*",
10081008
"@stacksjs/validation": "workspace:*",
1009-
"fs-extra": "^11.3.1",
1010-
"std-env": "^3.9.0",
1009+
},
1010+
"peerDependencies": {
1011+
"bun-types": "*",
10111012
},
10121013
},
10131014
"storage/framework/core/error-handling": {
10141015
"name": "@stacksjs/error-handling",
10151016
"version": "0.70.23",
10161017
"dependencies": {
1017-
"fs-extra": "^11.3.2",
1018+
"ts-error-handling": "^0.1.0",
10181019
},
10191020
"devDependencies": {
10201021
"@stacksjs/cli": "workspace:*",
@@ -1023,7 +1024,6 @@
10231024
"@stacksjs/path": "workspace:*",
10241025
"@stacksjs/types": "workspace:*",
10251026
"@stacksjs/validation": "workspace:*",
1026-
"neverthrow": "^8.2.0",
10271027
},
10281028
},
10291029
"storage/framework/core/events": {
@@ -1352,7 +1352,6 @@
13521352
"@stacksjs/types": "workspace:*",
13531353
"@types/archiver": "^6.0.3",
13541354
"archiver": "^7.0.1",
1355-
"fs-extra": "^11.3.1",
13561355
"tinyglobby": "^0.2.15",
13571356
},
13581357
},
@@ -1406,7 +1405,6 @@
14061405
"@types/aws4": "^1.11.6",
14071406
"@types/bun": "^1.2.21",
14081407
"@types/crypto-js": "^4.2.2",
1409-
"@types/fs-extra": "^11.0.4",
14101408
"@types/markdown-it-link-attributes": "^3.0.5",
14111409
"@types/minimatch": "^6.0.0",
14121410
"@types/nprogress": "^0.2.3",
@@ -1415,7 +1413,6 @@
14151413
"cac": "^6.7.14",
14161414
"markdown-it": "^14.1.0",
14171415
"meilisearch": "^0.52.0",
1418-
"neverthrow": "^8.2.0",
14191416
"ora": "^8.2.0",
14201417
"typescript": "^5.9.2",
14211418
"unocss": "66.4.2",
@@ -3071,8 +3068,6 @@
30713068

30723069
"@types/estree": ["@types/[email protected]", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="],
30733070

3074-
"@types/fs-extra": ["@types/[email protected]", "", { "dependencies": { "@types/jsonfile": "*", "@types/node": "*" } }, "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ=="],
3075-
30763071
"@types/geojson": ["@types/[email protected]", "", {}, "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg=="],
30773072

30783073
"@types/hast": ["@types/[email protected]", "", { "dependencies": { "@types/unist": "*" } }, "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ=="],
@@ -3083,8 +3078,6 @@
30833078

30843079
"@types/json-schema": ["@types/[email protected]", "", {}, "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="],
30853080

3086-
"@types/jsonfile": ["@types/[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ=="],
3087-
30883081
"@types/katex": ["@types/[email protected]", "", {}, "sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ=="],
30893082

30903083
"@types/keyv": ["@types/[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg=="],
@@ -4827,8 +4820,6 @@
48274820

48284821
"negotiator": ["[email protected]", "", {}, "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg=="],
48294822

4830-
"neverthrow": ["[email protected]", "", { "optionalDependencies": { "@rollup/rollup-linux-x64-gnu": "^4.24.0" } }, "sha512-kOCT/1MCPAxY5iUV3wytNFUMUolzuwd/VF/1KCx7kf6CutrOsTie+84zTGTpgQycjvfLdBBdvBvFLqFD2c0wkQ=="],
4831-
48324823
"nise": ["[email protected]", "", { "dependencies": { "@sinonjs/commons": "^3.0.1", "@sinonjs/fake-timers": "^13.0.1", "@sinonjs/text-encoding": "^0.7.3", "just-extend": "^6.2.0", "path-to-regexp": "^8.1.0" } }, "sha512-aMSAzLVY7LyeM60gvBS423nBmIPP+Wy7St7hsb+8/fc1HmeoHJfLO8CKse4u3BtOZvQLJghYPI2i/1WZrEj5/g=="],
48334824

48344825
"no-case": ["[email protected]", "", { "dependencies": { "lower-case": "^2.0.2", "tslib": "^2.0.3" } }, "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg=="],

storage/framework/core/env/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@
3737
"devDependencies": {
3838
"@stacksjs/development": "workspace:*",
3939
"@stacksjs/path": "workspace:*",
40-
"@stacksjs/validation": "workspace:*",
41-
"fs-extra": "^11.3.1"
40+
"@stacksjs/validation": "workspace:*"
4241
},
4342
"peerDependencies": {
4443
"bun-types": "*"

storage/framework/core/env/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Env } from './types'
33
import p from 'node:process'
44
import { projectPath } from '@stacksjs/path'
55
import { ValidationBoolean, ValidationEnum, ValidationNumber } from '@stacksjs/validation'
6-
import fs from 'fs-extra'
6+
import fs from 'node:fs'
77

88
const handler = {
99
get: (target: Env, key: EnvKey) => {

storage/framework/core/error-handling/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,14 @@
3535
"prepublishOnly": "bun run build"
3636
},
3737
"dependencies": {
38-
"fs-extra": "^11.3.2"
38+
"ts-error-handling": "^0.1.0"
3939
},
4040
"devDependencies": {
4141
"@stacksjs/cli": "workspace:*",
4242
"@stacksjs/config": "workspace:*",
4343
"@stacksjs/development": "workspace:*",
4444
"@stacksjs/path": "workspace:*",
4545
"@stacksjs/types": "workspace:*",
46-
"@stacksjs/validation": "workspace:*",
47-
"neverthrow": "^8.2.0"
46+
"@stacksjs/validation": "workspace:*"
4847
}
4948
}

storage/framework/core/error-handling/src/handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import type { LogErrorOptions } from '@stacksjs/logging'
22
import { appendFile, mkdir } from 'node:fs/promises'
3+
import fs from 'node:fs'
34
import { dirname } from 'node:path'
45
import * as process from 'node:process'
56
import { italic, stripAnsi } from '@stacksjs/cli'
67
import * as path from '@stacksjs/path'
78
import { ExitCode } from '@stacksjs/types'
8-
import fs from 'fs-extra'
99

1010
type ErrorMessage = string
1111

storage/framework/core/error-handling/src/index.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ export * from './handler'
22
export * from './http'
33
export * from './model'
44
export * from './utils'
5-
export {
6-
err,
5+
6+
export type {
77
Err,
8-
errAsync,
9-
fromPromise,
10-
fromSafePromise,
11-
fromThrowable,
12-
ok,
138
Ok,
14-
okAsync,
159
Result,
1610
ResultAsync,
17-
} from 'neverthrow'
11+
} from 'ts-error-handling'
12+
13+
export {
14+
err,
15+
fromPromise,
16+
ok,
17+
} from 'ts-error-handling'

storage/framework/core/error-handling/tests/error-handling.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { afterAll, beforeAll, describe, expect, it, mock, spyOn } from 'bun:test'
22
import { italic } from '@stacksjs/cli'
3-
import fs from 'fs-extra'
3+
import fs from 'ndoe:fs'
44
import { ErrorHandler, handleError } from '../src/handler'
55
import { rescue } from '../src/utils'
66

storage/framework/core/storage/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import {
3131
deleteFolder,
3232
doesFolderExist,
3333
fileURLToPath,
34-
fs, // fs-extra Node module
3534
hasComponents,
3635
hasFiles,
3736
hasFunctions,

storage/framework/core/storage/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
"@stacksjs/types": "workspace:*",
6363
"@types/archiver": "^6.0.3",
6464
"archiver": "^7.0.1",
65-
"fs-extra": "^11.3.1",
6665
"tinyglobby": "^0.2.15"
6766
}
6867
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import * as fs from 'fs-extra'
2-
import { pathExists as existsSync, watch as fsWatch, mkdirSync, readFileSync, watchFile, writeFileSync } from 'fs-extra'
1+
import * as fs from 'node:fs'
2+
import { existsSync, watch as fsWatch, mkdirSync, readFileSync, watchFile, writeFileSync } from 'node:fs'
33

4-
export async function exists(path: string): Promise<boolean> {
5-
return await existsSync(path)
4+
export function exists(path: string): boolean {
5+
return existsSync(path)
66
}
77

8-
export { existsSync, fs, fsWatch, mkdirSync, readFileSync, watchFile, writeFileSync }
8+
export { fsWatch, mkdirSync, readFileSync, watchFile, writeFileSync, fs }

0 commit comments

Comments
 (0)