Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prep for Strapi v5 #133

Open
wants to merge 5 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
yarn test
82 changes: 37 additions & 45 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"description": "A plugin for Strapi CMS that adds a preview button and live view button to the content manager edit view.",
"license": "MIT",
"strapi": {
"displayName": "Preview Button",
"kind": "plugin",
"name": "preview-button",
"description": "Adds a preview button and live view button to the content manager edit view.",
"kind": "plugin"
"displayName": "Preview Button",
"description": "Adds a preview button and live view button to the content manager edit view."
},
"author": {
"name": "Matt Milburn",
Expand All @@ -20,75 +20,67 @@
}
],
"engines": {
"node": ">=16.0.0 <=20.x.x",
"node": ">=18.0.0 <=20.x.x",
"npm": ">=6.0.0"
},
"scripts": {
"prepare": "husky install",
"lint": "eslint --fix-dry-run --ext .js,.jsx,.ts,.tsx ./",
"lint:fix": "eslint --fix --ext .js,.jsx,.ts,.tsx ./",
"format": "prettier --check \"**/*.+(js|jsx|ts|tsx|json|css|md)\"",
"format:fix": "prettier --write \"**/*.+(js|jsx|ts|tsx|json|css|md)\"",
"lint": "eslint --fix-dry-run --ext .js,.jsx,.ts,.tsx ./",
"lint:fix": "eslint --fix --ext .js,.jsx,.ts,.tsx ./",
"prepare": "husky",
"test": "jest --testPathPattern='\\/__tests__\\/.*\\.(?:test|spec)\\.js$' --ci 2>&1"
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"prettier --check",
"eslint --fix-dry-run"
"yarn format",
"yarn lint"
]
},
"dependencies": {
"@strapi/design-system": "^1.17.0",
"@strapi/helper-plugin": "^5.0.0-alpha.2",
"@strapi/icons": "^1.17.0",
"@strapi/utils": "^5.0.0-beta.2",
"immer": "9.0.21",
"lodash": "4.17.21",
"qs": "6.12.0",
"react-copy-to-clipboard": "5.1.0",
"react-redux": "8.1.1"
"react-intl": "6.6.2",
"react-redux": "8.1.3",
"react-router-dom": "6.22.3"
},
"peerDependencies": {
"@strapi/design-system": "^1.9.0",
"@strapi/helper-plugin": "^4.13.1",
"@strapi/icons": "^1.9.0",
"@strapi/strapi": "^4.13.1",
"@strapi/utils": "^4.13.1",
"lodash": "4.17.21",
"@strapi/strapi": "^5.0.0-beta.2",
"prop-types": "^15.8.1",
"qs": "^6.11.0",
"react": "^18.0.0",
"react-intl": "^6.4.1",
"react-router-dom": "^5.3.4"
"react": "^18.0.0"
},
"devDependencies": {
"@babel/core": "7.22.9",
"@babel/eslint-parser": "7.22.9",
"@babel/preset-react": "7.22.5",
"@strapi/design-system": "^1.9.0",
"@strapi/helper-plugin": "^4.13.1",
"@strapi/icons": "^1.9.0",
"@strapi/strapi": "^4.13.1",
"@strapi/utils": "^4.13.1",
"@swc/core": "1.3.70",
"@swc/jest": "0.2.27",
"eslint": "8.45.0",
"@babel/core": "7.24.3",
"@babel/eslint-parser": "7.24.1",
"@babel/preset-react": "7.24.1",
"@strapi/strapi": "^5.0.0-beta.2",
"@swc/core": "1.4.8",
"@swc/jest": "0.2.36",
"eslint": "8.57.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-airbnb-base": "15.0.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jest": "27.2.3",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jest": "27.9.0",
"eslint-plugin-jest-formatting": "3.1.0",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-jsx-a11y": "6.8.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-react": "7.32.2",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-react": "7.34.1",
"eslint-plugin-react-hooks": "4.6.0",
"husky": "8.0.3",
"jest": "29.6.1",
"husky": "9.0.11",
"jest": "29.7.0",
"jest-junit": "16.0.0",
"lint-staged": "13.2.3",
"lodash": "4.17.21",
"lint-staged": "15.2.2",
"prettier": "2.8.8",
"prop-types": "^15.8.1",
"qs": "^6.11.0",
"react": "^18.0.0",
"react-intl": "^6.4.1",
"react-router-dom": "^5.3.4"
"react": "^18.0.0"
},
"repository": {
"type": "git",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { pluginId } = require('../utils');

module.exports = ({ strapi }) => ({
async get() {
const config = await strapi.config.get(`plugin.${pluginId}`, defaultConfig);
const config = await strapi.config.get(`plugin::${pluginId}`, defaultConfig);

return config;
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';

const pluginPkg = require('../../package.json');
const pluginPkg = require('../../../package.json');

module.exports = pluginPkg.strapi.name;
3 changes: 0 additions & 3 deletions strapi-admin.js

This file was deleted.

2 changes: 1 addition & 1 deletion strapi-server.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
'use strict';

module.exports = require('./server');
module.exports = require('./server/src');