-
Notifications
You must be signed in to change notification settings - Fork 397
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
fix: prevent adding undefined msgid to messages #915
fix: prevent adding undefined msgid to messages #915
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/lingui-js/js-lingui/1jxxxm0hi |
Codecov Report
@@ Coverage Diff @@
## main #915 +/- ##
==========================================
+ Coverage 83.12% 83.25% +0.13%
==========================================
Files 52 52
Lines 1570 1571 +1
Branches 425 426 +1
==========================================
+ Hits 1305 1308 +3
+ Misses 157 156 -1
+ Partials 108 107 -1
Continue to review full report at Codecov.
|
Here is the diff for added test case fail FAIL packages/babel-plugin-extract-messages/test/index.ts
● @lingui/babel-plugin-extract-messages › should extract all messages from JS files (macros)
expect(received).toMatchSnapshot()
Snapshot name: `@lingui/babel-plugin-extract-messages should extract all messages from JS files (macros) 1`
- Snapshot - 0
+ Received + 9
@@ -50,6 +50,15 @@
js-with-macros.js,
17,
],
],
},
+ undefined: Object {
+ extractedComments: Array [],
+ origin: Array [
+ Array [
+ js-with-macros.js,
+ 26,
+ ],
+ ],
+ },
}
70 | fs.readFileSync(path.join(buildDir, `${assertion}.json`)).toString()
71 | )
> 72 | expect(messages).toMatchSnapshot()
| ^
73 | })
74 | }
75 | }
at Object.<anonymous> (packages/babel-plugin-extract-messages/test/index.ts:72:24)
at processTicksAndRejections (node:internal/process/task_queues:93:5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! 👍 Thank you
Released in 3.4.0 🥳 |
Changes in
babel-plugin-extract-messages
packages:Closes #905