Releases: projectfluent/fluent.js
@fluent/langneg 0.5.2
- Documentation fix. (#547)
@fluent/syntax 0.17.1
- Align AST types with fluent-rs. (#525)
Use Union types instead of inheritance forEntry,PatternElement,InlineExpression,Expression,Literal, andComments. The union types allow for type narrowing in TypeScript consumers. - Use concrete argument types for
VisitorandTransformer. (#525) - Update TypeScript to 4.2 to support type imports and exports.
@fluent/langneg 0.5.1
- Better TypeScript annotations. (#525)
Make array arguments read-only, and expose options type.
@fluent/bundle 0.16.1
- Separate FluentNumber/Datetime opts when used in DATETIME/NUMBER. (#526)
@fluent/react 0.13.1
- Allow the Localized component to have an array with one element in its children
property (#541)
@fluent/syntax 0.16.1
-
Fix serialization of multiline patterns starting with special characters. (#512)
The built-in behavior of
FluentSerializeris to serialize multiline
patterns starting on a new line:key = Foo BarThis used to lead to syntax errors if the pattern started with one of the
special characters in the Fluent Syntax: a curly brace, a period, an
asterisk, or a square bracket, and if it was originally written with the
first line on the same line as the identifier:key = *Foo BarSuch a pattern must not be serialized as following, because the asterisk
has a special meaning if placed at the beginning of a line.# Syntax Error key = *Foo Bar
The fix preserves the original layout of the pattern, i.e. it is now
serialized starting inline with the identifier.
@fluent/syntax 0.16.0
-
Remove the
compat.jsbuild and compile everything to ES2018. (#472)TypeScript source code is now compiled to ES2018 files in the
esm/
directory. These files are then bundled into a singleindex.jsUMD file
without any further transpilation.The
compat.jsbuild (available as@fluent/syntax/compat) was removed.
Please use your own transpilation pipeline if ES2018 is too recent for
your project.Refer to https://github.com/projectfluent/fluent.js/wiki/Compatibility
for more information.
@fluent/sequence 0.6.0
-
Remove the
compat.jsbuild and compile everything to ES2018. (#472)TypeScript source code is now compiled to ES2018 files in the
esm/
directory. These files are then bundled into a singleindex.jsUMD file
without any further transpilation.The
compat.jsbuild (available as@fluent/sequence/compat) was removed.
Please use your own transpilation pipeline if ES2018 is too recent for
your project.Refer to https://github.com/projectfluent/fluent.js/wiki/Compatibility
for more information.
@fluent/react 0.13.0
-
Add the
useLocalizationhook. (#467, #475)The hook can be used to get a reference to the current
ReactLocalizationinstance, for example in order to format a
translation with the imperativegetStringAPI.let {l10n} = useLocalization(); alert(l10n.getString("hello"));
-
Remove
compat.jsbuilds and compile everything to ES2018. (#472)TypeScript source code is now compiled to ES2018 files in the
esm/
directory. These files are then bundled into a singleindex.jsUMD file
without any further transpilation.The
compat.jsbuild (available as@fluent/react/compat) was removed.
Please use your own transpilation pipeline if ES2018 is too recent for
your project.Refer to https://github.com/projectfluent/fluent.js/wiki/Compatibility
for more information. -
Require
@fluent/bundle0.16.0 as peer dependency.In
@fluent/bundle0.16.0FluentArgumentwas renamed toFluentVariable.
@fluent/langneg 0.5.0
-
Remove the
compat.jsbuild and compile everything to ES2018. (#472)TypeScript source code is now compiled to ES2018 files in the
esm/
directory. These files are then bundled into a singleindex.jsUMD file
without any further transpilation.The
compat.jsbuild (available as@fluent/langneg/compat) was removed.
Please use your own transpilation pipeline if ES2018 is too recent for
your project.Refer to https://github.com/projectfluent/fluent.js/wiki/Compatibility
for more information.