Skip to content

Commit 05acbfe

Browse files
committed
switch to pnpm and biome, ignore node_modules
1 parent ce7fa8d commit 05acbfe

12 files changed

+7426
-9946
lines changed

.gitattributes

-1
This file was deleted.

.yarnrc.yml

-1
This file was deleted.

LICENSE

-21
This file was deleted.

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This currently only works for JSON based translation systems, like: [Next-Transl
66

77
To use:
88

9-
1. Create a `OPENAI_KEY` in your `.env` file
9+
1. Create a `OPENAI_API_KEY` in your `.env` file
1010
2. Create a config file, called `i18n-magic.js` in your project root.
1111

1212
The content of the file should look something like this:
@@ -21,7 +21,7 @@ module.exports = {
2121
defaultNamespace: 'common',
2222
namespaces: ['common', 'forms'],
2323
context:
24-
'This is a context which increases the quality of the translations by giving context to GPT 3.5',
24+
'This is a context which increases the quality of the translations by giving context to the LLM',
2525
};
2626
```
2727

biome.json

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
3+
"javascript": {
4+
"formatter": {
5+
"semicolons": "asNeeded"
6+
}
7+
},
8+
"formatter": {
9+
"formatWithErrors": true,
10+
"ignore": ["**/.next/**", "**/ios/**", "**/android/**", "**/out/**"],
11+
"indentStyle": "space"
12+
},
13+
"linter": {
14+
"enabled": true,
15+
"rules": {
16+
"a11y": {
17+
"noSvgWithoutTitle": "off",
18+
"useButtonType": "off",
19+
"useKeyWithClickEvents": "off"
20+
},
21+
"style": {
22+
"noUnusedTemplateLiteral": "off"
23+
},
24+
"correctness": {
25+
"noEmptyPattern": "off",
26+
"useExhaustiveDependencies": "warn",
27+
"noUnreachable": "off"
28+
},
29+
"recommended": true,
30+
"complexity": {
31+
"noStaticOnlyClass": "off",
32+
"noThisInStatic": "off"
33+
},
34+
"suspicious": {
35+
"noEmptyInterface": "off",
36+
"noExplicitAny": "off",
37+
"noArrayIndexKey": "off"
38+
},
39+
"security": {
40+
"noDangerouslySetInnerHtml": "off"
41+
}
42+
}
43+
}
44+
}

package.json

+11-38
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "i18n-magic",
3-
"version": "0.4.0",
3+
"version": "0.6.0",
44
"license": "MIT",
5-
"description": "CLI to help you manage your locales JSON with translations, replacements, etc. with GPT 3.5",
5+
"description": "CLI to help you manage your locales JSON with translations, replacements, etc. with OpenAI",
66
"repository": {
77
"type": "git",
88
"url": "https://github.com/BjoernRave/i18n-magic.git"
@@ -12,10 +12,7 @@
1212
"module": "dist/i18n-magic.esm.js",
1313
"typings": "dist/index.d.ts",
1414
"bin": "dist/index.js",
15-
"files": [
16-
"dist",
17-
"src"
18-
],
15+
"files": ["dist", "src"],
1916
"scripts": {
2017
"analyze": "size-limit --why",
2118
"build": "dts build && echo '#!/usr/bin/env node' | cat - dist/index.js > temp && mv temp dist/index.js",
@@ -25,51 +22,27 @@
2522
"start": "dts watch",
2623
"test": "dts test"
2724
},
28-
"husky": {
29-
"hooks": {
30-
"pre-commit": "dts lint"
31-
}
32-
},
33-
"prettier": {
34-
"printWidth": 80,
35-
"semi": true,
36-
"singleQuote": true,
37-
"trailingComma": "es5"
38-
},
3925
"jest": {
4026
"testEnvironment": "node"
4127
},
4228
"engines": {
43-
"node": ">=12"
29+
"node": ">=18"
4430
},
45-
"size-limit": [
46-
{
47-
"path": "dist/i18n-magic.cjs.production.min.js",
48-
"limit": "10 KB"
49-
},
50-
{
51-
"path": "dist/i18n-magic.esm.js",
52-
"limit": "10 KB"
53-
}
54-
],
5531
"dependencies": {
5632
"chalk": "^5.3.0",
57-
"commander": "^11.1.0",
58-
"dotenv": "^16.3.1",
33+
"commander": "^12.0.0",
34+
"dotenv": "^16.4.5",
5935
"fast-glob": "^3.3.2",
6036
"i18next-scanner": "^4.4.0",
61-
"openai": "^4.17.3",
37+
"openai": "^4.28.0",
6238
"prompts": "^2.4.2"
6339
},
6440
"devDependencies": {
65-
"@size-limit/preset-small-lib": "^10.0.2",
6641
"@tsconfig/recommended": "^1.0.3",
67-
"@types/node": "^20.9.0",
68-
"@types/prompts": "^2.4.8",
69-
"dts-cli": "^2.0.3",
70-
"husky": "^8.0.3",
71-
"size-limit": "^10.0.2",
42+
"@types/node": "^20.11.19",
43+
"@types/prompts": "^2.4.9",
44+
"dts-cli": "^2.0.4",
7245
"tslib": "^2.6.2",
73-
"typescript": "^5.2.2"
46+
"typescript": "^5.3.3"
7447
}
7548
}

0 commit comments

Comments
 (0)