-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
chore: update babel-plugin-tester to v11 #1790
Conversation
@@ -19,81 +19,81 @@ pluginTester({ | |||
babelOptions: { filename: __filename, parserOpts: { plugins: ['jsx'] } }, | |||
tests: [ | |||
` | |||
import { Trans } from '../icu.macro' | |||
import { Trans } from '../../../icu.macro' |
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.
babel-plugin-tester v11 has a different folder structure so these imports had to be updated.
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.
strange... but if it works, ok
|
||
const d = 1; | ||
const outside = plural\`\${d}, =0 { # } other { chose # }\`; | ||
`, | ||
snapshot: false, | ||
error: /"plural``" can only be used inside <Trans> in "[^"]+" on line 5/, | ||
error: /"plural``" can only be used inside <Trans> in "[^"]+" on line 6/, |
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.
v11 adds an empty line at the starts of the file so these lines numbers had to be updated.
" | ||
`; | ||
|
||
exports[`unknown plugin > 1. unknown plugin > 1. unknown plugin 1`] = ` |
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.
This massive deletion is due to a previous version of babel-plugin-tester no longer auto determining the name of a plugin, which left these obsolete snapshots in. It now determines the plugin name again, so these are safe to get rid of.
@adrai linting was failing in CI. Don't understand why yet but I'll try to fix it and raise a separate PR for it |
Description
Updates babel-plugin-tester to the latest version (v11).
Checklist
npm run test