Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: vtsvang/node-pkgtool
base: 00bc0d4a02
...
head fork: vtsvang/node-pkgtool
compare: 7be96bdf7e
  • 2 commits
  • 11 files changed
  • 0 commit comments
  • 1 contributor
View
2  README.md
@@ -58,6 +58,8 @@ Generate documentation: `npm run-script generate-doc`
# Changelog
+* v0.3.4
+ * Now using asynchronous runtime configuration library
* v0.3.3
* Fixed bug when cli removes package.json contents (Thanks to [Alexandr Lukin](https://github.com/kerbyfc))
* v0.3.2
View
16 doc/README.md.html
@@ -115,7 +115,7 @@
</p>
</nav>
<div id='filecontents'>
- <h1>pkgtool <a href="https://travis-ci.org/vtsvang/node-pkgtool"><img src="https://travis-ci.org/vtsvang/node-pkgtool.png" alt="Build Status"></a></h1><p>Tool for managing package&#39;s dependencies versions.</p><h2>Features</h2>
+ <h1>pkgtool <a href="https://travis-ci.org/vtsvang/node-pkgtool"><img src="https://travis-ci.org/vtsvang/node-pkgtool.png" alt="Build Status"></a> <a href="http://coderwall.com/vtsvang"><img src="http://api.coderwall.com/vtsvang/endorsecount.png" alt="endorse"></a></h1><p>Tool for managing package&#39;s dependencies versions.</p><h2>Features</h2>
<ul>
<li>Hold dependencies versions</li>
<li>Update dependencies versions</li>
@@ -143,6 +143,18 @@
console.log( &quot;Yay!&quot; ) unless err</code></pre>
<h1>Development</h1><p>Add specs for any new or changed functionality.</p><p>Run tests: <code>npm test</code></p><p>Generate documentation: <code>npm run-script generate-doc</code></p><h1>Changelog</h1>
<ul>
+<li>v0.3.4<ul>
+<li>Now using asynchronous runtime configuration library</li>
+</ul>
+</li>
+<li>v0.3.3<ul>
+<li>Fixed bug when cli removes package.json contents (Thanks to <a href="https://github.com/kerbyfc">Alexandr Lukin</a>)</li>
+</ul>
+</li>
+<li>v0.3.2<ul>
+<li>Updated documentation and npmignored doc</li>
+</ul>
+</li>
<li>v0.3.1<ul>
<li>Fixed issue with require cache</li>
</ul>
@@ -192,7 +204,7 @@
</div>
<div id='footer'>
Generated on
- Thu Jan 24 2013 17:07:04 GMT+0400 (MSK)
+ Mon Feb 04 2013 13:02:19 GMT+0400 (MSK)
by
<a href='https://github.com/netzpirat/codo' title='CoffeeScript API documentation generator'>Codo</a>
v1.5.4
View
2  doc/class_index.html
@@ -142,7 +142,7 @@ <h1 class='alphaindex'>Alphabetic Index</h1>
</div>
<div id='footer'>
Generated on
- Thu Jan 24 2013 17:07:04 GMT+0400 (MSK)
+ Mon Feb 04 2013 13:02:19 GMT+0400 (MSK)
by
<a href='https://github.com/netzpirat/codo' title='CoffeeScript API documentation generator'>Codo</a>
v1.5.4
View
2  doc/classes/Package.html
@@ -868,7 +868,7 @@
</div>
<div id='footer'>
Generated on
- Thu Jan 24 2013 17:07:04 GMT+0400 (MSK)
+ Mon Feb 04 2013 13:02:19 GMT+0400 (MSK)
by
<a href='https://github.com/netzpirat/codo' title='CoffeeScript API documentation generator'>Codo</a>
v1.5.4
View
2  doc/files/cli.coffee.html
@@ -143,7 +143,7 @@
</div>
<div id='footer'>
Generated on
- Thu Jan 24 2013 17:07:04 GMT+0400 (MSK)
+ Mon Feb 04 2013 13:02:19 GMT+0400 (MSK)
by
<a href='https://github.com/netzpirat/codo' title='CoffeeScript API documentation generator'>Codo</a>
v1.5.4
View
2  doc/files/package.coffee.html
@@ -117,7 +117,7 @@
</div>
<div id='footer'>
Generated on
- Thu Jan 24 2013 17:07:04 GMT+0400 (MSK)
+ Mon Feb 04 2013 13:02:19 GMT+0400 (MSK)
by
<a href='https://github.com/netzpirat/codo' title='CoffeeScript API documentation generator'>Codo</a>
v1.5.4
View
33 lib/package.coffee
@@ -3,7 +3,7 @@
class Package
fs = require "fs"
- rc = require "rc"
+ rc = require "runtime-configuration"
url = require "url"
util = require "util"
glob = require "glob"
@@ -154,24 +154,25 @@ class Package
return callback.call( @, err ) if err
# load npmrc configuration
- @rc = rc "npm", registry: "https://registry.npmjs.org/"
+ rc "npm", registry: "https://registry.npmjs.org/", ( err, config ) =>
+ @rc = config
- try
- # try to load info from package.json
- @pkg = @require @path
+ try
+ # try to load info from package.json
+ @pkg = @require @path
- # fill dependencies
- @dependencies = @pkg.dependencies
- @devDependencies = @pkg.devDependencies
+ # fill dependencies
+ @dependencies = @pkg.dependencies
+ @devDependencies = @pkg.devDependencies
- callback.call @
- catch e
- if e.code is "ENOENT"
- # if package.json not exists, should initialize dependencies
- @create callback
- else
- # if package.json is broken
- callback.call @, e
+ callback.call @
+ catch e
+ if e.code is "ENOENT"
+ # if package.json not exists, should initialize dependencies
+ @create callback
+ else
+ # if package.json is broken
+ callback.call @, e
@
View
4 package.json
@@ -1,7 +1,7 @@
{
"name": "pkgtool",
"description": "Tool for holding and updating package dependencies versions",
- "version": "0.3.3",
+ "version": "0.3.4",
"author": "Vladimir Tsvang <vtsvang@gmail.com>",
"dependencies": {
"coffee-script": "1.4.0",
@@ -11,7 +11,7 @@
"request": "2.12.0",
"wrench": "1.4.4",
"colors": "0.6.0-1",
- "rc": "0.0.6"
+ "runtime-configuration": "0.1.1"
},
"devDependencies": {
"mocha": "1.8.1",
View
2  test/helpers.js
@@ -1,7 +1,7 @@
global.fs = require( "fs" )
global.path = require( "path" )
global.wrench = require( "wrench" )
-global.rc = require( "rc" )
+global.rc = require( "runtime-configuration" )
global.sinon = require( "sinon" )
global.request = require( "request" )
global.exec = require('child_process').exec
View
1  test/mocha.opts
@@ -1,4 +1,3 @@
---ignore-leaks
--ui bdd
--timeout 500
--slow 75
View
7 test/specs/programmatic/package.coffee
@@ -1,8 +1,9 @@
describe "Package", ->
- before ->
- @npmrc = rc "npm", registry: "https://registry.npmjs.org/"
-
+ before ( done ) ->
+ rc "npm", registry: "https://registry.npmjs.org/", ( err, @npmrc ) =>
+ done()
+
describe "@lookup()", ->
it "should lookup package.json in specified directory", ( done ) ->

No commit comments for this range

Something went wrong with that request. Please try again.