Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

last-release-apm

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

last-release-apm - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

dist/head.js

61

dist/index.js

@@ -6,42 +6,12 @@ 'use strict';

});
exports.default = lastRelease;
exports.default = function (pluginConfig, _ref, callback) {
var pkg = _ref.pkg;
var _version = require('./version.js');
var requestSettings = {
url: ATOM_REGISTRY + '/api/packages/' + pkg.name,
json: true
};
var _version2 = _interopRequireDefault(_version);
_request2.default.get(requestSettings, function (error, response) {
var body = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
var _head = require('./head.js');
if (error) {
return callback(error);
}
var _head2 = _interopRequireDefault(_head);
if (response.statusCode === 404) {
return callback(null, {});
}
if (response.statusCode === 200 && body.releases && body.releases.latest) {
return callback(null, {
version: body.releases.latest,
tag: 'latest'
});
}
var message = body.message || body.error || body;
return callback(new _error2.default('Requesting package failed: ' + JSON.stringify(message)));
});
};
var _error = require('@semantic-release/error');
var _error2 = _interopRequireDefault(_error);
var _request = require('request');
var _request2 = _interopRequireDefault(_request);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -57,4 +27,23 @@

var ATOM_REGISTRY = 'https://atom.io';
function lastRelease(pluginConfig, _ref, callback) {
var pkg = _ref.pkg;
(0, _version2.default)(pkg, function (err1) {
var version = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];
if (err1) return callback(err1);
if (!!version) return callback(null, {});
(0, _head2.default)(pkg, version, function (err2) {
var gitHead = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1];
if (err2) return callback(err2);
return callback(null, {
gitHead: gitHead,
version: version
});
});
});
}
module.exports = exports['default'];
{
"name": "last-release-apm",
"version": "1.0.0",
"version": "1.1.0",
"description": "determine the version of the last release via the apm registry",

@@ -5,0 +5,0 @@ "author": "Arnaud Dezandee <dezandee.arnaud@gmail.com> (https://github.com/Adezandee)",

@@ -1,1 +0,54 @@

# semantic-release last-release-apm
# last-release-apm
**fully automated package publishing** with [semantic-release](https://github.com/semantic-release/semantic-release) for [Atom](https://atom.io/) packages.
[![NPM Version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]
[![Coverage Status][coveralls-image]][coveralls-url]
[![Dependency Status][david-image]][david-url]
[![devDependency Status][david-dev-image]][david-dev-url]
[![semantic-release][semantic-image]][semantic-url]
[![ESLint][standard-image]][standard-url]
[![Commitizen friendly][commitizen-image]][commitizen-url]
## Install and configure
```bash
$ npm install --save-dev last-release-apm
```
Add the following to the `package.json`
```json
"release": {
"getLastRelease": "last-release-apm"
}
```
This tells [semantic-release plugins](https://github.com/semantic-release/semantic-release#plugins)
to use this package to fetch the latest version from [Atom registry](https://atom.io/packages).
## MIT License
Copyright (c) 2016 Arnaud Dezandee
[npm-image]: https://img.shields.io/npm/v/last-release-apm.svg?style=flat
[npm-url]: https://www.npmjs.com/package/last-release-apm
[travis-image]: https://img.shields.io/travis/Adezandee/last-release-apm.svg?style=flat
[travis-url]: https://travis-ci.org/Adezandee/last-release-apm
[coveralls-image]: https://img.shields.io/coveralls/Adezandee/last-release-apm.svg?style=flat
[coveralls-url]: https://coveralls.io/r/Adezandee/last-release-apm?branch=master
[david-image]: https://img.shields.io/david/Adezandee/last-release-apm.svg?style=flat
[david-dev-image]: https://img.shields.io/david/dev/Adezandee/last-release-apm.svg?style=flat
[david-url]: https://david-dm.org/Adezandee/last-release-apm
[david-dev-url]: https://david-dm.org/Adezandee/last-release-apm#info=devDependencies
[semantic-image]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat
[semantic-url]: https://github.com/semantic-release/semantic-release
[standard-image]: https://img.shields.io/badge/code%20style-airbnb-brightgreen.svg?style=flat
[standard-url]: https://github.com/airbnb/javascript
[commitizen-image]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat
[commitizen-url]: http://commitizen.github.io/cz-cli/
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc