# gazelle:ts_test_name unit_test load("//tools:compile.bzl", "formatjs_library") load("//tools:test.bzl", "formatjs_test") load("//tools:tsconfig.bzl", "ESNEXT_TSCONFIG", "packages_tsconfig") package(default_visibility = ["//packages/editor:__subpackages__"]) formatjs_library( name = "editor", package_name = "@formatjs/editor", srcs = [ "copy-text-button.tsx", "core.tsx", "design-system.tsx", "index.ts", "layout.ts", "locale-picker.tsx", "message.tsx", "message-context.tsx", "message-preview.tsx", "message-status.ts", "search.ts", "source-location.ts", "types.ts", "ui.tsx", "validation.ts", "workflow.ts", ], author = "Long Ho ", bugs = { "url": "https://github.com/formatjs/formatjs/issues", }, description = "Headless ICU MessageFormat editor for React", entry_points = [ "index.ts", "ui.tsx", ], homepage = "https://github.com/formatjs/formatjs", keywords = [ "intl", "i18n", "internationalization", "locale", "localization", "globalization", "react", "react-intl", "reactjs", "format", "formatjs", "formatting", "translate", "translation", "cli", ], license = "MIT", package_dependency_version_overrides = { "react": "^19.0.0", "@types/react": "^19.0.0", }, package_peer_deps = [ "//:node_modules/react", "//:node_modules/@types/react", ], package_types = "index.d.ts", private = False, repository = { "type": "git", "url": "git+ssh://git@github.com/formatjs/formatjs.git", }, side_effects = False, tsconfig = packages_tsconfig(ESNEXT_TSCONFIG), type = "module", version = "1.8.1", # x-release-please-version visibility = ["//visibility:public"], exports = { ".": "./index.js", "./ui": { "types": "./ui.d.ts", "default": "./ui.js", }, }, deps = [ "//:node_modules/@formatjs/icu-messageformat-parser", "//:node_modules/@types/react", "//:node_modules/react", ], ) formatjs_test( name = "unit_test", srcs = [ "editor.test.tsx", "multi-locale.test.tsx", "search.test.ts", "source-location.test.ts", "tools.test.tsx", "ui.test.tsx", "workflow.test.tsx", ], data = [ ":unit_test_types", # keep "//:package.json", # keep ], dom = True, deps = [ ":editor", "//:node_modules/@testing-library/react", "//:node_modules/@types/react", "//:node_modules/react", "//:node_modules/vitest", ], ) filegroup( name = "unit_test_types", testonly = True, srcs = [":unit_test_typecheck"], output_group = "transitive_typecheck", )