Skip to content

Commit

Permalink
feat(@formatjs/ts-transformer): switch parser to @formatjs/icu-messag…
Browse files Browse the repository at this point in the history
…eformat-parser (6x faster)
  • Loading branch information
longlho committed Mar 27, 2021
1 parent 557b3a1 commit 82a4070
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/ts-transformer/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ SRCS = glob([
SRC_DEPS = [
"@npm//typescript",
"@npm//@types/node",
"//packages/intl-messageformat-parser:dist",
"//packages/icu-messageformat-parser:dist",
]

ts_compile(
Expand All @@ -50,7 +50,7 @@ jest_test(
"tests/__snapshots__/*.snap",
]),
deps = SRC_DEPS + [
"//packages/intl-messageformat-parser:types",
"//packages/icu-messageformat-parser:types",
],
)

Expand All @@ -62,7 +62,7 @@ jest_test(
jest_config = "tests/integration/jest.config.js",
deps = [
":dist",
"//packages/intl-messageformat-parser:types",
"//packages/icu-messageformat-parser:types",
"@npm//@types/react",
"@npm//@types/react-dom",
"@npm//react",
Expand Down
2 changes: 1 addition & 1 deletion packages/ts-transformer/src/transform.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as typescript from 'typescript'
import {MessageDescriptor} from './types'
import {interpolateName} from './interpolate-name'
import {parse, MessageFormatElement} from 'intl-messageformat-parser'
import {parse, MessageFormatElement} from '@formatjs/icu-messageformat-parser'
export type Extractor = (filePath: string, msgs: MessageDescriptor[]) => void
export type MetaExtractor = (
filePath: string,
Expand Down

0 comments on commit 82a4070

Please sign in to comment.