Skip to content

Commit

Permalink
feat: always use workingCopy service
Browse files Browse the repository at this point in the history
for the autosave feature to work
Loïc Mangeonjean committed Jul 29, 2024
1 parent 13b7ad2 commit c0ed058
Showing 5 changed files with 3,162 additions and 2,141 deletions.
5,107 changes: 3,060 additions & 2,047 deletions package-lock.json

Large diffs are not rendered by default.

180 changes: 90 additions & 90 deletions package.json
Original file line number Diff line number Diff line change
@@ -72,9 +72,9 @@
"types": "./dist/features/typescriptStandalone.d.ts",
"default": "./dist/features/typescriptStandalone.js"
},
"./features/workingCopy": {
"types": "./dist/features/workingCopy.d.ts",
"default": "./dist/features/workingCopy.js"
"./features/workingCopyBackup": {
"types": "./dist/features/workingCopyBackup.d.ts",
"default": "./dist/features/workingCopyBackup.js"
}
},
"typesVersions": {
@@ -112,8 +112,8 @@
"features/typescriptStandalone": [
"./dist/features/typescriptStandalone.d.ts"
],
"features/workingCopy": [
"./dist/features/workingCopy.d.ts"
"features/workingCopyBackup": [
"./dist/features/workingCopyBackup.d.ts"
]
}
},
@@ -122,92 +122,92 @@
"stats.html"
],
"dependencies": {
"@codingame/monaco-vscode-accessibility-service-override": "^7.0.0",
"@codingame/monaco-vscode-clojure-default-extension": "^7.0.0",
"@codingame/monaco-vscode-coffeescript-default-extension": "^7.0.0",
"@codingame/monaco-vscode-configuration-editing-default-extension": "^7.0.0",
"@codingame/monaco-vscode-configuration-service-override": "^7.0.0",
"@codingame/monaco-vscode-cpp-default-extension": "^7.0.0",
"@codingame/monaco-vscode-csharp-default-extension": "^7.0.0",
"@codingame/monaco-vscode-css-default-extension": "^7.0.0",
"@codingame/monaco-vscode-debug-service-override": "^7.0.0",
"@codingame/monaco-vscode-dialogs-service-override": "^7.0.0",
"@codingame/monaco-vscode-diff-default-extension": "^7.0.0",
"@codingame/monaco-vscode-editor-service-override": "^7.0.0",
"@codingame/monaco-vscode-emmet-service-override": "^7.0.0",
"@codingame/monaco-vscode-explorer-service-override": "^7.0.0",
"@codingame/monaco-vscode-extension-gallery-service-override": "^7.0.0",
"@codingame/monaco-vscode-extensions-service-override": "^7.0.0",
"@codingame/monaco-vscode-files-service-override": "^7.0.0",
"@codingame/monaco-vscode-fsharp-default-extension": "^7.0.0",
"@codingame/monaco-vscode-go-default-extension": "^7.0.0",
"@codingame/monaco-vscode-groovy-default-extension": "^7.0.0",
"@codingame/monaco-vscode-html-default-extension": "^7.0.0",
"@codingame/monaco-vscode-java-default-extension": "^7.0.0",
"@codingame/monaco-vscode-javascript-default-extension": "^7.0.0",
"@codingame/monaco-vscode-json-default-extension": "^7.0.0",
"@codingame/monaco-vscode-julia-default-extension": "^7.0.0",
"@codingame/monaco-vscode-keybindings-service-override": "^7.0.0",
"@codingame/monaco-vscode-language-detection-worker-service-override": "^7.0.0",
"@codingame/monaco-vscode-languages-service-override": "^7.0.0",
"@codingame/monaco-vscode-lifecycle-service-override": "^7.0.0",
"@codingame/monaco-vscode-log-service-override": "^7.0.0",
"@codingame/monaco-vscode-lua-default-extension": "^7.0.0",
"@codingame/monaco-vscode-markdown-basics-default-extension": "^7.0.0",
"@codingame/monaco-vscode-markdown-language-features-default-extension": "^7.0.0",
"@codingame/monaco-vscode-markdown-math-default-extension": "^7.0.0",
"@codingame/monaco-vscode-markers-service-override": "^7.0.0",
"@codingame/monaco-vscode-media-preview-default-extension": "^7.0.0",
"@codingame/monaco-vscode-model-service-override": "^7.0.0",
"@codingame/monaco-vscode-multi-diff-editor-service-override": "^7.0.0",
"@codingame/monaco-vscode-notifications-service-override": "^7.0.0",
"@codingame/monaco-vscode-npm-default-extension": "^7.0.0",
"@codingame/monaco-vscode-objective-c-default-extension": "^7.0.0",
"@codingame/monaco-vscode-outline-service-override": "^7.0.0",
"@codingame/monaco-vscode-output-service-override": "^7.0.0",
"@codingame/monaco-vscode-perl-default-extension": "^7.0.0",
"@codingame/monaco-vscode-php-default-extension": "^7.0.0",
"@codingame/monaco-vscode-powershell-default-extension": "^7.0.0",
"@codingame/monaco-vscode-preferences-service-override": "^7.0.0",
"@codingame/monaco-vscode-python-default-extension": "^7.0.0",
"@codingame/monaco-vscode-quickaccess-service-override": "^7.0.0",
"@codingame/monaco-vscode-r-default-extension": "^7.0.0",
"@codingame/monaco-vscode-references-view-default-extension": "^7.0.0",
"@codingame/monaco-vscode-ruby-default-extension": "^7.0.0",
"@codingame/monaco-vscode-rust-default-extension": "^7.0.0",
"@codingame/monaco-vscode-scss-default-extension": "^7.0.0",
"@codingame/monaco-vscode-search-result-default-extension": "^7.0.0",
"@codingame/monaco-vscode-search-service-override": "^7.0.0",
"@codingame/monaco-vscode-shellscript-default-extension": "^7.0.0",
"@codingame/monaco-vscode-snippets-service-override": "^7.0.0",
"@codingame/monaco-vscode-sql-default-extension": "^7.0.0",
"@codingame/monaco-vscode-standalone-typescript-language-features": "^7.0.0",
"@codingame/monaco-vscode-storage-service-override": "^7.0.0",
"@codingame/monaco-vscode-swift-default-extension": "^7.0.0",
"@codingame/monaco-vscode-terminal-service-override": "^7.0.0",
"@codingame/monaco-vscode-testing-service-override": "^7.0.0",
"@codingame/monaco-vscode-textmate-service-override": "^7.0.0",
"@codingame/monaco-vscode-theme-defaults-default-extension": "^7.0.0",
"@codingame/monaco-vscode-theme-service-override": "^7.0.0",
"@codingame/monaco-vscode-theme-seti-default-extension": "^7.0.0",
"@codingame/monaco-vscode-timeline-service-override": "^7.0.0",
"@codingame/monaco-vscode-typescript-basics-default-extension": "^7.0.0",
"@codingame/monaco-vscode-user-data-profile-service-override": "^7.0.0",
"@codingame/monaco-vscode-vb-default-extension": "^7.0.0",
"@codingame/monaco-vscode-view-status-bar-service-override": "^7.0.0",
"@codingame/monaco-vscode-views-service-override": "^7.0.0",
"@codingame/monaco-vscode-workbench-service-override": "^7.0.0",
"@codingame/monaco-vscode-working-copy-service-override": "^7.0.0",
"@codingame/monaco-vscode-xml-default-extension": "^7.0.0",
"@codingame/monaco-vscode-yaml-default-extension": "^7.0.0",
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@^7.0.0",
"@codingame/monaco-vscode-accessibility-service-override": "^7.1.0",
"@codingame/monaco-vscode-clojure-default-extension": "^7.1.0",
"@codingame/monaco-vscode-coffeescript-default-extension": "^7.1.0",
"@codingame/monaco-vscode-configuration-editing-default-extension": "^7.1.0",
"@codingame/monaco-vscode-configuration-service-override": "^7.1.0",
"@codingame/monaco-vscode-cpp-default-extension": "^7.1.0",
"@codingame/monaco-vscode-csharp-default-extension": "^7.1.0",
"@codingame/monaco-vscode-css-default-extension": "^7.1.0",
"@codingame/monaco-vscode-debug-service-override": "^7.1.0",
"@codingame/monaco-vscode-dialogs-service-override": "^7.1.0",
"@codingame/monaco-vscode-diff-default-extension": "^7.1.0",
"@codingame/monaco-vscode-editor-service-override": "^7.1.0",
"@codingame/monaco-vscode-emmet-service-override": "^7.1.0",
"@codingame/monaco-vscode-explorer-service-override": "^7.1.0",
"@codingame/monaco-vscode-extension-gallery-service-override": "^7.1.0",
"@codingame/monaco-vscode-extensions-service-override": "^7.1.0",
"@codingame/monaco-vscode-files-service-override": "^7.1.0",
"@codingame/monaco-vscode-fsharp-default-extension": "^7.1.0",
"@codingame/monaco-vscode-go-default-extension": "^7.1.0",
"@codingame/monaco-vscode-groovy-default-extension": "^7.1.0",
"@codingame/monaco-vscode-html-default-extension": "^7.1.0",
"@codingame/monaco-vscode-java-default-extension": "^7.1.0",
"@codingame/monaco-vscode-javascript-default-extension": "^7.1.0",
"@codingame/monaco-vscode-json-default-extension": "^7.1.0",
"@codingame/monaco-vscode-julia-default-extension": "^7.1.0",
"@codingame/monaco-vscode-keybindings-service-override": "^7.1.0",
"@codingame/monaco-vscode-language-detection-worker-service-override": "^7.1.0",
"@codingame/monaco-vscode-languages-service-override": "^7.1.0",
"@codingame/monaco-vscode-lifecycle-service-override": "^7.1.0",
"@codingame/monaco-vscode-log-service-override": "^7.1.0",
"@codingame/monaco-vscode-lua-default-extension": "^7.1.0",
"@codingame/monaco-vscode-markdown-basics-default-extension": "^7.1.0",
"@codingame/monaco-vscode-markdown-language-features-default-extension": "^7.1.0",
"@codingame/monaco-vscode-markdown-math-default-extension": "^7.1.0",
"@codingame/monaco-vscode-markers-service-override": "^7.1.0",
"@codingame/monaco-vscode-media-preview-default-extension": "^7.1.0",
"@codingame/monaco-vscode-model-service-override": "^7.1.0",
"@codingame/monaco-vscode-multi-diff-editor-service-override": "^7.1.0",
"@codingame/monaco-vscode-notifications-service-override": "^7.1.0",
"@codingame/monaco-vscode-npm-default-extension": "^7.1.0",
"@codingame/monaco-vscode-objective-c-default-extension": "^7.1.0",
"@codingame/monaco-vscode-outline-service-override": "^7.1.0",
"@codingame/monaco-vscode-output-service-override": "^7.1.0",
"@codingame/monaco-vscode-perl-default-extension": "^7.1.0",
"@codingame/monaco-vscode-php-default-extension": "^7.1.0",
"@codingame/monaco-vscode-powershell-default-extension": "^7.1.0",
"@codingame/monaco-vscode-preferences-service-override": "^7.1.0",
"@codingame/monaco-vscode-python-default-extension": "^7.1.0",
"@codingame/monaco-vscode-quickaccess-service-override": "^7.1.0",
"@codingame/monaco-vscode-r-default-extension": "^7.1.0",
"@codingame/monaco-vscode-references-view-default-extension": "^7.1.0",
"@codingame/monaco-vscode-ruby-default-extension": "^7.1.0",
"@codingame/monaco-vscode-rust-default-extension": "^7.1.0",
"@codingame/monaco-vscode-scss-default-extension": "^7.1.0",
"@codingame/monaco-vscode-search-result-default-extension": "^7.1.0",
"@codingame/monaco-vscode-search-service-override": "^7.1.0",
"@codingame/monaco-vscode-shellscript-default-extension": "^7.1.0",
"@codingame/monaco-vscode-snippets-service-override": "^7.1.0",
"@codingame/monaco-vscode-sql-default-extension": "^7.1.0",
"@codingame/monaco-vscode-standalone-typescript-language-features": "^7.1.0",
"@codingame/monaco-vscode-storage-service-override": "^7.1.0",
"@codingame/monaco-vscode-swift-default-extension": "^7.1.0",
"@codingame/monaco-vscode-terminal-service-override": "^7.1.0",
"@codingame/monaco-vscode-testing-service-override": "^7.1.0",
"@codingame/monaco-vscode-textmate-service-override": "^7.1.0",
"@codingame/monaco-vscode-theme-defaults-default-extension": "^7.1.0",
"@codingame/monaco-vscode-theme-service-override": "^7.1.0",
"@codingame/monaco-vscode-theme-seti-default-extension": "^7.1.0",
"@codingame/monaco-vscode-timeline-service-override": "^7.1.0",
"@codingame/monaco-vscode-typescript-basics-default-extension": "^7.1.0",
"@codingame/monaco-vscode-user-data-profile-service-override": "^7.1.0",
"@codingame/monaco-vscode-vb-default-extension": "^7.1.0",
"@codingame/monaco-vscode-view-status-bar-service-override": "^7.1.0",
"@codingame/monaco-vscode-views-service-override": "^7.1.0",
"@codingame/monaco-vscode-workbench-service-override": "^7.1.0",
"@codingame/monaco-vscode-working-copy-service-override": "^7.1.0",
"@codingame/monaco-vscode-xml-default-extension": "^7.1.0",
"@codingame/monaco-vscode-yaml-default-extension": "^7.1.0",
"monaco-editor": "npm:@codingame/monaco-vscode-editor-api@^7.1.0",
"typescript-worker-node-types": "npm:@types/node@^16.11.7",
"vscode": "npm:@codingame/monaco-vscode-api@^7.0.0"
"vscode": "npm:@codingame/monaco-vscode-api@^7.1.0"
},
"devDependencies": {
"@codingame/commitlint-config-codingame": "^1.1.1",
"@codingame/eslint-config": "^1.1.10",
"@codingame/monaco-vscode-rollup-vsix-plugin": "^7.0.0",
"@codingame/monaco-vscode-rollup-vsix-plugin": "^7.1.0",
"@codingame/semantic-release-config-github": "^1.0.0",
"@codingame/tsconfig": "^1.1.1",
"@commitlint/cli": "^19.3.0",
@@ -223,7 +223,7 @@
"@types/vscode": "~1.91.0",
"@typescript-eslint/eslint-plugin": "7.16.0",
"@typescript-eslint/parser": "7.16.0",
"@vscode/vsce": "^2.29.0",
"@vscode/vsce": "^2.31.1",
"@web/rollup-plugin-import-meta-assets": "^2.2.1",
"azure-devops-node-api": "^13.0.0",
"conventional-changelog-conventionalcommits": "^7.0.2",
@@ -242,12 +242,12 @@
"json5": "2.2.3",
"monaco-emacs": "^0.3.0",
"monaco-vim": "^0.4.1",
"postcss": "8.4.39",
"rollup": "4.18.1",
"postcss": "8.4.40",
"rollup": "4.19.1",
"rollup-plugin-visualizer": "5.12.0",
"ts-node": "10.9.2",
"tslib": "^2.6.3",
"typescript": "5.5.3"
"typescript": "5.5.4"
},
"browserslist": [
"defaults",
2 changes: 1 addition & 1 deletion rollup.config.ts
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ export default rollup.defineConfig({
'features/workbench': 'src/features/workbench.ts',
'features/profile': 'src/features/profile.ts',
'features/typescriptStandalone': 'src/features/typescriptStandalone.ts',
'features/workingCopy': 'src/features/workingCopy.ts'
'features/workingCopyBackup': 'src/features/workingCopyBackup.ts'
},
output: [{
dir: 'dist',
Original file line number Diff line number Diff line change
@@ -2,5 +2,7 @@ import getWorkingCopyServiceOverride from '@codingame/monaco-vscode-working-copy
import { registerServices } from '../services'

registerServices({
...getWorkingCopyServiceOverride()
...getWorkingCopyServiceOverride({
storage: 'userData'
})
})
10 changes: 8 additions & 2 deletions src/services.ts
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ import getLifecycleServiceOverride from '@codingame/monaco-vscode-lifecycle-serv
import getQuickAccessServiceOverride from '@codingame/monaco-vscode-quickaccess-service-override'
import getLogServiceOverride from '@codingame/monaco-vscode-log-service-override'
import getEmmetServiceOverride from '@codingame/monaco-vscode-emmet-service-override'
import getWorkingCopyServiceOverride from '@codingame/monaco-vscode-working-copy-service-override'
import { initialize as initializeServices } from 'vscode/services'
import * as monaco from 'monaco-editor'
import { RegisteredFile, RegisteredFileSystemProvider, registerCustomProvider, OverlayFileSystemProvider, EmptyFileSystemProvider, RegisteredMemoryFile } from '@codingame/monaco-vscode-files-service-override'
@@ -84,7 +85,10 @@ let services: monaco.editor.IEditorOverrideServices = {
return useGlobalPicker()
}
}),
...getEmmetServiceOverride()
...getEmmetServiceOverride(),
...getWorkingCopyServiceOverride({
storage: null
})
}

export function registerServices (newServices: monaco.editor.IEditorOverrideServices): void {
@@ -131,7 +135,9 @@ export async function initialize (constructionOptions: IWorkbenchConstructionOpt
}
}

await initializeServices(services, container, constructionOptions)
await initializeServices(services, container, constructionOptions, {
userHome: monaco.Uri.file('/')
})

await whenExtensionsReady()

0 comments on commit c0ed058

Please sign in to comment.