New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ace-de/eua-translations-sync

Package Overview
Dependencies
Maintainers
0
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ace-de/eua-translations-sync - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

4

package.json
{
"name": "@ace-de/eua-translations-sync",
"version": "2.1.1",
"version": "2.1.2",
"description": "EUA sync local translate with Google sheet",

@@ -29,3 +29,3 @@ "author": "Computer Rock",

},
"gitHead": "60dac06c67a2f17fc7895926cb336a64bdc131d2"
"gitHead": "f2a154bc29e53b389d20c247fe9fcf0f0715d86a"
}

@@ -67,3 +67,3 @@ # Translation sync package (@ace-de/eua-wa-lib/eua-translation-sync)

```
"postversion": "translations-sync",
"preversion": "translations-sync",
```

@@ -70,0 +70,0 @@

@@ -64,3 +64,3 @@ const fs = require('fs');

...newList[title],
[key]: parsedGitDifferences[key]?.added
[key]: parsedGitDifferences[key]?.added && parsedGitDifferences[key]?.[title]
? result[title]

@@ -67,0 +67,0 @@ : row[title] || '',

@@ -36,2 +36,32 @@ const {

if (!!replaceModified) {
let data = [];
localObj.forEach((row) => {
sheetObj.forEach((sheetRow, index) => {
if (sheetRow[translationKey] === row[translationKey]
&& (row[firstTranslateKey] !== sheetRow[firstTranslateKey]
|| row[secondTranslateKey] !== sheetRow[secondTranslateKey])) {
sheetRow[firstTranslateKey] = row[firstTranslateKey];
sheetRow[secondTranslateKey] = row[secondTranslateKey];
data.push(
{
'range': `${SHEET_NAME}!B${index + 1}:C${index + 1}`, //-1 header wasn't count
'majorDimension': 'ROWS',
'values': [
[sheetRow[secondTranslateKey], sheetRow[firstTranslateKey]],
],
},
);
}
});
},
);
if (data.length > 0) {
console.log(data);
await updateSpreadSheetRow(auth, SPREADSHEET_ID, data);
} else {
console.log('There aren\'t token values for updates in GSheet');
}
}
if (!!cleanupTokens) {

@@ -64,31 +94,3 @@ const missingTokens = [];

if (!!replaceModified) {
let data = [];
localObj.forEach((row) => {
sheetObj.forEach((sheetRow, index) => {
if (sheetRow[translationKey] === row[translationKey]
&& (!!sheetRow[firstTranslateKey] && row[firstTranslateKey] !== sheetRow[firstTranslateKey]
|| !!sheetRow[secondTranslateKey] && row[secondTranslateKey] !== sheetRow[secondTranslateKey])) {
sheetRow[firstTranslateKey] = row[firstTranslateKey];
sheetRow[secondTranslateKey] = row[secondTranslateKey];
data.push(
{
'range': `${SHEET_NAME}!B${index + 1}:C${index + 1}`, //-1 header wasn't count
'majorDimension': 'ROWS',
'values': [
[sheetRow[secondTranslateKey], sheetRow[firstTranslateKey]],
],
},
);
}
});
},
);
if (data.length > 0) {
console.log(data);
await updateSpreadSheetRow(auth, SPREADSHEET_ID, data);
} else {
console.log('There aren\'t token values for updates in GSheet');
}
} else {
if (!cleanupTokens && !replaceModified) {
//# difference between google-spreadsheet rows and newly created array

@@ -95,0 +97,0 @@ const difference = localObj.filter(

@@ -53,6 +53,4 @@ const spawn = require('@computerrock/react-dev-utils/crossSpawn');

const previousTag = previousTagResult.stdout.toString().trim();
const gitDifferenceResult = spawn.sync('git', ['diff', `${latestTag}..HEAD`, '--', process.env.LOCALE_TRANSLATIONS_PATH]);
const gitDifferenceResult = spawn.sync('git', ['diff', `${previousTag}..${latestTag}`, '--', process.env.LOCALE_TRANSLATIONS_PATH])
if (gitDifferenceResult.error) {

@@ -59,0 +57,0 @@ throw new Error(`Git diff failed: ${gitDifferenceResult.error.message}`);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc