build: community package cleanup before release (#897)

This commit is contained in:
Alex Yang
2024-06-11 10:47:35 -07:00
committed by GitHub
parent 6bc5bddb59
commit 1a6abb38bc
14 changed files with 705 additions and 955 deletions
+3 -1
View File
@@ -1,3 +1,5 @@
const { join } = require("node:path");
module.exports = {
root: true,
extends: [
@@ -6,7 +8,7 @@ module.exports = {
"plugin:@typescript-eslint/recommended-type-checked-only",
],
parserOptions: {
project: true,
project: join(__dirname, "tsconfig.eslint.json"),
__tsconfigRootDir: __dirname,
},
settings: {
-12
View File
@@ -1,12 +0,0 @@
{
"jsc": {
"parser": {
"syntax": "typescript"
},
"target": "esnext"
},
"module": {
"type": "commonjs",
"ignoreDynamic": true
}
}
-8
View File
@@ -1,8 +0,0 @@
{
"jsc": {
"parser": {
"syntax": "typescript"
},
"target": "esnext"
}
}
+12 -14
View File
@@ -13,23 +13,24 @@
},
"require": {
"types": "./dist/type/index.d.ts",
"default": "./dist/cjs/index.js"
"default": "./dist/index.cjs"
}
},
"./*": {
"./llm/bedrock": {
"import": {
"types": "./dist/type/*.d.ts",
"default": "./dist/*.js"
"types": "./dist/type/llm/bedrock.d.ts",
"default": "./dist/llm/bedrock/base.js"
},
"require": {
"types": "./dist/type/*.d.ts",
"default": "./dist/cjs/*.js"
"types": "./dist/type/llm/bedrock.d.ts",
"default": "./dist/llm/bedrock/base.cjs"
}
}
},
"files": [
"dist",
"CHANGELOG.md"
"CHANGELOG.md",
"!**/*.tsbuildinfo"
],
"repository": {
"type": "git",
@@ -37,23 +38,20 @@
"directory": "packages/community"
},
"scripts": {
"lint": "eslint .",
"build": "rm -rf ./dist && pnpm run build:esm && pnpm run build:cjs && pnpm run build:type",
"build:esm": "swc src -d dist --strip-leading-paths --config-file ../../.swcrc",
"build:cjs": "swc src -d dist/cjs --strip-leading-paths --config-file ../../.cjs.swcrc",
"build": "rm -rf ./dist && pnpm run build:code && pnpm run build:type",
"build:code": "tsup",
"build:type": "tsc -p tsconfig.json",
"postbuild": "node -e \"require('fs').writeFileSync('./dist/cjs/package.json', JSON.stringify({ type: 'commonjs' }))\"",
"dev": "concurrently \"pnpm run build:esm --watch\" \"pnpm run build:cjs --watch\" \"pnpm run build:type --watch\""
},
"devDependencies": {
"@swc/cli": "^0.3.12",
"@swc/core": "^1.5.5",
"concurrently": "^8.2.2",
"pathe": "^1.1.2"
"tsup": "^8.1.0"
},
"dependencies": {
"@aws-sdk/client-bedrock-runtime": "^3.582.0",
"@types/node": "^20.12.11",
"@types/node": "^20.14.2",
"llamaindex": "workspace:*"
}
}
+2 -2
View File
@@ -5,8 +5,8 @@
"outDir": "./dist/type",
"tsBuildInfoFile": "./dist/.tsbuildinfo",
"emitDeclarationOnly": true,
"module": "node16",
"moduleResolution": "node16",
"module": "ESNext",
"moduleResolution": "bundler",
"types": ["node"]
},
"include": ["./src"],
+9
View File
@@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "./dist/script/type",
"tsBuildInfoFile": "./dist/script/.tsbuildinfo",
"emitDeclarationOnly": true
},
"include": ["./tsup.config.ts"]
}
+9
View File
@@ -0,0 +1,9 @@
import { defineConfig } from "tsup";
export default defineConfig([
{
entry: ["src/index.ts", "src/llm/bedrock/base.ts"],
format: ["cjs", "esm"],
sourcemap: true,
},
]);
+2 -1
View File
@@ -141,7 +141,8 @@
"files": [
"dist",
"CHANGELOG.md",
"examples"
"examples",
"!**/*.tsbuildinfo"
],
"repository": {
"type": "git",
+2 -1
View File
@@ -48,7 +48,8 @@
},
"files": [
"dist",
"CHANGELOG.md"
"CHANGELOG.md",
"!**/*.tsbuildinfo"
],
"repository": {
"type": "git",
+2 -1
View File
@@ -37,7 +37,8 @@
},
"files": [
"dist",
"CHANGELOG.md"
"CHANGELOG.md",
"!**/*.tsbuildinfo"
],
"repository": {
"type": "git",
+2 -1
View File
@@ -42,7 +42,8 @@
},
"files": [
"dist",
"CHANGELOG.md"
"CHANGELOG.md",
"!**/*.tsbuildinfo"
],
"repository": {
"type": "git",
+648 -914
View File
File diff suppressed because it is too large Load Diff
+8
View File
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"allowJs": true
},
"include": ["."],
"exclude": ["**/node_modules", "**/dist", "**/lib"]
}
+6
View File
@@ -20,6 +20,12 @@
{
"path": "./apps/docs/tsconfig.json"
},
{
"path": "./packages/community/tsconfig.json"
},
{
"path": "./packages/community/tsconfig.script.json"
},
{
"path": "./packages/core/tsconfig.json"
},