@freckle/i18n-scripts 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -1
- package/package.json +19 -11
package/README.md
CHANGED
|
@@ -10,7 +10,27 @@ pnpm add @freckle/i18n-scripts
|
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
The package installs three bins:
|
|
14
|
+
|
|
15
|
+
- `check-i18n-variables <project-path>...` — extracts translation keys and the variables the
|
|
16
|
+
code passes to them, then reports keys whose Locize value references a variable the code
|
|
17
|
+
does not pass.
|
|
18
|
+
- `check-i18next-icu-parser <namespace>...` — reports Locize keys that `i18next` cannot parse
|
|
19
|
+
as ICU.
|
|
20
|
+
- `check-missing-translations <namespace> [project-path]` — reports keys used in code but
|
|
21
|
+
missing from Locize, and keys present in Locize but untranslated. Needs `git`, `curl` and
|
|
22
|
+
`jq`.
|
|
23
|
+
|
|
24
|
+
## Development
|
|
25
|
+
|
|
26
|
+
- **Package manager**: pnpm (Node version pinned in `.nvmrc`)
|
|
27
|
+
- `pnpm build` — copies `src/` to `dist/` minus the tests; `dist/` is committed
|
|
28
|
+
- `pnpm test` — Vitest
|
|
29
|
+
- `pnpm coverage` — Vitest with coverage, gated at 70% (lines/branches/functions/statements)
|
|
30
|
+
- `pnpm lint` — ESLint
|
|
31
|
+
- `pnpm format` / `pnpm format-check` — Prettier
|
|
32
|
+
- `pnpm knip` — unused files, dependencies and exports
|
|
33
|
+
- CI runs all of the above on every PR, plus a check that `dist/` is up to date
|
|
14
34
|
|
|
15
35
|
## Release
|
|
16
36
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@freckle/i18n-scripts",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Scripts for i18n",
|
|
5
5
|
"author": "Renaissance Learning Inc",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,24 +18,32 @@
|
|
|
18
18
|
"url": "git+https://github.com/freckle/i18n-scripts-js.git"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
|
-
"build": "rm -
|
|
22
|
-
"
|
|
23
|
-
"format
|
|
24
|
-
"
|
|
21
|
+
"build": "rm -rf dist && cp -r src dist && rm -f dist/*.test.js",
|
|
22
|
+
"coverage": "vitest run --coverage",
|
|
23
|
+
"format": "prettier --write 'src/**/*.js' '*.{js,mjs}'",
|
|
24
|
+
"format-check": "prettier --check 'src/**/*.js' '*.{js,mjs}'",
|
|
25
|
+
"knip": "knip",
|
|
26
|
+
"lint": "eslint",
|
|
27
|
+
"test": "vitest run"
|
|
25
28
|
},
|
|
26
29
|
"dependencies": {
|
|
27
30
|
"esprima-walk": "0.1.0",
|
|
28
|
-
"flow-parser": "0.
|
|
31
|
+
"flow-parser": "0.334.0",
|
|
29
32
|
"i18next": "26.4.2",
|
|
30
33
|
"i18next-http-backend": "^4.0.2",
|
|
31
34
|
"i18next-icu": "^2.4.4",
|
|
32
35
|
"intl-messageformat": "^12.1.2"
|
|
33
36
|
},
|
|
34
37
|
"devDependencies": {
|
|
35
|
-
"@freckle/eslint-config": "^1.
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
38
|
+
"@freckle/eslint-config": "^1.3.0",
|
|
39
|
+
"@freckle/prettier-config": "^1.3.0",
|
|
40
|
+
"@vitest/coverage-v8": "^5.0.3",
|
|
41
|
+
"eslint": "^10.12.0",
|
|
42
|
+
"globals": "^17.13.0",
|
|
43
|
+
"knip": "^6.39.0",
|
|
44
|
+
"prettier": "^3.9.9",
|
|
45
|
+
"vitest": "^5.0.3"
|
|
39
46
|
},
|
|
40
|
-
"packageManager": "pnpm@12.
|
|
47
|
+
"packageManager": "pnpm@12.8.2+sha512.a5941679663d952c5f0ecc38ba98af98b4dc01b95780354f6894f2f873973cef2f7e2989d7db3ee5393938ae21f62fe06bcdf685d475ddad829a62095d2b8b11",
|
|
48
|
+
"prettier": "@freckle/prettier-config"
|
|
41
49
|
}
|