You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After freshly installing i18next-parser with npm i -g i18next-parser and setting up a configuration file, running the CLI gives
i18next "src/**/*.{js, jsx, ts, tsx}"
i18next Parser
--------------
Input: src/**/*.{js, jsx, ts, tsx}
Output: public/locales/$LOCALE/$NAMESPACE.json
/home/justin/.nvm/versions/node/v20.12.0/lib/node_modules/i18next-parser/node_modules/anymatch/index.js:94
return (testString, ri = false) => {
^
RangeError: Maximum call stack size exceeded
at /home/justin/.nvm/versions/node/v20.12.0/lib/node_modules/i18next-parser/node_modules/anymatch/index.js:94:12
at EventEmitter.onPath (/home/justin/.nvm/versions/node/v20.12.0/lib/node_modules/i18next-parser/node_modules/glob-stream/index.js:270:20)
at EventEmitter.emit (node:events:518:28)
at processDirents (/home/justin/.nvm/versions/node/v20.12.0/lib/node_modules/i18next-parser/node_modules/glob-stream/index.js:88:10)
at next (/home/justin/.nvm/versions/node/v20.12.0/lib/node_modules/i18next-parser/node_modules/now-and-later/lib/mapSeries.js:43:5)
at handler (/home/justin/.nvm/versions/node/v20.12.0/lib/node_modules/i18next-parser/node_modules/now-and-later/lib/mapSeries.js:57:9)
at f (/home/justin/.nvm/versions/node/v20.12.0/lib/node_modules/i18next-parser/node_modules/once/once.js:25:25)
at processDirents (/home/justin/.nvm/versions/node/v20.12.0/lib/node_modules/i18next-parser/node_modules/glob-stream/index.js:113:7)
at next (/home/justin/.nvm/versions/node/v20.12.0/lib/node_modules/i18next-parser/node_modules/now-and-later/lib/mapSeries.js:43:5)
at handler (/home/justin/.nvm/versions/node/v20.12.0/lib/node_modules/i18next-parser/node_modules/now-and-later/lib/mapSeries.js:57:9)
Node.js v20.12.0
module.exports={contextSeparator: '_',// Key separator used in your translation keyscreateOldCatalogs: true,// Save the \_old filesdefaultNamespace: 'translation',// Default namespace used in your i18next configdefaultValue: (loc,ns,key)=>(loc==='en' ? key : '__NOT_TRANSLATED__'),// Default value to give to keys with no value// You may also specify a function accepting the locale, namespace, key, and value as argumentsindentation: 2,// Indentation of the catalog fileskeepRemoved: true,// Keep keys from the catalog that are no longer in code// You may either specify a boolean to keep or discard all removed keys.// You may also specify an array of patterns: the keys from the catalog that are no long in the code but match one of the patterns will be kept.// The patterns are applied to the full key including the namespace, the parent keys and the separators.keySeparator: false,// Key separator used in your translation keys// If you want to use plain english keys, separators such as `.` and `:` will conflict. You might want to set `keySeparator: false` and `namespaceSeparator: false`. That way, `t('Status: Loading...')` will not think that there are a namespace and three separator dots for instance.// see below for more detailslexers: {js: ['JavascriptLexer'],// if you're writing jsx inside .js files, change this to JsxLexerts: ['JavascriptLexer'],jsx: ['JsxLexer'],tsx: ['JsxLexer'],default: ['JavascriptLexer'],},lineEnding: 'auto',// Control the line ending. See options at https://github.com/ryanve/eollocales: ['en'],// An array of the locales in your applicationsnamespaceSeparator: false,// Namespace separator used in your translation keys// If you want to use plain english keys, separators such as `.` and `:` will conflict. You might want to set `keySeparator: false` and `namespaceSeparator: false`. That way, `t('Status: Loading...')` will not think that there are a namespace and three separator dots for instance.output: 'public/locales/$LOCALE/$NAMESPACE.json',// Supports $LOCALE and $NAMESPACE injection// Supports JSON (.json) and YAML (.yml) file formats// Where to write the locale files relative to process.cwd()pluralSeparator: '_',// Plural separator used in your translation keys// If you want to use plain english keys, separators such as `_` might conflict. You might want to set `pluralSeparator` to a different string that does not occur in your keys.// If you don't want to generate keys for plurals (for example, in case you are using ICU format), set `pluralSeparator: false`.input: ['src/**/*.{js, jsx, ts, tsx}'],// An array of globs that describe where to look for source files// relative to the location of the configuration filesort: false,// Whether or not to sort the catalog. Can also be a [compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#parameters)verbose: true,// Display info about the parsing including some statsfailOnWarnings: false,// Exit with an exit code of 1 on warningsfailOnUpdate: false,// Exit with an exit code of 1 when translations are updated (for CI purpose)i18nextOptions: {compatibilityJSON: 'v3'},// If you wish to customize options in internally used i18next instance, you can define an object with any// configuration property supported by i18next (https://www.i18next.com/overview/configuration-options).// { compatibilityJSON: 'v3' } can be used to generate v3 compatible plurals.};
npm i -g i18next-parser
i18next "src/**/*.{js, jsx, ts, tsx}"
Expected behavior
i18next-parser runs
Your Environment
runtime version: node v20, v18, v16
i18next version: ^23.5.1
os: Linux
Folders go no further than 4 levels deep, so not sure what would be causing
The text was updated successfully, but these errors were encountered:
🐛 Bug Report
After freshly installing
i18next-parser
withnpm i -g i18next-parser
and setting up a configuration file, running the CLI givesTo Reproduce
A minimal reproducible example.
A codesandbox example or similar
or at least steps to reproduce the behavior:
i18next-parser.config.js
Expected behavior
i18next-parser
runsYour Environment
The text was updated successfully, but these errors were encountered: