     for [activator, types] in @packageActivators
       packages = @getLoadedPackagesForTypes(types)
       promises = promises.concat(activator.activatePackages(packages))
-    Q.all(promises).then =>
+    Promise.all(promises).then =>
       @emit 'activated' if Grim.includeDeprecatedAPIs
       @emitter.emit 'did-activate-initial-packages'
 

  # Activate a single package by name
  activatePackage: (name) ->
    if pack = @getActivePackage(name)
      Q(pack)
    else if pack = @loadPackage(name)
      pack.activate().then =>
        @activePackages[pack.name] = pack
        @emitter.emit 'did-activate-package', pack
        pack
    else
      Q.reject(new Error("Failed to load package '#{name}'"))

  triggerActivationHook: (hook) ->
    return new Error("Cannot trigger an empty activation hook") unless hook? and _.isString(hook) and hook.length > 0

_ = require 'underscore-plus'
{Emitter} = require 'event-kit'
fs = require 'fs-plus'
Grim = require 'grim'

ServiceHub = require 'service-hub'
