Merge branch 'releases/4.1.6'

This commit is contained in:
Alexandre Bodin 2022-03-31 15:52:49 +02:00
commit c21b662f44
37 changed files with 5962 additions and 804 deletions

View File

@ -1,6 +1,6 @@
{
"name": "check-pr-status",
"version": "4.1.5",
"version": "4.1.6",
"main": "dist/index.js",
"license": "MIT",
"private": true,

View File

@ -1,7 +1,7 @@
{
"name": "getstarted",
"private": true,
"version": "4.1.5",
"version": "4.1.6",
"description": "A Strapi application.",
"scripts": {
"develop": "strapi develop",
@ -12,23 +12,23 @@
"strapi": "strapi"
},
"dependencies": {
"@strapi/admin": "4.1.5",
"@strapi/plugin-documentation": "4.1.5",
"@strapi/plugin-graphql": "4.1.5",
"@strapi/plugin-i18n": "4.1.5",
"@strapi/plugin-sentry": "4.1.5",
"@strapi/plugin-users-permissions": "4.1.5",
"@strapi/provider-email-mailgun": "4.1.5",
"@strapi/provider-upload-aws-s3": "4.1.5",
"@strapi/provider-upload-cloudinary": "4.1.5",
"@strapi/strapi": "4.1.5",
"@strapi/utils": "4.1.5",
"@strapi/admin": "4.1.6",
"@strapi/plugin-documentation": "4.1.6",
"@strapi/plugin-graphql": "4.1.6",
"@strapi/plugin-i18n": "4.1.6",
"@strapi/plugin-sentry": "4.1.6",
"@strapi/plugin-users-permissions": "4.1.6",
"@strapi/provider-email-mailgun": "4.1.6",
"@strapi/provider-upload-aws-s3": "4.1.6",
"@strapi/provider-upload-cloudinary": "4.1.6",
"@strapi/strapi": "4.1.6",
"@strapi/utils": "4.1.6",
"@vscode/sqlite3": "5.0.8",
"better-sqlite3": "7.5.0",
"lodash": "4.17.21",
"mysql": "2.18.1",
"passport-google-oauth2": "0.2.0",
"pg": "8.6.0",
"better-sqlite3": "7.5.0",
"@vscode/sqlite3": "5.0.8",
"sqlite3": "5.0.2"
},
"strapi": {

View File

@ -1,7 +1,7 @@
{
"name": "kitchensink",
"private": true,
"version": "4.1.5",
"version": "4.1.6",
"description": "A Strapi application.",
"scripts": {
"develop": "strapi develop",
@ -12,12 +12,12 @@
"strapi": "strapi"
},
"dependencies": {
"@strapi/admin": "4.1.5",
"@strapi/provider-email-mailgun": "4.1.5",
"@strapi/provider-upload-aws-s3": "4.1.5",
"@strapi/provider-upload-cloudinary": "4.1.5",
"@strapi/strapi": "4.1.5",
"@strapi/utils": "4.1.5",
"@strapi/admin": "4.1.6",
"@strapi/provider-email-mailgun": "4.1.6",
"@strapi/provider-upload-aws-s3": "4.1.6",
"@strapi/provider-upload-cloudinary": "4.1.6",
"@strapi/strapi": "4.1.6",
"@strapi/utils": "4.1.6",
"lodash": "4.17.21",
"mysql": "2.18.1",
"passport-google-oauth2": "0.2.0",

View File

@ -1,5 +1,5 @@
{
"version": "4.1.5",
"version": "4.1.6",
"packages": [
"packages/*",
"examples/*"

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/admin-test-utils",
"version": "4.1.5",
"version": "4.1.6",
"private": true,
"description": "Test utilities for the Strapi administration panel",
"license": "MIT",

View File

@ -1,6 +1,6 @@
{
"name": "create-strapi-app",
"version": "4.1.5",
"version": "4.1.6",
"description": "Generate a new Strapi application.",
"keywords": [
"create-strapi-app",
@ -38,7 +38,7 @@
"test": "echo \"no tests yet\""
},
"dependencies": {
"@strapi/generate-new": "4.1.5",
"@strapi/generate-new": "4.1.6",
"commander": "6.1.0",
"inquirer": "8.2.0"
},

View File

@ -1,6 +1,6 @@
{
"name": "create-strapi-starter",
"version": "4.1.5",
"version": "4.1.6",
"description": "Generate a new Strapi application.",
"keywords": [
"create-strapi-starter",
@ -38,7 +38,7 @@
"test": "echo \"no tests yet\""
},
"dependencies": {
"@strapi/generate-new": "4.1.5",
"@strapi/generate-new": "4.1.6",
"chalk": "4.1.1",
"ci-info": "3.1.1",
"commander": "7.1.0",

View File

@ -16,7 +16,12 @@ export default function hasContent(type, content, metadatas, fieldSchema) {
return content.length > 0;
}
const value = content[mainFieldName];
const value = content?.[mainFieldName];
// relations, media ... show the id as fallback
if (mainFieldName === 'id' && ![undefined, null].includes(value)) {
return true;
}
/* The ID field reports itself as type `integer`, which makes it
impossible to distinguish it from other number fields.

View File

@ -50,8 +50,15 @@ describe('hasContent', () => {
});
});
describe('ID', () => {
it('returns true for id main fields', () => {
const normalizedContent = hasContent('media', { id: 1 });
expect(normalizedContent).toEqual(true);
});
});
describe('single component', () => {
it('extracts content from single components with content', () => {
it('extracts content with content', () => {
const normalizedContent = hasContent(
'component',
{ name: 'content', id: 1 },
@ -60,7 +67,7 @@ describe('hasContent', () => {
expect(normalizedContent).toEqual(true);
});
it('extracts content from single components without content', () => {
it('extracts content without content', () => {
const normalizedContent = hasContent(
'component',
{ name: '', id: 1 },
@ -69,7 +76,7 @@ describe('hasContent', () => {
expect(normalizedContent).toEqual(false);
});
it('extracts integers from single components with content', () => {
it('extracts integers with content', () => {
const normalizedContent = hasContent(
'component',
{ number: 1, id: 1 },
@ -78,7 +85,7 @@ describe('hasContent', () => {
expect(normalizedContent).toEqual(true);
});
it('extracts integers from single components without content', () => {
it('extracts integers without content', () => {
const normalizedContent = hasContent(
'component',
{ number: null, id: 1 },
@ -87,7 +94,7 @@ describe('hasContent', () => {
expect(normalizedContent).toEqual(false);
});
it('extracts float from single components with content', () => {
it('extracts float with content', () => {
const normalizedContent = hasContent(
'component',
{ number: 1.11, id: 1 },
@ -96,7 +103,7 @@ describe('hasContent', () => {
expect(normalizedContent).toEqual(true);
});
it('extracts float from single components without content', () => {
it('extracts float without content', () => {
const normalizedContent = hasContent(
'component',
{ number: null, id: 1 },
@ -105,7 +112,7 @@ describe('hasContent', () => {
expect(normalizedContent).toEqual(false);
});
it('extracts decimal from single components with content', () => {
it('extracts decimal with content', () => {
const normalizedContent = hasContent(
'component',
{ number: 1.11, id: 1 },
@ -114,7 +121,7 @@ describe('hasContent', () => {
expect(normalizedContent).toEqual(true);
});
it('extracts decimal from single components without content', () => {
it('extracts decimal without content', () => {
const normalizedContent = hasContent(
'component',
{ number: null, id: 1 },
@ -123,7 +130,7 @@ describe('hasContent', () => {
expect(normalizedContent).toEqual(false);
});
it('extracts biginteger from single components with content', () => {
it('extracts biginteger with content', () => {
const normalizedContent = hasContent(
'component',
{ number: '12345678901234567890', id: 1 },
@ -132,7 +139,7 @@ describe('hasContent', () => {
expect(normalizedContent).toEqual(true);
});
it('extracts biginteger from single components without content', () => {
it('extracts biginteger without content', () => {
const normalizedContent = hasContent(
'component',
{ number: null, id: 1 },
@ -140,10 +147,28 @@ describe('hasContent', () => {
);
expect(normalizedContent).toEqual(false);
});
it('does not fail if the attribute is not set', () => {
const normalizedContent = hasContent(
'component',
{ id: 1 },
{ mainField: { name: 'number', type: 'biginteger' } }
);
expect(normalizedContent).toEqual(false);
});
it('returns true id the main field is an id', () => {
const normalizedContent = hasContent(
'component',
{ id: 1 },
{ mainField: { name: 'id', type: 'integer' } }
);
expect(normalizedContent).toEqual(true);
});
});
describe('repeatable components', () => {
it('extracts content from repeatable components with content', () => {
it('extracts content with content', () => {
const normalizedContent = hasContent(
'component',
[{ name: 'content_2', value: 'truthy', id: 1 }],
@ -153,7 +178,7 @@ describe('hasContent', () => {
expect(normalizedContent).toEqual(true);
});
it('extracts content from repeatable components without content', () => {
it('extracts content without content', () => {
const normalizedContent = hasContent(
'component',
[{ name: 'content_2', value: '', id: 1 }],
@ -163,7 +188,7 @@ describe('hasContent', () => {
expect(normalizedContent).toEqual(true);
});
it('extracts content from repeatable components without content', () => {
it('extracts content without content', () => {
const normalizedContent = hasContent(
'component',
[{ id: 1 }, { id: 2 }],
@ -173,7 +198,7 @@ describe('hasContent', () => {
expect(normalizedContent).toEqual(true);
});
it('extracts content from repeatable components without content', () => {
it('extracts content without content', () => {
const normalizedContent = hasContent(
'component',
[],

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/admin",
"version": "4.1.5",
"version": "4.1.6",
"description": "Strapi Admin",
"repository": {
"type": "git",
@ -52,11 +52,11 @@
"@fortawesome/free-brands-svg-icons": "^5.15.3",
"@fortawesome/free-solid-svg-icons": "^5.15.3",
"@fortawesome/react-fontawesome": "^0.1.14",
"@strapi/babel-plugin-switch-ee-ce": "4.1.5",
"@strapi/babel-plugin-switch-ee-ce": "4.1.6",
"@strapi/design-system": "0.0.1-alpha.79",
"@strapi/helper-plugin": "4.1.5",
"@strapi/helper-plugin": "4.1.6",
"@strapi/icons": "0.0.1-alpha.79",
"@strapi/utils": "4.1.5",
"@strapi/utils": "4.1.6",
"axios": "0.24.0",
"babel-loader": "8.2.3",
"babel-plugin-styled-components": "2.0.2",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-content-manager",
"version": "4.1.5",
"version": "4.1.6",
"description": "A powerful UI to easily manage your data.",
"repository": {
"type": "git",
@ -24,7 +24,7 @@
},
"dependencies": {
"@sindresorhus/slugify": "1.1.0",
"@strapi/utils": "4.1.5",
"@strapi/utils": "4.1.6",
"lodash": "4.17.21"
},
"engines": {

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-content-type-builder",
"version": "4.1.5",
"version": "4.1.6",
"description": "Strapi plugin to create content type",
"repository": {
"type": "git",
@ -28,9 +28,9 @@
},
"dependencies": {
"@sindresorhus/slugify": "1.1.0",
"@strapi/generators": "4.1.5",
"@strapi/helper-plugin": "4.1.5",
"@strapi/utils": "4.1.5",
"@strapi/generators": "4.1.6",
"@strapi/helper-plugin": "4.1.6",
"@strapi/utils": "4.1.6",
"fs-extra": "10.0.0",
"lodash": "4.17.21",
"pluralize": "^8.0.0",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/database",
"version": "4.1.5",
"version": "4.1.6",
"description": "Strapi's database layer",
"homepage": "https://strapi.io",
"bugs": {

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-email",
"version": "4.1.5",
"version": "4.1.6",
"description": "Easily configure your Strapi application to send emails.",
"repository": {
"type": "git",
@ -26,12 +26,12 @@
"test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
},
"dependencies": {
"@strapi/provider-email-sendmail": "4.1.5",
"@strapi/utils": "4.1.5",
"@strapi/provider-email-sendmail": "4.1.6",
"@strapi/utils": "4.1.6",
"lodash": "4.17.21"
},
"devDependencies": {
"@strapi/helper-plugin": "4.1.5"
"@strapi/helper-plugin": "4.1.6"
},
"engines": {
"node": ">=12.22.0 <=16.x.x",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/helper-plugin",
"version": "4.1.5",
"version": "4.1.6",
"description": "Helper for Strapi plugins development",
"repository": {
"type": "git",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/strapi",
"version": "4.1.5",
"version": "4.1.6",
"description": "An open source headless CMS solution to create and manage your own API. It provides a powerful dashboard and features to make your life easier. Databases supported: MySQL, MariaDB, PostgreSQL, SQLite",
"keywords": [
"strapi",
@ -80,16 +80,16 @@
"dependencies": {
"@koa/cors": "3.1.0",
"@koa/router": "10.1.1",
"@strapi/admin": "4.1.5",
"@strapi/database": "4.1.5",
"@strapi/generate-new": "4.1.5",
"@strapi/generators": "4.1.5",
"@strapi/logger": "4.1.5",
"@strapi/plugin-content-manager": "4.1.5",
"@strapi/plugin-content-type-builder": "4.1.5",
"@strapi/plugin-email": "4.1.5",
"@strapi/plugin-upload": "4.1.5",
"@strapi/utils": "4.1.5",
"@strapi/admin": "4.1.6",
"@strapi/database": "4.1.6",
"@strapi/generate-new": "4.1.6",
"@strapi/generators": "4.1.6",
"@strapi/logger": "4.1.6",
"@strapi/plugin-content-manager": "4.1.6",
"@strapi/plugin-content-type-builder": "4.1.6",
"@strapi/plugin-email": "4.1.6",
"@strapi/plugin-upload": "4.1.6",
"@strapi/utils": "4.1.6",
"bcryptjs": "2.4.3",
"boxen": "5.1.2",
"chalk": "4.1.2",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-upload",
"version": "4.1.5",
"version": "4.1.6",
"description": "Makes it easy to upload images and files to your Strapi Application.",
"license": "SEE LICENSE IN LICENSE",
"author": {
@ -23,9 +23,9 @@
"test:front:watch:ce": "cross-env IS_EE=false jest --config ./jest.config.front.js --watchAll"
},
"dependencies": {
"@strapi/helper-plugin": "4.1.5",
"@strapi/provider-upload-local": "4.1.5",
"@strapi/utils": "4.1.5",
"@strapi/helper-plugin": "4.1.6",
"@strapi/provider-upload-local": "4.1.6",
"@strapi/utils": "4.1.6",
"byte-size": "7.0.1",
"cropperjs": "1.5.11",
"fs-extra": "10.0.0",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/utils",
"version": "4.1.5",
"version": "4.1.6",
"description": "Shared utilities for the Strapi packages",
"keywords": [
"strapi",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/generate-new",
"version": "4.1.5",
"version": "4.1.6",
"description": "Generate a new Strapi application.",
"keywords": [
"generate",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/generators",
"version": "4.1.5",
"version": "4.1.6",
"description": "Interactive API generator.",
"keywords": [
"strapi",
@ -30,7 +30,7 @@
"main": "lib/index.js",
"dependencies": {
"@sindresorhus/slugify": "1.1.0",
"@strapi/utils": "4.1.5",
"@strapi/utils": "4.1.6",
"chalk": "4.1.2",
"fs-extra": "10.0.0",
"node-plop": "0.26.3",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-documentation",
"version": "4.1.5",
"version": "4.1.6",
"description": "Create an OpenAPI Document and visualize your API with SWAGGER UI.",
"repository": {
"type": "git",
@ -24,8 +24,8 @@
"test": "echo \"no tests yet\""
},
"dependencies": {
"@strapi/helper-plugin": "4.1.5",
"@strapi/utils": "4.1.5",
"@strapi/helper-plugin": "4.1.6",
"@strapi/utils": "4.1.6",
"bcryptjs": "2.4.3",
"cheerio": "^1.0.0-rc.5",
"fs-extra": "10.0.0",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-graphql",
"version": "4.1.5",
"version": "4.1.6",
"description": "Adds GraphQL endpoint with default API methods.",
"repository": {
"type": "git",
@ -30,7 +30,7 @@
"@apollo/federation": "^0.28.0",
"@graphql-tools/schema": "8.1.2",
"@graphql-tools/utils": "^8.0.2",
"@strapi/utils": "4.1.5",
"@strapi/utils": "4.1.6",
"apollo-server-core": "3.1.2",
"apollo-server-koa": "3.1.2",
"glob": "^7.1.7",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-i18n",
"version": "4.1.5",
"version": "4.1.6",
"description": "This plugin enables to create, to read and to update content in different languages, both from the Admin Panel and from the API",
"repository": {
"type": "git",
@ -24,7 +24,7 @@
"test:unit": "jest --verbose"
},
"dependencies": {
"@strapi/utils": "4.1.5",
"@strapi/utils": "4.1.6",
"lodash": "4.17.21"
},
"engines": {

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-sentry",
"version": "4.1.5",
"version": "4.1.6",
"description": "Send Strapi error events to Sentry",
"repository": {
"type": "git",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/plugin-users-permissions",
"version": "4.1.5",
"version": "4.1.6",
"description": "Protect your API with a full-authentication process based on JWT",
"repository": {
"type": "git",
@ -28,8 +28,8 @@
},
"dependencies": {
"@purest/providers": "^1.0.2",
"@strapi/helper-plugin": "4.1.5",
"@strapi/utils": "4.1.5",
"@strapi/helper-plugin": "4.1.6",
"@strapi/utils": "4.1.6",
"bcryptjs": "2.4.3",
"grant-koa": "5.4.8",
"jsonwebtoken": "^8.1.0",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/provider-email-amazon-ses",
"version": "4.1.5",
"version": "4.1.6",
"description": "Amazon SES provider for strapi email",
"keywords": [
"email",
@ -36,7 +36,7 @@
"test": "echo \"no tests yet\""
},
"dependencies": {
"@strapi/utils": "4.1.5",
"@strapi/utils": "4.1.6",
"node-ses": "^3.0.3"
},
"engines": {

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/provider-email-mailgun",
"version": "4.1.5",
"version": "4.1.6",
"description": "Mailgun provider for strapi email plugin",
"keywords": [
"email",
@ -36,7 +36,7 @@
"test": "echo \"no tests yet\""
},
"dependencies": {
"@strapi/utils": "4.1.5",
"@strapi/utils": "4.1.6",
"mailgun-js": "0.22.0"
},
"engines": {

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/provider-email-nodemailer",
"version": "4.1.5",
"version": "4.1.6",
"description": "Nodemailer provider for Strapi 3",
"keywords": [
"strapi",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/provider-email-sendgrid",
"version": "4.1.5",
"version": "4.1.6",
"description": "Sendgrid provider for strapi email",
"keywords": [
"email",
@ -37,7 +37,7 @@
},
"dependencies": {
"@sendgrid/mail": "7.4.7",
"@strapi/utils": "4.1.5"
"@strapi/utils": "4.1.6"
},
"engines": {
"node": ">=12.22.0 <=16.x.x",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/provider-email-sendmail",
"version": "4.1.5",
"version": "4.1.6",
"description": "Sendmail provider for strapi email",
"keywords": [
"email",
@ -35,7 +35,7 @@
"test": "echo \"no tests yet\""
},
"dependencies": {
"@strapi/utils": "4.1.5",
"@strapi/utils": "4.1.6",
"sendmail": "^1.6.1"
},
"engines": {

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/provider-upload-aws-s3",
"version": "4.1.5",
"version": "4.1.6",
"description": "AWS S3 provider for strapi upload",
"keywords": [
"upload",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/provider-upload-cloudinary",
"version": "4.1.5",
"version": "4.1.6",
"description": "Cloudinary provider for strapi upload",
"keywords": [
"upload",
@ -36,7 +36,7 @@
"test": "echo \"no tests yet\""
},
"dependencies": {
"@strapi/utils": "4.1.5",
"@strapi/utils": "4.1.6",
"cloudinary": "^1.25.1",
"into-stream": "^5.1.0"
},

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/provider-upload-local",
"version": "4.1.5",
"version": "4.1.6",
"description": "Local provider for strapi upload",
"keywords": [
"upload",
@ -35,7 +35,7 @@
"test": "echo \"no tests yet\""
},
"dependencies": {
"@strapi/utils": "4.1.5",
"@strapi/utils": "4.1.6",
"fs-extra": "10.0.0"
},
"engines": {

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/provider-upload-rackspace",
"version": "4.1.5",
"version": "4.1.6",
"description": "Rackspace provider for strapi upload",
"repository": {
"type": "git",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/babel-plugin-switch-ee-ce",
"version": "4.1.5",
"version": "4.1.6",
"private": false,
"description": "Babel plugin to switch from CE to EE at runtime",
"repository": "git://github.com/strapi/strapi.git",

View File

@ -1,6 +1,6 @@
{
"name": "@strapi/logger",
"version": "4.1.5",
"version": "4.1.6",
"description": "Strapi's logger",
"homepage": "https://strapi.io",
"bugs": {

6524
yarn.lock

File diff suppressed because it is too large Load Diff