Antonio Scandurra
186bcd70a5
Fix running packages preloading tests in interactive mode
...
This change also makes the test more useful, as it verifies that reading
metadata from package.json's `packagesCache` works correctly.
2017-05-12 10:11:58 +02:00
Max Brunsfeld
fb42ad36f0
Fix bundled package path check to use path, not name
2017-04-21 09:41:35 -07:00
Damien Guard
601aa59e7b
Do not treat packages in unusual locations as bundled despite name
2017-04-20 14:44:49 -07:00
Antonio Scandurra
48013a9140
Fix adding bundled packages to ModuleCache and increase test coverage
2017-04-11 09:37:11 +02:00
Antonio Scandurra
672259ec51
Deactivate preloaded package when the same package has been linked
2017-03-28 10:22:29 +02:00
Antonio Scandurra
557fac226d
Read devMode from PackageManager in Package
2017-03-28 10:22:29 +02:00
Antonio Scandurra
19010b9424
Activate menus, context menus, keymaps and settings during preload
2017-03-28 10:22:29 +02:00
Antonio Scandurra
9c469eb337
Deactivate and delete preloaded packages if they are disabled
2017-03-28 10:22:29 +02:00
Antonio Scandurra
de47a26c5d
WIP: Start preloading packages
2017-03-28 10:22:29 +02:00
Antonio Scandurra
fd0cd13271
Fix typo
2017-03-28 10:22:29 +02:00
Antonio Scandurra
e9c13a92ed
Extract a loadAvailablePackage method and avoid doing work twice
...
This will reuse the information that comes from `getAvailablePackages`,
thus avoiding to resolve, for example, a package path twice.
`PackageManager.loadPackage` will still be supported for backward
compatibility, but it will use `loadAvailablePackage` under the hood.
2017-03-28 10:22:29 +02:00
Antonio Scandurra
b913ad8bb5
Extract a getAvailablePackages method and start using it
2017-03-28 10:22:29 +02:00
Antonio Scandurra
c4d0944c0d
Snapshot more objects
2017-03-10 16:49:53 +01:00
Antonio Scandurra
756e6e4641
Activate packages immediately if hook had already been triggered
2016-12-02 12:56:51 +01:00
Matthew Dapena-Tretter
f1be4f057e
Add methods for checking if initial packages have been loaded/activated
...
This will allow packages to observe the state without having to worry
about subscribing to the events after they've already fired.
Originally suggested in #10839
2016-10-06 15:36:28 -07:00
Indrek Ardel
55f3311c01
Remove unused variables
2016-09-26 20:52:13 +03:00
Nathan Sobo
b7126aff4c
Don't serialize packages in deactivatePackages
...
Serialization still occurs when deactivating a single package via the
API. Otherwise, when the window is closed or reloaded we will serialize
all packages as a result of saving the window state.
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com >
2016-09-22 12:39:06 -06:00
Katrina Uychaco
49fb287592
Don't load packages starting with dot. Fixes #9805
2016-04-12 20:35:30 -07:00
Michelle Tilley
383174d380
Load apm path from config
...
Signed-off-by: Katrina Uychaco <kuychaco@github.com >
2016-03-10 21:28:40 -08:00
Nathan Sobo
6292484c97
Always strip git+ prefix and .git suffix from package repository URLs
...
Previously, a guard based on the presence of the _id field (which is
inserted by npm during installation) prevented a regex replacement of
the git+ prefix on URLs. Now we always do this. Since the .git suffix
also causes problems and we’re removing that in packages, I now remove
that as well.
2016-02-29 17:30:03 -07:00
Max Brunsfeld
8d27d1925c
Avoid emitting config events while loading packages
2016-02-16 16:13:15 -08:00
Katrina Uychaco
81f30d4908
Only call package serialize methods once on quit
2016-02-01 16:49:21 -08:00
Katrina Uychaco
5e21f7bad9
Serialize package upon deactivation
2016-02-01 16:11:10 -08:00
Katrina Uychaco
a8692f1984
Extract serialize functionality from ::deactivatePackage. Tests WIP
2016-01-26 22:46:17 -07:00
Machiste Quintana
78543a7a34
Only disable a package if it isn't already disabled
2016-01-11 13:44:27 -05:00
Max Brunsfeld
314a1234f4
Track which packages are in the process of activating
...
This fixes a race condition where a package's activation promise resolves asynchronously
after it has been deactivated, causing it to stay in the package manager's @activePackages
object.
2015-12-08 11:09:52 -08:00
Max Brunsfeld
ec759f1322
Clear out loaded packages in PackageManager.prototype.reset
...
This way, when the AtomEnvironment is reset, packages will have .load() called
on them again, so their config schemas will be registered again.
2015-12-07 16:49:57 -08:00
Max Brunsfeld
cb2b068d77
Load view providers from files specified in package.json
2015-11-19 16:58:20 -08:00
Nathan Sobo
67c42282a6
Merge pull request #9527 from atom/lierdakil-defer-act-hooks
...
Lierdakil: Defer Activation Hooks
2015-11-12 16:06:41 -07:00
Nikolay Yakimov
571686e52b
Remove deprecated call
2015-11-11 07:51:04 -07:00
Nikolay Yakimov
fe47394b22
Update specs for deferred activation hooks
2015-11-11 07:51:04 -07:00
Nikolay Yakimov
7d959df683
Defer activation hooks ( #8313 )
2015-11-11 07:51:04 -07:00
Antonio Scandurra
38d713379f
🎨 Introduce Config::transactAsync
2015-11-11 09:55:20 +01:00
Antonio Scandurra
7e1a1bc8b0
Merge branch 'master' into as-faster-settings-load
...
# Conflicts:
# src/package-manager.coffee
2015-11-11 09:09:47 +01:00
Kevin Sawicki
95f56aa41e
Merge pull request #9514 from atom/ks-disabled-keymaps-for-uninstalled-packages
...
Guard against not loaded packages when updating disabled keymaps
2015-11-10 15:06:42 -08:00
Kevin Sawicki
4692ca9702
Guard against package not being loaded
2015-11-10 13:54:42 -08:00
Antonio Scandurra
d4a67a7db5
🎨 Call it ::beginTransaction
2015-11-10 11:42:39 +01:00
Antonio Scandurra
e437234c58
Transact on both async and sync package activation
2015-11-10 11:05:31 +01:00
aki
396e8a42a4
Fix activatePackages
2015-11-08 23:14:13 +09:00
Wliu
5f8b2b643b
Include package name metadata when creating errors
2015-11-04 16:00:57 -05:00
Antonio Scandurra
b25d3e944b
Parameterize configDirPath and move config.load in ctor
2015-10-14 12:41:36 +02:00
Max Brunsfeld
74c0836be5
🔥 Duplicate devMode/inDevMode parameter to Package, PackageManager
2015-10-09 17:34:22 -07:00
Antonio Scandurra
60e4b78da3
Move package reset down into PackageManager
2015-10-09 10:04:04 +02:00
Antonio Scandurra
4108939201
Don't use atom.{themes,menu,contextMenu} global in Package
2015-10-07 15:25:05 -05:00
Antonio Scandurra
7b25af5ad4
Remove more globals from Package
...
🔥 atom.{notifications,keymaps,commands,grammars,inDevMode}
2015-10-07 15:25:05 -05:00
Antonio Scandurra
c192004b06
Don't use atom.{config,styles} global in Package
2015-10-07 15:25:05 -05:00
Max Brunsfeld
ed735c115b
Fix typo in package manager
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2015-10-07 15:24:56 -05:00
Nathan Sobo
b649cb48ef
Move static Package methods to PackageManager instance
2015-10-07 15:24:54 -05:00
Nathan Sobo
a573e1f381
Watch for theme changes in ThemeManager instead of Atom environment
2015-10-07 15:24:53 -05:00
Nathan Sobo
c4bbd2bbf2
Build StyleManager in Atom environment constructor
2015-10-07 15:24:51 -05:00