|
1 | 1 | { |
2 | 2 | "name": "@huggingface/inference", |
3 | | - "version": "3.13.2", |
| 3 | + "version": "3.14.0", |
4 | 4 | "packageManager": "[email protected]", |
5 | 5 | "license": "MIT", |
6 | 6 | "author": "Hugging Face and Tim Mikeladze <[email protected]>", |
|
30 | 30 | "!src/snippets/templates/**/*.jinja" |
31 | 31 | ], |
32 | 32 | "source": "src/index.ts", |
33 | | - "types": "./dist/src/index.d.ts", |
34 | | - "main": "./dist/index.cjs", |
35 | | - "module": "./dist/index.js", |
36 | | - "exports": { |
37 | | - "types": "./dist/src/index.d.ts", |
38 | | - "require": "./dist/index.cjs", |
39 | | - "import": "./dist/index.js" |
| 33 | + "types": "./dist/commonjs/index.d.ts", |
| 34 | + "main": "./dist/commonjs/index.js", |
| 35 | + "module": "./dist/esm/index.js", |
| 36 | + "tshy": { |
| 37 | + "exports": { |
| 38 | + "./package.json": "./package.json", |
| 39 | + ".": "./src/index.ts" |
| 40 | + } |
40 | 41 | }, |
41 | 42 | "type": "module", |
42 | 43 | "scripts": { |
43 | | - "build": "pnpm run export-templates && tsup src/index.ts --format cjs,esm --clean && tsc --emitDeclarationOnly --declaration", |
44 | | - "dts": "tsx scripts/generate-dts.ts && tsc --noEmit dist/index.d.ts", |
| 44 | + "build": "pnpm run export-templates && pnpm run package-to-ts && tshy", |
45 | 45 | "lint": "eslint --quiet --fix --ext .cjs,.ts .", |
46 | 46 | "lint:check": "eslint --ext .cjs,.ts .", |
47 | 47 | "format": "prettier --write .", |
|
52 | 52 | "test:browser": "vitest run --browser.name=chrome --browser.headless --config vitest.config.mts", |
53 | 53 | "check": "tsc", |
54 | 54 | "dev": "pnpm run export-templates && tsup src/index.ts --format cjs,esm --watch", |
55 | | - "export-templates": "tsx scripts/export-templates.ts" |
| 55 | + "export-templates": "tsx scripts/export-templates.ts", |
| 56 | + "package-to-ts": "tsx scripts/package-json-to-ts.ts" |
56 | 57 | }, |
57 | 58 | "dependencies": { |
58 | 59 | "@huggingface/tasks": "workspace:^", |
|
61 | 62 | "devDependencies": { |
62 | 63 | "@types/node": "18.13.0" |
63 | 64 | }, |
64 | | - "resolutions": {} |
| 65 | + "resolutions": {}, |
| 66 | + "exports": { |
| 67 | + "./package.json": "./package.json", |
| 68 | + ".": { |
| 69 | + "import": { |
| 70 | + "types": "./dist/esm/index.d.ts", |
| 71 | + "default": "./dist/esm/index.js" |
| 72 | + }, |
| 73 | + "require": { |
| 74 | + "types": "./dist/commonjs/index.d.ts", |
| 75 | + "default": "./dist/commonjs/index.js" |
| 76 | + } |
| 77 | + } |
| 78 | + } |
65 | 79 | } |
0 commit comments