Skip to content

Commit 18f79d5

Browse files
derrickmehaffyBoegie19boazpoolman
authored
Beta Release for Strapi 5 Migration (#112)
Co-authored-by: Derrick Mehaffy <derrickmehaffy@gmail.com> Co-authored-by: Boegie19 <Bramboegheim@gmail.com> Co-authored-by: Boegie19 <34578426+Boegie19@users.noreply.github.com> Co-authored-by: Boaz Poolman <boaz_skater@hotmail.com>
1 parent e3ae2d4 commit 18f79d5

171 files changed

Lines changed: 23153 additions & 42187 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"env": {
3+
"commonjs": true,
4+
"es2021": true,
5+
"node": true
6+
},
7+
"extends": ["eslint:recommended", "plugin:import/recommended", "prettier"],
8+
"overrides": [
9+
{
10+
"env": {
11+
"node": true
12+
},
13+
"files": [".eslintrc.{js,cjs}"],
14+
"parserOptions": {
15+
"sourceType": "script"
16+
}
17+
}
18+
],
19+
"parserOptions": {
20+
"ecmaVersion": "latest"
21+
},
22+
"rules": {
23+
"no-undef": "off"
24+
}
25+
}

.eslintrc.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,23 @@ name: tests
33
on:
44
workflow_call:
55
push:
6-
branches: [main]
7-
paths:
8-
- ".github/**"
9-
- "data/**"
10-
- "packages/**"
11-
- "playgrounds/**"
12-
- "shared/**"
6+
branches:
7+
- main
8+
- 'dev/**'
139
pull_request:
1410
branches: [main]
15-
paths:
16-
- ".github/**"
17-
- "data/**"
18-
- "packages/**"
19-
- "playgrounds/**"
20-
- "shared/**"
2111

2212
jobs:
2313
linters:
2414
runs-on: ubuntu-latest
25-
15+
strategy:
16+
matrix:
17+
node: [20, 22]
2618
steps:
2719
- uses: actions/checkout@v4
2820
- uses: actions/setup-node@v4
2921
with:
30-
node-version: 18.x
22+
node-version: ${{ matrix.node }}
3123

3224
# cache node_modules
3325
- name: Cache dependencies
@@ -49,13 +41,14 @@ jobs:
4941

5042
e2e_memory:
5143
runs-on: ubuntu-latest
52-
needs: [linters]
53-
44+
strategy:
45+
matrix:
46+
node: [20, 22]
5447
steps:
5548
- uses: actions/checkout@v4
5649
- uses: actions/setup-node@v4
5750
with:
58-
node-version: 18.x
51+
node-version: ${{ matrix.node }}
5952

6053
# cache node_modules
6154
- name: Cache dependencies
@@ -75,14 +68,17 @@ jobs:
7568

7669
- run: yarn postinstall:memory
7770

71+
- run: yarn build:plugin:rest-cache
72+
7873
- name: Run Memory e2e tests
7974
working-directory: playgrounds/memory
8075
run: yarn test:e2e
8176

8277
e2e_redis:
8378
runs-on: ubuntu-latest
84-
needs: [linters]
85-
79+
strategy:
80+
matrix:
81+
node: [20, 22]
8682
services:
8783
redis:
8884
image: bitnami/redis:latest
@@ -96,7 +92,7 @@ jobs:
9692
- uses: actions/checkout@v4
9793
- uses: actions/setup-node@v4
9894
with:
99-
node-version: 18.x
95+
node-version: ${{ matrix.node }}
10096

10197
# cache node_modules
10298
- name: Cache dependencies
@@ -116,6 +112,8 @@ jobs:
116112

117113
- run: yarn postinstall:redis
118114

115+
- run: yarn build:plugin:rest-cache
116+
119117
- name: Run Redis e2e tests
120118
working-directory: playgrounds/redis
121119
run: yarn test:e2e

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,11 @@ dist
109109
cache
110110

