Skip to content

Releases: projectfluent/fluent.js

@fluent/syntax 0.17.1

09 Apr 10:55
Compare
Choose a tag to compare
  • Align AST types with fluent-rs. (#525)
    Use Union types instead of inheritance for Entry, PatternElement, InlineExpression, Expression, Literal, and Comments. The union types allow for type narrowing in TypeScript consumers.
  • Use concrete argument types for Visitor and Transformer. (#525)
  • Update TypeScript to 4.2 to support type imports and exports.

@fluent/langneg 0.5.1

09 Apr 10:51
Compare
Choose a tag to compare
  • Better TypeScript annotations. (#525)
    Make array arguments read-only, and expose options type.

@fluent/bundle 0.16.1

09 Apr 10:46
Compare
Choose a tag to compare
  • Separate FluentNumber/Datetime opts when used in DATETIME/NUMBER. (#526)

@fluent/react 0.13.1

07 Apr 20:49
Compare
Choose a tag to compare
  • Allow the Localized component to have an array with one element in its children
    property (#541)

@fluent/syntax 0.16.1

15 Sep 11:40
Compare
Choose a tag to compare
  • 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

02 Jul 10:56
Compare
Choose a tag to compare
  • 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 single index.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

02 Jul 10:35
Compare
Choose a tag to compare
  • 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 single index.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

02 Jul 10:25
Compare
Choose a tag to compare
  • 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 imperative getString 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 single index.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.0 FluentArgument was renamed to FluentVariable.

@fluent/langneg 0.5.0

02 Jul 16:04
Compare
Choose a tag to compare
  • 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 single index.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

02 Jul 16:16
Compare
Choose a tag to compare
  • 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 the esm/ directory. These files are then bundled into a
    single index.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