Compare commits

...
22 Commits
Author SHA1 Message Date
semantic-release-bot b7faabb569 chore(release): 8.2.5 [skip ci]
## [8.2.5](https://github.com/parse-community/parse-server/compare/8.2.4...8.2.5) (2025-10-02)

### Bug Fixes

* GraphQL playground shows blank page ([#9858](https://github.com/parse-community/parse-server/issues/9858)) ([7b5395c](https://github.com/parse-community/parse-server/commit/7b5395c5d481235c022d96603280672366a50715))
2025-10-02 13:28:25 +00:00
Manuel 3c7c5e1a78 build: Release (#9863) 2025-10-02 15:27:28 +02:00
GitHub Actions fe4ba57892 empty commit to trigger CI 2025-10-01 00:17:22 +00:00
Antoine Cormouls 389de8426c ci: Fix MongoDB test instance not terminated after running tests (#9860) 2025-09-30 13:42:51 +02:00
semantic-release-bot aad8ff9326 chore(release): 8.2.5-alpha.1 [skip ci]
## [8.2.5-alpha.1](https://github.com/parse-community/parse-server/compare/8.2.4...8.2.5-alpha.1) (2025-09-21)

### Bug Fixes

* GraphQL playground shows blank page ([#9858](https://github.com/parse-community/parse-server/issues/9858)) ([7b5395c](https://github.com/parse-community/parse-server/commit/7b5395c5d481235c022d96603280672366a50715))
2025-09-21 15:46:01 +00:00
Alan Maulana Rahman 7b5395c5d4 fix: GraphQL playground shows blank page (#9858) 2025-09-21 17:45:07 +02:00
dependabot[bot] 82fdb0d95a refactor: Bump brace-expansion from 1.1.11 to 1.1.12 (#9854) 2025-09-05 11:02:40 +02:00
semantic-release-bot 43cb65ff90 chore(release): 8.2.4 [skip ci]
## [8.2.4](https://github.com/parse-community/parse-server/compare/8.2.3...8.2.4) (2025-09-01)

### Bug Fixes

* Security upgrade form-data from 4.0.3 to 4.0.4 ([#9829](https://github.com/parse-community/parse-server/issues/9829)) ([c2c593f](https://github.com/parse-community/parse-server/commit/c2c593f437c33f37101b4f3bb1287eef31dbbc3b))
2025-09-01 21:06:42 +00:00
Manuel e6283c3ca3 build: Release (#9851) 2025-09-01 23:05:34 +02:00
GitHub Actions b71a3106ce empty commit to trigger CI 2025-09-01 00:18:33 +00:00
dependabot[bot] 4b3f10b2ab refactor: Bump sha.js from 2.4.11 to 2.4.12 (#9845) 2025-08-24 13:55:22 +02:00
dependabot[bot] 587abdd45f refactor: Bump @eslint/plugin-kit from 0.3.1 to 0.3.4 (#9834) 2025-08-02 19:37:52 +02:00
semantic-release-bot 743484768b chore(release): 8.2.4-alpha.1 [skip ci]
## [8.2.4-alpha.1](https://github.com/parse-community/parse-server/compare/8.2.3...8.2.4-alpha.1) (2025-08-02)

### Bug Fixes

* Security upgrade form-data from 4.0.3 to 4.0.4 ([#9829](https://github.com/parse-community/parse-server/issues/9829)) ([c2c593f](https://github.com/parse-community/parse-server/commit/c2c593f437c33f37101b4f3bb1287eef31dbbc3b))
2025-08-02 08:05:36 +00:00
dependabot[bot] c2c593f437 fix: Security upgrade form-data from 4.0.3 to 4.0.4 (#9829) 2025-08-02 10:04:39 +02:00
semantic-release-bot 1a24ede388 chore(release): 8.2.3 [skip ci]
## [8.2.3](https://github.com/parse-community/parse-server/compare/8.2.2...8.2.3) (2025-08-01)

### Bug Fixes

* MongoDB aggregation pipeline with `$dateSubtract` from `$$NOW` returns no results ([#9822](https://github.com/parse-community/parse-server/issues/9822)) ([847a274](https://github.com/parse-community/parse-server/commit/847a274cdb8c22f8e0fc249162e5e2c9e29a594a))
2025-08-01 10:07:10 +00:00
Manuel 080610ac5f build: Release (#9836) 2025-08-01 12:05:47 +02:00
GitHub Actions a09f751c14 empty commit to trigger CI 2025-08-01 00:19:22 +00:00
Parse Platform 3d8dc5fa0d refactor: Upgrade @babel/eslint-parser from 7.27.1 to 7.28.0 (#9835) 2025-07-30 00:37:51 +02:00
Parse Platform 4e301a5fff refactor: Upgrade express-rate-limit from 7.5.0 to 7.5.1 (#9824) 2025-07-18 01:28:11 +02:00
Parse Platform dfffc14a54 refactor: Upgrade pg-promise from 11.13.0 to 11.14.0 (#9825) 2025-07-15 15:37:21 +02:00
semantic-release-bot 9c6d7ab4f1 chore(release): 8.2.3-alpha.1 [skip ci]
## [8.2.3-alpha.1](https://github.com/parse-community/parse-server/compare/8.2.2...8.2.3-alpha.1) (2025-07-13)

### Bug Fixes

* MongoDB aggregation pipeline with `$dateSubtract` from `$$NOW` returns no results ([#9822](https://github.com/parse-community/parse-server/issues/9822)) ([847a274](https://github.com/parse-community/parse-server/commit/847a274cdb8c22f8e0fc249162e5e2c9e29a594a))
2025-07-13 00:44:59 +00:00
Manuel 847a274cdb fix: MongoDB aggregation pipeline with $dateSubtract from $$NOW returns no results (#9822) 2025-07-13 02:44:08 +02:00
8 changed files with 560 additions and 190 deletions
+1 -2
View File
@@ -210,8 +210,7 @@ jobs:
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
- name: Install dependencies
run: npm ci
- run: npm run pretest
- run: npm run coverage
- run: npm run coverage:mongodb
env:
CI: true
- name: Upload code coverage
+21
View File
@@ -1,3 +1,24 @@
## [8.2.5-alpha.1](https://github.com/parse-community/parse-server/compare/8.2.4...8.2.5-alpha.1) (2025-09-21)
### Bug Fixes
* GraphQL playground shows blank page ([#9858](https://github.com/parse-community/parse-server/issues/9858)) ([7b5395c](https://github.com/parse-community/parse-server/commit/7b5395c5d481235c022d96603280672366a50715))
## [8.2.4-alpha.1](https://github.com/parse-community/parse-server/compare/8.2.3...8.2.4-alpha.1) (2025-08-02)
### Bug Fixes
* Security upgrade form-data from 4.0.3 to 4.0.4 ([#9829](https://github.com/parse-community/parse-server/issues/9829)) ([c2c593f](https://github.com/parse-community/parse-server/commit/c2c593f437c33f37101b4f3bb1287eef31dbbc3b))
## [8.2.3-alpha.1](https://github.com/parse-community/parse-server/compare/8.2.2...8.2.3-alpha.1) (2025-07-13)
### Bug Fixes
* MongoDB aggregation pipeline with `$dateSubtract` from `$$NOW` returns no results ([#9822](https://github.com/parse-community/parse-server/issues/9822)) ([847a274](https://github.com/parse-community/parse-server/commit/847a274cdb8c22f8e0fc249162e5e2c9e29a594a))
## [8.2.2-alpha.1](https://github.com/parse-community/parse-server/compare/8.2.1...8.2.2-alpha.1) (2025-07-10)
+21
View File
@@ -1,3 +1,24 @@
## [8.2.5](https://github.com/parse-community/parse-server/compare/8.2.4...8.2.5) (2025-10-02)
### Bug Fixes
* GraphQL playground shows blank page ([#9858](https://github.com/parse-community/parse-server/issues/9858)) ([7b5395c](https://github.com/parse-community/parse-server/commit/7b5395c5d481235c022d96603280672366a50715))
## [8.2.4](https://github.com/parse-community/parse-server/compare/8.2.3...8.2.4) (2025-09-01)
### Bug Fixes
* Security upgrade form-data from 4.0.3 to 4.0.4 ([#9829](https://github.com/parse-community/parse-server/issues/9829)) ([c2c593f](https://github.com/parse-community/parse-server/commit/c2c593f437c33f37101b4f3bb1287eef31dbbc3b))
## [8.2.3](https://github.com/parse-community/parse-server/compare/8.2.2...8.2.3) (2025-08-01)
### Bug Fixes
* MongoDB aggregation pipeline with `$dateSubtract` from `$$NOW` returns no results ([#9822](https://github.com/parse-community/parse-server/issues/9822)) ([847a274](https://github.com/parse-community/parse-server/commit/847a274cdb8c22f8e0fc249162e5e2c9e29a594a))
## [8.2.2](https://github.com/parse-community/parse-server/compare/8.2.1...8.2.2) (2025-07-10)
+458 -160
View File
File diff suppressed because it is too large Load Diff
+11 -15
View File
@@ -1,6 +1,6 @@
{
"name": "parse-server",
"version": "8.2.2",
"version": "8.2.5",
"description": "An express module providing a Parse-compatible API server",
"main": "lib/index.js",
"repository": {
@@ -21,7 +21,7 @@
"license": "Apache-2.0",
"dependencies": {
"@apollo/server": "4.12.1",
"@babel/eslint-parser": "7.27.1",
"@babel/eslint-parser": "7.28.0",
"@graphql-tools/merge": "9.0.24",
"@graphql-tools/schema": "10.0.23",
"@graphql-tools/utils": "10.8.6",
@@ -32,7 +32,7 @@
"cors": "2.8.5",
"deepcopy": "2.1.0",
"express": "5.1.0",
"express-rate-limit": "7.5.0",
"express-rate-limit": "7.5.1",
"follow-redirects": "1.15.9",
"graphql": "16.11.0",
"graphql-list-fields": "2.0.4",
@@ -52,7 +52,7 @@
"parse": "6.1.1",
"path-to-regexp": "6.3.0",
"pg-monitor": "3.0.0",
"pg-promise": "11.13.0",
"pg-promise": "11.14.0",
"pluralize": "8.0.0",
"punycode": "2.3.1",
"rate-limit-redis": "4.2.0",
@@ -90,7 +90,7 @@
"eslint": "9.27.0",
"eslint-plugin-expect-type": "0.6.2",
"flow-bin": "0.271.0",
"form-data": "4.0.3",
"form-data": "4.0.4",
"globals": "16.2.0",
"graphql-tag": "2.12.6",
"husky": "9.1.7",
@@ -103,7 +103,7 @@
"madge": "8.0.0",
"mock-files-adapter": "file:spec/dependencies/mock-files-adapter",
"mock-mail-adapter": "file:spec/dependencies/mock-mail-adapter",
"mongodb-runner": "5.8.3",
"mongodb-runner": "5.9.3",
"node-abort-controller": "3.1.1",
"node-fetch": "3.2.10",
"nyc": "17.1.0",
@@ -125,18 +125,14 @@
"build:types": "tsc",
"watch": "babel --watch src/ -d lib/ --copy-files",
"watch:ts": "tsc --watch",
"test:mongodb:runnerstart": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=$npm_config_dbversion} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner start -t ${MONGODB_TOPOLOGY} --version ${MONGODB_VERSION} -- --port 27017",
"test:mongodb:testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=$npm_config_dbversion} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 jasmine",
"test:mongodb": "npm run test:mongodb:runnerstart --dbversion=$npm_config_dbversion && npm run test:mongodb:testonly --dbversion=$npm_config_dbversion",
"test:mongodb:6.0.19": "npm run test:mongodb --dbversion=6.0.19",
"test:mongodb:7.0.16": "npm run test:mongodb --dbversion=7.0.16",
"test:mongodb:8.0.4": "npm run test:mongodb --dbversion=8.0.4",
"test:mongodb:6.0.19": "MONGODB_VERSION=6.0.19 npm run test",
"test:mongodb:7.0.16": "MONGODB_VERSION=7.0.16 npm run test",
"test:mongodb:8.0.4": "MONGODB_VERSION=8.0.4 npm run test",
"test:postgres:testonly": "cross-env PARSE_SERVER_TEST_DB=postgres PARSE_SERVER_TEST_DATABASE_URI=postgres://postgres:password@localhost:5432/parse_server_postgres_adapter_test_database npm run testonly",
"pretest": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=8.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner start -t ${MONGODB_TOPOLOGY} --version ${MONGODB_VERSION} -- --port 27017",
"testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=8.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 jasmine",
"test": "npm run testonly",
"test": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=8.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner exec -t ${MONGODB_TOPOLOGY} --version ${MONGODB_VERSION} -- --port 27017 -- npm run testonly",
"test:types": "eslint types/tests.ts -c ./types/eslint.config.mjs",
"posttest": "cross-env mongodb-runner stop --all",
"coverage:mongodb": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=8.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} mongodb-runner exec -t ${MONGODB_TOPOLOGY} --version ${MONGODB_VERSION} -- --port 27017 -- npm run coverage",
"coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=8.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 nyc jasmine",
"start": "node ./bin/parse-server",
"prettier": "prettier --write {src,spec}/{**/*,*}.js",
+30
View File
@@ -439,6 +439,36 @@ describe('Parse.Query Aggregate testing', () => {
}
);
it_id('3723671d-4100-4103-ad9c-60e4c22e20ff')(it_exclude_dbs(['postgres']))('matches expression with $dateSubtract from $$NOW', async () => {
const obj1 = new TestObject({ date: new Date(new Date().getTime() - 1 * 24 * 60 * 60 * 1_000) }); // 1 day ago
const obj2 = new TestObject({ date: new Date(new Date().getTime() - 2 * 24 * 60 * 60 * 1_000) }); // 3 days ago
await Parse.Object.saveAll([obj1, obj2]);
const pipeline = [
{
$match: {
$expr: {
$gte: [
'$date',
{
$dateSubtract: {
startDate: '$$NOW',
unit: 'day',
amount: 2,
},
},
],
},
},
},
];
const query = new Parse.Query('TestObject');
const results = await query.aggregate(pipeline, { useMasterKey: true });
expect(results.length).toBe(1);
expect(new Date(results[0].date.iso)).toEqual(obj1.get('date'));
});
it_only_db('postgres')(
'can group by any date field (it does not work if you have dirty data)', // rows in your collection with non date data in the field that is supposed to be a date
done => {
@@ -960,23 +960,28 @@ export class MongoStorageAdapter implements StorageAdapter {
return pipeline;
}
// This function will attempt to convert the provided value to a Date object. Since this is part
// of an aggregation pipeline, the value can either be a string or it can be another object with
// an operator in it (like $gt, $lt, etc). Because of this I felt it was easier to make this a
// recursive method to traverse down to the "leaf node" which is going to be the string.
/**
* Recursively converts values to Date objects. Since the passed object is part of an aggregation
* pipeline and can contain various logic operators (like $gt, $lt, etc), this function will
* traverse the object and convert any strings that can be parsed as dates into Date objects.
* @param {any} value The value to convert.
* @returns {any} The original value if not convertible to Date, or a Date object if it is.
*/
_convertToDate(value: any): any {
if (value instanceof Date) {
return value;
}
if (typeof value === 'string') {
return new Date(value);
return isNaN(Date.parse(value)) ? value : new Date(value);
}
const returnValue = {};
for (const field in value) {
returnValue[field] = this._convertToDate(value[field]);
if (typeof value === 'object') {
const returnValue = {};
for (const field in value) {
returnValue[field] = this._convertToDate(value[field]);
}
return returnValue;
}
return returnValue;
return value;
}
_parseReadPreference(readPreference: ?string): ?string {
+3 -3
View File
@@ -167,14 +167,14 @@ class ParseGraphQLServer {
new window.EmbeddedSandbox({
target: "#sandbox",
endpointIsEditable: false,
initialEndpoint: "${JSON.stringify(this.config.graphQLPath)}",
initialEndpoint: ${JSON.stringify(this.config.graphQLPath)},
handleRequest: (endpointUrl, options) => {
return fetch(endpointUrl, {
...options,
headers: {
...options.headers,
'X-Parse-Application-Id': "${JSON.stringify(this.parseServer.config.appId)}",
'X-Parse-Master-Key': "${JSON.stringify(this.parseServer.config.masterKey)}",
'X-Parse-Application-Id': ${JSON.stringify(this.parseServer.config.appId)},
'X-Parse-Master-Key': ${JSON.stringify(this.parseServer.config.masterKey)},
},
})
},