From f5f7f4f2d4b19f44720d25f4c56cb04a95d700fb Mon Sep 17 00:00:00 2001 From: harshithad0703 <104908717+harshithad0703@users.noreply.github.com> Date: Tue, 27 May 2025 11:53:40 +0530 Subject: [PATCH 1/4] Update .talismanrc --- .talismanrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.talismanrc b/.talismanrc index eb89e39..6ebb3c8 100644 --- a/.talismanrc +++ b/.talismanrc @@ -6,4 +6,6 @@ fileignoreconfig: checksum: ae766694424841b8ca67c0dc072a4bc9a8451f41d43166697b6757d0f8173553 - filename: .husky/pre-commit checksum: 1b9367d219802de2e3a8af9c5c698e0c255c00af89339d73bdbb8acf5275079f -version: "" \ No newline at end of file +- filename: src/util/index.ts + checksum: 8c4600145acb0319051df4237b7e753af93465419d14d5fe97c211050f6da405 +version: "" From aee7af835de4232763ab471c2b3c083a12890246 Mon Sep 17 00:00:00 2001 From: "harshitha.d" Date: Thu, 12 Jun 2025 10:32:01 +0530 Subject: [PATCH 2/4] Refactor: Update mkdirp import to use named import for consistency --- src/fs.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fs.ts b/src/fs.ts index 584fbee..4d4f4d6 100644 --- a/src/fs.ts +++ b/src/fs.ts @@ -7,7 +7,7 @@ import { debug as Debug } from 'debug' import { existsSync, unlinkSync } from 'fs' import { cloneDeep, compact } from 'lodash' -import mkdirp from 'mkdirp' +import { sync as mkdirpSync } from 'mkdirp' import { join, sep } from 'path' import { readFile, writeFile } from './util/fs' import { getFileFieldPaths } from './util/get-file-fields' @@ -167,7 +167,7 @@ export class FilesystemStore { contentTypePathKeys.splice(contentTypePathKeys.length - 1) const contentTypeFolderPath = join.apply(contentTypePathKeys) - mkdirp.sync(contentTypeFolderPath) + mkdirpSync(contentTypeFolderPath) await writeFile(contentTypePath, JSON.stringify([schema])) } @@ -218,7 +218,7 @@ export class FilesystemStore { } } else { // create folder, if it does not exist! - mkdirp.sync(assetFolderPath) + mkdirpSync(assetFolderPath) await writeFile(assetPath, JSON.stringify([data])) } @@ -501,7 +501,7 @@ export class FilesystemStore { } } else { // entry folder does not exist! - mkdirp.sync(entryFolderPath) + mkdirpSync(entryFolderPath) await writeFile(entryPath, JSON.stringify([entry])) } From 7f6ce0625c3157630d2357cb7b2fd1df789e096c Mon Sep 17 00:00:00 2001 From: "harshitha.d" Date: Thu, 12 Jun 2025 10:32:19 +0530 Subject: [PATCH 3/4] Version bump: Update package version to 2.1.4 in package.json and package-lock.json --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8f819b0..bc9883e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@contentstack/datasync-content-store-filesystem", - "version": "2.1.3", + "version": "2.1.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@contentstack/datasync-content-store-filesystem", - "version": "2.1.3", + "version": "2.1.4", "license": "MIT", "dependencies": { "debug": "^4.4.1", diff --git a/package.json b/package.json index 831099f..0af134d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@contentstack/datasync-content-store-filesystem", - "version": "2.1.3", + "version": "2.1.4", "description": "Datasync content store library - saves data in filesystem", "main": "./dist", "types": "./typings", From 2a5cc3382273da85572d2ef43a4d5308c77624d2 Mon Sep 17 00:00:00 2001 From: "harshitha.d" Date: Thu, 12 Jun 2025 11:57:30 +0530 Subject: [PATCH 4/4] Refactor: Replace mkdirpSync with mkdirSync --- src/fs.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/fs.ts b/src/fs.ts index 4d4f4d6..1feed12 100644 --- a/src/fs.ts +++ b/src/fs.ts @@ -5,9 +5,8 @@ */ import { debug as Debug } from 'debug' -import { existsSync, unlinkSync } from 'fs' +import { existsSync, unlinkSync, mkdirSync } from 'fs' import { cloneDeep, compact } from 'lodash' -import { sync as mkdirpSync } from 'mkdirp' import { join, sep } from 'path' import { readFile, writeFile } from './util/fs' import { getFileFieldPaths } from './util/get-file-fields' @@ -167,7 +166,7 @@ export class FilesystemStore { contentTypePathKeys.splice(contentTypePathKeys.length - 1) const contentTypeFolderPath = join.apply(contentTypePathKeys) - mkdirpSync(contentTypeFolderPath) + mkdirSync(contentTypeFolderPath) await writeFile(contentTypePath, JSON.stringify([schema])) } @@ -218,7 +217,7 @@ export class FilesystemStore { } } else { // create folder, if it does not exist! - mkdirpSync(assetFolderPath) + mkdirSync(assetFolderPath) await writeFile(assetPath, JSON.stringify([data])) } @@ -501,7 +500,7 @@ export class FilesystemStore { } } else { // entry folder does not exist! - mkdirpSync(entryFolderPath) + mkdirSync(entryFolderPath) await writeFile(entryPath, JSON.stringify([entry])) }