You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Why apm install the packageDependencies to node_module folder? #120
if no package name is given then all the dependencies in the package.json file are installed to the node_modules folder in the current working directory.
Why this is by design?
I am writing some specs for an atom package, which is dependent on another package. So, I write the dependent package's name on the packageDependencies list, then use the Travis CI config provided by Atom/CI to run the specs.
The dependent package is installed successfully
Bla bla bla...
Start to run spec...
Cannot resolve the path of the dependent package
Failed! :(
The failure message confused me, and after investigation, I find this is a design issue. So, why does apm install install packageDependencies to node_module folder instead of ~/.atom/package folder?
packageDependencies is currently only intended to be supported in the atom/atom repository which uses it, it isn't designed to be used by packages yet.
I would consider this an enhancement to support package to package dependencies using this property.
@kevinsawicki Oh, following your clue. I find one bigger issue.
The atom main package is using packageDependencies to install packages. Those packages are installed inside atom folder (<atom>/resources/app/node_modules), list as built-in packages in apm list.
Other personal installed packages are under ~/.atom/packages or ~/.atom/dev/packages (dev mode).
All built-in packages cannot be uninstall from apm uninstall, although I get a ✓ from console
> apm uninstall welcome
Uninstalling welcome ✓
> apm list
Built-in Atom packages (74)
├── [email protected]
├── ...
├── [email protected]
> apm help uninstall
Usage: apm uninstall <package_name>...
Delete the installed package(s) from the ~/.atom/packages directory.
Options:
--help, -h Print this usage message
--dev, -d Uninstall from ~/.atom/dev/packages [boolean]
--hard Uninstall from ~/.atom/packages and ~/.atom/dev/packages [boolean]
I think this is violating the notion of hackable editor, those built-in packages are like the embedded packages, they are not hackable. :(
In my opinion, it is better to distinguish as global packages and personal packages, Just like what npm does, global packages and project packages. Then, a user should have the ability to install/uninstall/hack the global (built-in) package. The packageDependencies field should be treat as the same for the global and personal package.
Activity
lijunle commentedon Jun 2, 2014
ping the author @kevinsawicki
I check the commit history, the help comment is added first, then the
packageDependenciesoptions is supported later. So, does this consider as a bug?kevinsawicki commentedon Jun 2, 2014
packageDependenciesis currently only intended to be supported in theatom/atomrepository which uses it, it isn't designed to be used by packages yet.I would consider this an enhancement to support package to package dependencies using this property.
lijunle commentedon Jun 2, 2014
@kevinsawicki Oh, following your clue. I find one bigger issue.
The atom main package is using
packageDependenciesto install packages. Those packages are installed inside atom folder (<atom>/resources/app/node_modules), list as built-in packages inapm list.Other personal installed packages are under
~/.atom/packagesor~/.atom/dev/packages(dev mode).All built-in packages cannot be uninstall from
apm uninstall, although I get a ✓ from consoleI think this is violating the notion of hackable editor, those built-in packages are like the embedded packages, they are not hackable. :(
In my opinion, it is better to distinguish as global packages and personal packages, Just like what
npmdoes, global packages and project packages. Then, a user should have the ability to install/uninstall/hack the global (built-in) package. ThepackageDependenciesfield should be treat as the same for the global and personal package.