GithubHelp home page GithubHelp logo

package-deps's Introduction

Hi πŸ‘‹! I'm @steelbrain

πŸ›  I'm the creator of some of the most loved Atom packages like:

πŸ“¦ I've also crafted popular node.js libraries:

πŸ“ˆ My packages have received over 100 million downloads on NPM!

🌲 Outside of coding, I love:

  • Taking long hikes
  • Exploring the world of cars
  • Diving deep into soldering projects

πŸ“« Wanna connect? Have cool ideas? Write to me at hello at my username dot ai.

package-deps's People

Contributors

aminya avatar arcanemagus avatar archcorsair avatar danielbayley avatar deankevorkian avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar dirk-thomas avatar greenkeeper[bot] avatar greenkeeperio-bot avatar joelbarker2011 avatar keplersj avatar lierdakil avatar steelbrain avatar uzitech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

package-deps's Issues

An in-range update of semver is breaking the build 🚨

The dependency semver was updated from 5.5.1 to 5.6.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

semver is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ ci/circleci: Your tests failed on CircleCI (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Installing package with dependencies fails on Windows

Attempting to install a package with any dependency from repository instead of npm registry (e.g. "package-deps": "github:steelbrain/package-deps" instead of "package-deps": "latest") leads to the following error:

C:\Users\username\.atom\packages\defold-ide\node_modules\atom-package-deps\lib\view.js:64 [Package-Deps] Unable to install autocomplete-lua, Error: npm ERR! git clone C:\Users\username\.atom\.apm\_git-remotes\git-github-com-dapetcu21-luaparse-git-1df252af C:\Users\username\AppData\Local\Temp\npm-13068-09b790b7\git-cache-15c834e3\5a1fd2868adecb79f6bc57ee1f1880a3ea83ad8b: Cloning into 'C:\Users\username\AppData\Local\Temp\npm-13068-09b790b7\git-cache-15c834e3\5a1fd2868adecb79f6bc57ee1f1880a3ea83ad8b'...
npm ERR! git clone C:\Users\username\.atom\.apm\_git-remotes\git-github-com-dapetcu21-luaparse-git-1df252af C:\Users\username\AppData\Local\Temp\npm-13068-09b790b7\git-cache-15c834e3\5a1fd2868adecb79f6bc57ee1f1880a3ea83ad8b: error: cannot spawn sh: No such file or directory
npm ERR! git clone C:\Users\username\.atom\.apm\_git-remotes\git-github-com-dapetcu21-luaparse-git-1df252af C:\Users\username\AppData\Local\Temp\npm-13068-09b790b7\git-cache-15c834e3\5a1fd2868adecb79f6bc57ee1f1880a3ea83ad8b: fatal: unable to fork
npm ERR! git clone C:\Users\username\.atom\.apm\_git-remotes\git-github-com-dapetcu21-luaparse-git-1df252af C:\Users\username\AppData\Local\Temp\npm-13068-09b790b7\git-cache-15c834e3\5a1fd2868adecb79f6bc57ee1f1880a3ea83ad8b: 
npm ERR! git clone C:\Users\username\.atom\.apm\_git-remotes\git-https-github-com-dapetcu21-luaparse-git-7c30d46c C:\Users\username\AppData\Local\Temp\npm-13068-09b790b7\git-cache-a4a3f540\5a1fd2868adecb79f6bc57ee1f1880a3ea83ad8b: Cloning into 'C:\Users\username\AppData\Local\Temp\npm-13068-09b790b7\git-cache-a4a3f540\5a1fd2868adecb79f6bc57ee1f1880a3ea83ad8b'...
npm ERR! git clone C:\Users\username\.atom\.apm\_git-remotes\git-https-github-com-dapetcu21-luaparse-git-7c30d46c C:\Users\username\AppData\Local\Temp\npm-13068-09b790b7\git-cache-a4a3f540\5a1fd2868adecb79f6bc57ee1f1880a3ea83ad8b: error: cannot spawn sh: No such file or directory
npm ERR! git clone C:\Users\username\.atom\.apm\_git-remotes\git-https-github-com-dapetcu21-luaparse-git-7c30d46c C:\Users\username\AppData\Local\Temp\npm-13068-09b790b7\git-cache-a4a3f540\5a1fd2868adecb79f6bc57ee1f1880a3ea83ad8b: fatal: unable to fork
npm ERR! git clone C:\Users\username\.atom\.apm\_git-remotes\git-https-github-com-dapetcu21-luaparse-git-7c30d46c C:\Users\username\AppData\Local\Temp\npm-13068-09b790b7\git-cache-a4a3f540\5a1fd2868adecb79f6bc57ee1f1880a3ea83ad8b: 
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit 
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:206:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:877:16)
npm WARN addRemoteGit     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
npm WARN addRemoteGit  dapetcu21/luaparse resetting remote C:\Users\username\.atom\.apm\_git-remotes\git-github-com-dapetcu21-luaparse-git-b80768f9 because of error: { Error: Command failed: git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit 
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:206:12)
npm WARN addRemoteGit     at emitTwo (events.js:106:13)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:191:7)
npm WARN addRemoteGit     at maybeClose (internal/child_process.js:877:16)
npm WARN addRemoteGit     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
npm WARN addRemoteGit   killed: false,
npm WARN addRemoteGit   code: 1,
npm WARN addRemoteGit   signal: null,
npm WARN addRemoteGit   cmd: 'git -c core.longpaths=true config --get remote.origin.url' }
npm ERR! git clone --template=C:\Users\username\.atom\.apm\_git-remotes\_templates --mirror [email protected]:dapetcu21/luaparse.git C:\Users\username\.atom\.apm\_git-remotes\git-github-com-dapetcu21-luaparse-git-b80768f9: Cloning into bare repository 'C:\Users\username\.atom\.apm\_git-remotes\git-github-com-dapetcu21-luaparse-git-b80768f9'...
npm ERR! git clone --template=C:\Users\username\.atom\.apm\_git-remotes\_templates --mirror [email protected]:dapetcu21/luaparse.git C:\Users\username\.atom\.apm\_git-remotes\git-github-com-dapetcu21-luaparse-git-b80768f9: error: cannot spawn ssh: No such file or directory
npm ERR! git clone --template=C:\Users\username\.atom\.apm\_git-remotes\_templates --mirror [email protected]:dapetcu21/luaparse.git C:\Users\username\.atom\.apm\_git-remotes\git-github-com-dapetcu21-luaparse-git-b80768f9: fatal: unable to fork
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Users\\root\\AppData\\Local\\atom\\app-1.16.0\\resources\\app\\apm\\bin\\node.exe" "C:\\Users\\root\\AppData\\Local\\atom\\app-1.16.0\\resources\\app\\apm\\node_modules\\npm\\bin\\npm-cli.js" "--globalconfig" "C:\\Users\\root\\.atom\\.apm\\.apmrc" "--userconfig" "C:\\Users\\root\\.atom\\.apmrc" "install" "C:\\Users\\root\\AppData\\Local\\Temp\\d-117319-14696-7sk09q.yejj7nwmi\\package.tgz" "--runtime=electron" "--target=1.3.13" "--arch=x64" "--global-style" "--production" "--msvs_version=2012"
npm ERR! node v6.9.5
npm ERR! npm  v3.10.5
npm ERR! code 128

