Skip to content

Fix/dx 3187 sync locale data #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/datasync-manager",
"author": "Contentstack LLC <support@contentstack.com>",
"version": "2.0.10",
"version": "2.0.11",
"description": "The primary module of Contentstack DataSync. Syncs Contentstack data with your server using Contentstack Sync API",
"main": "dist/index.js",
"dependencies": {
Expand Down
10 changes: 6 additions & 4 deletions src/util/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ export const formatItems = (items, config) => {
items[i]._type = config.contentstack.actions.publish
// extra keys
items[i]._synced_at = time
items[i].locale = items[i].data.publish_details.locale
items[i] = merge(items[i], items[i].data)
const assetLocale = items[i].data.publish_details.locale
items[i] = merge(cloneDeep(items[i]), items[i].data)
items[i].locale = assetLocale
break
case 'asset_unpublished':
delete items[i].type
Expand All @@ -170,8 +171,9 @@ export const formatItems = (items, config) => {
items[i]._content_type_uid = items[i].content_type_uid
// extra keys
items[i]._synced_at = time
items[i].locale = items[i].data.publish_details.locale
items[i] = merge(items[i], items[i].data)
const entryLocale = items[i].data.publish_details.locale
items[i] = merge(cloneDeep(items[i]), items[i].data)
items[i].locale = entryLocale
break
case 'entry_unpublished':
delete items[i].type
Expand Down
Loading