Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest App UI Kit version, monthly dependency updates and improvement to i18n linting rules and extraction scripts #43

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

thisisanto
Copy link
Contributor

2024-11-13

🧰 Added

  • Added tests for the TableWrapper sdk, utils/tests/table_wrapper.tests.ts.

  • eslint

    • Added arguments to formatjs eslint rules to require string literals for defaultMessage and description.
      Having variables for defaultMessage and description should not be used because it means formatjs can't generate message ids, and can't extract messages.

      // ❌ Not recommended, messages cannot be extracted, and cannot have ids auto-generated.
      <FormattedMessage defaultMessage={myMessage} .../>
      //                               ~~~~~~~~~~~
      // error: "defaultMessage" must be:
      // - a string literal or
      // - template literal without variable  eslintformatjs/enforce-default-message
      
      // ✅ Recommended, messages can be extracted, and have ids auto-generated.
      <FormattedMessage defaultMessage="My static message" description="My static description"/>

      NOTE: If your FormattedMessage text should change based on the value of some data,
      see this docs section for an example.

🐞 Fixed

  • Update package.json extract script to use a better file path pattern (\"src/**/*.{ts,tsx}\"). The previous path pattern (src/**/*.{ts,tsx}) would miss some files.

🔧 Changed

  • Dependencies audit bringing modules up to date:
  @canva/design                             2.1.0   →    2.2.1
  @eslint/js                               9.12.0   →   9.14.0
  @formatjs/cli                            6.2.12   →    6.3.8
  @formatjs/ts-transformer                3.13.14   →  3.13.22
  @types/jest                             29.5.13   →  29.5.14
  @types/react                            18.3.11   →  18.3.12
  @typescript-eslint/eslint-plugin          8.9.0   →   8.13.0
  @typescript-eslint/parser                 8.9.0   →   8.13.0
  eslint                                   9.12.0   →   9.14.0
  eslint-plugin-formatjs                    5.0.0   →    5.2.2
  eslint-plugin-jest                       28.8.3   →   28.9.0
  eslint-plugin-react                      7.37.1   →   7.37.2
  globals                                 15.11.0   →  15.12.0
  mini-css-extract-plugin                   2.9.1   →    2.9.2
  ts-jest                                  29.2.4   →   29.2.5
  webpack                                  5.95.0   →   5.96.1
  • @canva/app-ui-kit
    • Upgraded app-ui-kit to version 4.3.0. Please see the changelog for the list of changes.
    • Updated snapshots in examples/ui_test.

Copy link
Contributor

@mattbowolick mattbowolick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 🚀 🚀

@thisisanto thisisanto merged commit 4596981 into main Nov 13, 2024
2 checks passed
@thisisanto thisisanto deleted the 2024-11-13 branch November 13, 2024 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants