@parse/node-apn
Advanced tools
+7
-0
@@ -0,1 +1,8 @@ | ||
| # [8.1.0](https://github.com/parse-community/node-apn/compare/8.0.0...8.1.0) (2026-04-12) | ||
| ### Features | ||
| * Add support for notification push type `widgets` ([#194](https://github.com/parse-community/node-apn/issues/194)) ([a3bcbcb](https://github.com/parse-community/node-apn/commit/a3bcbcb8faeeb014bac4bd66a30a37f2015eabd3)) | ||
| # [8.0.0](https://github.com/parse-community/node-apn/compare/7.1.0...8.0.0) (2026-03-31) | ||
@@ -2,0 +9,0 @@ |
+6
-1
@@ -123,2 +123,3 @@ /// <reference types="node" /> | ||
| "content-available"?: undefined | 1 | ||
| "content-changed"?: undefined | true | ||
| "mutable-content"?: undefined | 1 | ||
@@ -271,3 +272,3 @@ "url-args"?: string[] | ||
| export type NotificationPushType = 'background' | 'alert' | 'voip' | 'pushtotalk' | 'liveactivity' | 'location' | 'complication' | 'fileprovider' | 'mdm'; | ||
| export type NotificationPushType = 'background' | 'alert' | 'voip' | 'pushtotalk' | 'liveactivity' | 'location' | 'complication' | 'fileprovider' | 'mdm' | 'widgets'; | ||
@@ -372,2 +373,6 @@ export type ChannelAction = 'create' | 'read' | 'readAll' | 'delete'; | ||
| /** | ||
| * Setting this to true will specify "content-changed" in the payload when it is compiled | ||
| */ | ||
| public contentChanged: boolean; | ||
| /** | ||
| * The value to specify for the `mdm` field where applicable. | ||
@@ -374,0 +379,0 @@ */ |
@@ -148,2 +148,10 @@ module.exports = { | ||
| set contentChanged(value) { | ||
| if (value === true || value === 1) { | ||
| this.aps['content-changed'] = true; | ||
| } else { | ||
| this.aps['content-changed'] = undefined; | ||
| } | ||
| }, | ||
| set mdm(value) { | ||
@@ -150,0 +158,0 @@ this._mdm = value; |
@@ -48,2 +48,3 @@ /** | ||
| 'mutableContent', | ||
| 'contentChanged', | ||
| 'mdm', | ||
@@ -50,0 +51,0 @@ 'urlArgs', |
+1
-1
| { | ||
| "name": "@parse/node-apn", | ||
| "description": "An interface to the Apple Push Notification service for Node.js", | ||
| "version": "8.0.0", | ||
| "version": "8.1.0", | ||
| "author": "Parse Platform, Andrew Naylor <argon@mkbot.net>", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -764,2 +764,34 @@ const Notification = require('../../lib/notification'); | ||
| describe('content-changed', function () { | ||
| it('defaults to undefined', function () { | ||
| expect(compiledOutput()).to.not.have.nested.deep.property('aps.content-changed'); | ||
| }); | ||
| it('can be set to a boolean value', function () { | ||
| note.contentChanged = true; | ||
| expect(compiledOutput()).to.have.nested.deep.property('aps.content-changed', true); | ||
| }); | ||
| it('can be set to `1`', function () { | ||
| note.contentChanged = 1; | ||
| expect(compiledOutput()).to.have.nested.deep.property('aps.content-changed', true); | ||
| }); | ||
| it('can be set to undefined', function () { | ||
| note.contentChanged = true; | ||
| note.contentChanged = undefined; | ||
| expect(compiledOutput()).to.not.have.nested.deep.property('aps.content-changed'); | ||
| }); | ||
| describe('setContentChanged', function () { | ||
| it('is chainable', function () { | ||
| expect(note.setContentChanged(true)).to.equal(note); | ||
| expect(compiledOutput()).to.have.nested.deep.property('aps.content-changed', true); | ||
| }); | ||
| }); | ||
| }); | ||
| describe('mdm', function () { | ||
@@ -766,0 +798,0 @@ it('defaults to undefined', function () { |
Network access
Supply chain riskThis module accesses the network.
Found 4 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 4 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 4 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
544491
0.33%9789
0.38%