@gedit/resource
Advanced tools
Comparing version 0.2.12 to 0.2.13
@@ -27,2 +27,3 @@ import type { TextDocumentContentChangeEvent } from 'vscode-languageserver-protocol'; | ||
content: string; | ||
type?: string | undefined; | ||
}>; | ||
@@ -44,2 +45,3 @@ readonly toDispose: DisposableCollection; | ||
content: string; | ||
type?: string | undefined; | ||
}>; | ||
@@ -46,0 +48,0 @@ readonly onDidChangeValid: import("@gedit/utils").Event<void>; |
@@ -122,2 +122,4 @@ "use strict"; | ||
this.onSyncContentEmitter.fire(content); | ||
// 重置 mindmap 里的数据; | ||
this.onDidSaveContentEmitter.fire({ content, type: 'reload' }); | ||
const token = this.cancelSave(); | ||
@@ -124,0 +126,0 @@ this.run(async () => { |
{ | ||
"name": "@gedit/resource", | ||
"version": "0.2.12", | ||
"version": "0.2.13", | ||
"license": "MIT", | ||
@@ -31,3 +31,3 @@ "main": "lib/common/index", | ||
}, | ||
"gitHead": "d95183632021f33643adb8f0ce03a1a678af8d9f" | ||
"gitHead": "fa187b496c18ce8b5b5baf9fcea4df6e8eddb7de" | ||
} |
@@ -33,3 +33,3 @@ import { injectable, inject } from 'inversify'; | ||
protected readonly onPreSaveContentEmitter = new Emitter<{ content: string }>(); | ||
protected readonly onDidSaveContentEmitter = new Emitter<ResourceChangeEvent & { content: string }>(); | ||
protected readonly onDidSaveContentEmitter = new Emitter<ResourceChangeEvent & { content: string, type?: string }>(); | ||
readonly toDispose = new DisposableCollection(); | ||
@@ -141,2 +141,4 @@ protected readonly onDirtyChangedEmitter = new Emitter<void>(); | ||
this.onSyncContentEmitter.fire(content); | ||
// 重置 mindmap 里的数据; | ||
this.onDidSaveContentEmitter.fire({ content, type: 'reload' }); | ||
const token = this.cancelSave(); | ||
@@ -149,3 +151,3 @@ this.run(async () => { | ||
try { | ||
await Resource.save(this.resource, { content, options: {encoding: this.options.encoding, version}}, token); | ||
await Resource.save(this.resource, { content, options: { encoding: this.options.encoding, version } }, token); | ||
// TODO 没有触发DidChange | ||
@@ -229,3 +231,3 @@ console.log(`-- reload (${this.resource.uri.displayName}) --`); | ||
this.onPreSaveContentEmitter.fire({ content }); | ||
await Resource.save(this.resource, { content, options: {encoding: this.options.encoding, version}}, token); | ||
await Resource.save(this.resource, { content, options: { encoding: this.options.encoding, version } }, token); | ||
this.onDidSaveContentEmitter.fire({ ...lastChanged, content }); | ||
@@ -232,0 +234,0 @@ console.log(`-- save (${this.resource.uri.displayName}) --`); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
87374
1472