New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

apn

Package Overview
Dependencies
Maintainers
2
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apn - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

index.d.ts

4

ChangeLog.md
## Changelog
2.1.2:
* Add TypeScript type definitions (#441, #465)
* Update node-http2 fork to 3.3.6 and add stream.upstream not defined check (#444)
2.1.1:

@@ -4,0 +8,0 @@ * Fix broken logger (#438)

2

lib/protocol/endpoint.js

@@ -17,3 +17,3 @@ "use strict";

const CLIENT_PRELUDE = new Buffer("PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n");
const CLIENT_PRELUDE = Buffer.from("PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n");

@@ -20,0 +20,0 @@ module.exports = function(dependencies) {

{
"name": "apn",
"description": "An interface to the Apple Push Notification service for Node.js",
"version": "2.1.1",
"version": "2.1.2",
"author": "Andrew Naylor <argon@mkbot.net>",

@@ -21,2 +21,3 @@ "contributors": [

"main": "index.js",
"types": "index.d.ts",
"bugs": {

@@ -31,5 +32,5 @@ "email": "florian.reinhart@gmail.com",

"dependencies": {
"debug": "^2.2.0",
"http2": "https://github.com/node-apn/node-http2/archive/apn-2.0.0.tar.gz",
"node-forge": "^0.6.20",
"debug": "^2.3.0",
"http2": "https://github.com/node-apn/node-http2/archive/apn-2.1.2.tar.gz",
"node-forge": "^0.6.45",
"jsonwebtoken": "^7.1.9",

@@ -36,0 +37,0 @@ "verror": "^1.8.1"

@@ -8,3 +8,3 @@ [<p align="center"><img src="doc/logo.png" alt="node-apn" width="450" height="auto"></p>][node-apn]

[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](https://github.com/argon/node-apn/issues/436)
[![Maintenance help wanted](https://img.shields.io/badge/maintenance-help%20wanted-red.svg)](https://github.com/node-apn/node-apn/issues/436)
[![Build status][ci-image] ][ci-url]

@@ -19,3 +19,3 @@ [![Code coverage][coverage-image]][coverage-url]

[npm-url]:https://npmjs.com/package/apn
[ci-image]:https://api.travis-ci.org/node-apn/node-apn.png
[ci-image]:https://api.travis-ci.org/node-apn/node-apn.svg
[ci-url]:https://travis-ci.org/node-apn/node-apn

@@ -27,6 +27,6 @@ [coverage-image]:https://coveralls.io/repos/argon/node-apn/badge.svg?branch=develop

[dependencies-image]:https://david-dm.org/argon/node-apn.png
[dependencies-url]:https://david-dm.org/argon/node-apn
[devdependencies-image]:https://david-dm.org/argon/node-apn/dev-status.png
[devdependencies-url]:https://david-dm.org/argon/node-apn#info=devDependencies
[dependencies-image]:https://david-dm.org/node-apn/node-apn/status.svg
[dependencies-url]:https://david-dm.org/node-apn/node-apn
[devdependencies-image]:https://david-dm.org/node-apn/node-apn/dev-status.svg
[devdependencies-url]:https://david-dm.org/node-apn/node-apn?type=dev

@@ -47,3 +47,3 @@ ## Features

This is readme is a brief introduction, please refer to the full [documentation](doc/apn.markdown) in `doc/` for more details.
This readme is a brief introduction, please refer to the full [documentation](doc/apn.markdown) in `doc/` for more details.

@@ -76,3 +76,3 @@ If you have previously used v1.x and wish to learn more about what's changed in v2.0, please see [What's New](doc/whats-new.markdown)

For more information about configuration options consult the [documentation](doc/provider.markdown).
For more information about configuration options consult the [provider documentation](doc/provider.markdown).

@@ -88,3 +88,3 @@ Help with preparing the key and certificate files for connection can be found in the [wiki][certificateWiki]

Create a notification object, configuring it with the relevant parameters (See the [payload documentation][pl] for more details.)
Create a notification object, configuring it with the relevant parameters (See the [notification documentation](doc/notification.markdown) for more details.)

@@ -130,3 +130,3 @@ ```javascript

* [Local and Push Notification Programming Guide: APNs Provider API][pl]
* [Local and Push Notification Programming Guide: APNs Overview][pl]
* [Apple Technical Note: Troubleshooting Push Notifications][tn2265]

@@ -160,8 +160,8 @@ * [List of Projects, Applications and Companies Using Node-apn][pacapn]

[npm]: https://npmjs.org
[node-apn]: https://github.com/argon/node-apn
[certificateWiki]:https://github.com/argon/node-apn/wiki/Preparing-Certificates "Preparing Certificates"
[pl]: https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/APNsProviderAPI.html#//apple_ref/doc/uid/TP40008194-CH101-SW1 "Local and Push Notification Programming Guide: APNs Provider API"
[node-apn]: https://github.com/node-apn/node-apn
[certificateWiki]:https://github.com/node-apn/node-apn/wiki/Preparing-Certificates "Preparing Certificates"
[pl]: https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview.html "Local and Push Notification Programming Guide: APNs Overview"
[tn2265]: http://developer.apple.com/library/ios/#technotes/tn2265/_index.html "Troubleshooting Push Notifications"
[googlegroup]:https://groups.google.com/group/node-apn "node-apn Google Group"
[pacapn]:https://github.com/argon/node-apn/wiki/Projects,-Applications,-and-Companies-Using-Node-apn "List of Projects, Applications and Companies Using Node-apn"
[pacapn]:https://github.com/node-apn/node-apn/wiki/Projects,-Applications,-and-Companies-Using-Node-apn "List of Projects, Applications and Companies Using node-apn"
[argon]: https://github.com/argon

@@ -168,0 +168,0 @@ [bobrik]: https://github.com/bobrik

@@ -166,3 +166,3 @@ "use strict";

.then(function () {
expect(fakes.stream._transform).to.be.calledWithMatch(actual => actual.equals(Buffer(notification.body)));
expect(fakes.stream._transform).to.be.calledWithMatch(actual => actual.equals(Buffer.from(notification.body)));
});

@@ -257,3 +257,3 @@ });

promise = client.write(builtNotification(), "abcd1234");
setImmediate(() => {

@@ -353,3 +353,3 @@ fakes.stream.emit("unprocessed");

it("writes the notification data to the pipe", function () {
expect(fakes.stream._transform).to.be.calledWithMatch(actual => actual.equals(Buffer(notification.body)));
expect(fakes.stream._transform).to.be.calledWithMatch(actual => actual.equals(Buffer.from(notification.body)));
});

@@ -403,3 +403,3 @@ });

fakes.streams.forEach( stream => {
expect(stream._transform).to.be.calledWithMatch(actual => actual.equals(Buffer(builtNotification().body)));
expect(stream._transform).to.be.calledWithMatch(actual => actual.equals(Buffer.from(builtNotification().body)));
});

@@ -463,3 +463,3 @@ });

fakes.streams.forEach( stream => {
expect(stream._transform).to.be.calledWithMatch(actual => actual.equals(Buffer(builtNotification().body)));
expect(stream._transform).to.be.calledWithMatch(actual => actual.equals(Buffer.from(builtNotification().body)));
});

@@ -736,3 +736,3 @@ });

});
callback(null, new Buffer(JSON.stringify(response) || ""));
callback(null, Buffer.from(JSON.stringify(response) || ""));
})

@@ -739,0 +739,0 @@ });

@@ -41,3 +41,3 @@ "use strict";

// These streams should never actually pass writable -> readable
// These streams should never actually pass writable -> readable
// otherwise the tests create an infinite loop. The real streams terminate.

@@ -131,3 +131,3 @@ // PassThrough is just an easy way to inspect the stream behaviour.

const HTTP2_PRELUDE = new Buffer("PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n");
const HTTP2_PRELUDE = Buffer.from("PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n");

@@ -552,3 +552,3 @@ expect(streams.socket.write.firstCall).to.be.calledWith(HTTP2_PRELUDE);

context("with error", function () {
const debugData = new Buffer(6);
const debugData = Buffer.alloc(6);
debugData.write("error!");

@@ -555,0 +555,0 @@

@@ -31,3 +31,3 @@ const token = require("../lib/token");

it("returns token as string", function () {
expect(token(new Buffer("a9d0ed10e9cfd022a61cb08753f49c5a0b0dfb784697bf9f9d750a1003da19c7", "hex")))
expect(token(Buffer.from("a9d0ed10e9cfd022a61cb08753f49c5a0b0dfb784697bf9f9d750a1003da19c7", "hex")))
.to.equal("a9d0ed10e9cfd022a61cb08753f49c5a0b0dfb784697bf9f9d750a1003da19c7");

@@ -38,5 +38,5 @@ });

it("throws when input is empty", function () {
expect(function () { token(new Buffer([])); }).to.throw(/invalid length/);
expect(function () { token(Buffer.from([])); }).to.throw(/invalid length/);
});
});
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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