Skip to content

Commit

Permalink
Formatting: Semicolons
Browse files Browse the repository at this point in the history
  • Loading branch information
martinheidegger committed Feb 16, 2017
1 parent 28d79ee commit f67af91
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var fs = require('fs');
var path = require('path');
var relativePath = require('cached-path-relative')
var relativePath = require('cached-path-relative');

var browserResolve = require('browser-resolve');
var nodeResolve = require('resolve');
Expand Down Expand Up @@ -280,7 +280,7 @@ Deps.prototype.getTransforms = function (file, pkg, opts) {
if (err) {
params.basedir = pkg.__dirname;
return nodeResolve(id, params, function (e, r) {
nr(e, r, true)
nr(e, r, true);
});
}

Expand Down Expand Up @@ -529,7 +529,7 @@ Deps.prototype.lookupPackage = function (file, cb) {
catch (err) {
return onpkg(new Error([
err + ' while parsing json file ' + pkgfile
].join('')))
].join('')));
}
pkg.__dirname = dir;

Expand All @@ -544,8 +544,8 @@ Deps.prototype.lookupPackage = function (file, cb) {
delete self.pkgFileCachePending[pkgfile];
fns.forEach(function (f) { f(err, pkg) });
}
if (err) cb(err)
else if (pkg) cb(null, pkg)
if (err) cb(err);
else if (pkg) cb(null, pkg);
else {
self.pkgCache[pkgfile] = false;
next();
Expand Down
8 changes: 4 additions & 4 deletions test/cache_persistent.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ test('uses persistent cache', function (t) {
var p = parser({
persistentCache: function (file, id, pkg, fallback, cb) {
if (file === files.bar) {
return fallback(null, cb)
return fallback(null, cb);
}
cb(null, {
source: 'file at ' + file + '@' + id,
package: pkg,
deps: { './bar': files.bar }
})
});
}
});
p.end({ id: 'foo', file: files.foo, entry: false });
Expand Down Expand Up @@ -48,7 +48,7 @@ test('passes persistent cache error through', function (t) {
t.plan(1);
var p = parser({
persistentCache: function (file, id, pkg, fallback, cb) {
cb(new Error('foo'))
cb(new Error('foo'));
}
});
p.end({ id: 'foo', file: files.foo, entry: false });
Expand All @@ -59,7 +59,7 @@ test('allow passing of the raw source as string', function (t) {
t.plan(1);
var p = parser({
persistentCache: function (file, id, pkg, fallback, cb) {
fallback(fs.readFileSync(files.bar, 'utf8'), cb)
fallback(fs.readFileSync(files.bar, 'utf8'), cb);
}
});
p.end({ id: 'foo', file: files.foo, entry: false });
Expand Down

0 comments on commit f67af91

Please sign in to comment.