npm ERR! Command failed: git -c core.longpaths=true clone --template=C:\Users\username\.atom\.apm\_git-remotes\_templates --mirror [email protected]:dapetcu21/luaparse.git C:\Users\username\.atom\.apm\_git-remotes\git-github-com-dapetcu21-luaparse-git-b80768f9
npm ERR! Cloning into bare repository 'C:\Users\username\.atom\.apm\_git-remotes\git-github-com-dapetcu21-luaparse-git-b80768f9'...
npm ERR! error: cannot spawn ssh: No such file or directory
npm ERR! fatal: unable to fork
npm ERR! 
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\username\AppData\Local\Temp\apm-install-dir-117319-14696-jlnq3m.0x6zpycik9\npm-debug.log

Tested on Windows 7, Windows 10 and Linux, using the latest version of package-deps and Atom v1.16.0. Error occurs only in Windows.
Example package: atom-defold-ide - it installs package autocomplete-lua, which has dependency that installs from repository.

Doesn't Recognize Github Format

apm allows us to install from github (thought it doesn't support tags for some reason). Just dropping a note in case anyone else runs into this that package-deps doesn't support the github dep format.

Linter activation

I don't know if this is a issue of this package or atom-community/linter.

I know you are using atom.packages.enablePackage() but to linters fully work you need to restart/reload atom. I tested with linter-js-standard and linter-ruby.

showPrompt fails

Hello,
showPrompt flag fails on the newest Atom 1.17.0-beta5
Rolled back into stable 1.16 and it works as expected.

'patch-package' is not recognized as an internal or external command

After upgrading to/installing v7.0.0 I'm getting the following error message:

$ npm install atom-package-deps

> [email protected] postinstall C:\Users\erico\.atom\packages\linter-htmllint\node_modules\atom-package-deps
> patch-package

'patch-package' is not recognized as an internal or external command,
operable program or batch file.
[...]

I'm guessing this can be fixed by moving "patch-package": "^6.2.2", back into the "dependencies" section from the "devDependencies" section (partly reverting f16e38c).

Error during showing installation progress to user

After upgrading to package-deps 7, I get this error in my Windows unit tests (headless). This does not happen on other platforms:

atom-community/atom-ide-base#47

[Package-Deps] Error during showing installation progress to user Error: Can't create a view for Notification instance. Please register a view provider.
    at ViewRegistry.createView (D:\a\_temp\atom\Atom\resources\app.asar\src\view-registry.js:198:11)
    at ViewRegistry.getView (D:\a\_temp\atom\Atom\resources\app.asar\src\view-registry.js:133:19)
    at getView (D:\a\atom-ide-base\atom-ide-base\node_modules\atom-package-deps\lib\index.js:778:41)
    at Object.install (D:\a\atom-ide-base\atom-ide-base\node_modules\atom-package-deps\lib\index.js:947:16)
.[Package-Deps] Error during showing installation progress to user Error: Can't create a view for Notification instance. Please register a view provider.
    at ViewRegistry.createView (D:\a\_temp\atom\Atom\resources\app.asar\src\view-registry.js:198:11)
    at ViewRegistry.getView (D:\a\_temp\atom\Atom\resources\app.asar\src\view-registry.js:133:19)
    at getView (D:\a\atom-ide-base\atom-ide-base\node_modules\atom-package-deps\lib\index.js:778:41)
    at Object.install (D:\a\atom-ide-base\atom-ide-base\node_modules\atom-package-deps\lib\index.js:947:16)
F[Package-Deps] Error during showing installation progress to user Error: Can't create a view for Notification instance. Please register a view provider.
    at ViewRegistry.createView (D:\a\_temp\atom\Atom\resources\app.asar\src\view-registry.js:198:11)
    at ViewRegistry.getView (D:\a\_temp\atom\Atom\resources\app.asar\src\view-registry.js:133:19)
    at getView (D:\a\atom-ide-base\atom-ide-base\node_modules\atom-package-deps\lib\index.js:778:41)
    at Object.install (D:\a\atom-ide-base\atom-ide-base\node_modules\atom-package-deps\lib\index.js:947:16)
.

For bin

Unable to install atom-ide-markdown-service, Error: Error: spawn apm ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Unable to install atom-ide-datatip, Error: Error: spawn apm ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Unable to install atom-ide-signature-help, Error: Error: spawn apm ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Unable to install atom-ide-hyperclick, Error: Error: spawn apm ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Unable to install atom-ide-definitions, Error: Error: spawn apm ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Unable to install atom-ide-outline, Error: Error: spawn apm ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Unable to install linter, Error: Error: spawn apm ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
Installation complete
All Done!
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Unable to install linter-ui-default, Error: Error: spawn apm ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)

