Comparing version 1.2.0 to 1.2.1
{ | ||
"name": "google-it", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "A CLI and Node.js library to help retrieve, display, and store Google search results", | ||
"main": "./googleIt.js", | ||
"bin": "./app.js", | ||
"main": "./src/googleIt.js", | ||
"bin": "./src/app.js", | ||
"repository": { | ||
@@ -12,2 +12,3 @@ "type": "git", | ||
"scripts": { | ||
"lint": "./node_modules/.bin/eslint --ext .js --ignore-path .eslintignore '*.js'", | ||
"test": "mocha test/**/*.js" | ||
@@ -31,2 +32,3 @@ }, | ||
"eslint": "^5.16.0", | ||
"eslint-config-amex": "^10.1.0", | ||
"mocha": "^5.0.0", | ||
@@ -33,0 +35,0 @@ "prettier": "1.14.3" |
@@ -13,3 +13,3 @@ # google-it [![Build Status](https://travis-ci.org/PatNeedham/google-it.svg?branch=master)](https://travis-ci.org/PatNeedham/google-it) [![Greenkeeper badge](https://badges.greenkeeper.io/PatNeedham/google-it.svg)](https://greenkeeper.io/) [![npm version](https://badge.fury.io/js/google-it.svg)](https://badge.fury.io/js/google-it) | ||
![GIF of google-it](google-it-demo.gif?raw=true "google-it") | ||
![GIF of google-it](./images/google-it-demo.gif?raw=true "google-it") | ||
@@ -20,11 +20,11 @@ Prevent display in the terminal, and save results to a JSON file: | ||
![GIF of google-it w/o display, results saved to file](google-it-output-no-display.gif?raw=true "google-it") | ||
![GIF of google-it w/o display, results saved to file](./images/google-it-output-no-display.gif?raw=true "google-it") | ||
`$ google-it --query="open whisper systems" -O 5` | ||
![GIF of opening-in-browser](open-results-in-browser.gif?raw=true "google-it-to-browser") | ||
![GIF of opening-in-browser](./images/open-results-in-browser.gif?raw=true "google-it-to-browser") | ||
`$ google-it --query="mechanical turk" --only-urls` | ||
![Screenshot of only-urls option](onlyUrls.png?raw=true "onlyUrls") | ||
![Screenshot of only-urls option](./images/onlyUrls.png?raw=true "onlyUrls") | ||
@@ -31,0 +31,0 @@ ### Command Line Arguments |
@@ -1,5 +0,4 @@ | ||
var assert = require('assert') | ||
var googleIt = require('../googleIt') | ||
var validateCLIArguments = require('../validateCLIArguments') | ||
var optionDefinitions = require('../optionDefinitions') | ||
const assert = require('assert'); | ||
const googleIt = require('../src/googleIt'); | ||
const validateCLIArguments = require('../src/validateCLIArguments'); | ||
@@ -10,13 +9,13 @@ describe('Validate output file format', () => { | ||
assert.equal( | ||
validateCLIArguments({query: 'i dont know', output: 12345}).valid, | ||
validateCLIArguments({ query: 'i dont know', output: 12345 }).valid, | ||
false | ||
) | ||
}) | ||
}) | ||
); | ||
}); | ||
}); | ||
describe('# -o whatever.jsonnn', () => { | ||
it('should be invalid because output file must end with .json', () => { | ||
assert.equal( | ||
validateCLIArguments({query: 'blah', output: 'whatever.jsonnn'}).valid, | ||
validateCLIArguments({ query: 'blah', output: 'whatever.jsonnn' }).valid, | ||
false | ||
) | ||
); | ||
}); | ||
@@ -27,7 +26,7 @@ }); | ||
assert.equal( | ||
validateCLIArguments({'query': 'blah', 'no-display': true}).valid, | ||
validateCLIArguments({ query: 'blah', 'no-display': true }).valid, | ||
false | ||
) | ||
}) | ||
}) | ||
); | ||
}); | ||
}); | ||
}); | ||
@@ -37,13 +36,13 @@ | ||
it('Should have results that exist', (done) => { | ||
var options = { | ||
"query": "Statue of liberty", | ||
"no-display": true | ||
} | ||
googleIt(options).then(results => { | ||
assert.notEqual(results, null, "Results must exist") | ||
done() | ||
}).catch(err => { | ||
done(err) | ||
}) | ||
}) | ||
}) | ||
const options = { | ||
query: 'Statue of liberty', | ||
'no-display': true, | ||
}; | ||
googleIt(options).then((results) => { | ||
assert.notEqual(results, null, 'Results must exist'); | ||
done(); | ||
}).catch((err) => { | ||
done(err); | ||
}); | ||
}); | ||
}); |
@@ -1,8 +0,8 @@ | ||
var googleIt = require('../googleIt') | ||
/* eslint-disable no-console */ | ||
const googleIt = require('../src/googleIt'); | ||
googleIt({query: 'St. Vincent St. Mary Ohio', 'disableConsole': true}).then(results => { | ||
googleIt({ query: 'St. Vincent St. Mary Ohio', disableConsole: true }).then((results) => { | ||
// THIS console.log will display when running `node test/without_console_logs.js | ||
// but the color-coded results will NOT display in the terminal | ||
console.log('the results here: ' + JSON.stringify(results, null, 2)) | ||
}) | ||
console.log(`the results here: ${JSON.stringify(results, null, 2)}`); | ||
}); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7857074
20
307
5
2