From aeb593b78eac2c8bab426d89ed7bf101c6b468a1 Mon Sep 17 00:00:00 2001 From: Stuart Clark Date: Fri, 23 Aug 2024 14:21:28 +1000 Subject: [PATCH] chore: fix docs drupal and tests --- .circleci/config.yml | 2 +- docs/drupal/composer.json | 10 ++++++---- docs/drupal/composer.lock | 6 +++--- packages/router/src/components/DruxtRouter.vue | 2 +- packages/router/src/router.js | 4 ++-- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3194878ec..3ccf11d35 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -92,7 +92,7 @@ jobs: test_e2e: machine: - image: ubuntu-2204:edge + image: ubuntu-2204:current working_directory: ~/repo environment: DDEV_NONINTERACTIVE: "true" diff --git a/docs/drupal/composer.json b/docs/drupal/composer.json index 01464a551..f88fe718b 100644 --- a/docs/drupal/composer.json +++ b/docs/drupal/composer.json @@ -66,11 +66,13 @@ "web/themes/custom/{$name}": ["type:drupal-custom-theme"] }, "patches": { - "drupal/druxt": { - "https://www.drupal.org/project/druxt/issues/3273228": "https://git.drupalcode.org/project/druxt/-/merge_requests/9.diff" - }, "drupal/decoupled_router": { - "https://www.drupal.org/project/decoupled_router/issues/3111456": "https://git.drupalcode.org/project/decoupled_router/-/merge_requests/11.diff" + "https://www.drupal.org/project/decoupled_router/issues/3172926": "https://www.drupal.org/files/issues/2020-09-24/3172926-2.patch", + "https://www.drupal.org/project/decoupled_router/issues/3468825": "https://git.drupalcode.org/project/decoupled_router/-/merge_requests/20.diff" + }, + "drupal/druxt": { + "#3315030 - Add a wildcard route translator": "https://git.drupalcode.org/project/druxt/-/merge_requests/11.diff", + "https://www.drupal.org/project/druxt/issues/3467742": "https://git.drupalcode.org/project/druxt/-/merge_requests/14.diff" }, "drupal/jsonapi_menu_items": { "https://www.drupal.org/project/jsonapi_menu_items/issues/3192576": "https://www.drupal.org/files/issues/2023-02-10/3192576-18.patch" diff --git a/docs/drupal/composer.lock b/docs/drupal/composer.lock index f4e58fe1d..0312b5344 100644 --- a/docs/drupal/composer.lock +++ b/docs/drupal/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1a188460f9a24454a8d949f75cb61d0d", + "content-hash": "bde3874ac857a9b2ae1aeabd747a9cf0", "packages": [ { "name": "asm89/stack-cors", @@ -8699,12 +8699,12 @@ "version": "v5.2.13", "source": { "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", + "url": "https://github.com/jsonrainbow/json-schema.git", "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/fbbe7e5d79f618997bc3332a6f49246036c45793", + "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/fbbe7e5d79f618997bc3332a6f49246036c45793", "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793", "shasum": "" }, diff --git a/packages/router/src/components/DruxtRouter.vue b/packages/router/src/components/DruxtRouter.vue index 69bc18189..035469460 100644 --- a/packages/router/src/components/DruxtRouter.vue +++ b/packages/router/src/components/DruxtRouter.vue @@ -67,7 +67,7 @@ export default { const result = await store.dispatch('druxtRouter/get', route.fullPath) // Process redirect. - if (result.redirect) { + if (result?.redirect) { redirect(result.redirect) } }, diff --git a/packages/router/src/router.js b/packages/router/src/router.js index 7bafad20c..94cbbf16c 100644 --- a/packages/router/src/router.js +++ b/packages/router/src/router.js @@ -186,10 +186,10 @@ class DruxtRouter { * @returns {boolean|string} The redirect path or false. */ getRedirect (path, route = {}) { - const prefix = (route.props || {}).langcode || '' + const prefix = route.props?.langcode || '' // Redirect to route provided redirect. - if (((route.redirect || [])[0] || {}).to) { + if (route.redirect?.[0]?.to) { return route.redirect[0].to } const url = Url(path)