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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"remote.spin.cliPath": {
"type": "string",
"markdownDescription": "The spin CLI that opens Spinbox workspaces (`spin+<workspace>`). Empty runs the one the Spinbox extension carries, or else `spin` on the PATH.",
"scope": "machine",
"scope": "application",
"default": ""
}
}
Expand Down
12 changes: 11 additions & 1 deletion test/package-manifest.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const pkg = JSON.parse(fs.readFileSync(path.resolve(__dirname, '..', 'package.js
activationEvents: string[];
enabledApiProposals: string[];
contributes: {
configuration: { properties: Record<string, unknown> };
configuration: { properties: Record<string, { scope?: string }> };
commands: { command: string }[];
resourceLabelFormatters: { authority: string }[];
};
Expand Down Expand Up @@ -44,4 +44,14 @@ describe('package.json', () => {
const read = [...src.matchAll(/getConfiguration\('([\w.]+)'\)\.get<\w+>\('([\w.]+)'/g)].map(m => `${m[1]}.${m[2]}`);
expect(Object.keys(pkg.contributes.configuration.properties).sort()).toEqual([...new Set(read)].sort());
});

// Every setting is of the machine the resolver runs on, which is the window's own and never
// the workspace's: application scope is read from the person's settings in every window. A
// machine one is not, once the window is remote: VS Code reconnecting a dropped window read
// remote.spin.cliPath as empty and ran another spin (test:spin-remote in vscode-spinbox).
it('scopes every setting to the application', () => {
for (const [name, setting] of Object.entries(pkg.contributes.configuration.properties)) {
expect(setting.scope, name).toBe('application');
}
});
});
Loading