Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release/3.6.0' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
admturner committed Apr 9, 2024
2 parents acc8bc8 + 97614e4 commit 82bf058
Show file tree
Hide file tree
Showing 40 changed files with 13,172 additions and 7,850 deletions.
5 changes: 3 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
.gitignore export-ignore
.markdownlintignore export-ignore
.npmpackagejsonlintrc.json export-ignore
.npmrc export-ignore
.nvmrc export-ignore
.prettierrc.js export-ignore
.stylelintrc.json export-ignore
.travis.yml export-ignore
composer.json export-ignore
composer.lock export-ignore
CONTRIBUTING.md export-ignore
package.json export-ignore
package-lock.json export-ignore
package.json export-ignore
phpcs.xml.dist export-ignore
postcss.config.js export-ignore
webpack.config.js export-ignore
Expand Down
51 changes: 26 additions & 25 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,53 +16,54 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Log debug information
run: |
npm --version
node --version
git --version
- name: Install NodeJS v14
uses: actions/setup-node@v2
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 14
- name: Log debug information
run: |
npm --version
node --version
- name: Install npm dependencies
run: npm ci
- name: Run eslint
node-version-file: '.nvmrc'
check-latest: true
cache: npm

- name: Npm install
run: npm install

- name: Lint JavaScript
run: npm run lint:script
- name: Run stylelint

- name: Lint Styles
run: npm run lint:style
- name: Run npmPkgJsonLint

- name: Lint package.json
run: npm run lint:pkg
- name: Run markdownlint

- name: Lint Docs
run: npm run lint:docs

phpcs:
name: PHP Coding Standards
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up PHP version
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
tools: composer, cs2pr
- name: Log debug information
run: |
php --version
composer --version

- name: Install Composer dependencies
uses: ramsey/composer-install@v1
with:
composer-options: '--no-progress --no-ansi --no-interaction'

- name: Make Composer packages available globally
run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH

- name: Log PHPCS debug information
run: phpcs -i

