Skip to content

Commit

Permalink
Fix error documentation for util files
Browse files Browse the repository at this point in the history
  • Loading branch information
jennyEckstein committed Dec 6, 2021
1 parent 314f738 commit 6fdbe7b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/utils/get-dependencies.js
Expand Up @@ -8,6 +8,7 @@ const path = require('path');
* @param {Object} obj - Object with parameters.
* @param {string} [obj.dir=''] - Path to directory.
* @returns {PackageJson} - Contects of package.json from the provided directory.
* @throws {Error} - When unable to find package.json.
*/
function getDependencies({ dir = '' }) {
return require(path.join(dir, 'package.json'));
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/get-latest-tag.js
Expand Up @@ -10,7 +10,7 @@ const execAsync = promisify(exec);
*
* @param {string} name - Package name.
* @returns {Promise<StandardOutput>} - Return latest version, if latest tag exists.
* @throws {Error} - Output failed JSON parse.
* @throws {Error} - When package name is invalid.
*/
function getLatestTag(name) {
return execAsync(`npm view ${name} dist-tags --json`);
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/get-latest-versions.js
Expand Up @@ -10,7 +10,7 @@ const execAsync = promisify(exec);
*
* @param {string} name - Package name.
* @returns {Promise<StandardOutput>} - List of available versions.
* @throws {Error} - Output failed JSON parse.
* @throws {Error} - When package name is invalid.
*/
function getLatestVersions(name) {
return execAsync(`npm view ${name} versions --json`);
Expand Down
1 change: 1 addition & 0 deletions lib/utils/install-dev-packages.js
Expand Up @@ -10,6 +10,7 @@ const execAsync = promisify(exec);
*
* @param {string} pkgs - list of packages.
* @returns {Promise<StandardOutput>} - Standard output.
* @throws {Error} - When unable to install development package.
*/
function installDevPackages(pkgs) {
return execAsync(`npm i -D ${pkgs}`);
Expand Down
1 change: 1 addition & 0 deletions lib/utils/install-packages.js
Expand Up @@ -10,6 +10,7 @@ const execAsync = promisify(exec);
*
* @param {string} pkgs - list of packages.
* @returns {Promise<StandardOutput>} - Standard output.
* @throws {Error} - When unable to install the package.
*/
function installPackages(pkgs) {
return execAsync(`npm i ${pkgs}`);
Expand Down

0 comments on commit 6fdbe7b

Please sign in to comment.