Dependencies fail to install when there is a space in Atom's install path

Hi folks.

I just got these errors in my console when installing atom-ide-base via the Atom Beta settings UI.

<embedded>:11 Could not resolve 'atom-ide-markdown-service' to a package path
loadPackage @ <embedded>:11
<embedded>:11 Could not resolve 'atom-ide-datatip' to a package path
loadPackage @ <embedded>:11
<embedded>:11 Could not resolve 'atom-ide-signature-help' to a package path
loadPackage @ <embedded>:11
<embedded>:11 Could not resolve 'atom-ide-hyperclick' to a package path
loadPackage @ <embedded>:11
<embedded>:11 Could not resolve 'atom-ide-definitions' to a package path
loadPackage @ <embedded>:11
<embedded>:11 Could not resolve 'atom-ide-outline' to a package path
loadPackage @ <embedded>:11
<embedded>:11 Could not resolve 'linter' to a package path
loadPackage @ <embedded>:11
<embedded>:11 Could not resolve 'linter-ui-default' to a package path
loadPackage @ <embedded>:11
/Users/[user]/.atom/packages/atom-ide-base/node_modules/atom-package-deps/lib/index.js:827 [Package-Deps] Unable to install atom-ide-markdown-service, Error: /bin/sh: /Applications/Atom: No such file or directory
handleFailure @ /Users/[user]/.atom/packages/atom-ide-base/node_modules/atom-package-deps/lib/index.js:827
/Users/[user]/.atom/packages/atom-ide-base/node_modules/atom-package-deps/lib/index.js:827 [Package-Deps] Unable to install atom-ide-datatip, Error: /bin/sh: /Applications/Atom: No such file or directory
handleFailure @ /Users/[user]/.atom/packages/atom-ide-base/node_modules/atom-package-deps/lib/index.js:827
/Users/[user]/.atom/packages/atom-ide-base/node_modules/atom-package-deps/lib/index.js:827 [Package-Deps] Unable to install atom-ide-signature-help, Error: /bin/sh: /Applications/Atom: No such file or directory
handleFailure @ /Users/[user]/.atom/packages/atom-ide-base/node_modules/atom-package-deps/lib/index.js:827
/Users/[user]/.atom/packages/atom-ide-base/node_modules/atom-package-deps/lib/index.js:827 [Package-Deps] Unable to install atom-ide-hyperclick, Error: /bin/sh: /Applications/Atom: No such file or directory
handleFailure @ /Users/[user]/.atom/packages/atom-ide-base/node_modules/atom-package-deps/lib/index.js:827
/Users/[user]/.atom/packages/atom-ide-base/node_modules/atom-package-deps/lib/index.js:827 [Package-Deps] Unable to install atom-ide-definitions, Error: /bin/sh: /Applications/Atom: No such file or directory
handleFailure @ /Users/[user]/.atom/packages/atom-ide-base/node_modules/atom-package-deps/lib/index.js:827
/Users/[user]/.atom/packages/atom-ide-base/node_modules/atom-package-deps/lib/index.js:827 [Package-Deps] Unable to install atom-ide-outline, Error: /bin/sh: /Applications/Atom: No such file or directory
handleFailure @ /Users/[user]/.atom/packages/atom-ide-base/node_modules/atom-package-deps/lib/index.js:827
/Users/[user]/.atom/packages/atom-ide-base/node_modules/atom-package-deps/lib/index.js:827 [Package-Deps] Unable to install linter, Error: /bin/sh: /Applications/Atom: No such file or directory
handleFailure @ /Users/[user]/.atom/packages/atom-ide-base/node_modules/atom-package-deps/lib/index.js:827
/Users/[user]/.atom/packages/atom-ide-base/node_modules/atom-package-deps/lib/index.js:827 [Package-Deps] Unable to install linter-ui-default, Error: /bin/sh: /Applications/Atom: No such file or directory
handleFailure @ /Users/[user]/.atom/packages/atom-ide-base/node_modules/atom-package-deps/lib/index.js:827

