Skip to content

Commit 72af572

Browse files
committed
fix: feedbacks
1 parent 56800e5 commit 72af572

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

9.0.0.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Parse Server 9 Migration Guide <!-- omit in toc -->
2+
3+
This document only highlights specific changes that require a longer explanation. For a full list of changes in Parse Server 9 please refer to the [changelog](https://github.com/parse-community/parse-server/blob/alpha/CHANGELOG.md).
4+
5+
---
6+
- [Route Path Syntax and Rate Limiting](#route-path-syntax-and-rate-limiting)
7+
---
8+
9+
## Route Path Syntax and Rate Limiting
10+
Parse Server 9 standardizes the route pattern syntax across cloud routes and rate-limiting to use the new **path-to-regexp v8** style. This update introduces validation and a clear deprecation error for the old wildcard route syntax.
11+
12+
### Key Changes
13+
- **Standardization**: All route paths now use the path-to-regexp v8 syntax, which provides better consistency and security.
14+
- **Validation**: Added validation to ensure route paths conform to the new syntax.
15+
- **Deprecation**: Old wildcard route syntax is deprecated and will trigger a clear error message.
16+
17+
### Migration Steps
18+
- Review your custom cloud routes and ensure they use the new path-to-regexp v8 syntax.
19+
- Update any rate-limiting configurations to use the new route path format.
20+
- Test your application to ensure all routes work as expected with the new syntax.
21+
- **Consult the [Express 5 Migration Guide](https://expressjs.com/en/guide/migrating-5.html#path-syntax) for more details on the new path syntax.**
22+
23+
### Related Pull Request
24+
- [#9942: feat: Bump path-to-regexp to v8](https://github.com/parse-community/parse-server/pull/9942)

spec/RateLimit.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ describe('rate limit', () => {
488488
` Old: "/functions/*" → New: "/functions/*path"\n` +
489489
` Old: "/classes/*" → New: "/classes/*path"\n` +
490490
` Old: "*" → New: "*path"\n` +
491-
`See: https://github.com/pillarjs/path-to-regexp#usage`);
491+
`See parameter name on the express migration guide.`);
492492
await expectAsync(
493493
reconfigureServer({
494494
rateLimit: [{ requestTimeWindow: 3, requestCount: 1, path: 'abc', requestPath: 'a' }],

src/Config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ export class Config {
699699
` Old: "/functions/*" → New: "/functions/*path"\n` +
700700
` Old: "/classes/*" → New: "/classes/*path"\n` +
701701
` Old: "*" → New: "*path"\n` +
702-
`See: https://github.com/pillarjs/path-to-regexp#usage`;
702+
`See parameter name on the express migration guide.`;
703703
}
704704

705705
// Validate that the path is valid path-to-regexp syntax

0 commit comments

Comments
 (0)