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

react-intl-po

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-intl-po - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

2

lib/potFormater.js

@@ -73,3 +73,3 @@ 'use strict';

.sort().map(function (id) {
return potCommentsFormater(messageObject[id]) + 'msgid "' + id + '"\nmsgstr ""\n';
return potCommentsFormater(messageObject[id]) + 'msgid ' + JSON.stringify(id) + '\nmsgstr ""\n';
}).join('\n');

@@ -76,0 +76,0 @@ };

{
"name": "react-intl-po",
"version": "2.0.1",
"version": "2.0.2",
"description": "Extract POT from react-intl and convert back to json.",

@@ -52,3 +52,3 @@ "author": "Michael Hsu",

"eslint": "^3.13.0",
"jest": "^18.1.0",
"jest": "^19.0.2",
"lint-config-m": "^3.1.0",

@@ -68,5 +68,9 @@ "stylelint": "^7.7.1"

"jest": {
"testEnvironment": "node",
"testRegex": "(/test/.*|\\.(test))\\.js$",
"moduleFileExtensions": [
"js"
],
"snapshotSerializers": [
"./config/stringSerializer.js"
]

@@ -73,0 +77,0 @@ },

@@ -61,5 +61,5 @@ /**

.sort()
.map(id => `${potCommentsFormater(messageObject[id])}msgid "${id}"\nmsgstr ""\n`)
.map(id => `${potCommentsFormater(messageObject[id])}msgid ${JSON.stringify(id)}\nmsgstr ""\n`)
.join('\n');
export default potFormater;

@@ -56,1 +56,16 @@ import potFormater from '../src/potFormater';

});
it('should return pot formatted string, with double quotes escaped', () => {
expect(
potFormater({
'This is "quoted"': [
{
id: 'NotFound.errorButton',
description: 'My description\nis\nquite\nlong.',
defaultMessage: 'This is "quoted"',
filename: './messages/src/containers/NotFound/messages.json',
},
],
}),
).toMatchSnapshot();
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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