Permalink
Browse files

v1.0.6

  • Loading branch information...
1 parent d6eaa90 commit 803abd961845f61e71a8d19df1bf2e2c5c646d5d @3rd-Eden committed Apr 2, 2012
Showing with 39 additions and 26 deletions.
  1. +6 −3 CHANGELOG
  2. +3 −1 bin/update.js
  3. +2 −0 features/index.js
  4. +1 −1 lib/agents.js
  5. +7 −5 lib/update.js
  6. +19 −15 lib/useragent.js
  7. +1 −1 package.json
View
@@ -1,10 +1,13 @@
+* __v1.0.6__ Updated the agent parser, JHint issues and leaking globals.
+
* __v1.0.5__ Potential fix for #11 where it doesn't install the stuff in windows
-this also brings a fresh update of the agents.js
+this also brings a fresh update of the agents.js.
* __v1.0.3__ Rewritten the `is` method so it doesn't display IE as true for
-firefox, chrome etc fixes #10 and #7
+firefox, chrome etc fixes #10 and #7.
-* __v1.0.3__ A fix for bug #6, updated the semver dependency for browserify support
+* __v1.0.3__ A fix for bug #6, updated the semver dependency for browserify
+support.
* __v1.0.2__ Don't throw errors when .parse is called without a useragent
string. It now defaults to a empty Agent instance.
View
@@ -1,7 +1,9 @@
#!/usr/bin/env node
var updater = require('../lib/update');
-updater(function (err, data) {
+updater(function updating (err, data) {
+ "use strict";
+
if (err) return console.error('Update unsuccessfull due to errors', err.message);
// yay no issues
View
@@ -1,3 +1,5 @@
+"use strict";
+
/**
* Plugin dependencies
*/
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -1,3 +1,5 @@
+"use strict";
+
var request = require('request')
, yaml = require('yamlparser')
, path = require('path')
@@ -27,8 +29,8 @@ module.exports = function update (fn) {
// try to see if we can parse the yaml
var parsed_yaml;
- try { parsed_yaml = yaml.eval(yamlstring) }
- catch (e) { return false }
+ try { parsed_yaml = yaml.eval(yamlstring); }
+ catch (e) { return false; }
// make sure we have a correct structure because we are reading this from
// a remote resource, they might change the structure of the JSON
@@ -39,7 +41,7 @@ module.exports = function update (fn) {
|| !('os_parsers' in parsed_yaml)
|| !parsed_yaml.os_parsers.length
|| !parsed_yaml.os_parsers[0].regex
- ) return false;
+ ) return false;
// \o/ working, now to create pre-compiled version of the regexps
// now we can try to generate a smaller file so it will take less memory
@@ -96,8 +98,8 @@ module.exports = function update (fn) {
// have been naught with our internet and injected a require() statment in
// the codez, paranoid ftw
var sandbox = { exports: {} };
- try { vm.runInNewContext(agentjs, sandbox, 'agentjs.vm') }
- catch (e) { return fn(e) }
+ try { vm.runInNewContext(agentjs, sandbox, 'agentjs.vm'); }
+ catch (e) { return fn(e); }
fn(null, sandbox.exports);
Oops, something went wrong.

0 comments on commit 803abd9

Please sign in to comment.