This repository was archived by the owner on Feb 22, 2026. It is now read-only.
Open
Conversation
esbuild is a large dependency, and pinning to a specific version makes it less likely that it can be shared across other dependencies. To make i18next-parser lighter: - Dynamically import esbuild if needed. Change esbuild to an optional peer dependency. - Update the version range. - Try loading .ts files using Node.js support for stripping TypeScript types (enabled by default in current Node.js versions), to potentially remove having to import ESBuild at all. - Allow loading .mts as well as .ts. This is a potentially breaking change: if a someone uses a .ts i18next-parser configuration, doesn't have type stripping enabled (or has a configuration file that's incompatible with Node.js's type stripping), and doesn't otherwise have esbuild installed, then they'll have to install it.
def448f to
c725eda
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1150 +/- ##
==========================================
- Coverage 95.35% 94.57% -0.79%
==========================================
Files 10 10
Lines 1918 1990 +72
==========================================
+ Hits 1829 1882 +53
- Misses 89 108 +19 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why am I submitting this PR
esbuild is a large dependency, and pinning to a specific version makes it less likely that it can be shared across other dependencies. To make i18next-parser lighter:
This is a potentially breaking change: if a someone uses a .ts i18next-parser configuration, doesn't have type stripping enabled (or has a configuration file that's incompatible with Node.js's type stripping), and doesn't otherwise have esbuild installed, then they'll have to install it.
Does it fix an existing ticket?
No
Checklist
yarn test(see details here) (Preexisting .ts functionality didn't have tests - if you want me to see about adding these, let me know.)