Skip to content

Commit 94f6aeb

Browse files
committed
chore: wip
1 parent 710001d commit 94f6aeb

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.stacks/core/storage/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@
4444
},
4545
"peerDependencies": {
4646
"@stacksjs/arrays": "workspace:*",
47+
"@stacksjs/path": "workspace:*",
4748
"@stacksjs/types": "workspace:*",
4849
"@stacksjs/utils": "workspace:*",
4950
"fs-extra": "^11.1.1",
5051
"unstorage": "^1.4.1"
5152
},
5253
"devDependencies": {
53-
"@stacksjs/development": "workspace:*",
54-
"@stacksjs/path": "workspace:*"
54+
"@stacksjs/development": "workspace:*"
5555
}
5656
}

.stacks/core/storage/src/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,20 +181,21 @@ export function createFolder(dir: string): Promise<void> {
181181
})
182182
}
183183

184-
export function updateConfigFile(filePath: string, newConfig: Array<string>): Promise<void> {
184+
export function updateConfigFile(filePath: string, newConfig: Record<string, unknown>): Promise<void> {
185185
return new Promise((resolve, reject) => {
186-
let config = JSON.parse(fs.readFileSync(filePath, 'utf8'));
186+
const config = JSON.parse(fs.readFileSync(filePath, 'utf8')) as Record<string, unknown>;
187187

188188
for (const key in newConfig) {
189189
config[key] = newConfig[key];
190190
}
191191

192192
fs.writeFileSync(filePath, JSON.stringify(config, null, 2));
193193

194-
return config
194+
resolve();
195195
})
196196
}
197197

198+
198199
export const filesystem = {
199200
_dirname,
200201
readJsonFile,

0 commit comments

Comments
 (0)