Releases: projectfluent/fluent.js
@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
Visitor
andTransformer
. (#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
FluentSerializer
is to serialize multiline
patterns starting on a new line:key = Foo Bar
This 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 Bar
Such 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.js
build 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.js
UMD file
without any further transpilation.The
compat.js
build (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.js
build 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.js
UMD file
without any further transpilation.The
compat.js
build (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
useLocalization
hook. (#467, #475)The hook can be used to get a reference to the current
ReactLocalization
instance, for example in order to format a
translation with the imperativegetString
API.let {l10n} = useLocalization(); alert(l10n.getString("hello"));
-
Remove
compat.js
builds 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.js
UMD file
without any further transpilation.The
compat.js
build (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/bundle
0.16.0 as peer dependency.In
@fluent/bundle
0.16.0FluentArgument
was renamed toFluentVariable
.
@fluent/langneg 0.5.0
-
Remove the
compat.js
build 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.js
UMD file
without any further transpilation.The
compat.js
build (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.
@fluent/dom 0.7.0
-
Remove the
compat.js
build and compile everything to ES2018. (#472, #474)The source code is now compiled by the TypeScript's compiler,
tsc
, to
ES2018 files in theesm/
directory. These files are then bundled into a
singleindex.js
UMD file without any further transpilation.The
compat.js
build (available as@fluent/dom/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