Skip to content

Commit 36d09ae

Browse files
committed
(@fluent/react) Require @fluent/bundle 0.16.0
1 parent 8f967fb commit 36d09ae

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

fluent-react/package-lock.json

+3-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fluent-react/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,18 @@
4545
"node": ">=10.0.0"
4646
},
4747
"dependencies": {
48-
"cached-iterable": "^0.2.1",
4948
"@fluent/sequence": "0.5.0",
49+
"cached-iterable": "^0.2.1",
5050
"prop-types": "^15.6.0"
5151
},
5252
"peerDependencies": {
53-
"@fluent/bundle": ">=0.14.0 <0.16.0",
53+
"@fluent/bundle": ">=0.16.0 <0.17.0",
5454
"react": ">=16.8.0"
5555
},
5656
"devDependencies": {
5757
"@babel/preset-env": "^7.5.5",
5858
"@babel/preset-react": "7.0.0",
59-
"@fluent/bundle": "^0.15.0",
59+
"@fluent/bundle": "^0.16.0",
6060
"@types/react": "^16.9.22",
6161
"@types/react-dom": "^16.9.5",
6262
"babel-jest": "^24.8.0",

fluent-react/src/localization.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FluentBundle, FluentArgument } from "@fluent/bundle";
1+
import { FluentBundle, FluentVariable } from "@fluent/bundle";
22
import { mapBundleSync } from "@fluent/sequence";
33
import { CachedSyncIterable } from "cached-iterable";
44
import { createParseMarkup, MarkupParser } from "./markup";
@@ -32,7 +32,7 @@ export class ReactLocalization {
3232

3333
getString(
3434
id: string,
35-
args?: Record<string, FluentArgument> | null,
35+
args?: Record<string, FluentVariable> | null,
3636
fallback?: string
3737
): string {
3838
const bundle = this.getBundle(id);

fluent-react/src/localized.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
import PropTypes from "prop-types";
1111
import voidElementTags from "../vendor/voidElementTags";
1212
import { FluentContext } from "./context";
13-
import { FluentArgument } from "@fluent/bundle";
13+
import { FluentVariable } from "@fluent/bundle";
1414

1515
// Match the opening angle bracket (<) in HTML tags, and HTML entities like
1616
// &amp;, &#0038;, &#x0026;.
@@ -20,7 +20,7 @@ export interface LocalizedProps {
2020
id: string;
2121
attrs?: Record<string, boolean>;
2222
children?: ReactNode;
23-
vars?: Record<string, FluentArgument>;
23+
vars?: Record<string, FluentVariable>;
2424
elems?: Record<string, ReactElement>;
2525
}
2626
/*

fluent-react/src/with_localization.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { createElement, useContext, ComponentType, ReactElement } from "react";
22
import { FluentContext } from "./context";
3-
import { FluentArgument } from "@fluent/bundle";
3+
import { FluentVariable } from "@fluent/bundle";
44

55
export interface WithLocalizationProps {
66
getString(
77
id: string,
8-
args?: Record<string, FluentArgument> | null,
8+
args?: Record<string, FluentVariable> | null,
99
fallback?: string): string;
1010
}
1111

0 commit comments

Comments
 (0)