Skip to content
Snippets Groups Projects
Unverified Commit 1a6abb38 authored by Alex Yang's avatar Alex Yang Committed by GitHub
Browse files

build: community package cleanup before release (#897)

parent 6bc5bddb
Branches
No related tags found
No related merge requests found
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: {
......
{
"jsc": {
"parser": {
"syntax": "typescript"
},
"target": "esnext"
},
"module": {
"type": "commonjs",
"ignoreDynamic": true
}
}
{
"jsc": {
"parser": {
"syntax": "typescript"
},
"target": "esnext"
}
}
......@@ -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:*"
}
}
......@@ -5,8 +5,8 @@
"outDir": "./dist/type",
"tsBuildInfoFile": "./dist/.tsbuildinfo",
"emitDeclarationOnly": true,
"module": "node16",
"moduleResolution": "node16",
"module": "ESNext",
"moduleResolution": "bundler",
"types": ["node"]
},
"include": ["./src"],
......
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "./dist/script/type",
"tsBuildInfoFile": "./dist/script/.tsbuildinfo",
"emitDeclarationOnly": true
},
"include": ["./tsup.config.ts"]
}
import { defineConfig } from "tsup";
export default defineConfig([
{
entry: ["src/index.ts", "src/llm/bedrock/base.ts"],
format: ["cjs", "esm"],
sourcemap: true,
},
]);
......@@ -141,7 +141,8 @@
"files": [
"dist",
"CHANGELOG.md",
"examples"
"examples",
"!**/*.tsbuildinfo"
],
"repository": {
"type": "git",
......
......@@ -48,7 +48,8 @@
},
"files": [
"dist",
"CHANGELOG.md"
"CHANGELOG.md",
"!**/*.tsbuildinfo"
],
"repository": {
"type": "git",
......
......@@ -37,7 +37,8 @@
},
"files": [
"dist",
"CHANGELOG.md"
"CHANGELOG.md",
"!**/*.tsbuildinfo"
],
"repository": {
"type": "git",
......
......@@ -42,7 +42,8 @@
},
"files": [
"dist",
"CHANGELOG.md"
"CHANGELOG.md",
"!**/*.tsbuildinfo"
],
"repository": {
"type": "git",
......
This diff is collapsed.
{
"extends": "./tsconfig.json",
"compilerOptions": {
"allowJs": true
},
"include": ["."],
"exclude": ["**/node_modules", "**/dist", "**/lib"]
}
......@@ -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"
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment