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

atom-project-util

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atom-project-util - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

41

index.js

@@ -82,4 +82,10 @@ var fs = require('fs')

// shim atom.deserialize in <= 1.6
function atomDeserialize (state) {
// Atom >= 1.17
// There is a new API for deserializing state into an active window
if (atom.restoreStateIntoThisEnvironment) {
return atom.restoreStateIntoThisEnvironment(state);
}
// Atom < 1.17
if (atom.deserialize != null) return atom.deserialize(state)

@@ -108,9 +114,13 @@

function loadState (key) {
if (atom.loadState != null) {
return atom.loadState(key);
}
if (atom.stateStore != null) {
// Atom 1.7+
return atom.stateStore.load(key)
} else {
// Atom <= 1.6
return Promise.resolve(atom.getStorageFolder().load(key))
}
// Atom <= 1.6
return Promise.resolve(atom.getStorageFolder().load(key))
}

@@ -146,2 +156,21 @@

loadState(newStateKey).then((state) => {
// HACK: Unload the active projects. This is _needed_ as of
// Atom 1.17 but apparently it should have been done earlier as
// well. I don't think there was any "bad" effects but eh,
// here we go I guess.
atom.project.getPaths().forEach(path => {
atom.project.removePath(path)
})
// Destroy the tabs
// Fixes memory leak that was present in <= 3.x of this package
var tabs = atom.packages.getActivePackage('tabs')
if (tabs) {
for (var i = 0; i < tabs.mainModule.tabBarViews.length; i++) {
tabs.mainModule.tabBarViews[i].destroy();
}
tabs.mainModule.tabBarViews.splice(0);
}
if (state) {

@@ -189,2 +218,6 @@ // Deserialize state (this is what does the grunt of the work)

// HACK: Toggle find-and-replace
atom.packages.disablePackage('find-and-replace')
atom.packages.enablePackage('find-and-replace')
// Done

@@ -191,0 +224,0 @@ resolve()

2

package.json
{
"name": "atom-project-util",
"version": "3.0.0",
"version": "3.1.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

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