abe33 / atom-utils Goto Github PK
View Code? Open in Web Editor NEWA bunch of general purpose utilities for Atom packages
A bunch of general purpose utilities for Atom packages
If a package you're trying to load has activationEvents
defined in its package.json
, activation will be deferred and the promise returned from atom.packages.activatePackage
will never resolve.
I think this can be gotten around by calling package.activateNow()
instead of activating through the package manager but I'm not sure if it'll work properly.
Reproduction
apm install tree-view-breadcrumb
atom.notifications.addError
) in the top right corner of Atom's window.System details
Stack trace
TypeError: atom.packages.activatePackage(...).then(...).fail is not a function
at /home/olmo/.atom/packages/tree-view-breadcrumb/node_modules/atom-utils/lib/atom-utils.js:27:14
at Array.forEach (native)
at module.exports.requirePackages (/home/olmo/.atom/packages/tree-view-breadcrumb/node_modules/atom-utils/lib/atom-utils.js:23:25)
at module.exports.requirePackages (/home/olmo/.atom/packages/tree-view-breadcrumb/node_modules/atom-utils/lib/atom-utils.js:8:14)
at Object.module.exports.activate (/home/olmo/.atom/packages/tree-view-breadcrumb/lib/tree-view-breadcrumb.coffee:34:5)
at Package.module.exports.Package.activateNow (/usr/local/share/atom/resources/app.asar/src/package.js:246:19)
at /usr/local/share/atom/resources/app.asar/src/package.js:226:32
at Package.module.exports.Package.measure (/usr/local/share/atom/resources/app.asar/src/package.js:167:15)
at /usr/local/share/atom/resources/app.asar/src/package.js:219:26
at Package.module.exports.Package.activate (/usr/local/share/atom/resources/app.asar/src/package.js:215:34)
at PackageManager.module.exports.PackageManager.activatePackage (/usr/local/share/atom/resources/app.asar/src/package-manager.js:484:21)
at /usr/local/share/atom/resources/app.asar/src/package-manager.js:467:29
at Config.module.exports.Config.transact (/usr/local/share/atom/resources/app.asar/src/config.js:324:16)
at PackageManager.module.exports.PackageManager.activatePackages (/usr/local/share/atom/resources/app.asar/src/package-manager.js:462:19)
at PackageManager.module.exports.PackageManager.activate (/usr/local/share/atom/resources/app.asar/src/package-manager.js:443:46)
at Atom.module.exports.Atom.startEditorWindow (/usr/local/share/atom/resources/app.asar/src/atom.js:657:21)
at Object.<anonymous> (/usr/local/share/atom/resources/app.asar/src/window-bootstrap.js:12:8)
at Object.<anonymous> (/usr/local/share/atom/resources/app.asar/src/window-bootstrap.js:23:4)
at Module._compile (module.js:428:26)
at Object.keys.forEach.Object.defineProperty.value [as .js] (/usr/local/share/atom/resources/app.asar/src/compile-cache.js:169:21)
at Module.load (module.js:353:32)
at Function.Module._load (module.js:308:12)
at Module.require (module.js:363:17)
at require (module.js:382:17)
at setupWindow (file:///usr/local/share/atom/resources/app.asar/static/index.js:82:25)
at window.onload (file:///usr/local/share/atom/resources/app.asar/static/index.js:35:9)
I think the error should be fixed if you use Promise::catch
instead of Promise::fail
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.