Skip to content

Commit

Permalink
(@fluent/react) Require @fluent/bundle 0.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
stasm committed Jul 1, 2020
1 parent 8f967fb commit 36d09ae
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
7 changes: 3 additions & 4 deletions fluent-react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions fluent-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@
"node": ">=10.0.0"
},
"dependencies": {
"cached-iterable": "^0.2.1",
"@fluent/sequence": "0.5.0",
"cached-iterable": "^0.2.1",
"prop-types": "^15.6.0"
},
"peerDependencies": {
"@fluent/bundle": ">=0.14.0 <0.16.0",
"@fluent/bundle": ">=0.16.0 <0.17.0",
"react": ">=16.8.0"
},
"devDependencies": {
"@babel/preset-env": "^7.5.5",
"@babel/preset-react": "7.0.0",
"@fluent/bundle": "^0.15.0",
"@fluent/bundle": "^0.16.0",
"@types/react": "^16.9.22",
"@types/react-dom": "^16.9.5",
"babel-jest": "^24.8.0",
Expand Down
4 changes: 2 additions & 2 deletions fluent-react/src/localization.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FluentBundle, FluentArgument } from "@fluent/bundle";
import { FluentBundle, FluentVariable } from "@fluent/bundle";
import { mapBundleSync } from "@fluent/sequence";
import { CachedSyncIterable } from "cached-iterable";
import { createParseMarkup, MarkupParser } from "./markup";
Expand Down Expand Up @@ -32,7 +32,7 @@ export class ReactLocalization {

getString(
id: string,
args?: Record<string, FluentArgument> | null,
args?: Record<string, FluentVariable> | null,
fallback?: string
): string {
const bundle = this.getBundle(id);
Expand Down
4 changes: 2 additions & 2 deletions fluent-react/src/localized.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import PropTypes from "prop-types";
import voidElementTags from "../vendor/voidElementTags";
import { FluentContext } from "./context";
import { FluentArgument } from "@fluent/bundle";
import { FluentVariable } from "@fluent/bundle";

// Match the opening angle bracket (<) in HTML tags, and HTML entities like
// &amp;, &#0038;, &#x0026;.
Expand All @@ -20,7 +20,7 @@ export interface LocalizedProps {
id: string;
attrs?: Record<string, boolean>;
children?: ReactNode;
vars?: Record<string, FluentArgument>;
vars?: Record<string, FluentVariable>;
elems?: Record<string, ReactElement>;
}
/*
Expand Down
4 changes: 2 additions & 2 deletions fluent-react/src/with_localization.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { createElement, useContext, ComponentType, ReactElement } from "react";
import { FluentContext } from "./context";
import { FluentArgument } from "@fluent/bundle";
import { FluentVariable } from "@fluent/bundle";

export interface WithLocalizationProps {
getString(
id: string,
args?: Record<string, FluentArgument> | null,
args?: Record<string, FluentVariable> | null,
fallback?: string): string;
}

Expand Down

0 comments on commit 36d09ae

Please sign in to comment.