From 2097bf1c1e5919436e38c380f3c857a792522083 Mon Sep 17 00:00:00 2001 From: Saurabh Daware Date: Sun, 13 Oct 2019 18:05:48 +0530 Subject: [PATCH 1/6] pm gp // question fix --- lib/action.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/action.js b/lib/action.js index 12a845a..04b50f7 100644 --- a/lib/action.js +++ b/lib/action.js @@ -299,7 +299,7 @@ async function getProjectPath(projectName) { if(!projectName){ const question = { name:'selectedProject', - message:'Enter number of project you want to cd to:', + message:'Select project you want to cd to:', type:'autocomplete', out:process.stderr, choices:getChoices(), From f2db2d44e00b3bdd233ab22911e659f096370cfd Mon Sep 17 00:00:00 2001 From: Saurabh Daware Date: Mon, 11 Nov 2019 09:26:16 +0530 Subject: [PATCH 2/6] prompts updated --- mocharc.json | 4 ---- package-lock.json | 12 ++++++------ package.json | 2 +- tests/action.spec.js | 6 ++++-- tests/helper.spec.js | 4 ++-- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/mocharc.json b/mocharc.json index 62e276e..4c24b77 100644 --- a/mocharc.json +++ b/mocharc.json @@ -1,7 +1,3 @@ -// This config file contains Mocha's defaults. -// As you can see, comments are allowed. -// This same configuration could be provided in the `mocha` property of your -// project's `package.json`. { "diff": true, "extension": ["js"], diff --git a/package-lock.json b/package-lock.json index d4f15e3..c7009c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -759,9 +759,9 @@ "dev": true }, "prompts": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.2.1.tgz", - "integrity": "sha512-VObPvJiWPhpZI6C5m60XOzTfnYg/xc/an+r9VYymj9WJW3B/DIH+REzjpAACPf8brwPeP+7vz3bIim3S+AaMjw==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.3.0.tgz", + "integrity": "sha512-NfbbPPg/74fT7wk2XYQ7hAIp9zJyZp5Fu19iRbORqqy1BhtrkZ0fPafBU+7bmn8ie69DpT0R6QpJIN2oisYjJg==", "requires": { "kleur": "^3.0.3", "sisteransi": "^1.0.3" @@ -823,9 +823,9 @@ "dev": true }, "sisteransi": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.3.tgz", - "integrity": "sha512-SbEG75TzH8G7eVXFSN5f9EExILKfly7SUvVY5DhhYLvfhKqhDFY0OzevWa/zwak0RLRfWS5AvfMWpd9gJvr5Yg==" + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.4.tgz", + "integrity": "sha512-/ekMoM4NJ59ivGSfKapeG+FWtrmWvA1p6FBZwXrqojw90vJu8lBmrTxCMuBCydKtkaUe2zt4PlxeTKpjwMbyig==" }, "sprintf-js": { "version": "1.0.3", diff --git a/package.json b/package.json index 1a26772..c120d8e 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "homepage": "https://github.com/saurabhdaware/projectman#readme", "dependencies": { "commander": "^3.0.1", - "prompts": "^2.2.1" + "prompts": "^2.3.0" }, "devDependencies": { "chai": "^4.2.0", diff --git a/tests/action.spec.js b/tests/action.spec.js index f02f4db..d7a342a 100644 --- a/tests/action.spec.js +++ b/tests/action.spec.js @@ -1,5 +1,7 @@ const expect = require('chai').expect; -it('this test should be replaced with real tests', () => { - expect(true); +describe('action', () => { + it('this test should be replaced with real tests', () => { + expect(true); + }) }) \ No newline at end of file diff --git a/tests/helper.spec.js b/tests/helper.spec.js index 5aaf0a3..386c86a 100644 --- a/tests/helper.spec.js +++ b/tests/helper.spec.js @@ -1,10 +1,10 @@ -const { isURL } = require('../lib/helper') +const { isURL } = require('../lib/helper'); const expect = require('chai').expect; describe('helper', ()=> { - it('isURL()', () => { + it('#isURL()', () => { // Links expect(isURL("https://www.google.com")).to.be.true expect(isURL("https://www.data.gov.in")).to.be.true From 0ba0166bbe376bb7e518a575f6dd72e9ec1f2c65 Mon Sep 17 00:00:00 2001 From: Saurabh Daware Date: Mon, 11 Nov 2019 09:35:26 +0530 Subject: [PATCH 3/6] out changed to stdout to support prompts --- lib/action.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/action.js b/lib/action.js index 04b50f7..91b2ea5 100644 --- a/lib/action.js +++ b/lib/action.js @@ -301,7 +301,7 @@ async function getProjectPath(projectName) { name:'selectedProject', message:'Select project you want to cd to:', type:'autocomplete', - out:process.stderr, + stdout:process.stderr, choices:getChoices(), onRender:() => { process.stderr.write('\033c'); From 5275726f4aa1b3d88d6eebe5f7d69ef665b25b75 Mon Sep 17 00:00:00 2001 From: Saurabh Daware Date: Mon, 11 Nov 2019 09:38:52 +0530 Subject: [PATCH 4/6] locking dependencies with shrinkwrap --- package-lock.json => npm-shrinkwrap.json | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename package-lock.json => npm-shrinkwrap.json (100%) diff --git a/package-lock.json b/npm-shrinkwrap.json similarity index 100% rename from package-lock.json rename to npm-shrinkwrap.json From a5011396861f4335059eb3ede78eab5d296e14f6 Mon Sep 17 00:00:00 2001 From: Saurabh Daware Date: Mon, 11 Nov 2019 09:42:03 +0530 Subject: [PATCH 5/6] version bump to 1.3.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c120d8e..bb9e996 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "projectman", - "version": "1.3.1", + "version": "1.3.2", "description": "Hate opening folders? Select and open your projects in your favourite editor straight from your command line without 'CD'ing into the deeply nested folders.", "main": "bin/index.js", "bin": { From 99fca9d01ca8cf819aaf463f835cd004fb05b65a Mon Sep 17 00:00:00 2001 From: Saurabh Daware Date: Mon, 11 Nov 2019 09:46:11 +0530 Subject: [PATCH 6/6] documentation update --- CHANGELOG.md | 9 ++++++++- README.md | 16 ++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be449a7..ee625c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,17 @@ # Production Releases (Note: Only production releases will be mentioned here, If you want to see beta releases, you can find them [here](https://github.com/saurabhdaware/projectman/releases)) +### v1.3.2 *[LATEST RELEASE]* +- `pm getpath` Question fix +- prompts updated to v2.3.0 +- Unit testing for helper added ([@junaidrahim](https://github.com/junaidrahim) - [#27](https://github.com/saurabhdaware/projectman/pull/27)) -### v1.3.1 *[LATEST RELEASE]* + +### v1.3.1 Documentation Update + + ### v1.3.0 --- ```shell diff --git a/README.md b/README.md index e41bc0f..7c7cffc 100644 --- a/README.md +++ b/README.md @@ -174,21 +174,13 @@ This will show three projects in `pm open` and project2 will be opened in Atom a ## ChangeLogs -### v1.3.0 *[LATEST RELEASE]* - -- ## Brought dependencies from 36 packages to 4 packages!! 🎉 -Some internal code refactoring and asking myself "Do I really need this package?" helped me bring down dependency tree of 37 packages to 4 packages!!! -- ## AutoComplete added during project selection. -In `pm open` and other project selection menus. You can now start typing the letters and list will be filtered out to show projects matching the letters. -- ## Ability to open/add URLs (Thank You [@ZakariaTalhami](https://github.com/ZakariaTalhami) for PR [#20](https://github.com/saurabhdaware/projectman/pull/20) ) - - `pm add --url [URL]` to add URLs to the projectman. `[URL]` is an optional parameter - - These URLs will show up in `pm open` with (URL) appended to their names. - - On selecting the URL in `pm open` they will be opened in your default browser. - - This can be used to store your repositories/websites/other useful links. +### v1.3.2 *[LATEST RELEASE]* +- `pm getpath` Question fix +- prompts updated to v2.3.0 +- Unit testing for helper added ([@junaidrahim](https://github.com/junaidrahim) - [#27](https://github.com/saurabhdaware/projectman/pull/27)) **. . -. .** ***For More Changes read [CHANGELOG.md](CHANGELOG.md)***