├── .gitignore ├── .gitattributes ├── .hound.yml ├── .eslintrc ├── .editorconfig ├── .github └── workflows │ ├── npm-test.yaml │ └── codeql-analysis.yaml ├── tests └── index.test.js ├── index.js ├── cli.js ├── readme.md ├── license ├── package.json ├── CONTRIBUTING.md ├── CODE_OF_CONDUCT.md ├── CHANGELOG.md └── jest.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /.hound.yml: -------------------------------------------------------------------------------- 1 | javascript: 2 | enabled: false 3 | eslint: 4 | enabled: true 5 | config_file: .eslintrc 6 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "plugin:prettier/recommended", 3 | "plugins": [ 4 | "prettier" 5 | ], 6 | "rules": { 7 | "prettier/prettier": ["error", { 8 | "singleQuote": true 9 | }] 10 | }, 11 | "env": { 12 | "es6": true, 13 | "node": true 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | end_of_line = lf 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [{package.json,*.yml}] 11 | indent_style = space 12 | indent_size = 2 13 | 14 | [*.md] 15 | trim_trailing_whitespace = false 16 | -------------------------------------------------------------------------------- /.github/workflows/npm-test.yaml: -------------------------------------------------------------------------------- 1 | name: Node.js Package 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - master 7 | push: 8 | branches: 9 | - master 10 | release: 11 | types: [created] 12 | 13 | jobs: 14 | test: 15 | runs-on: ${{ matrix.os }} 16 | strategy: 17 | matrix: 18 | node_version: ['12', '14', '16'] 19 | os: [ubuntu-latest, macOS-latest] 20 | steps: 21 | - uses: actions/checkout@v2 22 | - uses: actions/setup-node@v1 23 | with: 24 | node-version: ${{ matrix.node_version }} 25 | - run: npm i 26 | - run: npm test 27 | -------------------------------------------------------------------------------- /tests/index.test.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | const quote = require("../index"); 4 | 5 | describe("Quote CLI", () => { 6 | test("should get a random quote", async () => { 7 | const res = await quote(); 8 | expect(res).toBeInstanceOf(Object); 9 | expect(res.quote.body.length).toBeGreaterThan(2); 10 | expect(res.quote.author.length).toBeGreaterThan(2); 11 | }); 12 | 13 | test("should get the quote of the day", async () => { 14 | const res = await quote("qotd"); 15 | expect(res).toBeInstanceOf(Object); 16 | expect(res.quote.body.length).toBeGreaterThan(2); 17 | expect(res.quote.author.length).toBeGreaterThan(2); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const axios = require('axios'); 4 | const _ = require('lodash'); 5 | 6 | const baseUrl = 'https://favqs.com/api/'; 7 | const headers = { 8 | Authorization: 'Token token=a857a430e3a1e6d481eaafc1ab6e1f19', 9 | }; 10 | 11 | module.exports = (opts, callback) => { 12 | return new Promise((resolve, reject) => { 13 | opts = opts || ''; 14 | 15 | axios({ 16 | url: opts === 'qotd' ? '/qotd' : '/quotes', 17 | baseURL: baseUrl, 18 | headers: headers, 19 | }) 20 | .then((response) => { 21 | if (response.data.quotes && _.isArray(response.data.quotes)) { 22 | let result = { quote: _.sample(response.data.quotes) }; 23 | return resolve(result); 24 | } 25 | 26 | return resolve(response.data); 27 | }) 28 | .catch((err) => reject(err)); 29 | }); 30 | }; 31 | -------------------------------------------------------------------------------- /cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 'use strict'; 3 | 4 | const meow = require('meow'); 5 | const chalk = require('chalk'); 6 | const updateNotifier = require('update-notifier'); 7 | 8 | const pkg = require('./package.json'); 9 | const quote = require('./index'); 10 | 11 | const cli = meow( 12 | ` 13 | Usage 14 | $ quote [options] 15 | 16 | Options 17 | qotd Display quote of the day 18 | 19 | Examples 20 | $ quote 21 | To be or not be, that is the question. - William Shakespeare 22 | $ quote qotd 23 | Wars teach us not to love our enemies, but to hate our allies. - W. L. George 24 | `, 25 | {} 26 | ); 27 | 28 | updateNotifier({ pkg: pkg }).notify(); 29 | 30 | quote(cli.input[0]) 31 | .then((result) => { 32 | console.log( 33 | chalk.cyan(chalk.yellow(result.quote.body) + ' - ' + result.quote.author) 34 | ); 35 | process.exit(0); 36 | }) 37 | .catch((err) => { 38 | console.log(chalk.bold.red(err)); 39 | process.exit(1); 40 | }); 41 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # quote-cli 2 | [![Build Status](https://travis-ci.org/riyadhalnur/quote-cli.svg?branch=master)](https://travis-ci.org/riyadhalnur/quote-cli) [![Dependency Status](https://dependencyci.com/github/riyadhalnur/quote-cli/badge)](https://dependencyci.com/github/riyadhalnur/quote-cli) [![Coverage Status](https://coveralls.io/repos/github/riyadhalnur/quote-cli/badge.svg?branch=master)](https://coveralls.io/github/riyadhalnur/quote-cli?branch=master) [![Known Vulnerabilities](https://snyk.io/test/github/riyadhalnur/quote-cli/badge.svg)](https://snyk.io/test/github/riyadhalnur/quote-cli) 3 | 4 | > Get a random quote or the quote of the day in your CLI 5 | 6 | 7 | ## Install 8 | 9 | ``` 10 | $ npm install -g quote-cli 11 | ``` 12 | 13 | ```bash 14 | $ quote --help 15 | 16 | Usage 17 | quote [options] 18 | 19 | Options 20 | qotd 21 | 22 | Examples 23 | $ quote 24 | To be or not be, that is the question. - William Shakespeare 25 | $ quote qotd 26 | Wars teach us not to love our enemies, but to hate our allies. - W. L. George 27 | ``` 28 | 29 | ## License 30 | 31 | MIT 32 | 33 | Made with love in Dhaka, Bangladesh by [Riyadh Al Nur](http://twitter.com/riyadhalnur) 34 | -------------------------------------------------------------------------------- /license: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Riyadh Al Nur (blog.verticalaxisbd.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "quote-cli", 3 | "version": "1.2.0", 4 | "description": "Get a random quote or the quote of the day in your CLI", 5 | "license": "MIT", 6 | "repository": "riyadhalnur/quote-cli", 7 | "author": { 8 | "name": "Riyadh Al Nur", 9 | "email": "riyadhalnur@verticalaxisbd.com", 10 | "url": "https://verticalaxisbd.com" 11 | }, 12 | "bin": { 13 | "quote": "cli.js" 14 | }, 15 | "engines": { 16 | "node": ">=4" 17 | }, 18 | "scripts": { 19 | "test": "jest", 20 | "format": "prettier --single-quote --write \"*.js\" \"tests/*.js\"", 21 | "precommit": "lint-staged" 22 | }, 23 | "lint-staged": { 24 | "*.{js}": [ 25 | "prettier --single-quote --write", 26 | "git add" 27 | ] 28 | }, 29 | "files": [ 30 | "index.js", 31 | "cli.js" 32 | ], 33 | "preferGlobal": true, 34 | "keywords": [ 35 | "cli-app", 36 | "cli", 37 | "quote" 38 | ], 39 | "dependencies": { 40 | "axios": "1.12.0", 41 | "chalk": "4.1.1", 42 | "lodash": "4.17.21", 43 | "meow": "9.0.0", 44 | "update-notifier": "5.1.0" 45 | }, 46 | "devDependencies": { 47 | "eslint": "7.25.0", 48 | "eslint-config-prettier": "8.3.0", 49 | "eslint-plugin-prettier": "3.4.0", 50 | "husky": "5.1.1", 51 | "jest": "26.6.3", 52 | "lint-staged": "10.5.4", 53 | "prettier": "2.2.1" 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yaml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ master, gh-pages ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ master ] 20 | schedule: 21 | - cron: '34 15 * * 4' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | 28 | strategy: 29 | fail-fast: false 30 | matrix: 31 | language: [ 'javascript' ] 32 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] 33 | # Learn more: 34 | # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed 35 | 36 | steps: 37 | - name: Checkout repository 38 | uses: actions/checkout@v2 39 | 40 | # Initializes the CodeQL tools for scanning. 41 | - name: Initialize CodeQL 42 | uses: github/codeql-action/init@v1 43 | with: 44 | languages: ${{ matrix.language }} 45 | # If you wish to specify custom queries, you can do so here or in a config file. 46 | # By default, queries listed here will override any specified in a config file. 47 | # Prefix the list here with "+" to use these queries and those in the config file. 48 | # queries: ./path/to/local/query, your-org/your-repo/queries@main 49 | 50 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 51 | # If this step fails, then you should remove it and run the build manually (see below) 52 | - name: Autobuild 53 | uses: github/codeql-action/autobuild@v1 54 | 55 | # ℹ️ Command-line programs to run using the OS shell. 56 | # 📚 https://git.io/JvXDl 57 | 58 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 59 | # and modify them (or add more) to build your code if your project 60 | # uses a compiled language 61 | 62 | #- run: | 63 | # make bootstrap 64 | # make release 65 | 66 | - name: Perform CodeQL Analysis 67 | uses: github/codeql-action/analyze@v1 68 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # :eight_spoked_asterisk: :stars: :sparkles: :dizzy: :star2: :star2: :sparkles: :dizzy: :star2: :star2: Contributing :star: :star2: :dizzy: :sparkles: :star: :star2: :dizzy: :sparkles: :stars: :eight_spoked_asterisk: 2 | 3 | So, you want to contribute to this project! That's awesome. However, before 4 | doing so, please read the following simple steps how to contribute. This will 5 | make the life easier and will avoid wasting time on things which are not 6 | requested. :sparkles: 7 | 8 | ## Discuss the changes before doing them 9 | - First of all, open an issue in the repository, using the bug tracker , 10 | describing the contribution you would like to make, the bug you found or any 11 | other ideas you have. This will help us to get you started on the right 12 | foot. 13 | 14 | - If it makes sense, add the platform and software information (e.g. operating 15 | system, Node.JS version etc.), screenshots (so we can see what you are 16 | seeing). 17 | 18 | - It is recommended to wait for feedback before continuing to next steps. 19 | However, if the issue is clear (e.g. a typo) and the fix is simple, you can 20 | continue and fix it. 21 | 22 | ## Fixing issues 23 | - Fork the project in your account and create a branch with your fix: 24 | `some-great-feature` or `some-issue-fix`. 25 | 26 | - Commit your changes in that branch, writing the code following the 27 | [code style][2]. If the project contains tests (generally, the `test` 28 | directory), you are encouraged to add a test as well. :memo: 29 | 30 | - If the project contains a `package.json` or a `bower.json` file add yourself 31 | in the `contributors` array (or `authors` in the case of `bower.json`; 32 | if the array does not exist, create it): 33 | 34 | ```json 35 | { 36 | "contributors": [ 37 | "Your Name (http://your.website)" 38 | ] 39 | } 40 | ``` 41 | 42 | ## Creating a pull request 43 | 44 | - Open a pull request, and reference the initial issue in the pull request 45 | message (e.g. *fixes #*). Write a good description and 46 | title, so everybody will know what is fixed/improved. 47 | 48 | - If it makes sense, add screenshots, gifs etc., so it is easier to see what 49 | is going on. 50 | 51 | ## Wait for feedback 52 | Before accepting your contributions, we will review them. You may get feedback 53 | about what should be fixed in your modified code. If so, just keep committing 54 | in your branch and the pull request will be updated automatically. 55 | 56 | ## Everyone is happy! 57 | Finally, your contributions will be merged, and everyone will be happy! :smile: 58 | Contributions are more than welcome! 59 | 60 | Thanks! :sweat_smile: 61 | 62 | 63 | 64 | [2]: https://github.com/IonicaBizau/code-style 65 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at devops@hyperlab.xyz. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### Changelog 2 | 3 | All notable changes to this project will be documented in this file. Dates are displayed in UTC. 4 | 5 | Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). 6 | 7 | #### [v1.2.0](https://github.com/riyadhalnur/quote-cli/compare/v1.1.2...v1.2.0) 8 | 9 | > 27 April 2021 10 | 11 | - [Snyk] Security upgrade lodash from 4.17.20 to 4.17.21 [`#70`](https://github.com/riyadhalnur/quote-cli/pull/70) 12 | - [Snyk] Security upgrade axios from 0.19.2 to 0.21.1 [`#69`](https://github.com/riyadhalnur/quote-cli/pull/69) 13 | - Bump ini from 1.3.5 to 1.3.7 [`#68`](https://github.com/riyadhalnur/quote-cli/pull/68) 14 | - [Snyk] Security upgrade lodash from 4.17.19 to 4.17.20 [`#67`](https://github.com/riyadhalnur/quote-cli/pull/67) 15 | - Bump lodash from 4.17.13 to 4.17.19 [`#66`](https://github.com/riyadhalnur/quote-cli/pull/66) 16 | - CHORE: update and trim deps [`1b39a60`](https://github.com/riyadhalnur/quote-cli/commit/1b39a603b2ae8dbc54c28e7224a99362b100f8d4) 17 | - UPDATED: test using jest [`1ccb386`](https://github.com/riyadhalnur/quote-cli/commit/1ccb386436190d638130090783c1e8d51f751753) 18 | - UPDATED: deps [`e6a581c`](https://github.com/riyadhalnur/quote-cli/commit/e6a581c3d9360869762d26651da7b0e60f7af0e1) 19 | 20 | #### [v1.1.2](https://github.com/riyadhalnur/quote-cli/compare/v1.1.1...v1.1.2) 21 | 22 | > 8 April 2020 23 | 24 | - [Snyk] Security upgrade meow from 5.0.0 to 6.1.0 [`#63`](https://github.com/riyadhalnur/quote-cli/pull/63) 25 | - [Snyk] Fix for 1 vulnerabilities [`#62`](https://github.com/riyadhalnur/quote-cli/pull/62) 26 | - Bump handlebars from 4.1.2 to 4.5.3 [`#61`](https://github.com/riyadhalnur/quote-cli/pull/61) 27 | - Bump mixin-deep from 1.3.1 to 1.3.2 [`#60`](https://github.com/riyadhalnur/quote-cli/pull/60) 28 | - Bump lodash from 4.17.11 to 4.17.13 [`#59`](https://github.com/riyadhalnur/quote-cli/pull/59) 29 | - [CHORE] Update deps [`2b57938`](https://github.com/riyadhalnur/quote-cli/commit/2b5793853536a0fef61aaa34d276f8187ba8bdd1) 30 | - fix: package.json & package-lock.json to reduce vulnerabilities [`8443a51`](https://github.com/riyadhalnur/quote-cli/commit/8443a513fc7e0de6ca9d432cf47ad16e3702367b) 31 | - fix: package.json & package-lock.json to reduce vulnerabilities [`caf301e`](https://github.com/riyadhalnur/quote-cli/commit/caf301e45891e61f6adad07a1ef040b087456cf5) 32 | 33 | #### [v1.1.1](https://github.com/riyadhalnur/quote-cli/compare/v1.1.0...v1.1.1) 34 | 35 | > 10 June 2019 36 | 37 | - CHORE: Security updates [`c4adb85`](https://github.com/riyadhalnur/quote-cli/commit/c4adb85c4d07512cad481b458f7e75a54f4e39cc) 38 | - Add CHANGELOG [`a67e909`](https://github.com/riyadhalnur/quote-cli/commit/a67e90988ca0d8a4d379c5cb5434cb3a7bbf5cd1) 39 | - Add new badge in README [`2dacd20`](https://github.com/riyadhalnur/quote-cli/commit/2dacd2086e0a1cccbe4b4aa3af016d7056fbcae6) 40 | 41 | #### [v1.1.0](https://github.com/riyadhalnur/quote-cli/compare/v1.0.5...v1.1.0) 42 | 43 | > 29 April 2018 44 | 45 | - Update chalk to the latest version 🚀 [`#29`](https://github.com/riyadhalnur/quote-cli/pull/29) 46 | - Update got to the latest version 🚀 [`#28`](https://github.com/riyadhalnur/quote-cli/pull/28) 47 | - Update update-notifier to the latest version 🚀 [`#25`](https://github.com/riyadhalnur/quote-cli/pull/25) 48 | - Update ava to the latest version 🚀 [`#24`](https://github.com/riyadhalnur/quote-cli/pull/24) 49 | - Update got to the latest version 🚀 [`#23`](https://github.com/riyadhalnur/quote-cli/pull/23) 50 | - New version [`f942739`](https://github.com/riyadhalnur/quote-cli/commit/f942739ab567e8409280ee0acbeffba4589e78bb) 51 | - Add OSS based docs and update README [`bcbed72`](https://github.com/riyadhalnur/quote-cli/commit/bcbed72dbc1ad91f13e3e2ff28be9f295ccc3b36) 52 | - Dot files [`3a695be`](https://github.com/riyadhalnur/quote-cli/commit/3a695be3bed43f8ea411f7ed5146fa7820869864) 53 | 54 | #### [v1.0.5](https://github.com/riyadhalnur/quote-cli/compare/v1.0.4...v1.0.5) 55 | 56 | > 26 December 2016 57 | 58 | - Update README [`f432839`](https://github.com/riyadhalnur/quote-cli/commit/f432839e4c9bf676c9a91e416e7f74cef85c75e8) 59 | - Update help info [`185de52`](https://github.com/riyadhalnur/quote-cli/commit/185de521587613b029c6ce532fabf0c10aef6b37) 60 | 61 | #### [v1.0.4](https://github.com/riyadhalnur/quote-cli/compare/v1.0.3...v1.0.4) 62 | 63 | > 26 December 2016 64 | 65 | - Use quote instead of quote-cli when invoked [`b92c174`](https://github.com/riyadhalnur/quote-cli/commit/b92c17459b2abdd950defd7b5bfc9a5becfd8906) 66 | 67 | #### [v1.0.3](https://github.com/riyadhalnur/quote-cli/compare/1.0.2...v1.0.3) 68 | 69 | > 25 December 2016 70 | 71 | - Update lodash to the latest version 🚀 [`#22`](https://github.com/riyadhalnur/quote-cli/pull/22) 72 | - Update dependencies to enable Greenkeeper 🌴 [`#9`](https://github.com/riyadhalnur/quote-cli/pull/9) 73 | - 👻😱 Node.js 0.10 is unmaintained 😱👻 [`#8`](https://github.com/riyadhalnur/quote-cli/pull/8) 74 | - Update lodash to version 4.16.0 🚀 [`#5`](https://github.com/riyadhalnur/quote-cli/pull/5) 75 | - Update lodash to version 4.15.0 🚀 [`#4`](https://github.com/riyadhalnur/quote-cli/pull/4) 76 | - Update lodash to version 4.14.0 🚀 [`#2`](https://github.com/riyadhalnur/quote-cli/pull/2) 77 | - Change import order for package.json [`ad64723`](https://github.com/riyadhalnur/quote-cli/commit/ad6472393c023af674fbd547f51c0473ee2cd8e2) 78 | - chore(package): update dependencies [`ad77dac`](https://github.com/riyadhalnur/quote-cli/commit/ad77dac7bfab6eda52dccba7003f7f827a91507b) 79 | - Improper quotes fix [`29a1cbd`](https://github.com/riyadhalnur/quote-cli/commit/29a1cbda55f368c2a834fa2080317198cc23b205) 80 | 81 | #### [1.0.2](https://github.com/riyadhalnur/quote-cli/compare/1.0.1...1.0.2) 82 | 83 | > 9 November 2015 84 | 85 | - Explicitly declare path to index.js [`0f6edab`](https://github.com/riyadhalnur/quote-cli/commit/0f6edab0b7c3aa7c91ac76d098bc4bf72bb68b71) 86 | 87 | #### [1.0.1](https://github.com/riyadhalnur/quote-cli/compare/1.0.0...1.0.1) 88 | 89 | > 9 November 2015 90 | 91 | - Added newer Node versions for Travis [`d051b10`](https://github.com/riyadhalnur/quote-cli/commit/d051b102952a9559ff005379329ce4460948091e) 92 | 93 | #### 1.0.0 94 | 95 | > 19 September 2015 96 | 97 | - Initial commit [`0cb248b`](https://github.com/riyadhalnur/quote-cli/commit/0cb248b24371a0e520a6dbf47ca4d610f67d64db) 98 | - Add API key and parse returned data properly [`6bff585`](https://github.com/riyadhalnur/quote-cli/commit/6bff5853f7f0e44c6bb4c3cd0755203f0dd99df0) 99 | -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | /* 2 | * For a detailed explanation regarding each configuration property, visit: 3 | * https://jestjs.io/docs/en/configuration.html 4 | */ 5 | 6 | module.exports = { 7 | // All imported modules in your tests should be mocked automatically 8 | // automock: false, 9 | 10 | // Stop running tests after `n` failures 11 | // bail: 0, 12 | 13 | // The directory where Jest should store its cached dependency information 14 | // cacheDirectory: "/tmp/jest_rs", 15 | 16 | // Automatically clear mock calls and instances between every test 17 | clearMocks: true, 18 | 19 | // Indicates whether the coverage information should be collected while executing the test 20 | // collectCoverage: false, 21 | 22 | // An array of glob patterns indicating a set of files for which coverage information should be collected 23 | // collectCoverageFrom: undefined, 24 | 25 | // The directory where Jest should output its coverage files 26 | coverageDirectory: 'coverage', 27 | 28 | // An array of regexp pattern strings used to skip coverage collection 29 | // coveragePathIgnorePatterns: [ 30 | // "/node_modules/" 31 | // ], 32 | 33 | // Indicates which provider should be used to instrument code for coverage 34 | coverageProvider: 'v8', 35 | 36 | // A list of reporter names that Jest uses when writing coverage reports 37 | // coverageReporters: [ 38 | // "json", 39 | // "text", 40 | // "lcov", 41 | // "clover" 42 | // ], 43 | 44 | // An object that configures minimum threshold enforcement for coverage results 45 | // coverageThreshold: undefined, 46 | 47 | // A path to a custom dependency extractor 48 | // dependencyExtractor: undefined, 49 | 50 | // Make calling deprecated APIs throw helpful error messages 51 | // errorOnDeprecated: false, 52 | 53 | // Force coverage collection from ignored files using an array of glob patterns 54 | // forceCoverageMatch: [], 55 | 56 | // A path to a module which exports an async function that is triggered once before all test suites 57 | // globalSetup: undefined, 58 | 59 | // A path to a module which exports an async function that is triggered once after all test suites 60 | // globalTeardown: undefined, 61 | 62 | // A set of global variables that need to be available in all test environments 63 | // globals: {}, 64 | 65 | // The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers. 66 | // maxWorkers: "50%", 67 | 68 | // An array of directory names to be searched recursively up from the requiring module's location 69 | // moduleDirectories: [ 70 | // "node_modules" 71 | // ], 72 | 73 | // An array of file extensions your modules use 74 | // moduleFileExtensions: [ 75 | // "js", 76 | // "json", 77 | // "jsx", 78 | // "ts", 79 | // "tsx", 80 | // "node" 81 | // ], 82 | 83 | // A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module 84 | // moduleNameMapper: {}, 85 | 86 | // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader 87 | // modulePathIgnorePatterns: [], 88 | 89 | // Activates notifications for test results 90 | // notify: false, 91 | 92 | // An enum that specifies notification mode. Requires { notify: true } 93 | // notifyMode: "failure-change", 94 | 95 | // A preset that is used as a base for Jest's configuration 96 | // preset: undefined, 97 | 98 | // Run tests from one or more projects 99 | // projects: undefined, 100 | 101 | // Use this configuration option to add custom reporters to Jest 102 | // reporters: undefined, 103 | 104 | // Automatically reset mock state between every test 105 | // resetMocks: false, 106 | 107 | // Reset the module registry before running each individual test 108 | // resetModules: false, 109 | 110 | // A path to a custom resolver 111 | // resolver: undefined, 112 | 113 | // Automatically restore mock state between every test 114 | // restoreMocks: false, 115 | 116 | // The root directory that Jest should scan for tests and modules within 117 | // rootDir: undefined, 118 | 119 | // A list of paths to directories that Jest should use to search for files in 120 | // roots: [ 121 | // "" 122 | // ], 123 | 124 | // Allows you to use a custom runner instead of Jest's default test runner 125 | // runner: "jest-runner", 126 | 127 | // The paths to modules that run some code to configure or set up the testing environment before each test 128 | // setupFiles: [], 129 | 130 | // A list of paths to modules that run some code to configure or set up the testing framework before each test 131 | // setupFilesAfterEnv: [], 132 | 133 | // The number of seconds after which a test is considered as slow and reported as such in the results. 134 | // slowTestThreshold: 5, 135 | 136 | // A list of paths to snapshot serializer modules Jest should use for snapshot testing 137 | // snapshotSerializers: [], 138 | 139 | // The test environment that will be used for testing 140 | testEnvironment: 'node', 141 | 142 | // Options that will be passed to the testEnvironment 143 | // testEnvironmentOptions: {}, 144 | 145 | // Adds a location field to test results 146 | // testLocationInResults: false, 147 | 148 | // The glob patterns Jest uses to detect test files 149 | // testMatch: [ 150 | // "**/__tests__/**/*.[jt]s?(x)", 151 | // "**/?(*.)+(spec|test).[tj]s?(x)" 152 | // ], 153 | 154 | // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped 155 | // testPathIgnorePatterns: [ 156 | // "/node_modules/" 157 | // ], 158 | 159 | // The regexp pattern or array of patterns that Jest uses to detect test files 160 | // testRegex: [], 161 | 162 | // This option allows the use of a custom results processor 163 | // testResultsProcessor: undefined, 164 | 165 | // This option allows use of a custom test runner 166 | // testRunner: "jasmine2", 167 | 168 | // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href 169 | // testURL: "http://localhost", 170 | 171 | // Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout" 172 | // timers: "real", 173 | 174 | // A map from regular expressions to paths to transformers 175 | // transform: undefined, 176 | 177 | // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation 178 | // transformIgnorePatterns: [ 179 | // "/node_modules/", 180 | // "\\.pnp\\.[^\\/]+$" 181 | // ], 182 | 183 | // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them 184 | // unmockedModulePathPatterns: undefined, 185 | 186 | // Indicates whether each individual test should be reported during the run 187 | // verbose: undefined, 188 | 189 | // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode 190 | // watchPathIgnorePatterns: [], 191 | 192 | // Whether to use watchman for file crawling 193 | // watchman: true, 194 | }; 195 | --------------------------------------------------------------------------------