Compare commits

...
4 Commits
4 changed files with 48 additions and 22 deletions
+14
View File
@@ -1,3 +1,17 @@
# [7.1.0-alpha.14](https://github.com/parse-community/parse-server/compare/7.1.0-alpha.13...7.1.0-alpha.14) (2024-07-07)
### Features
* Upgrade to Parse JS SDK 5.3.0 ([#9180](https://github.com/parse-community/parse-server/issues/9180)) ([dca187f](https://github.com/parse-community/parse-server/commit/dca187f91b93cbb362b22a3fb9ee38451799ff13))
# [7.1.0-alpha.13](https://github.com/parse-community/parse-server/compare/7.1.0-alpha.12...7.1.0-alpha.13) (2024-07-01)
### Bug Fixes
* Invalid push notification tokens are not cleaned up from database for FCM API v2 ([#9173](https://github.com/parse-community/parse-server/issues/9173)) ([284da09](https://github.com/parse-community/parse-server/commit/284da09f4546356b37511a589fb5f64a3efffe79))
# [7.1.0-alpha.12](https://github.com/parse-community/parse-server/compare/7.1.0-alpha.11...7.1.0-alpha.12) (2024-06-30)
+18 -18
View File
@@ -1,12 +1,12 @@
{
"name": "parse-server",
"version": "7.1.0-beta.1",
"version": "7.1.0-alpha.14",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "parse-server",
"version": "7.1.0-beta.1",
"version": "7.1.0-alpha.14",
"hasInstallScript": true,
"license": "Apache-2.0",
"dependencies": {
@@ -40,7 +40,7 @@
"mongodb": "5.9.0",
"mustache": "4.2.0",
"otpauth": "9.2.2",
"parse": "5.2.0",
"parse": "5.3.0",
"path-to-regexp": "6.2.1",
"pg-monitor": "2.0.0",
"pg-promise": "11.7.8",
@@ -2329,9 +2329,9 @@
}
},
"node_modules/@babel/runtime-corejs3": {
"version": "7.24.6",
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.24.6.tgz",
"integrity": "sha512-tbC3o8uHK9xMgMsvUm9qGqxVpbv6yborMBLbDteHIc7JDNHsTV0vDMQ5j1O1NXvO+BDELtL9KgoWYaUVIVGt8w==",
"version": "7.24.7",
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.24.7.tgz",
"integrity": "sha512-eytSX6JLBY6PVAeQa2bFlDx/7Mmln/gaEpsit5a3WEvjGfiIytEsgAwuIXCPM0xvw0v0cJn3ilq0/TvXrW0kgA==",
"dependencies": {
"core-js-pure": "^3.30.2",
"regenerator-runtime": "^0.14.0"
@@ -15772,11 +15772,11 @@
}
},
"node_modules/parse": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/parse/-/parse-5.2.0.tgz",
"integrity": "sha512-FoD3kcLAQCw/2J1984sl3GUBzbHE2tA9mUcyw/EBWZ46WVZTzV+kjnA5tttXyzN4uodt21wSluzjbGnyLqreKw==",
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/parse/-/parse-5.3.0.tgz",
"integrity": "sha512-mWBnE6hHJhdvlx5KPQcYgCGRdgqKhPw+5fSC0j7vOfse3Lkh3xtDwOfmDpvv2LXZVBj72G/mgVKMRmbAICRzkQ==",
"dependencies": {
"@babel/runtime-corejs3": "7.24.6",
"@babel/runtime-corejs3": "7.24.7",
"idb-keyval": "6.2.1",
"react-native-crypto-js": "1.0.0",
"uuid": "10.0.0",
@@ -15784,7 +15784,7 @@
"xmlhttprequest": "1.8.0"
},
"engines": {
"node": ">=18 <21"
"node": "18 || 19 || 20 || 22"
},
"optionalDependencies": {
"crypto-js": "4.2.0"
@@ -21604,9 +21604,9 @@
}
},
"@babel/runtime-corejs3": {
"version": "7.24.6",
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.24.6.tgz",
"integrity": "sha512-tbC3o8uHK9xMgMsvUm9qGqxVpbv6yborMBLbDteHIc7JDNHsTV0vDMQ5j1O1NXvO+BDELtL9KgoWYaUVIVGt8w==",
"version": "7.24.7",
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.24.7.tgz",
"integrity": "sha512-eytSX6JLBY6PVAeQa2bFlDx/7Mmln/gaEpsit5a3WEvjGfiIytEsgAwuIXCPM0xvw0v0cJn3ilq0/TvXrW0kgA==",
"requires": {
"core-js-pure": "^3.30.2",
"regenerator-runtime": "^0.14.0"
@@ -31664,11 +31664,11 @@
}
},
"parse": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/parse/-/parse-5.2.0.tgz",
"integrity": "sha512-FoD3kcLAQCw/2J1984sl3GUBzbHE2tA9mUcyw/EBWZ46WVZTzV+kjnA5tttXyzN4uodt21wSluzjbGnyLqreKw==",
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/parse/-/parse-5.3.0.tgz",
"integrity": "sha512-mWBnE6hHJhdvlx5KPQcYgCGRdgqKhPw+5fSC0j7vOfse3Lkh3xtDwOfmDpvv2LXZVBj72G/mgVKMRmbAICRzkQ==",
"requires": {
"@babel/runtime-corejs3": "7.24.6",
"@babel/runtime-corejs3": "7.24.7",
"crypto-js": "4.2.0",
"idb-keyval": "6.2.1",
"react-native-crypto-js": "1.0.0",
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "parse-server",
"version": "7.1.0-beta.1",
"version": "7.1.0-alpha.14",
"description": "An express module providing a Parse-compatible API server",
"main": "lib/index.js",
"repository": {
@@ -49,7 +49,7 @@
"mongodb": "5.9.0",
"mustache": "4.2.0",
"otpauth": "9.2.2",
"parse": "5.2.0",
"parse": "5.3.0",
"path-to-regexp": "6.2.1",
"pg-monitor": "2.0.0",
"pg-promise": "11.7.8",
+14 -2
View File
@@ -237,11 +237,23 @@ export function pushStatusHandler(config, existingObjectId) {
) {
const token = result.device.deviceToken;
const error = result.response.error;
// GCM errors
// GCM / FCM HTTP v1 API errors; see:
// https://firebase.google.com/docs/reference/fcm/rest/v1/ErrorCode
if (error === 'NotRegistered' || error === 'InvalidRegistration') {
devicesToRemove.push(token);
}
// APNS errors
// FCM API v2 errors; see:
// https://firebase.google.com/docs/cloud-messaging/manage-tokens
// https://github.com/firebase/functions-samples/blob/703c0359eacf07a551751d1319d34f912a2cd828/Node/fcm-notifications/functions/index.js#L89-L93C16
if (
error?.code === 'messaging/registration-token-not-registered' ||
error?.code === 'messaging/invalid-registration-token' ||
(error?.code === 'messaging/invalid-argument' && error?.message === 'The registration token is not a valid FCM registration token')
) {
devicesToRemove.push(token);
}
// APNS errors; see:
// https://developer.apple.com/documentation/usernotifications/handling-notification-responses-from-apns
if (error === 'Unregistered' || error === 'BadDeviceToken') {
devicesToRemove.push(token);
}