Repository navigation
Conversation
|
By default, |
|
My mistake! I'll move the workspace scope to |
5adb5ea to
cc10c2e
Compare
|
I saved a shared query and a private query in the old version, then upgraded. My shared query was still in the list, but Data Inspector treated it as private. My private query disappeared from the list. We need to handle this migration so users can still find their saved queries. |
|
Took another pass at this. The migration is the problem. If 🤔 |
|
I prefer |
|
Cool, agreed on For the migration, the implicit version doesn't hold up. Shared is the easy half, only the workspace scope ever wrote So the plan is explicit: kit exposes the legacy path, and Data Inspector lists the unclaimed records so users can claim some into this project or discard them. Claimed records remember which project took them, so the next project only sees the rest, or sees all but marks the claimed ones. Discard is for records from a project that's gone, otherwise they keep the file and the notice alive forever. Once nothing is unclaimed the file can be deleted after a while. Each official plugin needs its own handling here, since only the plugin knows what its files mean. Third-party ones can pick it up from the same API if their authors care. Settings I'd leave alone. Global and project both wrote This breaks stored data, maybe it needs a release note and a Upstream, a contract check that the three storage dirs are distinct would have caught this, so I'd add one too. |
Description
createViteDevToolsHost().getStorageDir()putworkspaceinsidenode_modulesand returned the same~/.vite/devtoolsfor bothprojectandglobal. devframe defines the three scopes as committable and team-shared, per-checkout, and per-user, so saved presets land in a directory that is gitignored and cleared by an install, and nothing is per-checkout at all.Each scope now gets its own directory:
workspaceis<workspaceRoot>/.vite-devtools,projectis<workspaceRoot>/node_modules/.vite/devtools, andglobalstays~/.vite/devtools.The remote-asset cache in
packages/core/src/node/start.tsreads theprojectscope, so it moves from the home directory intonode_modulesand rotates with an install, like the rest of the per-checkout data.Test
packages/kit/src/node/vite-host.test.tscovers the three scopes, thatprojectandglobaldiffer, and thatworkspaceRootfalls back to the Vite root. Four of the five cases fail onmain:Linked Issues
N/A
Additional context
@devframes/plugin-data-inspectoralready writes its saved queries through both theworkspaceandprojectscopes (plugins/data-inspector/src/node/saved-queries.ts), which is what turns the wrong mapping from a theoretical problem into a visible one.