Revisit code-workspace format (#33097)

* drop workspace ID from workspace file

* make folders types an object instead of just string

* fix compile

* polish relauncher for id change

* migrate old workspace format to new on startup

* more migration from previous workspace id

* more migration code

* change folder format to be a path

* support for relative paths in workspace file

* fix of ctor call

* put root validation and filtering into workspace

* ensure we always have file resources

* fix tests

* add tests for workspace

* 💄

* linting
This commit is contained in:
Benjamin Pasero
2017-08-25 16:22:30 +02:00
committed by GitHub
parent 6b1c9cd61d
commit 9de3068a4d
29 changed files with 367 additions and 249 deletions

View File

@@ -24,7 +24,7 @@ function options(custom?: Partial<IBestWindowOrFolderOptions<ISimpleWindow>>): I
reuseWindow: false,
context: OpenContext.CLI,
codeSettingsFolder: '_vscode',
workspaceResolver: workspace => { return workspace === testWorkspace ? { id: testWorkspace.id, folders: [path.join(fixturesFolder, 'vscode_workspace_1_folder'), path.join(fixturesFolder, 'vscode_workspace_2_folder')] } : null; },
workspaceResolver: workspace => { return workspace === testWorkspace ? { id: testWorkspace.id, configPath: workspace.configPath, folders: [{ path: path.join(fixturesFolder, 'vscode_workspace_1_folder') }, { path: path.join(fixturesFolder, 'vscode_workspace_2_folder') }] } : null; },
...custom
};
}