111111
# Strapi
112+
license.txt
113+
exports
114+
.strapi
115+
dist
116+
build
112117
.strapi-updater.json
118+
.strapi-cloud.json
119+
playgrounds/**/types/*

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v14.19.1
1+
v20.18.0

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"endOfLine": "lf",
3+
"semi": true,
4+
"singleQuote": true,
5+
"tabWidth": 2,
6+
"trailingComma": "es5",
7+
"printWidth": 100
8+
}

.prettierrc.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

BENCHMARKS.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Benchmarks
22

3+
These benchmarks are out of date for the current version of the plugin. They are kept here for reference and might be updated in the future.
4+
35
## Context
46

57
- Rest cache version: `4.2.4`
@@ -15,13 +17,13 @@
1517
$ ENABLE_CACHE=false yarn profile:memory
1618
```
1719

18-
| Stat | 2.5% | 50% | 97.5% | 99% | Avg | Stdev | Max |
19-
| ----------- | ------- | ------- | ------- | ------- | ---------- | --------- | ------- |
20+
| Stat | 2.5% | 50% | 97.5% | 99% | Avg | Stdev | Max |
21+
|-------------|---------|---------|---------|---------|------------|--------|---------|
2022
| **Latency** | 2424 ms | 2555 ms | 2921 ms | 3012 ms | 2565.12 ms | 133.23 | 3401 ms |
2123

22-
| Stat | 1% | 2.5% | 50% | 97.5% | Avg | Stdev | Min |
23-
| ------------- | --- | ---- | ------ | ------- | ------ | ------ | ------ |
24-
| **Req/Sec** | 0 | 0 | 386 | 1000 | 383.34 | 382.38 | 39 |
24+
| Stat | 1% | 2.5% | 50% | 97.5% | Avg | Stdev | Min |
25+
|---------------|-----|------|--------|---------|--------|--------|---------|
26+
| **Req/Sec** | 0 | 0 | 386 | 1000 | 383.34 | 382.38 | 39 |
2527
| **Bytes/Sec** | 0 B | 0 B | 453 kB | 1.17 MB | 450 kB | 449 kB | 45.7 kB |
2628

2729
### Cache enabled (without etag)
@@ -30,12 +32,12 @@ $ ENABLE_CACHE=false yarn profile:memory
3032
$ ENABLE_ETAG=false yarn profile:memory
3133
```
3234

33-
| Stat | 2.5% | 50% | 97.5% | 99% | Avg | Stdev | Max |
34-
| ----------- | ------ | ------ | ------ | ------ | --------- | ------- | ------ |
35+
| Stat | 2.5% | 50% | 97.5% | 99% | Avg | Stdev | Max |
36+
|-------------|--------|--------|--------|--------|-----------|----------|--------|
3537
| **Latency** | 113 ms | 116 ms | 166 ms | 175 ms | 120.04 ms | 12.86 ms | 275 ms |
3638

3739
| Stat | 1% | 2.5% | 50% | 97.5% | Avg | Stdev | Min |
38-
| ------------- | ------- | ------- | ------- | ------- | ------- | ------ | ------- |
40+
|---------------|---------|---------|---------|---------|---------|--------|---------|
3941
| **Req/Sec** | 7451 | 7523 | 8287 | 8687 | 8293.49 | 306.35 | 6381 |
4042
| **Bytes/Sec** | 8.85 MB | 8.93 MB | 9.84 MB | 10.3 MB | 9.84 MB | 364 kB | 7.57 MB |
4143

@@ -46,10 +48,10 @@ $ yarn profile:memory
4648
```
4749

4850
| Stat | 2.5% | 50% | 97.5% | 99% | Avg | Stdev | Max |
49-
| ----------- | ------ | ------ | ------ | ------ | --------- | -------- | ------ |
51+
|-------------|--------|--------|--------|--------|-----------|----------|--------|
5052
| **Latency** | 119 ms | 125 ms | 185 ms | 197 ms | 131.05 ms | 16.87 ms | 307 ms |
5153

52-
| Stat | 1% | 2.5% | 50% | 97.5% | Avg | Stdev | Min |
53-
| ------------- | ------- | ------- | ------- | ------- | ------- | ------ | ------- |
54-
| **Req/Sec** | 6551 | 6559 | 7651 | 8231 | 7599.39 | 472.94 | 6100 |
54+
| Stat | 1% | 2.5% | 50% | 97.5% | Avg | Stdev | Min |
55+
|---------------|---------|---------|--------|---------|---------|--------|--------|
56+
| **Req/Sec** | 6551 | 6559 | 7651 | 8231 | 7599.39 | 472.94 | 6100 |
5557
| **Bytes/Sec** | 8.05 MB | 8.07 MB | 9.4 MB | 10.1 MB | 9.34 MB | 581 kB | 7.5 MB |

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Copyright (c) 2022 Strapi Community.
1+
Copyright (c) 2025 Strapi Community.
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
44

55
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
66

7-
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
<p style="margin-top: 0;">Speed-up HTTP requests with LRU cache.</p>
55

66
<p>
7-
<a href="https://www.npmjs.org/package/strapi-plugin-rest-cache">
8-
<img src="https://img.shields.io/npm/v/strapi-plugin-rest-cache/latest.svg" alt="NPM Version" />
7+
<a href="https://www.npmjs.org/package/@strapi-community/plugin-rest-cache">
8+
<img src="https://img.shields.io/npm/v/@strapi-community/plugin-rest-cache/latest.svg" alt="NPM Version" />
99
</a>
10-
<a href="https://www.npmjs.org/package/strapi-plugin-rest-cache">
11-
<img src="https://img.shields.io/npm/dm/strapi-plugin-rest-cache" alt="Monthly download on NPM" />
10+
<a href="https://www.npmjs.org/package/@strapi-community/plugin-rest-cache">
11+
<img src="https://img.shields.io/npm/dm/@strapi-community/plugin-rest-cache" alt="Monthly download on NPM" />
1212
</a>
1313
</p>
1414
</div>
@@ -17,15 +17,14 @@
1717

1818
- [🚦 Current Status](#-current-status)
1919
- [✨ Features](#-features)
20-
- [🤔 Motivation](#-motivation)
2120
- [🖐 Requirements](#-requirements)
2221
- [🚚 Getting Started](#-getting-started)
2322
- [Contributing](#contributing)
2423
- [License](#license)
2524

2625
## 🚦 Current Status
2726

28-
This package is currently under development and should be consider **ALPHA** in terms of state. I/We are currently accepting contributions and/or dedicated contributors to help develop and maintain this package.
27+
This package is currently under development and should be consider **BETA** in terms of state. I/We are currently accepting contributions and/or dedicated contributors to help develop and maintain this package.
2928

3029
## ✨ Features
3130

@@ -38,21 +37,20 @@ You can set a **strategy** to tell what to cache and how much time responses sho
3837

3938
Supported Strapi Versions:
4039

41-
- Strapi v4.0.x (recently tested as of January 2022)
42-
- Strapi v4.1.x (recently tested as of March 2022)
43-
- Strapi v4.x.x (Assumed, but possibly not tested)
40+
- Strapi v5.x.x (recently tested as of September 2025)
4441

42+
**If you are looking for the Strapi v4.x support, please check the [legacy package](https://www.npmjs.com/package/strapi-plugin-rest-cache).**
4543
**If you are looking for a plugin for Strapi v3.x, please check the [strapi-middleware-cache](https://github.com/patrixr/strapi-middleware-cache/).**
4644

4745
## 🚚 Getting Started
4846

49-
[Read the Docs to Learn More.](https://strapi-community.github.io/strapi-plugin-rest-cache/)
47+
[Read the Docs to Learn More.](https://strapi-community.github.io/plugin-rest-cache/)
5048

5149
## Contributing
5250

5351
I/We are actively looking for contributors, maintainers, and others to help shape this package. As this plugins sole purpose within the Strapi community is to be used by other developers and plugin maintainers to get fast responses time.
5452

55-
If interested please feel free to email the lead maintainer Sacha at: sacha@digisquad.io or ping `stf#3254` on Discord.
53+
If interested please feel free to open an issue or pull request.
5654

5755
## License
5856

0 commit comments

Comments
 (0)