i18n-validate
Advanced tools
Comparing version 1.4.2 to 1.4.3-next.056d542.0
#!/usr/bin/env node | ||
import { parseOptionsFile, log, parseFile, ValidationError, validateKey } from './chunk-STXOAPH2.js'; | ||
import { parseOptionsFile, log, parseFile, ValidationError, validateKey } from './chunk-G4YG6XYC.js'; | ||
import process from 'node:process'; | ||
import { Command } from 'commander'; | ||
import { Glob } from 'glob'; | ||
import { stream } from 'fast-glob'; | ||
var start = performance.now(); | ||
var command = new Command().version("1.4.2").usage("[options] <file ...>").option("-c, --config <config>", "Path to the config file", "./i18n-validate.json").option("--log-level <logLevel>", "Log level").option("--exclude <exclude...>", "Exclude files from parsing").option("--exit-on-error", "Exit immediately if an error is found"); | ||
var command = new Command().version("1.4.3-next.056d542.0").usage("[options] <file ...>").option("-c, --config <config>", "Path to the config file", "./i18n-validate.json").option("--log-level <logLevel>", "Log level").option("--exclude <exclude...>", "Exclude files from parsing").option("--exit-on-error", "Exit immediately if an error is found"); | ||
command.on("--help", () => { | ||
@@ -23,2 +23,4 @@ console.log(""); | ||
options.inputs = [options.inputs]; | ||
if (!Array.isArray(options.exclude)) | ||
options.exclude = [options.exclude]; | ||
options.inputs = options.inputs.map((_input) => { | ||
@@ -37,3 +39,3 @@ let input = _input.trim().replaceAll("\\", "/"); | ||
} | ||
var glob = new Glob(options.inputs, { | ||
var glob = stream(options.inputs, { | ||
ignore: options.exclude | ||
@@ -47,3 +49,3 @@ }); | ||
log(`Parsing ${file}`, "debug", options); | ||
const translationNodes = parseFile(file, options); | ||
const translationNodes = parseFile(file.toString(), options); | ||
for (const node of translationNodes) { | ||
@@ -50,0 +52,0 @@ if (!node.isStaticKey) { |
@@ -1,3 +0,3 @@ | ||
export { ValidationError, parseFile, parseOptionsFile, validateKey } from './chunk-STXOAPH2.js'; | ||
export { ValidationError, parseFile, parseOptionsFile, validateKey } from './chunk-G4YG6XYC.js'; | ||
//# sourceMappingURL=out.js.map | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "i18n-validate", | ||
"version": "1.4.2", | ||
"version": "1.4.3-next.056d542.0", | ||
"description": "A cli tool to find invalid i18n keys, missing variables and many more", | ||
@@ -33,18 +33,18 @@ "main": "./dist/index.js", | ||
"commander": "^11.0.0", | ||
"glob": "^10.3.3", | ||
"typescript": "^5.1.6" | ||
"fast-glob": "^3.3.1", | ||
"typescript": "^5.2.2" | ||
}, | ||
"devDependencies": { | ||
"@favware/cliff-jumper": "^2.1.1", | ||
"@favware/cliff-jumper": "^2.1.2", | ||
"@favware/npm-deprecate": "^1.0.7", | ||
"@types/node": "^20.4.2", | ||
"@vitest/coverage-v8": "^0.33.0", | ||
"@types/node": "^20.5.9", | ||
"@vitest/coverage-v8": "^0.34.3", | ||
"esbuild-plugin-version-injector": "^1.2.0", | ||
"eslint": "^8.45.0", | ||
"eslint-config-mahir": "^0.0.29", | ||
"eslint": "^8.48.0", | ||
"eslint-config-mahir": "^0.0.31", | ||
"husky": "^8.0.3", | ||
"lint-staged": "^13.2.3", | ||
"prettier": "^3.0.0", | ||
"tsup": "^7.1.0", | ||
"vitest": "^0.33.0" | ||
"lint-staged": "^14.0.1", | ||
"prettier": "^3.0.3", | ||
"tsup": "^7.2.0", | ||
"vitest": "^0.34.3" | ||
}, | ||
@@ -51,0 +51,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
535
59569
1
2
+ Addedfast-glob@^3.3.1
+ Added@nodelib/fs.scandir@2.1.5(transitive)
+ Added@nodelib/fs.stat@2.0.5(transitive)
+ Added@nodelib/fs.walk@1.2.8(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedfast-glob@3.3.3(transitive)
+ Addedfastq@1.18.0(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedmerge2@1.4.1(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedqueue-microtask@1.2.3(transitive)
+ Addedreusify@1.0.4(transitive)
+ Addedrun-parallel@1.2.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)
- Removedglob@^10.3.3
- Removed@isaacs/cliui@8.0.2(transitive)
- Removed@pkgjs/parseargs@0.11.0(transitive)
- Removedansi-regex@5.0.16.1.0(transitive)
- Removedansi-styles@4.3.06.2.1(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@2.0.1(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedcross-spawn@7.0.6(transitive)
- Removedeastasianwidth@0.2.0(transitive)
- Removedemoji-regex@8.0.09.2.2(transitive)
- Removedforeground-child@3.3.0(transitive)
- Removedglob@10.4.5(transitive)
- Removedis-fullwidth-code-point@3.0.0(transitive)
- Removedisexe@2.0.0(transitive)
- Removedjackspeak@3.4.3(transitive)
- Removedlru-cache@10.4.3(transitive)
- Removedminimatch@9.0.5(transitive)
- Removedminipass@7.1.2(transitive)
- Removedpackage-json-from-dist@1.0.1(transitive)
- Removedpath-key@3.1.1(transitive)
- Removedpath-scurry@1.11.1(transitive)
- Removedshebang-command@2.0.0(transitive)
- Removedshebang-regex@3.0.0(transitive)
- Removedsignal-exit@4.1.0(transitive)
- Removedstring-width@4.2.35.1.2(transitive)
- Removedstrip-ansi@6.0.17.1.0(transitive)
- Removedwhich@2.0.2(transitive)
- Removedwrap-ansi@7.0.08.1.0(transitive)
Updatedtypescript@^5.2.2