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.3 to 2.1.4

4

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

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

},
"gitHead": "8415d887eb50e0579be177cc7a7093792d7d7595"
"gitHead": "d79841d8ea0772e5add3bc199612bc77ad4f02aa"
}

@@ -39,3 +39,3 @@ const spawn = require('@computerrock/react-dev-utils/crossSpawn');

function getGitDifferences() {
function getGitDifferences(nextVersion, isPreviousAlphaVersion) {
const latestTagResult = spawn.sync('git', ['describe', '--tags', '--abbrev=0']);

@@ -45,4 +45,7 @@ if (latestTagResult.error) throw new Error('Failed to get the latest git version tag.');

const latestTag = latestTagResult.stdout.toString().trim();
const comparisonTag = isPreviousAlphaVersion && !nextVersion.includes('alpha')
? latestTag.replace(/.$/, '0')
: latestTag
const gitDifferenceResult = spawn.sync('git', ['diff', `${latestTag}..HEAD`, '--', process.env.LOCALE_TRANSLATIONS_PATH]);
const gitDifferenceResult = spawn.sync('git', ['diff', `${comparisonTag}..HEAD`, '--', process.env.LOCALE_TRANSLATIONS_PATH]);

@@ -49,0 +52,0 @@ if (gitDifferenceResult.error) {

@@ -17,3 +17,5 @@ 'use strict';

const appVersion = getAppVersion();
if (!appVersion) {
const nextVersion = process.env.npm_new_version;
if (!appVersion || !nextVersion) {
console.log('No defined app version. Skipping translation sync.');

@@ -30,10 +32,11 @@ return;

const environments = appVersion.includes('alpha') ? ['DEV', 'INT'] : ['PP'];
const environments = nextVersion.includes('alpha') ? ['DEV', 'INT'] : ['PP'];
let parsedGitDifferences = {};
// Get git differences
try {
parsedGitDifferences = getGitDifferences();
parsedGitDifferences = getGitDifferences(nextVersion, appVersion.includes('alpha'));
} catch (err) {
console.error(err)
}
process.env.PARSED_GIT_DIFFERENCES = JSON.stringify(parsedGitDifferences);

@@ -43,3 +46,3 @@ process.env.npm_config_get_new_tokens = 'true';

environments.forEach(environment => {
console.log(`Starting translation sync for app version: ${appVersion}. Environment: ${environment}`);
console.log(`Starting translation sync for app version: ${nextVersion}. Environment: ${environment}`);

@@ -77,5 +80,5 @@ const sheet = sheets.find(sheet => sheet.name === environment);

})
commitAndPushChanges(`[sync translations] App version: ${appVersion}`);
commitAndPushChanges(`[sync translations] App version: ${nextVersion}`);
}
module.exports = {syncTranslations};
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