I can see that it's not finding the paths correctly. (Error: /bin/sh: /Applications/Atom: No such file or directory). I believe this is because there is a space in my install path for Atom Beta. It's the default install dir for macOS: /Applications/Atom Beta.app/

This is a really common thing, at least for macOS users. So any Atom Beta, Atom Nightly user on macOS, or anyone whose Atom install dir contains a space is likely affected by this bug.

Thanks for taking a look. If you need any more details, I can help with reproducing or troubleshooting this, and I would be happy to test a fix if I get the time.

Unable to get loaded package

I tried to use package-deps to install an apm package for a theme.
However, an error message is printed on the console during the theme load.

[Package-Deps] Unable to get loaded package 'atom-antescofo'

Did I miss something ?

Bump major and enable show prompt by default

Most people didn't notice the new feature, or didn't read the new README to know that we've added a confirmation box, bumping major and setting it default would enable it for masses

Move package-deps to `apm`

Now every package loads a separate instance of package-deps in their node_modules. This means a huge lag when we consider all of the Atom packages together.

The most logical approach for Atom is to merge the functionality of this package to apm and let apm do all of the dependency management offline once a package is installed. That is how every good Package manager does its job.

It does not make sense to care about installing dependencies in the runtime inside activate function.

Installing linter-eslint fails from uncaught exception in main.js

