Skip to content

Commit

Permalink
Merge pull request #60 from steelbrain/steelbrain/maintenance
Browse files Browse the repository at this point in the history
Maintenance
  • Loading branch information
steelbrain authored Aug 26, 2016
2 parents f9332b2 + a666a95 commit a1c27ac
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 4.3.0

* Fix support for upcoming Atom versions
* Use babel style exports (backward compatible)

## 4.2.0

* Support git-based packages without repeatedly reinstalling
Expand Down
1 change: 0 additions & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ dependencies:

test:
override:
- npm run lint
- npm test

machine:
Expand Down
1 change: 0 additions & 1 deletion decls/atom.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ declare var atom: Object;

// Global Chromium CSS Object
declare var CSS: Object;
declare var HTMLElement: Object;

declare module 'atom' {
declare var Point: any;
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"description": "Automatically install package dependencies",
"main": "lib/index.js",
"scripts": {
"test": "apm test",
"lint": "eslint .",
"test": "(apm test) && (flow check) && (eslint . )",
"clean": "rm -rf lib",
"compile": "npm run clean && babel src --out-dir lib",
"watch": "npm run clean && babel src --out-dir lib --watch"
Expand All @@ -32,6 +31,7 @@
"babel-plugin-for-of-efficient": "^1.0.0",
"babel-preset-steelbrain": "^4.0.1",
"eslint-config-steelbrain": "^1.0.4",
"flow-bin": "^0.31.1",
"jasmine-fix": "^1.0.1"
}
}
12 changes: 9 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ if (typeof window.__steelbrain_package_deps === 'undefined') {
window.__steelbrain_package_deps = new Set()
}

async function install(givenPackageName: ?string) {
const packageName = givenPackageName || AtomPackagePath.guessFromCallIndex(5)
async function installDependencies(packageName: ?string): Promise<void> {
invariant(packageName, '[Package-Deps] Failed to determine package name')

const dependencies = Helpers.getDependencies(packageName)
Expand All @@ -35,4 +34,11 @@ async function install(givenPackageName: ?string) {
await Promise.all(promises)
}

module.exports.install = install
function install(givenPackageName: ?string) {
// NOTE: We are wrapping the async function in a sync function to avoid extra
// stack values before we extract names
return installDependencies(givenPackageName || AtomPackagePath.guessFromCallIndex(2))
}

export default install
export { install }
2 changes: 1 addition & 1 deletion src/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class View {
detail: `Installing ${dependencies.map(i => i.name).join(', ')}`,
dismissable: true,
})
const progress = document.createElement('progress')
const progress: Object = document.createElement('progress')
this.dispose = function() {
notification.dismiss()
}
Expand Down

0 comments on commit a1c27ac

Please sign in to comment.