@simon_he/translate
Version:
A fast, robust, and lightweight translation library supporting 5 translation services (Google, Bing, DeepL, MyMemory, Lingva) with automatic fallback, batch processing, caching, and full TypeScript support.
135 lines (134 loc) • 4.21 kB
JSON
{
"name": "@simon_he/translate",
"version": "0.0.13",
"description": "A fast, robust, and lightweight translation library supporting 5 translation services (Google, Bing, DeepL, MyMemory, Lingva) with automatic fallback, batch processing, caching, and full TypeScript support.",
"author": "Simon He",
"license": "MIT",
"funding": "https://github.com/sponsors/Simon-He95",
"homepage": "https://github.com/Simon-He95/translate#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/Simon-He95/translate.git"
},
"bugs": "https://github.com/Simon-He95/translate/issues",
"keywords": [
"translate",
"translation",
"translator",
"google-translate",
"bing-translate",
"deepl",
"deeplx",
"mymemory",
"lingva",
"i18n",
"internationalization",
"localization",
"multilingual",
"language",
"text-translation",
"batch-translation",
"auto-translate",
"machine-translation",
"free-translation",
"open-source-translation",
"typescript",
"nodejs",
"javascript",
"es6",
"esm",
"cjs",
"promise",
"async",
"api",
"fallback",
"robust",
"fast",
"lightweight",
"reliable",
"cross-platform",
"multiple-providers",
"translation-api"
],
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"typesVersions": {
"*": {
"*": [
"./dist/*",
"./dist/index.d.ts"
]
}
},
"files": [
"dist"
],
"engines": {
"node": ">=14.0.0"
},
"os": [
"darwin",
"linux",
"win32"
],
"cpu": [
"x64",
"arm64"
],
"scripts": {
"build": "tsup ./src/index.ts --format cjs,esm --dts --clean --minify --splitting",
"dev": "npm run build -- --watch src",
"demo": "tsx demo.ts",
"format": "prettier --write --cache .",
"lint": "eslint . --cache",
"lint:fix": "pnpm run lint --fix",
"prepublishOnly": "nr build",
"release": "bumpp && npm publish",
"test": "vitest",
"test:working": "vitest run test/index.test.ts test/simple.test.ts test/final.test.ts test/mymemory.test.ts test/bing.test.ts --reporter=verbose",
"test:reliable": "vitest run test/mymemory.test.ts test/bing.test.ts --reporter=verbose",
"test:core": "vitest run test/index.test.ts test/simple.test.ts test/final.test.ts --reporter=verbose",
"test:services": "vitest run --reporter=verbose test/google.test.ts test/bing.test.ts test/deeplx.test.ts test/mymemory.test.ts test/lingva.test.ts test/all-services.test.ts",
"test:google": "vitest run test/google.test.ts",
"test:bing": "vitest run test/bing.test.ts",
"test:deeplx": "vitest run test/deeplx.test.ts",
"test:mymemory": "vitest run test/mymemory.test.ts",
"test:lingva": "vitest run test/lingva.test.ts",
"test:integration": "vitest run test/all-services.test.ts",
"test:performance": "vitest run test/performance.test.ts --reporter=verbose",
"test:stress": "vitest run test/stress.test.ts --reporter=verbose",
"test:benchmark": "vitest run test/benchmark.test.ts --reporter=verbose",
"test:diagnose": "vitest run test/diagnose.test.ts --reporter=verbose --testTimeout=25000",
"test:debug": "vitest run test/debug-empty.test.ts --reporter=verbose",
"test:lingva-diagnose": "tsx test/lingva-diagnose.ts",
"test:quick": "tsx test/quick-test.ts",
"test:all": "npm run test && npm run test:services && npm run test:performance && npm run test:benchmark",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"@antfu/eslint-config": "^4.10.2",
"@google-cloud/translate": "^8.5.1",
"@types/node": "^18.19.81",
"bing-translate-api": "^4.0.2",
"bumpp": "^8.2.1",
"deeplx": "^0.1.3",
"eslint": "^9.23.0",
"google-translate-api": "^2.3.0",
"lint-staged": "^13.3.0",
"picocolors": "^1.1.1",
"prettier": "^2.8.8",
"tsup": "^6.7.0",
"tsx": "^3.14.0",
"typescript": "^4.9.5",
"vitest": "^3.0.9"
}
}