Clean install of [email protected], [email protected], [email protected] on OS X Yosemite

An error is thrown from the atom-package-deps/lib/main.js at https://github.com/steelbrain/package-deps/blob/master/lib/main.js#L15, which causes the rest of the package to fail.

In the debugger, it seems that the call require('callsite')() returns the following error string

"Error
    at Object.eval (eval at evaluate (unknown source), <anonymous>:1:20)
    at Object.InjectedScript._evaluateOn (<anonymous>:904:55)
    at Object.InjectedScript._evaluateAndWrap (<anonymous>:837:34)
    at Object.InjectedScript.evaluateOnCallFrame (<anonymous>:963:21)
    at Object.install (/Users/jonathan/.atom/packages/linter-eslint/node_modules/atom-package-deps/lib/main.js:15:5)
    at Object.activate (/Users/jonathan/.atom/packages/linter-eslint/lib/main.js:53:34)
    at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:170:19)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:150:32
    at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:92:15)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:143:26"

which then results in the expression require('callsite')()[1].getFileName() to throw a 'not a function error', since require('callsite')()[1] is simply the character "E".

packages installation for node fails on windows

running npx atom-package-deps . on windows in GitHub Actions fails. It works for linux and macos but not windows.

image

When I changed the command to apm install <package> it worked so it doesn't have to do with apm not being installed.

image

Inferring the package name fails on Electron 1.2.x

