Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
"packages/typescript/smoke-tests/adapters/src/**",
"packages/typescript/smoke-tests/e2e/playwright.config.ts",
"packages/typescript/smoke-tests/e2e/src/**",
"packages/typescript/smoke-tests/e2e/vite.config.ts"
"packages/typescript/smoke-tests/e2e/vite.config.ts",
"packages/typescript/ai-devtools/src/production.ts"
],
"tsup": true,
"ignoreExportsUsedInFile": true,
"workspaces": {
"packages/react-ai": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"test:types": "nx affected --targets=test:types --exclude=examples/**",
"test:knip": "knip",
"test:docs": "node scripts/verify-links.ts",
"build": "nx affected --skip-nx-cache --targets=build --exclude=examples/**",
"build": "nx affected --skip-nx-cache --targets=build --exclude=examples/**,stream-processor-panel/**,packages/typescript/smoke-tests/**",
"build:all": "nx run-many --targets=build --exclude=examples/**",
"watch": "pnpm run build:all && nx watch --all -- pnpm run build:all",
"dev": "pnpm run watch",
Expand Down
25 changes: 17 additions & 8 deletions packages/typescript/ai-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand All @@ -28,7 +35,7 @@
"src"
],
"scripts": {
"build": "vite build",
"build": "tsup",
"clean": "premove ./build ./dist",
"lint:fix": "eslint ./src --fix",
"test:build": "publint --strict",
Expand All @@ -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",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | πŸ”΄ Critical

PR preview URL should not be used as a production dependency.

The @tanstack/devtools-utils dependency points to a PR preview URL (pkg.pr.new), which is ephemeral and not suitable for published packages. This will break when the preview expires or the PR is closed.

πŸ”§ Suggested fix

Revert 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

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"@tanstack/devtools-utils": "https://pkg.pr.new/TanStack/devtools/@tanstack/devtools-utils@332",
"@tanstack/devtools-utils": "^0.3.0",
πŸ€– Prompt for AI Agents
In `@packages/typescript/ai-devtools/package.json` at line 74, The dependency
"@tanstack/devtools-utils" in package.json currently points to an ephemeral PR
preview URL; replace that URL string with a stable published semver version
(e.g. a caret or exact npm version like "^<version>" or
"<major>.<minor>.<patch>") or remove it until the package is published, then add
the official npm release; update the dependency entry for
"@tanstack/devtools-utils" to reference the chosen semver version and run
install/lockfile update.

"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"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/typescript/ai-devtools/src/core.tsx
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 }
2 changes: 1 addition & 1 deletion packages/typescript/ai-devtools/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"strict": true,
"target": "ES2020"
},
"include": ["src", "vite.config.ts"],
"include": ["src", "vite.config.ts", "tsup.config.ts"],
"exclude": ["node_modules", "dist"]
}
30 changes: 30 additions & 0 deletions packages/typescript/ai-devtools/tsup.config.ts
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',
},
}))
})
14 changes: 2 additions & 12 deletions packages/typescript/ai-devtools/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { defineConfig, mergeConfig } from 'vitest/config'
import { tanstackViteConfig } from '@tanstack/vite-config'
import { defineConfig } from 'vitest/config'
import solid from 'vite-plugin-solid'
import packageJson from './package.json'

const config = defineConfig({
export default defineConfig({
plugins: [solid() as any],
test: {
name: packageJson.name,
Expand All @@ -14,12 +13,3 @@ const config = defineConfig({
typecheck: { enabled: true },
},
})

export default mergeConfig(
config,
tanstackViteConfig({
entry: ['./src/index.ts', './src/production.ts'],
srcDir: './src',
cjs: false,
}),
)
36 changes: 28 additions & 8 deletions packages/typescript/preact-ai-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand All @@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Direct URL dependency should be replaced before merging.

Same issue as in react-ai-devtools: the @tanstack/devtools-utils dependency points to a PR artifact URL that should be reverted to a proper semver version before merging.

πŸ€– Prompt for AI Agents
In `@packages/typescript/preact-ai-devtools/package.json` at line 72, The
package.json currently pins "@tanstack/devtools-utils" to a PR artifact URL;
replace that direct URL dependency with the intended semver package version
(e.g., the published `@tanstack/devtools-utils` X.Y.Z) so the dependency uses a
stable npm registry version instead of
"https://pkg.pr.new/TanStack/devtools/@tanstack/devtools-utils@332"; update the
dependency entry for "@tanstack/devtools-utils" in package.json accordingly and
ensure package-lock/yarn.lock is regenerated.

},
"devDependencies": {
"@vitest/coverage-v8": "4.0.14",
Expand Down
32 changes: 32 additions & 0 deletions packages/typescript/preact-ai-devtools/src/server.ts
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,
})
2 changes: 1 addition & 1 deletion packages/typescript/preact-ai-devtools/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const config = defineConfig({
export default mergeConfig(
config,
tanstackViteConfig({
entry: ['./src/index.ts', './src/production.ts'],
entry: ['./src/index.ts', './src/production.ts', './src/server.ts'],
srcDir: './src',
cjs: false,
}),
Expand Down
36 changes: 28 additions & 8 deletions packages/typescript/react-ai-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand All @@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Direct URL dependency should be replaced before merging.

The @tanstack/devtools-utils dependency points to a PR artifact URL (pkg.pr.new). This is appropriate for testing but should be reverted to a proper semver version (e.g., ^0.3.0 or a newly published version) before merging to main, as these URLs are typically ephemeral and may become unavailable.

πŸ€– Prompt for AI Agents
In `@packages/typescript/react-ai-devtools/package.json` at line 72, The
dependency entry for "@tanstack/devtools-utils" currently uses an ephemeral PR
artifact URL; replace that URL in package.json with a stable semver version (for
example "^0.3.0" or the appropriate published release) so the package resolution
is reproducible, then update the lockfile and run your package manager install
(npm/yarn/pnpm) to ensure the new version is persisted; verify the dependency
appears as the chosen semver in package.json and lockfile and that any importers
of `@tanstack/devtools-utils` continue to build.

},
"peerDependencies": {
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
Expand Down
32 changes: 32 additions & 0 deletions packages/typescript/react-ai-devtools/src/server.ts
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,
})
2 changes: 1 addition & 1 deletion packages/typescript/react-ai-devtools/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const config = defineConfig({
export default mergeConfig(
config,
tanstackViteConfig({
entry: ['./src/index.ts', './src/production.ts'],
entry: ['./src/index.ts', './src/production.ts', './src/server.ts'],
srcDir: './src',
cjs: false,
}),
Expand Down
35 changes: 29 additions & 6 deletions packages/typescript/solid-ai-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Direct URL dependency should be replaced before merging.

Same issue as in the other packages: the @tanstack/devtools-utils dependency points to a PR artifact URL that should be reverted to a proper semver version before merging.

πŸ€– Prompt for AI Agents
In `@packages/typescript/solid-ai-devtools/package.json` at line 74, The
package.json currently references a PR artifact URL for the dependency
"@tanstack/devtools-utils"; replace that direct URL entry with the appropriate
published semver version string (e.g., the previously used version or the
official released version) so the dependency points to a normal registry release
instead of the PR artifact; update the "@tanstack/devtools-utils" entry in
package.json accordingly and run your package manager install to verify
resolution.

},
"peerDependencies": {
"solid-js": ">=1.9.7"
Expand Down
Loading
Loading