-
-
Notifications
You must be signed in to change notification settings - Fork 121
chore: fix issues with bundling #251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
8eeff13
53b31f8
0b83b93
e1e0834
fbc3b1f
706f175
263f5ff
a87bbec
af4f11f
53078bb
36fca71
e0a64e0
a4246e7
f6d5eba
c76fe4c
b70e970
300c17d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -10,16 +10,23 @@ | |||||
| "directory": "packages/typescript/ai" | ||||||
| }, | ||||||
| "type": "module", | ||||||
| "types": "./dist/esm/index.d.ts", | ||||||
| "module": "./dist/esm/index.js", | ||||||
| "types": "./dist/index/index.d.ts", | ||||||
| "module": "./dist/index/index.js", | ||||||
| "exports": { | ||||||
| ".": { | ||||||
| "types": "./dist/esm/index.d.ts", | ||||||
| "import": "./dist/esm/index.js" | ||||||
| "types": "./dist/index/index.d.ts", | ||||||
| "development": { | ||||||
| "import": "./dist/index/dev.js" | ||||||
| }, | ||||||
| "import": "./dist/index/index.js" | ||||||
| }, | ||||||
| "./server": { | ||||||
| "types": "./dist/index/index.d.ts", | ||||||
| "import": "./dist/index/server.js" | ||||||
| }, | ||||||
| "./production": { | ||||||
| "types": "./dist/esm/production.d.ts", | ||||||
| "import": "./dist/esm/production.js" | ||||||
| "types": "./dist/production/index.d.ts", | ||||||
| "import": "./dist/production/index.js" | ||||||
| }, | ||||||
| "./package.json": "./package.json" | ||||||
| }, | ||||||
|
|
@@ -28,7 +35,7 @@ | |||||
| "src" | ||||||
| ], | ||||||
| "scripts": { | ||||||
| "build": "vite build", | ||||||
| "build": "tsup", | ||||||
| "clean": "premove ./build ./dist", | ||||||
| "lint:fix": "eslint ./src --fix", | ||||||
| "test:build": "publint --strict", | ||||||
|
|
@@ -48,13 +55,15 @@ | |||||
| "dependencies": { | ||||||
| "@tanstack/ai": "workspace:*", | ||||||
| "@tanstack/devtools-ui": "^0.4.4", | ||||||
| "@tanstack/devtools-utils": "^0.3.0", | ||||||
| "@tanstack/devtools-utils": "https://pkg.pr.new/TanStack/devtools/@tanstack/devtools-utils@332", | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PR preview URL should not be used as a production dependency. The π§ Suggested fixRevert to a semver range or publish a stable version before merging: - "@tanstack/devtools-utils": "https://pkg.pr.new/TanStack/devtools/@tanstack/devtools-utils@332",
+ "@tanstack/devtools-utils": "^0.3.0",Or if a newer version is needed, publish it to npm first and reference that version. π Committable suggestion
Suggested change
π€ Prompt for AI Agents |
||||||
| "goober": "^2.1.18", | ||||||
| "solid-js": "^1.9.10" | ||||||
| }, | ||||||
| "devDependencies": { | ||||||
| "@vitest/coverage-v8": "4.0.14", | ||||||
| "jsdom": "^27.2.0", | ||||||
| "tsup": "^8.5.1", | ||||||
| "tsup-preset-solid": "^2.2.0", | ||||||
| "vite": "^7.2.7", | ||||||
| "vite-plugin-solid": "^2.11.10" | ||||||
| } | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| import { lazy } from 'solid-js' | ||
| import { constructCoreClass } from '@tanstack/devtools-utils/solid' | ||
|
|
||
| const Component = lazy(() => import('./components/Shell')) | ||
|
|
||
| export interface AiDevtoolsInit {} | ||
|
|
||
| const [AiDevtoolsCore, AiDevtoolsCoreNoOp] = constructCoreClass(Component) | ||
| const [AiDevtoolsCore, AiDevtoolsCoreNoOp] = constructCoreClass( | ||
| lazy(() => import('./components/Shell')), | ||
| ) | ||
|
|
||
| export { AiDevtoolsCore, AiDevtoolsCoreNoOp } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| import { defineConfig } from 'tsup' | ||
| import { generateTsupOptions, parsePresetOptions } from 'tsup-preset-solid' | ||
|
|
||
| const preset_options = { | ||
| entries: [ | ||
| { | ||
| entry: 'src/index.ts', | ||
| dev_entry: true, | ||
| server_entry: true, | ||
| }, | ||
| { | ||
| entry: 'src/production.ts', | ||
| name: 'production', | ||
| }, | ||
| ], | ||
| cjs: false, | ||
| drop_console: true, | ||
| } | ||
|
|
||
| export default defineConfig(() => { | ||
| const parsed_data = parsePresetOptions(preset_options) | ||
| const tsup_options = generateTsupOptions(parsed_data) | ||
|
|
||
| return tsup_options.map((option: any) => ({ | ||
| ...option, | ||
| loader: { | ||
| '.png': 'dataurl', | ||
| }, | ||
| })) | ||
| }) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,16 +29,36 @@ | |
| "module": "./dist/esm/index.js", | ||
| "exports": { | ||
| ".": { | ||
| "import": { | ||
| "workerd": { | ||
| "types": "./dist/esm/server.d.ts", | ||
| "import": "./dist/esm/server.js" | ||
| }, | ||
| "edge-light": { | ||
| "types": "./dist/esm/server.d.ts", | ||
| "import": "./dist/esm/server.js" | ||
| }, | ||
| "netlify": { | ||
| "types": "./dist/esm/server.d.ts", | ||
| "import": "./dist/esm/server.js" | ||
| }, | ||
| "deno": { | ||
| "types": "./dist/esm/server.d.ts", | ||
| "import": "./dist/esm/server.js" | ||
| }, | ||
| "node": { | ||
| "types": "./dist/esm/server.d.ts", | ||
| "import": "./dist/esm/server.js" | ||
| }, | ||
| "browser": { | ||
| "types": "./dist/esm/index.d.ts", | ||
| "default": "./dist/esm/index.js" | ||
| } | ||
| "import": "./dist/esm/index.js" | ||
| }, | ||
| "types": "./dist/esm/index.d.ts", | ||
| "import": "./dist/esm/index.js" | ||
| }, | ||
| "./production": { | ||
| "import": { | ||
| "types": "./dist/esm/production.d.ts", | ||
| "default": "./dist/esm/production.js" | ||
| } | ||
| "types": "./dist/esm/production.d.ts", | ||
| "import": "./dist/esm/production.js" | ||
| }, | ||
| "./package.json": "./package.json" | ||
| }, | ||
|
|
@@ -49,7 +69,7 @@ | |
| ], | ||
| "dependencies": { | ||
| "@tanstack/ai-devtools-core": "workspace:*", | ||
| "@tanstack/devtools-utils": "^0.3.0" | ||
| "@tanstack/devtools-utils": "https://pkg.pr.new/TanStack/devtools/@tanstack/devtools-utils@332" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Direct URL dependency should be replaced before merging. Same issue as in π€ Prompt for AI Agents |
||
| }, | ||
| "devDependencies": { | ||
| "@vitest/coverage-v8": "4.0.14", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| /** | ||
| * Server-side stub for Preact AI Devtools. | ||
| * This module provides no-op implementations that are safe to import in SSR environments. | ||
| */ | ||
|
|
||
| export interface AiDevtoolsPreactInit { | ||
| buttonPosition?: | ||
| | 'top-left' | ||
| | 'top-right' | ||
| | 'bottom-left' | ||
| | 'bottom-right' | ||
| | 'relative' | ||
| initialIsOpen?: boolean | ||
| errorTypes?: Array<string> | ||
| styleNonce?: string | ||
| shadowDOMTarget?: ShadowRoot | ||
| } | ||
|
|
||
| /** | ||
| * No-op AiDevtoolsPanel component for server-side rendering. | ||
| */ | ||
| export const AiDevtoolsPanel = (): null => null | ||
|
|
||
| /** | ||
| * No-op aiDevtoolsPlugin for server-side rendering. | ||
| */ | ||
| export const aiDevtoolsPlugin = () => ({ | ||
| name: 'TanStack AI', | ||
| id: 'tanstack-ai', | ||
| defaultOpen: true, | ||
| component: () => null, | ||
| }) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,16 +29,36 @@ | |
| "module": "./dist/esm/index.js", | ||
| "exports": { | ||
| ".": { | ||
| "import": { | ||
| "workerd": { | ||
| "types": "./dist/esm/server.d.ts", | ||
| "import": "./dist/esm/server.js" | ||
| }, | ||
| "edge-light": { | ||
| "types": "./dist/esm/server.d.ts", | ||
| "import": "./dist/esm/server.js" | ||
| }, | ||
| "netlify": { | ||
| "types": "./dist/esm/server.d.ts", | ||
| "import": "./dist/esm/server.js" | ||
| }, | ||
| "deno": { | ||
| "types": "./dist/esm/server.d.ts", | ||
| "import": "./dist/esm/server.js" | ||
| }, | ||
| "node": { | ||
| "types": "./dist/esm/server.d.ts", | ||
| "import": "./dist/esm/server.js" | ||
| }, | ||
| "browser": { | ||
| "types": "./dist/esm/index.d.ts", | ||
| "default": "./dist/esm/index.js" | ||
| } | ||
| "import": "./dist/esm/index.js" | ||
| }, | ||
| "types": "./dist/esm/index.d.ts", | ||
| "import": "./dist/esm/index.js" | ||
| }, | ||
| "./production": { | ||
| "import": { | ||
| "types": "./dist/esm/production.d.ts", | ||
| "default": "./dist/esm/production.js" | ||
| } | ||
| "types": "./dist/esm/production.d.ts", | ||
| "import": "./dist/esm/production.js" | ||
| }, | ||
| "./package.json": "./package.json" | ||
| }, | ||
|
|
@@ -49,7 +69,7 @@ | |
| ], | ||
| "dependencies": { | ||
| "@tanstack/ai-devtools-core": "workspace:*", | ||
| "@tanstack/devtools-utils": "^0.3.0" | ||
| "@tanstack/devtools-utils": "https://pkg.pr.new/TanStack/devtools/@tanstack/devtools-utils@332" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Direct URL dependency should be replaced before merging. The π€ Prompt for AI Agents |
||
| }, | ||
| "peerDependencies": { | ||
| "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| /** | ||
| * Server-side stub for React AI Devtools. | ||
| * This module provides no-op implementations that are safe to import in SSR environments. | ||
| */ | ||
|
|
||
| export interface AiDevtoolsReactInit { | ||
| buttonPosition?: | ||
| | 'top-left' | ||
| | 'top-right' | ||
| | 'bottom-left' | ||
| | 'bottom-right' | ||
| | 'relative' | ||
| initialIsOpen?: boolean | ||
| errorTypes?: Array<string> | ||
| styleNonce?: string | ||
| shadowDOMTarget?: ShadowRoot | ||
| } | ||
|
|
||
| /** | ||
| * No-op AiDevtoolsPanel component for server-side rendering. | ||
| */ | ||
| export const AiDevtoolsPanel = (): null => null | ||
|
|
||
| /** | ||
| * No-op aiDevtoolsPlugin for server-side rendering. | ||
| */ | ||
| export const aiDevtoolsPlugin = () => ({ | ||
| name: 'TanStack AI', | ||
| id: 'tanstack-ai', | ||
| defaultOpen: true, | ||
| component: () => null, | ||
| }) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,15 +14,38 @@ | |
| "types": "./dist/esm/index.d.ts", | ||
| "exports": { | ||
| ".": { | ||
| "workerd": { | ||
| "types": "./dist/esm/server.d.ts", | ||
| "import": "./dist/esm/server.js" | ||
| }, | ||
| "edge-light": { | ||
| "types": "./dist/esm/server.d.ts", | ||
| "import": "./dist/esm/server.js" | ||
| }, | ||
| "netlify": { | ||
| "types": "./dist/esm/server.d.ts", | ||
| "import": "./dist/esm/server.js" | ||
| }, | ||
| "deno": { | ||
| "types": "./dist/esm/server.d.ts", | ||
| "import": "./dist/esm/server.js" | ||
| }, | ||
| "node": { | ||
| "types": "./dist/esm/server.d.ts", | ||
| "import": "./dist/esm/server.js" | ||
| }, | ||
| "browser": { | ||
| "types": "./dist/esm/index.d.ts", | ||
| "import": "./dist/esm/index.js" | ||
| }, | ||
| "types": "./dist/esm/index.d.ts", | ||
| "import": "./dist/esm/index.js" | ||
| }, | ||
| "./production": { | ||
| "import": { | ||
| "types": "./dist/esm/production.d.ts", | ||
| "default": "./dist/esm/production.js" | ||
| } | ||
| } | ||
| "types": "./dist/esm/production.d.ts", | ||
| "import": "./dist/esm/production.js" | ||
| }, | ||
| "./package.json": "./package.json" | ||
| }, | ||
| "files": [ | ||
| "dist", | ||
|
|
@@ -48,7 +71,7 @@ | |
| ], | ||
| "dependencies": { | ||
| "@tanstack/ai-devtools-core": "workspace:*", | ||
| "@tanstack/devtools-utils": "^0.3.0" | ||
| "@tanstack/devtools-utils": "https://pkg.pr.new/TanStack/devtools/@tanstack/devtools-utils@332" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Direct URL dependency should be replaced before merging. Same issue as in the other packages: the π€ Prompt for AI Agents |
||
| }, | ||
| "peerDependencies": { | ||
| "solid-js": ">=1.9.7" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.