outdated-pods

1.0.0 • Public • Published

outdated-pods

NPM version Build Status Coverage Status devDependency Status devDependency Status

Extract outdated Pod information from the output of pod outdated command

const outdatedPods = require('outdated-pods');
 
const stdout = `
- Foo 4.12.1 -> 4.12.1 (latest version 4.15.0)
- baz+qux (unused) -> 2.8.3 (latest version 2.9.0)
`;
 
outdatedPods(stdout)
/* =>
  [
    {
      name: 'Foo',
      current: '4.12.1',
      wanted: '4.12.1',
      latest: '4.15.0'
    },
    {
      name: 'baz+qux',
      current: '(unused)',
      wanted: '2.8.3',
      latest: '2.9.0'
    }
  ]
*/

Installation

Use npm.

npm install outdated-pods

API

outdatedPods(str)

str: String
Return: Array of plain objects

It parses a string of the log generated with pod install command, and returns an array of objects that shows which Pod is outdated. Each of the object has these four properties:

  • name: String (Pod name)
  • current: String (currently installed version)
  • wanted: String (the latest version according to the version specified in the Podfile)
  • latest: String (the very latest version)

It automatically strips ANSI escape codes before parsing a string.

const outdatedPods = ('outdated-pods');
 
outdatedPods('\u001b[32m- Foo 4.12.1 -> 4.12.1 (latest version 4.15.0)\u001b[39m');
//=> [{name: 'Foo', current: '4.12.1', wanted: '4.12.1', latest: '4.15.0'}]

License

Copyright (c) 2015 Shinnosuke Watanabe

Licensed under the MIT License.

Package Sidebar

Install

npm i outdated-pods

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • shinnn