Skip to content
Merged
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
8 changes: 4 additions & 4 deletions packages/devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@
"dependencies": {
"@nano_kit/platform-web": "workspace:^",
"@nano_kit/store": "workspace:^",
"nanoviews": "1.0.0-prerelease.20260923175652"
"nanoviews": "^1.0.0"
},
"devDependencies": {
"@nanoviews/storybook": "1.0.0-prerelease.20260923175652",
"@nanoviews/storybook-vite": "1.0.0-prerelease.20260923175652",
"@nanoviews/testing-library": "1.0.0-prerelease.20260923175652",
"@nanoviews/storybook": "^1.0.0",
"@nanoviews/storybook-vite": "^1.0.0",
"@nanoviews/testing-library": "^1.0.0",
"@testing-library/dom": "catalog:",
"@types/svg-sprite": "^0.0.39",
"@vitest/coverage-v8": "catalog:",
Expand Down
8 changes: 8 additions & 0 deletions packages/devtools/src/devtools.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import {
InjectionContext,
UninspectedMode,
inject,
provide,
signal,
uninspected,
start
} from '@nano_kit/store'
Expand Down Expand Up @@ -59,6 +61,12 @@ export interface DevtoolsOptions {
* ```
*/
export function devtools({ library }: DevtoolsOptions = {}) {
// A production core marks no node of the panel: the panel would hear its own nodes without end
if (!(uninspected(() => signal()).node.modes & UninspectedMode)) {
console.warn('[nano_kit/devtools] The core is a production build, which reports nothing to the panel: call devtools() in development alone, with the `development` condition resolved for @nano_kit/store')
return
}

// Whatever the DevTools create is theirs and never shows among the nodes of the application
uninspected(() => {
const context = new InjectionContext(library && [
Expand Down
66 changes: 30 additions & 36 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ minimumReleaseAgeExclude:
- '@nanoviews/*'
- '@trigen/*'
overrides:
# nanoviews depends on published kida snapshots; the workspace core is the one instance every graph shares
# nanoviews depends on the published kida; the workspace core is the one instance every graph shares
agera: workspace:^
kida: workspace:^
'@nano_kit/devtools@*': workspace:^
Expand Down
Loading