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

@fluent/react

Package Overview
Dependencies
Maintainers
4
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluent/react - npm Package Compare versions

Comparing version 0.11.0 to 0.11.1

9

CHANGELOG.md
# Changelog
## @fluent/react 0.11.1 (January 31, 2020)
- Don't call `createParseMarkup` too eagerly. (#453)
Fix a regression from 0.11.0 in which the default `FluentContext` value
was an empty `ReactLocalization` which would call `createParseMarkup` to
create its markup parser. In SSR, it's not desirable to call this
function as it uses the `document` global.
## @fluent/react 0.11.0 (January 23, 2020)

@@ -4,0 +13,0 @@

6

compat.js

@@ -1,2 +0,2 @@

/* @fluent/react@0.11.0 */
/* @fluent/react@0.11.1 */
(function (global, factory) {

@@ -89,3 +89,3 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('prop-types'), require('@fluent/sequence/compat'), require('cached-iterable/compat')) :

var FluentContext = react.createContext(new ReactLocalization([]));
var FluentContext = react.createContext(new ReactLocalization([], null));

@@ -459,3 +459,3 @@ /*

if (!reMarkup.test(messageValue)) {
if (!reMarkup.test(messageValue) || l10n.parseMarkup === null) {
return react.cloneElement(child, localizedProps, messageValue);

@@ -462,0 +462,0 @@ } // If the message contains markup, parse it and try to match the children

@@ -1,2 +0,2 @@

/* @fluent/react@0.11.0 */
/* @fluent/react@0.11.1 */
(function (global, factory) {

@@ -87,3 +87,3 @@ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('prop-types'), require('@fluent/sequence'), require('cached-iterable')) :

var FluentContext = react.createContext(new ReactLocalization([]));
var FluentContext = react.createContext(new ReactLocalization([], null));

@@ -350,3 +350,3 @@ /*

// insert it as the only child of the wrapped component.
if (!reMarkup.test(messageValue)) {
if (!reMarkup.test(messageValue) || l10n.parseMarkup === null) {
return react.cloneElement(child, localizedProps, messageValue);

@@ -353,0 +353,0 @@ }

{
"name": "@fluent/react",
"description": "Fluent bindings for React",
"version": "0.11.0",
"version": "0.11.1",
"homepage": "https://projectfluent.org",

@@ -60,3 +60,3 @@ "author": "Mozilla <l10n-drivers@mozilla.org>",

"@babel/preset-react": "7.0.0",
"@fluent/bundle": "^0.14.0",
"@fluent/bundle": "^0.15.0",
"babel-jest": "^24.8.0",

@@ -63,0 +63,0 @@ "babel-plugin-transform-rename-import": "^2.2.0",

import { createContext } from "react";
import ReactLocalization from "./localization";
export default createContext(new ReactLocalization([]));
export default createContext(new ReactLocalization([], null));

@@ -138,3 +138,3 @@ import { isValidElement, cloneElement, useContext } from "react";

// insert it as the only child of the wrapped component.
if (!reMarkup.test(messageValue)) {
if (!reMarkup.test(messageValue) || l10n.parseMarkup === null) {
return cloneElement(child, localizedProps, messageValue);

@@ -141,0 +141,0 @@ }

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