Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lingui/babel-plugin-extract-messages

Package Overview
Dependencies
Maintainers
1
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lingui/babel-plugin-extract-messages - npm Package Compare versions

Comparing version 2.1.2 to 2.2.0-9

21

index.js

@@ -204,2 +204,6 @@ "use strict";

var _fsPath$basename$spli = _path2.default.basename(filename).split(".", 2),
_fsPath$basename$spli2 = (0, _slicedToArray3.default)(_fsPath$basename$spli, 1),
basename = _fsPath$basename$spli2[0];
var baseDir = _path2.default.dirname(_path2.default.relative(optsBaseDir, filename));

@@ -210,6 +214,14 @@ var targetDir = _path2.default.join(localeDir, "_build", baseDir);

var catalog = {};
var catalogFilename = _path2.default.join(targetDir, basename + ".json");
// no messages, skip file
if (!messages.size) return;
if (!messages.size) {
// clean any existing catalog
if (_fs2.default.existsSync(catalogFilename)) {
_fs2.default.writeFileSync(catalogFilename, (0, _stringify2.default)({}));
}
return;
}
messages.forEach(function (value, key) {

@@ -220,8 +232,3 @@ catalog[key] = value;

_mkdirp2.default.sync(targetDir);
var _fsPath$basename$spli = _path2.default.basename(filename).split(".", 2),
_fsPath$basename$spli2 = (0, _slicedToArray3.default)(_fsPath$basename$spli, 1),
basename = _fsPath$basename$spli2[0];
_fs2.default.writeFileSync(_path2.default.join(targetDir, basename + ".json"), (0, _stringify2.default)(catalog, null, 2));
_fs2.default.writeFileSync(catalogFilename, (0, _stringify2.default)(catalog, null, 2));
}

@@ -228,0 +235,0 @@ };

{
"name": "@lingui/babel-plugin-extract-messages",
"version": "2.1.2",
"version": "2.2.0-9",
"description": "Extract messages for translation",

@@ -31,9 +31,9 @@ "main": "index.js",

"dependencies": {
"@lingui/conf": "2.1.2",
"@lingui/conf": "2.2.0-9",
"babel-generator": "^6.26.1"
},
"devDependencies": {
"@lingui/babel-plugin-transform-js": "2.1.2",
"@lingui/babel-plugin-transform-react": "2.1.2"
"@lingui/babel-plugin-transform-js": "2.2.0-9",
"@lingui/babel-plugin-transform-react": "2.2.0-9"
}
}
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