We're in the process of upgrading Atom's version of Electron (atom/atom#12300).

We noticed when using the new Electron, packages that use package-deps are throwing exceptions like this:

screen shot 2016-08-24 at 2 21 23 pm

It looks like this module tries to infer the package name from a stack trace, and stack traces for generator functions have changed in the new version of Electron.

Unable to get package info for ...

Hi, I've been trying to release a package that relies upon "linter". In my development environment, I've been getting a message "[Package-Deps] Unable to get package info for linter". I'm not sure if this is just what happens when I don't run the installation of my package out of the official repos (I just use apm link). It seems when it's trying to run the installation of linter, it tries to get get linter's dependencies, but if it isn't already installed, of course it cannot query them. What might be going on here? I was just using the latest package-deps version.

Can't bring up the integration

Hey there,

I'm currently facing an issue with my integration.

This is my package: https://github.com/sous-chefs/language-chef/tree/feature/dependency-inspec
The package.json: https://github.com/sous-chefs/language-chef/blob/feature/dependency-inspec/package.json
And the main.js, which is loaded: https://github.com/sous-chefs/language-chef/blob/feature/dependency-inspec/lib/main.js

I've tried different things, but did not mentioned out anyone to work. I'm always getting an error, which is just showing up for a milisecond or so.

Could you just give me hint, what I'm doing wrong right now?

Best regards,
Patrick

Performance

It currently takes about 25m to figure out a package name, gonna investigate where

Cannot configure package-deps to install package dependancies.

I'm having issues, unfortunately, using your package. I think I've followed your instructions but I'm missing something that is keeping me from greatness.

After putting this code in my package I've published it to Atom packages (apm publish major/minor) so that I can see it in the install section of the settings tab in Atom. From there I can install or uninstall the new package. When I install it'll pulldown the package and install the NPM deps (your package) but then it stops there. It doesn't pull down any other package.

Here are the links to the full project (basically empty because I'm trying to get this part to work)

what where
version 2.2.0 https://github.com/mrpotatoes/re-re-re-react/releases/tag/v2.2.0
package.json https://github.com/mrpotatoes/re-re-re-react/blob/master/package.json
activate() https://github.com/mrpotatoes/re-re-re-react/blob/master/lib/re-re-re-react.js#L12

Snippets of the code so you don' thave to click the links:
Part of the package.json

"dependencies": {
   "atom-package-deps": "4.6.0"
 },

 "package-deps": [
    "atom-beautify",
    "atom-ternjs",
    ... and so on 
  ]

The main part of my "main" method.

export default {
  // ...
  activate(state) {
    // replace the example argument 'linter-ruby' with the name of this Atom package
    require('atom-package-deps').install('re-re-re-react')
      .then(function() {
      console.log('All dependencies installed, good to go')
    })
  }
  // ...
}

Can't create a view for Notification instance. Please register a view provider.

Stack Trace:

Error: Can't create a view for Notification instance. Please register a view provider.
    at ViewRegistry.module.exports.ViewRegistry.createView (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/view-registry.js:96:15)
    at ViewRegistry.module.exports.ViewRegistry.getView (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/view-registry.js:65:21)
    at new PackageDepsView (/Users/kepler/.atom/packages/linter-ruby/node_modules/atom-package-deps/lib/view.js:18:38)
    at Function.installPackage (/Users/kepler/.atom/packages/linter-ruby/node_modules/atom-package-deps/lib/main.js:32:18)
    at Function.install (/Users/kepler/.atom/packages/linter-ruby/node_modules/atom-package-deps/lib/main.js:27:26)
    at Object.activate (/Users/kepler/.atom/packages/linter-ruby/lib/main.js:21:34)
    at Package.module.exports.Package.activateNow (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/package.js:243:19)
    at /opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/package.js:224:30
    at Package.module.exports.Package.measure (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/package.js:167:15)
    at Package.module.exports.Package.activate (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/package.js:216:14)
    at PackageManager.module.exports.PackageManager.activatePackage (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/package-manager.js:486:21)
    at /opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/package-manager.js:469:29
    at Config.module.exports.Config.transact (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/config.js:324:16)
    at PackageManager.module.exports.PackageManager.activatePackages (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/package-manager.js:464:19)
    at PackageManager.module.exports.PackageManager.activate (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/package-manager.js:445:46)
    at Atom.module.exports.Atom.startEditorWindow (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/atom.js:670:21)
    at Object.<anonymous> (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/window-bootstrap.js:12:8)
    at Object.<anonymous> (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/window-bootstrap.js:23:4)
    at Module._compile (module.js:452:26)
    at Object.defineProperty.value [as .js] (/opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:169:21)
    at Module.load (module.js:347:32)
    at Function.Module._load (module.js:302:12)
    at Module.require (module.js:357:17)
    at require (module.js:376:17)
    at setupWindow (file:///opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/static/index.js:82:25)
    at window.onload (file:///opt/homebrew-cask/Caskroom/atom/latest/Atom.app/Contents/Resources/app.asar/static/index.js:35:9)

Upon first-run of an instance with only AtomLinter/linter-ruby@d172f17 installed.

screen shot 2015-09-05 at 6 53 41 pm

`packageDeps.install()` causes exception "querySelector is not a function"

Error when trying to install dependency. Only thing I have in code, is in package.json:

  "dependencies": {
    "atom-package-deps": "^3.0.0"
  },
  "package-deps": [
    "language-lua"
  ]

And in main.coffee:

module.exports =
    config:
      includeArguments:
        type: 'boolean'
        default: true
    activate: ->
        packageDeps.install()
        .then ->
          provider.loadCompletions()

This causes exception:

/Users/vlad/.atom/packages/autocomplete-corona/node_modules/atom-package-deps/lib/view.js:41

TypeError: this.element.querySelector is not a function
    at View.advance (/Users/vlad/.atom/packages/autocomplete-corona/node_modules/atom-package-deps/lib/view.js:41:36)
    at /Users/vlad/.atom/packages/autocomplete-corona/node_modules/atom-package-deps/lib/main.js:53:16
    at stdout (/Users/vlad/.atom/packages/autocomplete-corona/node_modules/atom-package-deps/lib/helpers.js:24:11)
    at Socket.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/buffered-process.js:212:17)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at Pipe.onread (net.js:551:20)

image

Steps to reproduce:

  1. delete language-lua
  2. Install "autocomplete-corona" from Atom package GUI

Progress bar does not update

The async logic in main.js is wrong. Promise.all() creates one promise that is not fulfilled until all of the packages are installed. Once that happens, view.markFinished() is called N times in a row (synchronously). In effect, the user never sees any progress.

Also, if the number of packages to install is large (and the packages themselves are large), then you will likely cause the user's machine to lock up because you are running all of the apm install calls in parallel.

Doesn’t prompt to install sub-dependencies

linter-js-standard specifies linter v2.0.0 as a dependency.

When I install linter-js-standard with Atom-Package-Deps v4, it prompts me to install linter (after which it installs linter v2.0.0). Right after, it prompts me to install linter-ui-default (since it’s a dependency of linter).

When I install linter-js-standard with Atom-Package-Deps v5, it prompts me to install linter (after which it installs the latest version of linter). However, it doesn’t prompt me to install linter-ui-default. Only after I restart Atom, I get a prompt to install linter’s dependencies as well.

maximum required version

README says:

If you need to install specific version of a package, you can add the minimum required version to the package name (semver doesn't work!), separated by ::

{
  "name": "linter-ruby",
  ...
  "package-deps": ["linter:2.0.0"]
}

Is it possible to have an upper limit of version or one fixed version. Could you do something similar like this:

apm install [email protected]

I'm trying to find a solution to AtomLinter/linter-julia#38 and one short term solution would be reverting to linter version 1.11.21.

Confirm windows support

We might or might not have to add .exe to APMPath on windows. I'll try this on a windows PC soon.

Allow users a choice in dependencies.

We are beginning to see a rise in Atom packages which provide different implementations for the same service, or differing grammars which provide highlighting differently.

In order to combat this packages should be able to designate an array of packages they are compatible with and depend on, but only one of the array should be picked.

An example manifest:

{
  "packageName": "linter-swiftc",
  "package-deps": [
    ["linter", "nuclide-diagnostics"],
    ["language-swift", "language-sourcekit"]
  ]
}

In this scenario when a user tries to install linter-swiftc they will be asked if they prefer linter or nuclide-diagnostics, and language-swift or language-sourcekit.

As well package-deps could detect if one of the options is installed before-hand and ignore asking in the first place.

Rename key to packageDeps

I recently had an edge case, in which I would have loved the option to use the following in my package:

import { package-deps as atomDeps } from '../package.json'

Unfortunately, this does not work because of the hyphen in package-deps (and I couldn't find a workaround on MDN or Stack Overflow – quotes produce an error!) Maybe you could keep this in the back of your head, when working on a new major version with (other) breaking changes and rename this to packageDeps or atomPackageDeps.

As I said, this is an edge-case, so priority is low.

recommended API slower then necessary

Even with the latest release (3.0.8) the recommended API:

require('atom-package-deps').install()

is more then twice as slow as passing the package name explicitly:

require('atom-package-deps').install('linter-NAME')

E.g. with linter-pyflakes the time with the recommended call is around 25ms while with the second signature it is around 12ms. So why not recommend the second one?

Beside the performance difference I think 12ms is still significant in the context of dozens of packages using this feature. Users installing a linter through the UI will always have the dependencies installed correctly. Therefore I am not sure if the overhead is justified.

See related discussion on AtomLinter/linter-xmllint#41

Tag old releases

It would be nice as an easy reference if the older releases (and future ones!) were tagged here on GitHub.

packages installed from git repositories are incorrectly treated as not installed

background

When a package.json file contains the following:

"package-deps": [
  "vanilla",
  "githubuser/chocolate"
],

the package-deps code will install the vanilla package from atom.io and the chocolate package from github.com/githubuser/chocolate. Before installing, it will check whether these packages already exist.

expected behavior

Both vanilla and chocolate should be installed on first run, and neither should be installed again.

actual behavior

The vanilla package installs once, and never gets installed again (this is expected).

Unfortunately, the chocolate package gets installed every time Atom is loaded.

the cause

package-deps checks whether a package is installed in this line from helpers.js, using a call to atom.packages.resolvePackagePath(name).

However, resolvePackagePath(name) only works for actual package names, so it works for vanilla (and other packages from atom.io), but fails for githubuser/chocolate (because the package name is probably just chocolate, but might be something like atom-chocolate if the maintainer decided to use a package name different from the repo name! ;).

possible solution

The best solution I can think of is to expand the syntax of the package-deps JSON key by allowing objects (or perhaps arrays) instead of just strings. The example above would be changed to something like this:

"package-deps": [
  "vanilla",
  { "chocolate": "githubuser/chocolate" }
],

(The above object syntax is intended to be similar to the npm "dependencies" syntax, but an array or a more structured map would work too.)

If this sounds like a good solution, I can write a pull request (but I'm not familiar with Flow, so it would be straight JS/ES).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.