- name: Run PHPCS
run: phpcs -q -n --report=checkstyle . | cs2pr
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
save-exact = true
engine-strict = true
legacy-peer-deps = true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,39 @@ Changelog formatting (http://semver.org/):
### Security (in case of vulnerabilities.)
-->

## 3.6.0 (2024-04-09)

### Changed

- Bump WP tested-to to 6.5.0 to close #138.
- Posts List block: Add offset controls. (13578a0)
- Include linting step in default build process. (9524183)
- Fix #139 upgrade Node.js to v20 and NPM and use `.nvmrc` to track version. (5110d24, 1709f73)
- Update phpcs config rules. (e8a3bee)
- Upgrade @wordpress/scripts from 25.3.0 to 27.4.0. (901afee)
- Upgrade prettier from [email protected] to [email protected]. (139d943)
- Upgrade cssnano from 5.0.17 to 6.1.1. (f8556e6)
- Upgrade postcss-import from 15.1.0 to 16.1.0. (541d5fb, 9d2e0f4)
- Upgrade postcss-preset-env from 8.0.1 to 9.5.2. (dcb6d8f)
- Update @wordpress/icons from 9.17.0 to 9.44.0. (54cf331)
- Update classnames from 2.3.1 to 2.5.1. (3dbbeba)
- Update composer dependencies. (e8a3bee)

### Fixed

- Fix #143 Posts List block: disable links in the editor. (05bf298)
- Fix #144 replace experimental date settings with production version. (435fd47)
- Fix #141 use `.nvmrc` in GitHub Action. (11d143a)
- Fix `__construct` should not return value. (e8a3bee)
- Fix #140 replace get_page_by_title with get_posts. (e8a3bee)
- Fix #146 replace deprecated value attribute with inner blocks. (d80268e)
- Fix #135 deprecated value attribute on list block. (ef67d84)

### Security

- Bump follow-redirects from 1.15.4 to 1.15.6 (#136)
- Bump follow-redirects from 1.15.2 to 1.15.4 (#131)

## 3.5.0 (2023-11-16)

### Changed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HRSWP Blocks

[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Build Status](https://github.com/washingtonstateuniversity/hrswp-plugin-blocks/actions/workflows/coding-standards.yml/badge.svg)](https://github.com/washingtonstateuniversity/hrswp-plugin-blocks/actions) [![Release Version](https://img.shields.io/github/v/release/washingtonstateuniversity/hrswp-plugin-blocks)](https://github.com/washingtonstateuniversity/hrswp-plugin-blocks/releases/latest) ![WordPress tested up to version 6.4.1](https://img.shields.io/badge/WordPress-v6.4.1%20tested-success.svg) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier) [![GPLv3 License](https://img.shields.io/github/license/washingtonstateuniversity/hrswp-plugin-blocks)](https://github.com/washingtonstateuniversity/hrswp-plugin-blocks/blob/develop/LICENSE.md)
[![Support Level](https://img.shields.io/badge/support-active-green.svg)](#support-level) [![Build Status](https://github.com/washingtonstateuniversity/hrswp-plugin-blocks/actions/workflows/coding-standards.yml/badge.svg)](https://github.com/washingtonstateuniversity/hrswp-plugin-blocks/actions) [![Release Version](https://img.shields.io/github/v/release/washingtonstateuniversity/hrswp-plugin-blocks)](https://github.com/washingtonstateuniversity/hrswp-plugin-blocks/releases/latest) ![WordPress tested up to version 6.5.0](https://img.shields.io/badge/WordPress-v6.5.0%20tested-success.svg) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier) [![GPLv3 License](https://img.shields.io/github/license/washingtonstateuniversity/hrswp-plugin-blocks)](https://github.com/washingtonstateuniversity/hrswp-plugin-blocks/blob/develop/LICENSE.md)

## Overview

Expand Down
2 changes: 1 addition & 1 deletion build/accordion.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => 'bf72f242261fc824ad6d');
<?php return array('dependencies' => array(), 'version' => '784893649757ac2a5d1d');
2 changes: 1 addition & 1 deletion build/accordion.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/blocks/list-awards/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function render( $attributes ) {
'post_type' => 'attachment',
'posts_per_page' => -1,
'orderby' => 'meta_value_num',
'meta_key' => '_hrswp_sqlsrv_db_award_group',
'meta_key' => '_hrswp_sqlsrv_db_award_group', // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key
'order' => 'ASC',
)
);
Expand Down
4 changes: 4 additions & 0 deletions build/blocks/posts-list/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@
"addLinkToFeaturedImage": {
"type": "boolean",
"default": false
},
"offsetPostsNumber": {
"type": "integer",
"default": 0
}
},
"supports": {
Expand Down
33 changes: 16 additions & 17 deletions build/blocks/posts-list/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public function render( $attributes ) {
'post_status' => 'publish',
'order' => $attributes['order'],
'orderby' => $attributes['orderBy'],
'offset' => $attributes['offsetPostsNumber'],
'suppress_filters' => false,
);

Expand Down Expand Up @@ -228,22 +229,20 @@ public function render( $attributes ) {
);

$post_meta_markup .= get_the_term_list( $post->ID, $taxonomy_name, $prefix, ', ', '</p>' );
} else {
if (
'post_tag' !== $taxonomy_name &&
'category' !== $taxonomy_name &&
isset( $attributes['displayPostTaxonomy'] ) &&
$attributes['displayPostTaxonomy']
) {
$taxonomy_object = get_taxonomy( $taxonomy_name );
$prefix = sprintf(
'<p class="hrswp-block-posts-list__%1$s-list"><span>%2$s: </span>',
esc_attr( $taxonomy_name ),
esc_html( $taxonomy_object->labels->singular_name )
);

$post_meta_markup .= get_the_term_list( $post->ID, $taxonomy_name, $prefix, ', ', '</p>' );
}
} elseif (
'post_tag' !== $taxonomy_name &&
'category' !== $taxonomy_name &&
isset( $attributes['displayPostTaxonomy'] ) &&
$attributes['displayPostTaxonomy']
) {
$taxonomy_object = get_taxonomy( $taxonomy_name );
$prefix = sprintf(
'<p class="hrswp-block-posts-list__%1$s-list"><span>%2$s: </span>',
esc_attr( $taxonomy_name ),
esc_html( $taxonomy_object->labels->singular_name )
);

$post_meta_markup .= get_the_term_list( $post->ID, $taxonomy_name, $prefix, ', ', '</p>' );
}
}
}
Expand Down Expand Up @@ -317,7 +316,7 @@ public function render( $attributes ) {
*/
add_action(
'init',
function() {
function () {
return new PostsList();
},
25
Expand Down
2 changes: 1 addition & 1 deletion build/filter.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '5a17a4cd3ca1c795966a');
<?php return array('dependencies' => array(), 'version' => '25e99a6cb7ab7fd87dc7');
2 changes: 1 addition & 1 deletion build/filter.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-primitives', 'wp-server-side-render'), 'version' => 'd1912fb8309eb45917bb');
<?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-element', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-primitives', 'wp-server-side-render'), 'version' => '959cae0c456c73eee7ea');
2 changes: 1 addition & 1 deletion build/index.css

Large diffs are not rendered by default.

Loading

0 comments on commit 82bf058

Please sign in to comment.