From 13b256dd86ad0c20d7684437992b6ed74eb8ea69 Mon Sep 17 00:00:00 2001 From: Alex Ford Date: Wed, 5 Apr 2023 10:50:29 +0100 Subject: [PATCH 1/3] Fix 'preceding' typo --- .../core/content-type-builder/admin/src/translations/en.json | 2 +- packages/core/strapi/lib/core/domain/content-type/validator.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/content-type-builder/admin/src/translations/en.json b/packages/core/content-type-builder/admin/src/translations/en.json index 8718ec2e3d..b47b776e81 100644 --- a/packages/core/content-type-builder/admin/src/translations/en.json +++ b/packages/core/content-type-builder/admin/src/translations/en.json @@ -60,7 +60,7 @@ "error.contentTypeName.reserved-name": "This name cannot be used in your project as it might break other functionalities", "error.validation.enum-duplicate": "Duplicate values are not allowed (only alphanumeric characters are taken into account).", "error.validation.enum-empty-string": "Empty strings are not allowed", - "error.validation.enum-regex": "At least one value is invalid. Values should have at least one alphabetical character preceeding the first occurence of a number.", + "error.validation.enum-regex": "At least one value is invalid. Values should have at least one alphabetical character preceding the first occurence of a number.", "error.validation.minSupMax": "Can't be superior", "error.validation.positive": "Must be a positive number", "error.validation.regex": "Regex pattern is invalid", diff --git a/packages/core/strapi/lib/core/domain/content-type/validator.js b/packages/core/strapi/lib/core/domain/content-type/validator.js index 85f248dd79..487cb9f482 100644 --- a/packages/core/strapi/lib/core/domain/content-type/validator.js +++ b/packages/core/strapi/lib/core/domain/content-type/validator.js @@ -61,7 +61,7 @@ const contentTypeSchemaValidator = yup.object().shape({ // should match the GraphQL regex if (!regressedValues.every((value) => GRAPHQL_ENUM_REGEX.test(value))) { - const message = `Invalid enumeration value. Values should have at least one alphabetical character preceeding the first occurence of a number. Update your enumeration '${attrName}'.`; + const message = `Invalid enumeration value. Values should have at least one alphabetical character preceding the first occurence of a number. Update your enumeration '${attrName}'.`; return this.createError({ message }); } From 5bb143b23de94ee6cdb34561898ffe52d74d482d Mon Sep 17 00:00:00 2001 From: Josh <37798644+joshuaellis@users.noreply.github.com> Date: Wed, 12 Apr 2023 11:06:26 +0100 Subject: [PATCH 2/3] chore: only use node 18 for lint --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 93e1fdc4dd..ff42dc63c1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [14, 16, 18] + node: [18] steps: - uses: actions/checkout@v3 with: From 8d6c3d4cad5f1ffdd36e08424cf42d7f6b745231 Mon Sep 17 00:00:00 2001 From: Marc-Roig Date: Fri, 14 Apr 2023 18:25:42 +0200 Subject: [PATCH 3/3] fix: clear transaction context just before committing --- packages/core/database/lib/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/database/lib/index.js b/packages/core/database/lib/index.js index f85e4ce873..c76581278c 100644 --- a/packages/core/database/lib/index.js +++ b/packages/core/database/lib/index.js @@ -57,15 +57,15 @@ class Database { async function commit() { if (notNestedTransaction) { - await trx.commit(); transactionCtx.clear(); + await trx.commit(); } } async function rollback() { if (notNestedTransaction) { - await trx.rollback(); transactionCtx.clear(); + await trx.rollback(); } }