Skip to content

Commit

Permalink
Merge branch 'releases/4.8.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandrebodin committed Mar 15, 2023
2 parents 1b6a692 + b3cb13c commit 2ec4bf2
Show file tree
Hide file tree
Showing 45 changed files with 166 additions and 116 deletions.
2 changes: 1 addition & 1 deletion .github/actions/check-pr-status/package.json
@@ -1,6 +1,6 @@
{
"name": "check-pr-status",
"version": "4.8.0",
"version": "4.8.1",
"main": "dist/index.js",
"license": "MIT",
"private": true,
Expand Down
22 changes: 11 additions & 11 deletions examples/getstarted/package.json
@@ -1,7 +1,7 @@
{
"name": "getstarted",
"private": true,
"version": "4.8.0",
"version": "4.8.1",
"description": "A Strapi application.",
"scripts": {
"develop": "strapi develop",
Expand All @@ -13,16 +13,16 @@
},
"dependencies": {
"@strapi/icons": "1.6.5",
"@strapi/plugin-color-picker": "4.8.0",
"@strapi/plugin-documentation": "4.8.0",
"@strapi/plugin-graphql": "4.8.0",
"@strapi/plugin-i18n": "4.8.0",
"@strapi/plugin-sentry": "4.8.0",
"@strapi/plugin-users-permissions": "4.8.0",
"@strapi/provider-email-mailgun": "4.8.0",
"@strapi/provider-upload-aws-s3": "4.8.0",
"@strapi/provider-upload-cloudinary": "4.8.0",
"@strapi/strapi": "4.8.0",
"@strapi/plugin-color-picker": "4.8.1",
"@strapi/plugin-documentation": "4.8.1",
"@strapi/plugin-graphql": "4.8.1",
"@strapi/plugin-i18n": "4.8.1",
"@strapi/plugin-sentry": "4.8.1",
"@strapi/plugin-users-permissions": "4.8.1",
"@strapi/provider-email-mailgun": "4.8.1",
"@strapi/provider-upload-aws-s3": "4.8.1",
"@strapi/provider-upload-cloudinary": "4.8.1",
"@strapi/strapi": "4.8.1",
"@vscode/sqlite3": "5.1.2",
"better-sqlite3": "8.0.1",
"lodash": "4.17.21",
Expand Down
8 changes: 4 additions & 4 deletions examples/kitchensink-ts/package.json
@@ -1,7 +1,7 @@
{
"name": "kitchensink-ts",
"private": true,
"version": "4.8.0",
"version": "4.8.1",
"description": "A Strapi application",
"scripts": {
"develop": "strapi develop",
Expand All @@ -10,9 +10,9 @@
"strapi": "strapi"
},
"dependencies": {
"@strapi/plugin-i18n": "4.8.0",
"@strapi/plugin-users-permissions": "4.8.0",
"@strapi/strapi": "4.8.0",
"@strapi/plugin-i18n": "4.8.1",
"@strapi/plugin-users-permissions": "4.8.1",
"@strapi/strapi": "4.8.1",
"better-sqlite3": "8.0.1"
},
"author": {
Expand Down
10 changes: 5 additions & 5 deletions examples/kitchensink/package.json
@@ -1,7 +1,7 @@
{
"name": "kitchensink",
"private": true,
"version": "4.8.0",
"version": "4.8.1",
"description": "A Strapi application.",
"scripts": {
"develop": "strapi develop",
Expand All @@ -12,10 +12,10 @@
"strapi": "strapi"
},
"dependencies": {
"@strapi/provider-email-mailgun": "4.8.0",
"@strapi/provider-upload-aws-s3": "4.8.0",
"@strapi/provider-upload-cloudinary": "4.8.0",
"@strapi/strapi": "4.8.0",
"@strapi/provider-email-mailgun": "4.8.1",
"@strapi/provider-upload-aws-s3": "4.8.1",
"@strapi/provider-upload-cloudinary": "4.8.1",
"@strapi/strapi": "4.8.1",
"lodash": "4.17.21",
"mysql": "2.18.1",
"passport-google-oauth2": "0.2.0",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
@@ -1,5 +1,5 @@
{
"version": "4.8.0",
"version": "4.8.1",
"packages": [
"packages/*",
"examples/*"
Expand Down
2 changes: 1 addition & 1 deletion packages/admin-test-utils/package.json
@@ -1,6 +1,6 @@
{
"name": "@strapi/admin-test-utils",
"version": "4.8.0",
"version": "4.8.1",
"private": true,
"description": "Test utilities for the Strapi administration panel",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/create-strapi-app/package.json
@@ -1,9 +1,9 @@
{
"name": "create-strapi-app",
"version": "4.8.0",
"version": "4.8.1",
"description": "Generate a new Strapi application.",
"dependencies": {
"@strapi/generate-new": "4.8.0",
"@strapi/generate-new": "4.8.1",
"commander": "8.3.0",
"inquirer": "8.2.5"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/create-strapi-starter/package.json
@@ -1,6 +1,6 @@
{
"name": "create-strapi-starter",
"version": "4.8.0",
"version": "4.8.1",
"description": "Generate a new Strapi application.",
"keywords": [
"create-strapi-starter",
Expand Down Expand Up @@ -38,7 +38,7 @@
"test": "echo \"no tests yet\""
},
"dependencies": {
"@strapi/generate-new": "4.8.0",
"@strapi/generate-new": "4.8.1",
"chalk": "4.1.2",
"ci-info": "3.8.0",
"commander": "8.3.0",
Expand Down
16 changes: 8 additions & 8 deletions packages/core/admin/package.json
@@ -1,6 +1,6 @@
{
"name": "@strapi/admin",
"version": "4.8.0",
"version": "4.8.1",
"description": "Strapi Admin",
"repository": {
"type": "git",
Expand Down Expand Up @@ -46,15 +46,15 @@
"@casl/ability": "^5.4.3",
"@fingerprintjs/fingerprintjs": "3.3.6",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.10",
"@strapi/babel-plugin-switch-ee-ce": "4.8.0",
"@strapi/data-transfer": "4.8.0",
"@strapi/babel-plugin-switch-ee-ce": "4.8.1",
"@strapi/data-transfer": "4.8.1",
"@strapi/design-system": "1.6.5",
"@strapi/helper-plugin": "4.8.0",
"@strapi/helper-plugin": "4.8.1",
"@strapi/icons": "1.6.5",
"@strapi/permissions": "4.8.0",
"@strapi/provider-audit-logs-local": "4.8.0",
"@strapi/typescript-utils": "4.8.0",
"@strapi/utils": "4.8.0",
"@strapi/permissions": "4.8.1",
"@strapi/provider-audit-logs-local": "4.8.1",
"@strapi/typescript-utils": "4.8.1",
"@strapi/utils": "4.8.1",
"axios": "1.2.2",
"babel-loader": "^9.1.2",
"babel-plugin-styled-components": "2.0.2",
Expand Down
33 changes: 33 additions & 0 deletions packages/core/admin/server/controllers/__tests__/user.test.js
Expand Up @@ -174,13 +174,29 @@ describe('User Controller', () => {
pagination,
}));

const state = {
userAbility: {
can: jest.fn(),
cannot: jest.fn(() => false),
},
};

const sanitizeUser = jest.fn((user) => user);
const ctx = createContext({});
ctx.state = state;

const createPermissionsManager = jest.fn(() => ({
ability: state.userAbility,
sanitizeQuery: (query) => query,
}));

global.strapi = {
admin: {
services: {
user: { findPage, sanitizeUser },
permission: {
createPermissionsManager,
},
},
},
};
Expand All @@ -199,13 +215,30 @@ describe('User Controller', () => {
pagination,
}));

const state = {
userAbility: {
can: jest.fn(),
cannot: jest.fn(() => false),
},
};

const sanitizeUser = jest.fn((user) => user);
const ctx = createContext({ query: { _q: 'foo' } });

ctx.state = state;

const createPermissionsManager = jest.fn(() => ({
ability: state.userAbility,
sanitizeQuery: (query) => query,
}));

global.strapi = {
admin: {
services: {
user: { findPage, sanitizeUser },
permission: {
createPermissionsManager,
},
},
},
};
Expand Down
2 changes: 1 addition & 1 deletion packages/core/admin/server/tests/admin-user.test.api.js
Expand Up @@ -379,7 +379,7 @@ describe('Admin User CRUD (api)', () => {
method: 'GET',
qs: {
filters: {
email: testData.user.email,
username: testData.user.username,
},
},
});
Expand Down
4 changes: 2 additions & 2 deletions packages/core/content-manager/package.json
@@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-content-manager",
"version": "4.8.0",
"version": "4.8.1",
"description": "A powerful UI to easily manage your data.",
"repository": {
"type": "git",
Expand All @@ -24,7 +24,7 @@
},
"dependencies": {
"@sindresorhus/slugify": "1.1.0",
"@strapi/utils": "4.8.0",
"@strapi/utils": "4.8.1",
"lodash": "4.17.21"
},
"engines": {
Expand Down
Expand Up @@ -23,6 +23,9 @@ describe('Single Types', () => {
create: jest.fn(() => false),
},
buildReadQuery: jest.fn((query) => query),
sanitizedQuery: {
read: (q) => q,
},
};

global.strapi = {
Expand Down Expand Up @@ -101,6 +104,9 @@ describe('Single Types', () => {
sanitizeCreateInput: (obj) => obj,
sanitizeOutput: (obj) => obj,
buildReadQuery: jest.fn((query) => query),
sanitizedQuery: {
update: (q) => q,
},
};

const createFn = jest.fn(() => ({}));
Expand Down Expand Up @@ -215,6 +221,9 @@ describe('Single Types', () => {
},
sanitizeOutput: jest.fn((obj) => obj),
buildReadQuery: jest.fn((query) => query),
sanitizedQuery: {
delete: (q) => q,
},
};

const deleteFn = jest.fn(() => ({}));
Expand Down Expand Up @@ -309,6 +318,9 @@ describe('Single Types', () => {
},
sanitizeOutput: jest.fn((obj) => obj),
buildReadQuery: jest.fn((query) => query),
sanitizedQuery: {
publish: (q) => q,
},
};

const publishFn = jest.fn(() => ({}));
Expand Down Expand Up @@ -403,6 +415,9 @@ describe('Single Types', () => {
},
sanitizeOutput: jest.fn((obj) => obj),
buildReadQuery: jest.fn((query) => query),
sanitizedQuery: {
unpublish: (q) => q,
},
};

const unpublishFn = jest.fn(() => ({}));
Expand Down
Expand Up @@ -64,7 +64,7 @@ const createPermissionChecker =

// Sanitized queries shortcuts
Object.keys(ACTIONS).forEach((action) => {
sanitizedQuery[action] = (query) => sanitizedQuery(query, action);
sanitizedQuery[action] = (query) => sanitizedQuery(query, ACTIONS[action]);
});

// Permission utils shortcuts
Expand Down
12 changes: 6 additions & 6 deletions packages/core/content-type-builder/package.json
@@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-content-type-builder",
"version": "4.8.0",
"version": "4.8.1",
"description": "Strapi plugin to create content type",
"repository": {
"type": "git",
Expand Down Expand Up @@ -29,11 +29,11 @@
"dependencies": {
"@sindresorhus/slugify": "1.1.0",
"@strapi/design-system": "1.6.5",
"@strapi/generators": "4.8.0",
"@strapi/helper-plugin": "4.8.0",
"@strapi/generators": "4.8.1",
"@strapi/helper-plugin": "4.8.1",
"@strapi/icons": "1.6.5",
"@strapi/strapi": "4.8.0",
"@strapi/utils": "4.8.0",
"@strapi/strapi": "4.8.1",
"@strapi/utils": "4.8.1",
"fs-extra": "10.0.0",
"immer": "9.0.19",
"lodash": "4.17.21",
Expand All @@ -49,7 +49,7 @@
"yup": "^0.32.9"
},
"devDependencies": {
"@strapi/admin": "4.8.0",
"@strapi/admin": "4.8.1",
"@testing-library/react": "12.1.4",
"@testing-library/react-hooks": "8.0.1",
"history": "^4.9.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/core/data-transfer/package.json
@@ -1,6 +1,6 @@
{
"name": "@strapi/data-transfer",
"version": "4.8.0",
"version": "4.8.1",
"description": "Data transfer capabilities for Strapi",
"keywords": [
"strapi",
Expand Down Expand Up @@ -39,8 +39,8 @@
"lib": "./lib"
},
"dependencies": {
"@strapi/logger": "4.8.0",
"@strapi/strapi": "4.8.0",
"@strapi/logger": "4.8.1",
"@strapi/strapi": "4.8.1",
"chalk": "4.1.2",
"fs-extra": "10.0.0",
"lodash": "4.17.21",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/database/package.json
@@ -1,6 +1,6 @@
{
"name": "@strapi/database",
"version": "4.8.0",
"version": "4.8.1",
"description": "Strapi's database layer",
"homepage": "https://strapi.io",
"bugs": {
Expand Down
8 changes: 4 additions & 4 deletions packages/core/email/package.json
@@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-email",
"version": "4.8.0",
"version": "4.8.1",
"description": "Easily configure your Strapi application to send emails.",
"repository": {
"type": "git",
Expand Down Expand Up @@ -28,15 +28,15 @@
"dependencies": {
"@strapi/design-system": "1.6.5",
"@strapi/icons": "1.6.5",
"@strapi/provider-email-sendmail": "4.8.0",
"@strapi/utils": "4.8.0",
"@strapi/provider-email-sendmail": "4.8.1",
"@strapi/utils": "4.8.1",
"lodash": "4.17.21",
"prop-types": "^15.7.2",
"react-intl": "6.2.8",
"yup": "^0.32.9"
},
"devDependencies": {
"@strapi/helper-plugin": "4.8.0",
"@strapi/helper-plugin": "4.8.1",
"@testing-library/react": "12.1.4",
"msw": "1.0.0",
"react": "^17.0.2",
Expand Down

0 comments on commit 2ec4bf2

Please sign in to comment.