Socket
Socket
Sign inDemoInstall

atom-package-deps

Package Overview
Dependencies
0
Maintainers
2
Versions
47
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    atom-package-deps

Automatically install package dependencies


Version published
Weekly downloads
271
decreased by-24.93%
Maintainers
2
Created
Weekly downloads
 

Changelog

Source

7.0.0

  • BREAKING Change function signature to get rid of promptUser
  • BREAKING Change format of package-deps in manifest from "my-name:my-version" to be { "name": "my-name", "minimumVersion": "my-version" }
  • BREAKING Instead of accepting a semver-range for version, you can now only specify a minimum version in x.y.z format, instead of for example >=2
  • Add support for optional/group packages where users only have to install one of many, and are given a choice at runtime. Signature becomes Dependency[][] instead of Dependency[]
  • Add support for using through CLI for CI and similar purposes

Readme

Source

Atom-Package-Deps

Atom-Package-Deps is a module that lets your atom package depend on other atom packages, It's quite simple and shows a nice progress bar as a notification as the packages are installed.

How it works?

You need to have an array of package deps in your package manifest, like

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

You can also specify the minimum required version (version not semver-range!) of the package, or give users a choice by specifying multiple ones.

{
  "name": "linter-ruby",
  ...
  "package-deps": [
    // Add a dependency on a package:
    { "name": "linter", "minimumVersion": "2.0.0" },
    // Add a depdencny in any of the following packages,
    // so if one is already installed, user is not prompted to install the other
    [ { "name": "linter" }, { "name": "atom-ide-ui" } ]
  ]
}

Because the package installation is async, it returns a promise that resolves when all the dependencies have been installed.

'use babel'

module.exports = {
  activate() {
    // replace the example argument 'linter-ruby' with the name of this Atom package
    require('atom-package-deps')
      .install('linter-ruby')
      // ^ NOTE: This is the name of YOUR package, NOT the package you want to install.
      .then(function() {
        console.log('All dependencies installed, good to go')
      })
  },
}
API

You can use this package programatically via this exported interface:

export function install(packageName: string)

Alternatively, if you want to install dependencies via CLI, this package exposes a bin for that

Usage: atom-package-deps <directory>
Screenshots

Installation Prompt

Installation Prompt with choices:

Installation Progress

Installation Complete

License

This project is licensed under the terms of MIT license, See the LICENSE file for more info.

Keywords

FAQs

Last updated on 16 Aug 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc