Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@gedit/resource

Package Overview
Dependencies
Maintainers
3
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gedit/resource - npm Package Compare versions

Comparing version 0.1.46 to 0.1.48

9

lib/browser/resource-autosave-service.d.ts

@@ -29,2 +29,4 @@ import type { TextDocumentContentChangeEvent } from 'vscode-languageserver-protocol';

protected readonly toDisposeOnAutoSave: DisposableCollection;
protected readonly onResourceChangedEmitter: Emitter<Resource>;
readonly onResourceChanged: import("@gedit/utils").Event<Resource>;
readonly onDirtyChanged: import("@gedit/utils").Event<void>;

@@ -35,4 +37,9 @@ readonly onDidChangeContent: import("@gedit/utils").Event<ResourceChangeEvent<any>>;

protected _valid: boolean;
protected resource: Resource;
resource: Resource;
constructor(options: ResourceAutoSaveOptions);
/**
* 切换资源
* @param resource
*/
changeResource(resource: Resource): void;
dispose(): void;

@@ -39,0 +46,0 @@ get dirty(): boolean;

@@ -93,2 +93,4 @@ "use strict";

this.toDisposeOnAutoSave = new utils_1.DisposableCollection();
this.onResourceChangedEmitter = new utils_1.Emitter();
this.onResourceChanged = this.onResourceChangedEmitter.event;
this.onDirtyChanged = this.onDirtyChangedEmitter.event;

@@ -112,2 +114,13 @@ this.onDidChangeContent = this.onDidChangeContentEmitter.event;

}
/**
* 切换资源
* @param resource
*/
ResourceAutoSaveService.prototype.changeResource = function (resource) {
this.resource.dispose(); // clear old resource
this.toDispose.push(resource);
this.resource = resource;
this.options.resource = resource;
this.onResourceChangedEmitter.fire(resource);
};
ResourceAutoSaveService.prototype.dispose = function () {

@@ -114,0 +127,0 @@ this.toDispose.dispose();

8

package.json
{
"name": "@gedit/resource",
"version": "0.1.46",
"version": "0.1.48",
"license": "MIT",

@@ -12,4 +12,4 @@ "main": "lib/common/index",

"dependencies": {
"@gedit/application-common": "^0.1.46",
"@gedit/utils": "^0.1.46",
"@gedit/application-common": "^0.1.48",
"@gedit/utils": "^0.1.48",
"vscode-languageserver-protocol": "^3.15.3"

@@ -32,3 +32,3 @@ },

},
"gitHead": "e761d7ae6c701701ef4608fa67976dbd93cf9280"
"gitHead": "6aabb78f19f490d6ee62b298db9aa4fbb6452658"
}

@@ -39,2 +39,4 @@ import { injectable, inject } from 'inversify';

protected readonly toDisposeOnAutoSave = new DisposableCollection();
protected readonly onResourceChangedEmitter = new Emitter<Resource>();
readonly onResourceChanged = this.onResourceChangedEmitter.event;
readonly onDirtyChanged = this.onDirtyChangedEmitter.event;

@@ -45,3 +47,3 @@ readonly onDidChangeContent = this.onDidChangeContentEmitter.event;

protected _valid = false;
protected resource: Resource;
resource: Resource;

@@ -61,2 +63,13 @@ constructor(

}
/**
* 切换资源
* @param resource
*/
changeResource(resource: Resource): void {
this.resource.dispose(); // clear old resource
this.toDispose.push(resource);
this.resource = resource;
this.options.resource = resource;
this.onResourceChangedEmitter.fire(resource);
}

@@ -63,0 +76,0 @@ dispose(): void {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc