@codingame/monaco-vscode-files-service-override 2.2.0-next.3 → 2.2.0-next.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/files.js +4 -6
  2. package/package.json +2 -2
package/files.js CHANGED
@@ -11,8 +11,6 @@ import { Disposable, DisposableStore, toDisposable } from 'vscode/vscode/vs/base
11
11
  import { extUri, joinPath } from 'vscode/vscode/vs/base/common/resources';
12
12
  import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
13
13
  export { HTMLFileSystemProvider } from 'vscode/vscode/vs/platform/files/browser/htmlFileSystemProvider';
14
- import { relative } from 'vscode/vscode/vs/base/common/path';
15
- import 'vscode/vscode/vs/workbench/contrib/files/browser/files.configuration.contribution';
16
14
  import { Schemas } from 'vscode/vscode/vs/base/common/network';
17
15
  import { IndexedDBFileSystemProvider } from './vscode/src/vs/platform/files/browser/indexedDBFileSystemProvider.js';
18
16
  import { IndexedDB } from 'vscode/vscode/vs/base/browser/indexedDB';
@@ -27,6 +25,7 @@ import { BrowserElevatedFileService } from './vscode/src/vs/workbench/services/f
27
25
  import { IElevatedFileService } from 'vscode/vscode/vs/workbench/services/files/common/elevatedFileService';
28
26
  import { registerServiceInitializePreParticipant, checkServicesNotInitialized } from 'vscode/lifecycle';
29
27
  import { logsPath } from 'vscode/workbench';
28
+ import 'vscode/vscode/vs/workbench/contrib/files/browser/files.configuration.contribution';
30
29
 
31
30
  class RegisteredFile {
32
31
  constructor(uri, readonly) {
@@ -133,12 +132,11 @@ class RegisteredFileSystemProvider extends Disposable {
133
132
  disposableStore.add(file.onDidRename(({ from, to }) => {
134
133
  if (this.files.get(( from.toString())) === file) {
135
134
  this.files.delete(( from.toString()));
135
+ this.files.set(( to.toString()), file);
136
136
  this._onDidChangeFile.fire([{
137
137
  resource: from,
138
138
  type: 2
139
- }]);
140
- this.files.set(( to.toString()), file);
141
- this._onDidChangeFile.fire([{
139
+ }, {
142
140
  resource: to,
143
141
  type: 1
144
142
  }]);
@@ -167,7 +165,7 @@ class RegisteredFileSystemProvider extends Disposable {
167
165
  }
168
166
  async readdir(resource) {
169
167
  const includedPaths = ( Array.from(( this.files.keys()))
170
- .map(uri => relative(resource.path, ( URI.parse(uri)).path)))
168
+ .map(uri => extUri.relativePath(resource, ( URI.parse(uri)))))
171
169
  .filter(path => !path.startsWith('..'));
172
170
  const files = includedPaths.filter(path => !path.includes('/'));
173
171
  const directories = ( includedPaths.filter(path => path.includes('/')).map(path => path.slice(0, path.indexOf('/'))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-files-service-override",
3
- "version": "2.2.0-next.3",
3
+ "version": "2.2.0-next.5",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -18,7 +18,7 @@
18
18
  "module": "index.js",
19
19
  "types": "index.d.ts",
20
20
  "dependencies": {
21
- "vscode": "npm:@codingame/monaco-vscode-api@2.2.0-next.3",
21
+ "vscode": "npm:@codingame/monaco-vscode-api@2.2.0-next.5",
22
22
  "vscode-marked": "npm:marked@=3.0.2"
23
23
  }
24
24
  }