Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
2fa68c23a9 | |||
4083a36d8c | |||
3988ccbcb3 | |||
6eadbc654f | |||
fda1543701 |
13
changelog.md
13
changelog.md
@@ -1,5 +1,18 @@
|
||||
# Changelog
|
||||
|
||||
## 2025-05-24 - 11.2.4 - fix(config)
|
||||
Add local permissions configuration for pnpm test commands in .claude/settings.local.json
|
||||
|
||||
- Introduced .claude/settings.local.json to allow Bash(pnpm test:*) permissions
|
||||
- Ensured local testing commands have proper execution rights
|
||||
|
||||
## 2025-05-21 - 11.2.2 - fix(tests/settings)
|
||||
Improve test assertions and update local settings permissions
|
||||
|
||||
- Refactor StreamFile tests to assert content string type using toBeTypeofString
|
||||
- Update file existence tests to use resolves.toBeTrue and resolves.toBeFalse for cleaner promise handling
|
||||
- Add .claude/settings.local.json to allow specific Bash permissions for pnpm test commands
|
||||
|
||||
## 2025-05-21 - 11.2.1 - fix(fs)
|
||||
Fix inconsistent glob matching in listFileTree and update test imports and dependency versions for enhanced stability.
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@push.rocks/smartfile",
|
||||
"private": false,
|
||||
"version": "11.2.1",
|
||||
"version": "11.2.4",
|
||||
"description": "Provides comprehensive tools for efficient file management in Node.js using TypeScript, including handling streams, virtual directories, and various file operations.",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
|
@@ -57,7 +57,7 @@ tap.test('StreamFile should return content as a buffer', async () => {
|
||||
tap.test('StreamFile should return content as a string', async () => {
|
||||
const streamFile = await smartfile.StreamFile.fromPath(path.join(testAssetsPath, 'mytest.json'));
|
||||
const contentString = await streamFile.getContentAsString();
|
||||
expect(typeof contentString).toBeTypeofString();
|
||||
expect(contentString).toBeTypeofString();
|
||||
// Verify the content matches what's expected
|
||||
// This assumes the file contains a JSON object with a key 'key1' with value 'this works'
|
||||
expect(JSON.parse(contentString).key1).toEqual('this works');
|
||||
|
@@ -15,13 +15,8 @@ tap.test('.fs.fileExistsSync -> should return an accurate boolean', async () =>
|
||||
});
|
||||
|
||||
tap.test('.fs.fileExists -> should resolve or reject a promise', async () => {
|
||||
expect(smartfile.fs.fileExists('./test/testassets/mytest.json')).toBeInstanceOf(Promise);
|
||||
await smartfile.fs.fileExists('./test/testassets/mytest.json');
|
||||
await smartfile.fs.fileExists('./test/testassets/notthere.json').catch((err) => {
|
||||
return expect(err.message).toEqual(
|
||||
"ENOENT: no such file or directory, access './test/testassets/notthere.json'"
|
||||
);
|
||||
});
|
||||
await expect(smartfile.fs.fileExists('./test/testassets/mytest.json')).resolves.toBeTrue();
|
||||
await expect(smartfile.fs.fileExists('./test/testassets/notthere.json')).resolves.toBeFalse();
|
||||
});
|
||||
|
||||
tap.test('.fs.listFoldersSync() -> should get the file type from a string', async () => {
|
||||
|
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartfile',
|
||||
version: '11.2.1',
|
||||
version: '11.2.4',
|
||||
description: 'Provides comprehensive tools for efficient file management in Node.js using TypeScript, including handling streams, virtual directories, and various file operations.'
|
||||
}
|
||||
|
Reference in New Issue
Block a user