Skip to content

[localization-utilities] Expose parsers directly #3455

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

Merged

Conversation

dmichon-msft
Copy link
Contributor

Summary

Removes the dependency on decache in favor of leveraging vm.runInNewContext to run each pseudolocalizer in its own context.
Exposes the resjson and loc.json parsers directly, in addition to the current code path through a highly opinionated dispatcher. The motivation being to allow webpack loaders to use the parsers on arbitrary content or on output of other custom loaders.

How it was tested

New unit tests
Usage in upcoming webpack 5 localization plugin

Remove decache dependency
Add unit tests
@dmichon-msft dmichon-msft enabled auto-merge June 8, 2022 21:28
@dmichon-msft dmichon-msft disabled auto-merge June 8, 2022 22:19
@dmichon-msft dmichon-msft mentioned this pull request Jun 8, 2022
6 tasks
@dmichon-msft dmichon-msft merged commit ab06e9f into microsoft:main Jun 13, 2022
@dmichon-msft dmichon-msft deleted the localization-utilities-refactor branch June 13, 2022 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants