Skip to content

Commit cd937bc

Browse files
authored
Merge pull request #964 from zoran995/strapi-v5-upgrade
Strapi v5
2 parents 3c39b3f + 0ccc98d commit cd937bc

File tree

145 files changed

+22435
-7673
lines changed

Some content is hidden

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

145 files changed

+22435
-7673
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.cache
22
build
33
**/node_modules/**
4+
dist

.github/workflows/cypress.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,20 @@ jobs:
3131
path: |
3232
./playground/node_modules
3333
key: ${{ hashFiles('playground/yarn.lock') }}
34+
3435
- name: Install dependencies
3536
run: yarn --dev && yarn --cwd ./playground
36-
- name: Remove plugin symlink
37-
run: rm ./playground/src/plugins/meilisearch
38-
- name: Move plugin inside playground
39-
# Since the plugin is located at the root of the project but a symlink links
40-
# to it in ./playground/plugins/meilisearch it causes a circular
41-
# chaining problem.
42-
# Now that we removed the symlink (see previous step), we need to move our plugin in the
43-
# plugin directory of the playground.
44-
run: mkdir ./playground/src/plugins/meilisearch &&
45-
mv admin ./playground/src/plugins/meilisearch &&
46-
mv server ./playground/src/plugins/meilisearch &&
47-
mv strapi-admin.js ./playground/src/plugins/meilisearch &&
48-
mv strapi-server.js ./playground/src/plugins/meilisearch &&
49-
cp package.json ./playground/src/plugins/meilisearch
37+
38+
- name: Build and link the package
39+
run: |
40+
npm install -g yalc
41+
yarn build
42+
yalc publish
43+
cd playground
44+
npx yalc add strapi-plugin-meilisearch
45+
npx yalc link strapi-plugin-meilisearch
46+
cd ..
47+
yarn --cwd ./playground install
5048
5149
- name: Run e2e browser tests
5250
uses: cypress-io/github-action@v6

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,6 @@ data.db
137137
.prettierignore
138138
.prettierrc.js
139139
.vscode
140+
141+
142+
dist

CONTRIBUTING.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ First of all, thank you for contributing to Meilisearch! The goal of this docume
2222
4. Review the [Development Workflow](#development-workflow) section that describes the steps to maintain the repository.
2323
5. Make the changes on your branch.
2424
6. [Submit the branch as a PR](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) pointing to the `main` branch of the main strapi-plugin-meilisearch repository. A maintainer should comment and/or review your Pull Request within a few days. Although depending on the circumstances, it may take longer.<br>
25-
We do not enforce a naming convention for the PRs, but **please use something descriptive of your changes**, having in mind that the title of your PR will be automatically added to the next [release changelog](https://github.com/meilisearch/strapi-plugin-meilisearch/releases/).
25+
We do not enforce a naming convention for the PRs, but **please use something descriptive of your changes**, having in mind that the title of your PR will be automatically added to the next [release changelog](https://github.com/meilisearch/strapi-plugin-meilisearch/releases/).
2626

2727
## Development Workflow
2828

@@ -31,6 +31,7 @@ First of all, thank you for contributing to Meilisearch! The goal of this docume
3131
You can set up your local environment natively or using `docker`, check out the [`docker-compose.yml`](/docker-compose.yml).
3232

3333
Example of running all the checks with docker:
34+
3435
```bash
3536
docker-compose run --rm package bash -c "yarn install && yarn test && yarn playground:build && yarn style"
3637
```
@@ -56,21 +57,31 @@ yarn test
5657
yarn style
5758
# Linter with fixing
5859
yarn style:fix
60+
# E2E tests
61+
yarn dlx cypress open
5962
```
6063

6164
### Run Playground
6265

6366
To test directly your changes on the plugin in Strapi, you can run the Strapi playground:
6467

6568
```bash
69+
# Root of repository
70+
yarn watch:link # Build the plugin and release it with yalc
71+
72+
# Playground dir
73+
yarn dlx yalc add --link strapi-plugin-meilisearch && yarn install
74+
6675
# Root of repository
6776
yarn playground:build # Build the playground
77+
# or
6878
yarn playground:dev # Start the development server
6979
```
7080

7181
This command will install required dependencies and launch the app in development mode. You should be able to reach it on the [port 8000 of your localhost](http://localhost:8000/admin/).
7282

7383
Once on the admin panel, you are required to log-in. Here are the credentials:
84+
7485
7586
- password: `Qwertyuiop1`
7687

@@ -84,6 +95,7 @@ We do not enforce any branch naming style, but please use something descriptive
8495
### Git Commits <!-- omit in toc -->
8596

8697
As minimal requirements, your commit message should:
98+
8799
- be capitalized
88100
- not finish by a dot or any other punctuation character (!,?)
89101
- start with a verb so that we can read your commit message this way: "This commit will ...", where "..." is the commit message.
@@ -134,7 +146,7 @@ GitHub Actions will be triggered and push the package to [npm](https://www.npmjs
134146
Here are the steps to release a beta version of this package:
135147

136148
- Create a new branch originating the branch containing the "beta" changes. For example, if during the Meilisearch pre-release, create a branch originating `bump-meilisearch-v*.*.*`.<br>
137-
`vX.X.X` is the next version of the package, NOT the version of Meilisearch!
149+
`vX.X.X` is the next version of the package, NOT the version of Meilisearch!
138150

139151
```bash
140152
git checkout bump-meilisearch-v*.*.*
@@ -144,7 +156,6 @@ git checkout -b vX.X.X-beta.0
144156

145157
- Change the version in [`package.json`](/package.json) and commit it to the `beta` branch.
146158

147-
148159
- Go to the [GitHub interface for releasing](https://github.com/meilisearch/strapi-plugin-meilisearch/releases): on this page, click on `Draft a new release`.
149160

150161
- Create a GitHub pre-release:
@@ -158,6 +169,7 @@ git checkout -b vX.X.X-beta.0
158169
GitHub Actions will be triggered and push the beta version to [npm](https://www.npmjs.com/package/meilisearch).
159170

160171
💡 If you need to release a new beta for the same version (i.e. `vX.X.X-beta.1`):
172+
161173
- merge the change into `bump-meilisearch-v*.*.*`
162174
- rebase the `vX.X.X-beta.0` branch
163175
- change the version name in `package.json`

0 commit comments

Comments
 (0)