diff --git a/.github/workflows/build_deploy_and_test.yml b/.github/workflows/build_deploy_and_test.yml index 94fab7ee2d..aeb90ae9ef 100644 --- a/.github/workflows/build_deploy_and_test.yml +++ b/.github/workflows/build_deploy_and_test.yml @@ -7,7 +7,7 @@ defaults: run: shell: bash env: - TZ: "/usr/share/zoneinfo/America/Los_Angeles" + TZ: '/usr/share/zoneinfo/America/Los_Angeles' TERM: dumb ADMIN_EMAIL: ${{ secrets.ADMIN_EMAIL }} ADMIN_PASSWORD: ${{ secrets.ADMIN_PASSWORD }} @@ -86,7 +86,7 @@ jobs: options: --user root runs-on: ubuntu-latest env: - YALESITES_BUILD_TOKEN: ${{ secrets.YALESITES_BUILD_TOKEN }} + YALESITES_BUILD_TOKEN: ${{ secrets.YALESITES_BUILD_TOKEN }} steps: - name: Checkout uses: actions/checkout@v4 @@ -145,7 +145,7 @@ jobs: # Workaround for https://github.com/actions/runner/issues/2033 - name: Set git safe.directory run: | - git config --global --add safe.directory "$GITHUB_WORKSPACE" + git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Set bash_env env var run: echo BASH_ENV=${RUNNER_TEMP}/bash_env.txt >> $GITHUB_ENV @@ -194,11 +194,11 @@ jobs: # https://github.com/pantheon-systems/docker-build-tools-ci/blob/6.x/scripts/set-environment - name: setup-environment-vars run: /build-tools-ci/scripts/set-environment - + - name: Use Node.js uses: actions/setup-node@v4 with: - node-version: '16.13' + node-version: '20' - name: build frontend components env: diff --git a/.nvmrc b/.nvmrc index 7da30cba76..48b14e6b2b 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16.13 +20.14.0 diff --git a/composer.json b/composer.json index 5924d1a218..f25533d75a 100644 --- a/composer.json +++ b/composer.json @@ -70,7 +70,9 @@ "[project-root]/.gitattributes": false } }, - "installer-types": ["npm-asset"], + "installer-types": [ + "npm-asset" + ], "installer-paths": { "web/core": [ "type:drupal-core" @@ -127,7 +129,8 @@ "drupal/core-project-message": true, "phpstan/extension-installer": true, "drupal/console-extend-plugin": true, - "php-http/discovery": true + "php-http/discovery": true, + "tbachert/spi": true } }, "scripts": { @@ -138,14 +141,14 @@ "prepare-for-pantheon": "DrupalProject\\composer\\ScriptHandler::prepareForPantheon", "unit-test": "echo 'No unit test step defined.'", "code-sniff": [ - ".\/vendor\/bin\/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,info,txt --colors --ignore=node_modules,bower_components,vendor .\/web\/modules\/custom .\/web\/themes\/custom .\/web\/profiles\/custom", - ".\/vendor\/bin\/phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt --colors --ignore=node_modules,bower_components,vendor .\/web\/modules\/custom .\/web\/themes\/custom .\/web\/profiles\/custom" + "./vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,info,txt --colors --ignore=node_modules,bower_components,vendor ./web/modules/custom ./web/themes/custom ./web/profiles/custom", + "./vendor/bin/phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt --colors --ignore=node_modules,bower_components,vendor ./web/modules/custom ./web/themes/custom ./web/profiles/custom" ], "code-fix": [ - ".\/vendor\/bin\/phpcbf --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,info,txt --colors --ignore=node_modules,bower_components,vendor .\/web\/modules\/custom .\/web\/themes\/custom .\/web\/profiles\/custom", - ".\/vendor\/bin\/phpcbf --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt --colors --ignore=node_modules,bower_components,vendor .\/web\/modules\/custom .\/web\/themes\/custom .\/web\/profiles\/custom" + "./vendor/bin/phpcbf --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,info,txt --colors --ignore=node_modules,bower_components,vendor ./web/modules/custom ./web/themes/custom ./web/profiles/custom", + "./vendor/bin/phpcbf --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt --colors --ignore=node_modules,bower_components,vendor ./web/modules/custom ./web/themes/custom ./web/profiles/custom" ], - "lint:php": ".\/.ci/test/static/lint_php", + "lint:php": "./.ci/test/static/lint_php", "post-install-cmd": [ "DrupalProject\\composer\\ScriptHandler::createRequiredFiles" ], diff --git a/package.json b/package.json index 80d6aafe54..d7a641e605 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "devDependencies": { "@saithodev/semantic-release-backmerge": "^4.0.1", "@semantic-release/git": "^10.0.1", - "@yalesites-org/eslint-config-and-other-formatting": "^1.5.0", + "@yalesites-org/eslint-config-and-other-formatting": "^1.20.0", "eslint-config-drupal": "^5.0.2", "eslint-plugin-jsx-a11y": "^6.5.1", "eslint-plugin-react": "^7.29.4", @@ -92,7 +92,9 @@ [ "@saithodev/semantic-release-backmerge", { - "backmergeBranches": ["develop"], + "backmergeBranches": [ + "develop" + ], "backmergeStrategy": "merge" } ], diff --git a/web/profiles/custom/yalesites_profile/config/sync/config_ignore.settings.yml b/web/profiles/custom/yalesites_profile/config/sync/config_ignore.settings.yml index 5837ade671..135a826d86 100644 --- a/web/profiles/custom/yalesites_profile/config/sync/config_ignore.settings.yml +++ b/web/profiles/custom/yalesites_profile/config/sync/config_ignore.settings.yml @@ -8,5 +8,6 @@ ignored_config_entities: - 'ys_alert.settings:alert' - 'ys_core*' - 'ys_localist*' + - 'ai_engine*' + - 'ys_servicenow*' - ys_themes.theme_settings - - 'ys_servicenow*' \ No newline at end of file diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_alert/ys_alert.info.yml b/web/profiles/custom/yalesites_profile/modules/custom/ys_alert/ys_alert.info.yml index 7bb304b09d..6d2d53e697 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_alert/ys_alert.info.yml +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_alert/ys_alert.info.yml @@ -7,3 +7,4 @@ configure: ys_alert.settings dependencies: - drupal:block - ys_core + - maxlength diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.info.yml b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.info.yml index 4f6bef2220..ad7b9c185b 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.info.yml +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_core/ys_core.info.yml @@ -6,3 +6,4 @@ package: YaleSites dependencies: - multivalue_form_element - media_library_form_element + - role_delegation diff --git a/web/profiles/custom/yalesites_profile/modules/custom/ys_views_basic/src/ViewsBasicManager.php b/web/profiles/custom/yalesites_profile/modules/custom/ys_views_basic/src/ViewsBasicManager.php index e885f1060e..08cc1a38a2 100644 --- a/web/profiles/custom/yalesites_profile/modules/custom/ys_views_basic/src/ViewsBasicManager.php +++ b/web/profiles/custom/yalesites_profile/modules/custom/ys_views_basic/src/ViewsBasicManager.php @@ -446,10 +446,12 @@ public function getView($type, $params) { // This ensures that if the options for showing categories, tags, // or thumbnails change, the cache will be invalidated, // and the view will be re-rendered with the new options. - foreach ($view['#rows']['#rows'] as &$resultRow) { - $resultRow['#cache']['keys'][] = $field_display_options['show_categories']; - $resultRow['#cache']['keys'][] = $field_display_options['show_tags']; - $resultRow['#cache']['keys'][] = $field_display_options['show_thumbnail']; + if ($view['#rows'] && $view['#rows']['#rows']) { + foreach ($view['#rows']['#rows'] as &$resultRow) { + $resultRow['#cache']['keys'][] = $field_display_options['show_categories']; + $resultRow['#cache']['keys'][] = $field_display_options['show_tags']; + $resultRow['#cache']['keys'][] = $field_display_options['show_thumbnail']; + } } break;