Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: projectfluent/fluent.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @fluent/bundle@0.18.0
Choose a base ref
...
head repository: projectfluent/fluent.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: @fluent/bundle@0.19.0
Choose a head ref

Commits on Mar 24, 2023

  1. Update dependencies & fluent-react/example (#612)

    * chore: Fix internal dependencies
    
    * docs: Update fluent-react/example to React 18
    
    * chore: Refresh lockfile & apply Prettier styling
    eemeli authored Mar 24, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    myitcv Paul Jolly
    Copy the full SHA
    36a895b View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    myitcv Paul Jolly
    Copy the full SHA
    f877b29 View commit details

Commits on May 27, 2023

  1. chore: Refresh lockfiles

    eemeli committed May 27, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4c6a8bc View commit details
  2. chore: Publish

    - @fluent/react@0.15.1
    eemeli committed May 27, 2023
    Copy the full SHA
    20ebb43 View commit details

Commits on Aug 1, 2023

  1. feat(react): Allow user provided reportError function (#619)

    Because:
    
    * We should allow users the ability to provide a reportError function.
    
    This commit:
    
    * Adds a class property, reportError, to ReactLocalization that allows
      consumers to provide a function on initialization to report errors.
      By default the errors will console.warn.
    
    Closes: #411
    StaberindeZA authored Aug 1, 2023
    Copy the full SHA
    5f521c9 View commit details
  2. chore: Refresh lockfiles

    eemeli committed Aug 1, 2023
    Copy the full SHA
    806e84f View commit details
  3. chore: Publish

    - @fluent/react@0.15.2
    eemeli committed Aug 1, 2023
    Copy the full SHA
    f073055 View commit details

Commits on Feb 28, 2024

  1. chore: Refresh lockfile

    eemeli committed Feb 28, 2024
    Copy the full SHA
    2e3f059 View commit details
  2. Copy the full SHA
    94b4f00 View commit details
  3. Copy the full SHA
    aa264be View commit details
  4. chore: Update to Prettier 3

    eemeli committed Feb 28, 2024
    Copy the full SHA
    b16af46 View commit details
  5. Copy the full SHA
    c1a6c53 View commit details
  6. Copy the full SHA
    458d1e9 View commit details
  7. Copy the full SHA
    067ce3a View commit details
  8. Copy the full SHA
    f6f316b View commit details
  9. chore: Refresh lockfile

    eemeli committed Feb 28, 2024
    Copy the full SHA
    82cade5 View commit details
  10. Copy the full SHA
    af921d4 View commit details
  11. Copy the full SHA
    d552c77 View commit details
  12. ci: Drop tests in Node.js < 18

    eemeli committed Feb 28, 2024
    Copy the full SHA
    08f9ae8 View commit details
  13. Copy the full SHA
    a829b5e View commit details
  14. Merge pull request #627 from projectfluent/updates

    Update dependencies
    eemeli authored Feb 28, 2024
    Copy the full SHA
    9522dcf View commit details
  15. feat!: Make pauseObserving and resumeObserving public (#623)

    This is consistent with mozilla-central.
    calixteman authored Feb 28, 2024
    Copy the full SHA
    c5c44b8 View commit details

Commits on Apr 3, 2024

  1. Add test for custom selector; fix & enable custom SUM() test

    eemeli committed Apr 3, 2024
    Copy the full SHA
    fee2242 View commit details

Commits on Jun 25, 2024

  1. fix(dom): Cancel the requestAnimationFrame when all roots are disconn…

    …ected (#633)
    Snuffleupagus authored Jun 25, 2024
    Copy the full SHA
    4833994 View commit details
  2. chore: Publish

    - @fluent/dom@0.10.0
    eemeli committed Jun 25, 2024
    Copy the full SHA
    48e2a62 View commit details

Commits on Mar 24, 2025

  1. feat(bundle): Add Temporal support (#636)

    rkh authored Mar 24, 2025
    Copy the full SHA
    bbcf907 View commit details

Commits on Mar 25, 2025

  1. Update to eslint 9 (#637)

    eemeli authored Mar 25, 2025
    Copy the full SHA
    ca021ac View commit details
  2. Copy the full SHA
    c9fc47e View commit details
  3. Copy the full SHA
    d77cd5d View commit details
  4. docs: Update API docs

    eemeli committed Mar 25, 2025
    Copy the full SHA
    afbd420 View commit details
  5. Merge pull request #638 from projectfluent/typedoc-update

    Update to typedoc 0.28 and use entryPointStrategy: packages
    eemeli authored Mar 25, 2025
    Copy the full SHA
    b5dcf6a View commit details
  6. chore: Publish

    - @fluent/bundle@0.19.0
    eemeli committed Mar 25, 2025
    Copy the full SHA
    d411136 View commit details
Showing with 8,450 additions and 15,571 deletions.
  1. +0 −48 .eslintrc.yaml
  2. +0 −25 .github/workflows/legacy.yml
  3. +6 −6 .github/workflows/test.yml
  4. +8 −8 README.md
  5. +0 −72 eslint-base.yaml
  6. +141 −0 eslint.config.mjs
  7. +10 −0 fluent-bundle/CHANGELOG.md
  8. +1 −10 fluent-bundle/README.md
  9. +4 −4 fluent-bundle/package.json
  10. +7 −16 fluent-bundle/src/builtins.ts
  11. +1 −2 fluent-bundle/src/bundle.ts
  12. +4 −5 fluent-bundle/src/index.ts
  13. +3 −7 fluent-bundle/src/resolver.ts
  14. +4 −2 fluent-bundle/src/resource.ts
  15. +4 −1 fluent-bundle/src/scope.ts
  16. +100 −9 fluent-bundle/src/types.ts
  17. +2 −10 fluent-bundle/test/arguments_test.js
  18. +6 −8 fluent-bundle/test/attributes_test.js
  19. +0 −2 fluent-bundle/test/bomb_test.js
  20. +0 −2 fluent-bundle/test/constructor_test.js
  21. +0 −2 fluent-bundle/test/context_test.js
  22. +0 −2 fluent-bundle/test/errors_test.js
  23. +0 −2 fluent-bundle/test/functions_builtin_test.js
  24. +20 −10 fluent-bundle/test/functions_runtime_test.js
  25. +8 −10 fluent-bundle/test/functions_test.js
  26. +0 −2 fluent-bundle/test/isolating_test.js
  27. +0 −1 fluent-bundle/test/literals_test.js
  28. +0 −2 fluent-bundle/test/macros_test.js
  29. +0 −2 fluent-bundle/test/memoizer_test.js
  30. +0 −2 fluent-bundle/test/object_prototype_test.js
  31. +0 −2 fluent-bundle/test/patterns_test.js
  32. +2 −4 fluent-bundle/test/primitives_test.js
  33. +0 −1 fluent-bundle/test/select_expressions_test.js
  34. +209 −0 fluent-bundle/test/temporal_test.js
  35. +1 −3 fluent-bundle/test/transform_test.js
  36. +0 −2 fluent-bundle/test/values_format_test.js
  37. +0 −2 fluent-bundle/test/values_ref_test.js
  38. +1 −1 fluent-bundle/tsconfig.json
  39. +3 −0 fluent-bundle/typedoc.json
  40. +1 −2 fluent-dedent/package.json
  41. +0 −2 fluent-dedent/test/blank_test.js
  42. +0 −2 fluent-dedent/test/content_test.js
  43. +0 −2 fluent-dedent/test/eol_test.js
  44. +0 −2 fluent-dedent/test/interpolation_test.js
  45. +0 −2 fluent-dedent/test/mixed_test.js
  46. +0 −2 fluent-dedent/test/tabs_test.js
  47. +1 −1 fluent-dedent/tsconfig.json
  48. +14 −0 fluent-dom/CHANGELOG.md
  49. +4 −5 fluent-dom/package.json
  50. +3 −4 fluent-dom/src/dom_localization.js
  51. +0 −2 fluent-dom/src/localization.js
  52. +1 −1 fluent-dom/test/dom_localization_test.js
  53. +3 −3 fluent-dom/test/index.js
  54. +1 −1 fluent-dom/test/localization_test.js
  55. +1 −1 fluent-dom/tsconfig.json
  56. +3 −0 fluent-dom/typedoc.json
  57. +1 −1 fluent-langneg/CHANGELOG.md
  58. +1 −2 fluent-langneg/package.json
  59. +4 −9 fluent-langneg/src/index.ts
  60. +0 −2 fluent-langneg/src/locale.ts
  61. +43 −45 fluent-langneg/src/matches.ts
  62. +27 −28 fluent-langneg/src/negotiate_languages.ts
  63. +2 −4 fluent-langneg/test/langneg_test.js
  64. +1 −1 fluent-langneg/tsconfig.json
  65. +8 −0 fluent-react/CHANGELOG.md
  66. +1 −1 fluent-react/README.md
  67. 0 fluent-react/{babel.config.js → babel.config.cjs}
  68. +1 −0 fluent-react/example/.gitignore
  69. +5 −7 fluent-react/example/README.md
  70. +0 −4,376 fluent-react/example/package-lock.json
  71. +9 −8 fluent-react/example/package.json
  72. +1 −1 fluent-react/example/public/index.html
  73. +4 −4 fluent-react/example/src/index.tsx
  74. +3 −2 fluent-react/example/src/l10n.tsx
  75. +4 −5 fluent-react/package.json
  76. +6 −8 fluent-react/src/index.ts
  77. +13 −13 fluent-react/src/localization.ts
  78. +0 −1 fluent-react/src/localized.ts
  79. +4 −4 fluent-react/src/provider.ts
  80. +2 −6 fluent-react/src/use_localization.ts
  81. +6 −5 fluent-react/src/with_localization.ts
  82. +0 −3 fluent-react/test/.eslintrc.yaml
  83. +20 −0 fluent-react/test/localized_valid.test.js
  84. +1 −1 fluent-react/tsconfig.build.json
  85. +2 −6 fluent-react/tsconfig.json
  86. +3 −0 fluent-react/typedoc.json
  87. +2 −3 fluent-sequence/package.json
  88. +3 −2 fluent-sequence/src/index.ts
  89. +1 −1 fluent-sequence/src/map_async.ts
  90. +1 −1 fluent-sequence/src/map_sync.ts
  91. +2 −2 fluent-sequence/test/fallback_async_test.js
  92. +1 −1 fluent-sequence/tsconfig.build.json
  93. +1 −7 fluent-sequence/tsconfig.json
  94. +2 −2 fluent-syntax/CHANGELOG.md
  95. +2 −3 fluent-syntax/package.json
  96. +42 −1 fluent-syntax/src/ast.ts
  97. +1 −1 fluent-syntax/src/errors.ts
  98. +2 −0 fluent-syntax/src/index.ts
  99. +33 −3 fluent-syntax/src/parser.ts
  100. +4 −0 fluent-syntax/src/serializer.ts
  101. +0 −2 fluent-syntax/test/ast_test.js
  102. +3 −3 fluent-syntax/test/serializer_test.js
  103. +0 −2 fluent-syntax/test/stream_test.js
  104. +1 −3 fluent-syntax/test/visitor_test.js
  105. +1 −1 fluent-syntax/tsconfig.json
  106. +4 −0 fluent-syntax/typedoc.json
  107. +7,458 −10,561 package-lock.json
  108. +18 −17 package.json
  109. +13 −13 tools/README.md
  110. +15 −12 tools/{fluentfmt.js → fluentfmt.mjs}
  111. +8 −14 tools/{format.js → format.mjs}
  112. +14 −15 tools/{fuzz.js → fuzz.mjs}
  113. +11 −17 tools/{parse.js → parse.mjs}
  114. +0 −1 tools/perf/benchmark.node.js
  115. +6 −3 tools/perf/util.js
  116. +12 −0 tsconfig.base.json
  117. +6 −8 tsconfig.json
  118. +0 −10 typedoc.config.cjs
  119. +34 −0 typedoc.json
48 changes: 0 additions & 48 deletions .eslintrc.yaml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/legacy.yml

This file was deleted.

12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: test
on:
push:
branches: [master]
branches: [main]
pull_request:
branches: [master]
branches: [main]
workflow_dispatch:
jobs:
dist:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16, 18, latest]
node: [18, 20, latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{matrix.node}}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{matrix.node}}
- run: npm ci
- run: npm run build --workspaces
- run: npm test
- run: npm run lint
- run: npm run docs --workspaces
- run: npm run docs
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -13,13 +13,13 @@ natural languages like gender, plurals, conjugations, and others.
Fluent.js consists of a set of packages which have different use-cases and can
be installed independently of each other.

- [@fluent/bundle](https://github.com/projectfluent/fluent.js/tree/master/fluent-bundle)
- [@fluent/dedent](https://github.com/projectfluent/fluent.js/tree/master/fluent-dedent)
- [@fluent/dom](https://github.com/projectfluent/fluent.js/tree/master/fluent-dom)
- [@fluent/langneg](https://github.com/projectfluent/fluent.js/tree/master/fluent-langneg)
- [@fluent/react](https://github.com/projectfluent/fluent.js/tree/master/fluent-react)
- [@fluent/sequence](https://github.com/projectfluent/fluent.js/tree/master/fluent-sequence)
- [@fluent/syntax](https://github.com/projectfluent/fluent.js/tree/master/fluent-syntax)
- [@fluent/bundle](https://github.com/projectfluent/fluent.js/tree/main/fluent-bundle)
- [@fluent/dedent](https://github.com/projectfluent/fluent.js/tree/main/fluent-dedent)
- [@fluent/dom](https://github.com/projectfluent/fluent.js/tree/main/fluent-dom)
- [@fluent/langneg](https://github.com/projectfluent/fluent.js/tree/main/fluent-langneg)
- [@fluent/react](https://github.com/projectfluent/fluent.js/tree/main/fluent-react)
- [@fluent/sequence](https://github.com/projectfluent/fluent.js/tree/main/fluent-sequence)
- [@fluent/syntax](https://github.com/projectfluent/fluent.js/tree/main/fluent-syntax)

You can install each of the above packages via `npm`, e.g. `npm install @fluent/react`.
See the end of this `README` for instructions on how to build `fluent.js` locally.
@@ -81,7 +81,7 @@ Build and test all packages at once:
$ npm run build --workspaces
$ npm run lint
$ npm run test
$ npm run docs --workspaces
$ npm run docs

Each package may also be built separately by running `npm run build` in
its directory.
72 changes: 0 additions & 72 deletions eslint-base.yaml

This file was deleted.

141 changes: 141 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
import js from "@eslint/js";
import eslintConfigPrettier from "eslint-config-prettier";
import mochaPlugin from "eslint-plugin-mocha";
import globals from "globals";

import tseslint from "typescript-eslint";

export default [
{
ignores: [
"**/node_modules/",
"*/coverage/",
"*/dist/",
"*/esm/",
"*/vendor/",
"fluent-*/index.js",
"html/",
"tools/",
],
},
{
languageOptions: {
ecmaVersion: 2018,
sourceType: "module",
},
},

// Config files
{
files: ["**/*.mjs"],
languageOptions: { ecmaVersion: 2020 },
},
{
files: ["**/*.cjs"],
languageOptions: { globals: { ...globals.node } },
},

js.configs.recommended,
{
files: ["**/*.js", "**/*.mjs", "*/src/*.ts"],
rules: {
"consistent-return": "warn",
"dot-notation": "error",
eqeqeq: "error",
"max-depth": ["error", 6],
"no-caller": "error",
"no-console": "warn",
"no-constant-condition": ["warn", { checkLoops: false }],
"no-duplicate-imports": "error",
"no-else-return": "error",
"no-empty": "warn",
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-implicit-globals": "error",
"no-implied-eval": "error",
"no-iterator": "error",
"no-loop-func": "error",
"no-multi-str": "error",
"no-nested-ternary": "error",
"no-proto": "error",
"no-sequences": "error",
"no-shadow": "error",
"no-undef-init": "error",
"no-unneeded-ternary": "error",
"no-unreachable": "warn",
"no-unused-vars": "warn",
"no-use-before-define": ["error", { functions: false, classes: false }],
"no-useless-call": "error",
"no-useless-concat": "error",
"no-useless-return": "error",
"prefer-arrow-callback": "warn",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"spaced-comment": ["error", "always"],
strict: ["error", "global"],
},
},

// TypeScript
...tseslint.configs.recommendedTypeChecked.map(cfg => ({
...cfg,
files: ["**/*.ts"],
})),
{
files: ["**/*.ts"],
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
complexity: "off",
"prefer-const": "off",
"no-undef": "off",
"no-unused-vars": ["error", { args: "none" }],
"no-use-before-define": "off",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-unused-vars": ["error", { args: "none" }],
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/explicit-function-return-type": "error",
},
},
eslintConfigPrettier,

// Test suites
{
files: ["*/test/**"],
languageOptions: {
globals: { ...globals.mocha, ...globals.node },
ecmaVersion: 2020,
},
plugins: { mocha: mochaPlugin },
rules: {
"mocha/no-exclusive-tests": "error",
"mocha/no-identical-title": "error",
"no-console": "off",
"prefer-arrow-callback": "off",
},
},
{
files: ["fluent-dom/test/*"],
languageOptions: { globals: { ...globals.browser } },
},
{
files: ["fluent-react/test/**"],
languageOptions: {
globals: { ...globals.browser, ...globals.jest },
ecmaVersion: 2020,
parserOptions: { ecmaFeatures: { jsx: true } },
},
plugins: { mocha: mochaPlugin },
rules: {
"mocha/no-exclusive-tests": "error",
"mocha/no-identical-title": "error",
"no-unused-vars": "off",
},
},
];
10 changes: 10 additions & 0 deletions fluent-bundle/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## [0.19.0](https://github.com/projectfluent/fluent.js/compare/@fluent/bundle@0.18.0...@fluent/bundle@0.19.0) (2025-03-25)

### ⚠ Breaking Changes

- Require Node.js >= 18

### Features

- Add Temporal support ([#636](https://github.com/projectfluent/fluent.js/issues/636))

## [0.18.0](https://github.com/projectfluent/fluent.js/compare/@fluent/bundle@0.17.1...@fluent/bundle@0.18.0) (2023-03-13)

- Drop Node.js v12 support, add v18 & latest to CI tests
11 changes: 1 addition & 10 deletions fluent-bundle/README.md
Original file line number Diff line number Diff line change
@@ -47,17 +47,8 @@ The API reference is available at https://projectfluent.org/fluent.js/bundle.

- `Intl.DateTimeFormat` (standard, well-supported)
- `Intl.NumberFormat` (standard, well-supported)
- `Intl.PluralRules` (standard, new in ECMAScript 2018)

`Intl.PluralRules` may already be available in some engines. In most cases,
however, a polyfill will be required. We recommend [intl-pluralrules][].

```javascript
import "intl-pluralrules";
import { FluentBundle } from "@fluent/bundle";
```
- `Intl.PluralRules` (standard, well-supported)

See also the [Compatibility][] article on the `fluent.js` wiki.

[intl-pluralrules]: https://www.npmjs.com/package/intl-pluralrules
[compatibility]: https://github.com/projectfluent/fluent.js/wiki/Compatibility
Loading