Skip to content

Commit e91b698

Browse files
authored
Merge branch 'alpha' into moumouls/disableIndexValidation
2 parents 3647128 + be362fe commit e91b698

File tree

15 files changed

+159
-53
lines changed

15 files changed

+159
-53
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,7 @@ jobs:
210210
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
211211
- name: Install dependencies
212212
run: npm ci
213-
- run: npm run pretest
214-
- run: npm run coverage
213+
- run: npm run coverage:mongodb
215214
env:
216215
CI: true
217216
- name: Upload code coverage
@@ -239,6 +238,9 @@ jobs:
239238
- name: PostgreSQL 17, PostGIS 3.5
240239
POSTGRES_IMAGE: postgis/postgis:17-3.5
241240
NODE_VERSION: 22.12.0
241+
- name: PostgreSQL 18, PostGIS 3.6
242+
POSTGRES_IMAGE: postgis/postgis:18-3.6
243+
NODE_VERSION: 22.12.0
242244
fail-fast: false
243245
name: ${{ matrix.name }}
244246
timeout-minutes: 20

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
[![Node Version](https://img.shields.io/badge/nodejs-18,_20,_22-green.svg?logo=node.js&style=flat)](https://nodejs.org)
1212
[![MongoDB Version](https://img.shields.io/badge/mongodb-6,_7,_8-green.svg?logo=mongodb&style=flat)](https://www.mongodb.com)
13-
[![Postgres Version](https://img.shields.io/badge/postgresql-13,_14,_15,_16,_17-green.svg?logo=postgresql&style=flat)](https://www.postgresql.org)
13+
[![Postgres Version](https://img.shields.io/badge/postgresql-13,_14,_15,_16,_17,_18-green.svg?logo=postgresql&style=flat)](https://www.postgresql.org)
1414

1515
[![npm latest version](https://img.shields.io/npm/v/parse-server/latest.svg)](https://www.npmjs.com/package/parse-server)
1616
[![npm alpha version](https://img.shields.io/npm/v/parse-server/alpha.svg)](https://www.npmjs.com/package/parse-server)
@@ -152,6 +152,7 @@ Parse Server is continuously tested with the most recent releases of PostgreSQL
152152
| Postgres 15 | 3.3, 3.4, 3.5 | November 2027 | <= 8.x (2025) |
153153
| Postgres 16 | 3.5 | November 2028 | <= 9.x (2026) |
154154
| Postgres 17 | 3.5 | November 2029 | <= 10.x (2027) |
155+
| Postgres 18 | 3.6 | November 2030 | <= 11.x (2028) |
155156

156157
### Locally
157158

changelogs/CHANGELOG_alpha.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
# [8.3.0-alpha.3](https://github.com/parse-community/parse-server/compare/8.3.0-alpha.2...8.3.0-alpha.3) (2025-10-07)
2+
3+
4+
### Features
5+
6+
* Add support for Postgres 18 ([#9870](https://github.com/parse-community/parse-server/issues/9870)) ([d275c18](https://github.com/parse-community/parse-server/commit/d275c1806e0a5a037cc06cde7eefff3e12c91d7d))
7+
8+
# [8.3.0-alpha.2](https://github.com/parse-community/parse-server/compare/8.3.0-alpha.1...8.3.0-alpha.2) (2025-10-03)
9+
10+
11+
### Features
12+
13+
* Add regex option `u` for unicode support in `Parse.Query.matches` for MongoDB ([#9867](https://github.com/parse-community/parse-server/issues/9867)) ([7cb962a](https://github.com/parse-community/parse-server/commit/7cb962a02845f3dded61baffd84515f94b66ee50))
14+
15+
# [8.3.0-alpha.1](https://github.com/parse-community/parse-server/compare/8.2.5...8.3.0-alpha.1) (2025-10-03)
16+
17+
18+
### Features
19+
20+
* Add option `keepUnknownIndexes` to retain indexes which are not specified in schema ([#9857](https://github.com/parse-community/parse-server/issues/9857)) ([89fad46](https://github.com/parse-community/parse-server/commit/89fad468c3a43772879c06c4d939a83b72517a8e))
21+
22+
## [8.2.5-alpha.1](https://github.com/parse-community/parse-server/compare/8.2.4...8.2.5-alpha.1) (2025-09-21)
23+
24+
25+
### Bug Fixes
26+
27+
* 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))
28+
129
## [8.2.4-alpha.1](https://github.com/parse-community/parse-server/compare/8.2.3...8.2.4-alpha.1) (2025-08-02)
230

331

changelogs/CHANGELOG_release.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [8.2.5](https://github.com/parse-community/parse-server/compare/8.2.4...8.2.5) (2025-10-02)
2+
3+
4+
### Bug Fixes
5+
6+
* 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))
7+
18
## [8.2.4](https://github.com/parse-community/parse-server/compare/8.2.3...8.2.4) (2025-09-01)
29

310

package-lock.json

Lines changed: 33 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "parse-server",
3-
"version": "8.2.4",
3+
"version": "8.3.0-alpha.3",
44
"description": "An express module providing a Parse-compatible API server",
55
"main": "lib/index.js",
66
"repository": {
@@ -103,7 +103,7 @@
103103
"madge": "8.0.0",
104104
"mock-files-adapter": "file:spec/dependencies/mock-files-adapter",
105105
"mock-mail-adapter": "file:spec/dependencies/mock-mail-adapter",
106-
"mongodb-runner": "5.8.3",
106+
"mongodb-runner": "5.9.3",
107107
"node-abort-controller": "3.1.1",
108108
"node-fetch": "3.2.10",
109109
"nyc": "17.1.0",
@@ -125,18 +125,14 @@
125125
"build:types": "tsc",
126126
"watch": "babel --watch src/ -d lib/ --copy-files",
127127
"watch:ts": "tsc --watch",
128-
"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",
129-
"test:mongodb:testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=$npm_config_dbversion} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 jasmine",
130-
"test:mongodb": "npm run test:mongodb:runnerstart --dbversion=$npm_config_dbversion && npm run test:mongodb:testonly --dbversion=$npm_config_dbversion",
131-
"test:mongodb:6.0.19": "npm run test:mongodb --dbversion=6.0.19",
132-
"test:mongodb:7.0.16": "npm run test:mongodb --dbversion=7.0.16",
133-
"test:mongodb:8.0.4": "npm run test:mongodb --dbversion=8.0.4",
128+
"test:mongodb:6.0.19": "MONGODB_VERSION=6.0.19 npm run test",
129+
"test:mongodb:7.0.16": "MONGODB_VERSION=7.0.16 npm run test",
130+
"test:mongodb:8.0.4": "MONGODB_VERSION=8.0.4 npm run test",
134131
"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",
135-
"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",
136132
"testonly": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=8.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 jasmine",
137-
"test": "npm run testonly",
133+
"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",
138134
"test:types": "eslint types/tests.ts -c ./types/eslint.config.mjs",
139-
"posttest": "cross-env mongodb-runner stop --all",
135+
"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",
140136
"coverage": "cross-env MONGODB_VERSION=${MONGODB_VERSION:=8.0.4} MONGODB_TOPOLOGY=${MONGODB_TOPOLOGY:=standalone} TESTING=1 nyc jasmine",
141137
"start": "node ./bin/parse-server",
142138
"prettier": "prettier --write {src,spec}/{**/*,*}.js",

spec/DefinedSchemas.spec.js

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ describe('DefinedSchemas', () => {
371371
expect(schema.indexes).toEqual(indexes);
372372
});
373373

374-
it('should delete removed indexes', async () => {
374+
it('should delete unknown indexes when keepUnknownIndexes is not set', async () => {
375375
const server = await reconfigureServer();
376376

377377
let indexes = { complex: { createdAt: 1, updatedAt: 1 } };
@@ -393,6 +393,53 @@ describe('DefinedSchemas', () => {
393393
cleanUpIndexes(schema);
394394
expect(schema.indexes).toBeUndefined();
395395
});
396+
397+
it('should delete unknown indexes when keepUnknownIndexes is set to false', async () => {
398+
const server = await reconfigureServer();
399+
400+
let indexes = { complex: { createdAt: 1, updatedAt: 1 } };
401+
402+
let schemas = { definitions: [{ className: 'Test', indexes }], keepUnknownIndexes: false };
403+
await new DefinedSchemas(schemas, server.config).execute();
404+
405+
indexes = {};
406+
schemas = { definitions: [{ className: 'Test', indexes }], keepUnknownIndexes: false };
407+
// Change indexes
408+
await new DefinedSchemas(schemas, server.config).execute();
409+
let schema = await new Parse.Schema('Test').get();
410+
cleanUpIndexes(schema);
411+
expect(schema.indexes).toBeUndefined();
412+
413+
// Update
414+
await new DefinedSchemas(schemas, server.config).execute();
415+
schema = await new Parse.Schema('Test').get();
416+
cleanUpIndexes(schema);
417+
expect(schema.indexes).toBeUndefined();
418+
});
419+
420+
it('should not delete unknown indexes when keepUnknownIndexes is set to true', async () => {
421+
const server = await reconfigureServer();
422+
423+
const indexes = { complex: { createdAt: 1, updatedAt: 1 } };
424+
425+
let schemas = { definitions: [{ className: 'Test', indexes }], keepUnknownIndexes: true };
426+
await new DefinedSchemas(schemas, server.config).execute();
427+
428+
schemas = { definitions: [{ className: 'Test', indexes: {} }], keepUnknownIndexes: true };
429+
430+
// Change indexes
431+
await new DefinedSchemas(schemas, server.config).execute();
432+
let schema = await new Parse.Schema('Test').get();
433+
cleanUpIndexes(schema);
434+
expect(schema.indexes).toEqual({ complex: { createdAt: 1, updatedAt: 1 } });
435+
436+
// Update
437+
await new DefinedSchemas(schemas, server.config).execute();
438+
schema = await new Parse.Schema('Test').get();
439+
cleanUpIndexes(schema);
440+
expect(schema.indexes).toEqual(indexes);
441+
});
442+
396443
xit('should keep protected indexes', async () => {
397444
const server = await reconfigureServer();
398445

spec/ParseQuery.spec.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2113,6 +2113,16 @@ describe('Parse.Query testing', () => {
21132113
.then(done);
21142114
});
21152115

2116+
it_id('351f57a8-e00a-4da2-887d-6e25c9e359fc')(it)('regex with unicode option', async function () {
2117+
const thing = new TestObject();
2118+
thing.set('myString', 'hello 世界');
2119+
await Parse.Object.saveAll([thing]);
2120+
const query = new Parse.Query(TestObject);
2121+
query.matches('myString', '世界', 'u');
2122+
const results = await query.find();
2123+
equal(results.length, 1);
2124+
});
2125+
21162126
it_id('823852f6-1de5-45ba-a2b9-ed952fcc6012')(it)('Use a regex that requires all modifiers', function (done) {
21172127
const thing = new TestObject();
21182128
thing.set('myString', 'PArSe\nCom');

src/Controllers/DatabaseController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const validateQuery = (
111111
Object.keys(query).forEach(key => {
112112
if (query && query[key] && query[key].$regex) {
113113
if (typeof query[key].$options === 'string') {
114-
if (!query[key].$options.match(/^[imxs]+$/)) {
114+
if (!query[key].$options.match(/^[imxsu]+$/)) {
115115
throw new Parse.Error(
116116
Parse.Error.INVALID_QUERY,
117117
`Bad $options value for query: ${query[key].$options}`

src/GraphQL/ParseGraphQLServer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,14 +167,14 @@ class ParseGraphQLServer {
167167
new window.EmbeddedSandbox({
168168
target: "#sandbox",
169169
endpointIsEditable: false,
170-
initialEndpoint: "${JSON.stringify(this.config.graphQLPath)}",
170+
initialEndpoint: ${JSON.stringify(this.config.graphQLPath)},
171171
handleRequest: (endpointUrl, options) => {
172172
return fetch(endpointUrl, {
173173
...options,
174174
headers: {
175175
...options.headers,
176-
'X-Parse-Application-Id': "${JSON.stringify(this.parseServer.config.appId)}",
177-
'X-Parse-Master-Key': "${JSON.stringify(this.parseServer.config.masterKey)}",
176+
'X-Parse-Application-Id': ${JSON.stringify(this.parseServer.config.appId)},
177+
'X-Parse-Master-Key': ${JSON.stringify(this.parseServer.config.masterKey)},
178178
},
179179
})
180180
},

0 commit comments

Comments
 (0)