Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Branch for v2.4.6 #1049

Merged
merged 37 commits into from
Feb 2, 2024
Merged

Feature Branch for v2.4.6 #1049

merged 37 commits into from
Feb 2, 2024

Conversation

attackant
Copy link

@attackant attackant commented Jan 24, 2024

Version 2.4.6

Bugs Fixed

Enhancements

Documentation

@attackant attackant self-assigned this Jan 24, 2024
@attackant attackant marked this pull request as draft January 24, 2024 23:05
@attackant attackant added this to the v2.4.6 milestone Jan 24, 2024
The version number in package.json, apple-news.php, class-apple-news.php, and readme.txt files has been updated from 2.4.5 to 2.4.6.
Updated Node.js and npm to versions 18 and 9 respectively. Updated versions of many npm packages in both devDependencies and dependencies in package.json. Various version updates were also reflected in package-lock.json.
The version of Node.js used in the GitHub workflow has been updated to version 18. This ensures consistency with the recently updated versions in other areas of the project.
The version of Node.js used in the GitHub workflow has been increased to version 18. This change aligns the version used in the workflow with those used in other parts of the application.
The npm version required for the application has been updated from 9 to 10. This version change ensures consistency and compatibility with other parts of the application infrastructure.
The node version used in the GitHub workflows and specified in package.json has been upgraded from 18 to 20. The npm version range has also been slightly adjusted in package.json. The modifications intend to keep the system updated and address potential compatibility issues.
The versions of various "@WordPress" dependencies in both "package.json" and "package-lock.json" files are downgraded to match WP 6.4.2. This includes a switch to previous versions for packages such as "@wordpress/dependency-extraction-webpack-plugin", "@wordpress/a11y", "@wordpress/annotations", among others. Adjustments aim to improve compatibility and address potential issues with the specific project's environment or other dependencies.
The 'frontend.jsx' file under 'admin-settings' in the assets/js directory now uses the new React root API for rendering. The root API creates a root from a container and allows rendering operations to be scheduled over time. Instead of rendering directly in the component, a constant container is declared and then a root is created from this container for the rendering process.
This change transforms functional components across several files to use the 'function' keyword instead of arrow functions. It adheres to the project coding style guide and aids in debugging by providing more descriptive function names in stack traces. The code refactoring was applied consistently for all functional components in affected files. No functionality changes were made.
This commit increases the maximum acceptable Node.js version in package.json and updates the Node.js versions in the node-tests.yml and built-release.yml workflow files to version 21. This change helps maintain software alignment with updated technologies and enhances compatibility.
Numerous package dependencies have been updated in package-lock.json. Significant changes largely involve updates to allow for newer versions of packages, some removals due to redundancy or changes in codebase, and a few version-specific updates. This will help maintain alignment with contemporary packages.
The function fetchTerm in use-term-cache service now accepts term ID as a string. It then converts this string to a number and verifies its validity before proceeding. This update improves error handling by ensuring the term ID received is a valid number.
Update term ID type handling in fetchTerm function
Refactored the API fetch in the term-selector component to remove the asynchronous await functionality. Instead, the search results are directly set, which should improve speed and performance. Please note this might change the sequence of execution in this block of code.
Update Node, npm versions and dependencies
Eliminated asynchronous await function in the term-selector component and reorganized code in the use-taxonomies component for clarity and better performance. The changes involve directly setting the search results in term-selector and restructuring some segments in use-taxonomies, although the sequence of execution may have been affected.
attackant and others added 6 commits January 30, 2024 17:17
Updated the useEffect in sidebar.jsx to ensure 'notices' is an array and has content before attempting to display notifications. This aims to prevent sporadic errors related to 'notices' being undefined or empty, with helpful logging added for potential future debugging needs.
Prevent error by adding check before displaying notices
…tice

Make the default theme notice dismissible
The changes in this commit include refactoring the `class-push.php` file to directly use imported libraries/classes. It replaces the fully qualified class names with their respective aliases through the import statements at the top of the file. This simplifies the code and logical flow, and improves readability for developers. Redundant variables were also removed as part of the modifications.
The code is updated to check if the filename is `null` instead of an empty string. This is a more accurate way to verify if filename is set before bundling source. Additionally, the way settings are referred to has been changed. Now the magic method `__get` is used instead of the `get` method, to ensure proper retrieval of the property regardless the visibility of the property.
@@ -48,6 +48,6 @@ abstract public function perform();
* @return mixed The value for the setting.
*/
protected function get_setting( $name ) {
return $this->settings->get( $name );
return $this->settings->__get( $name );
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get is deprecated in favor of __get

)
),
get_current_user_id(),
true
);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes notice dismissable

Comprehensive and detailed updates have been made to the readme file's changelog for the Apple News plugin. Several bugs were fixed, Node.js and npm versions were upgraded, and some valuable info regarding plugin usage with News Preview app was added.
@attackant attackant marked this pull request as ready for review February 1, 2024 18:30
Copy link
Member

@mslinnea mslinnea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving but consider that specific node and npm versions may prevent issues.

package.json Outdated
"node": "16",
"npm": "8"
"node": ">=18.0.0 <22.0.0",
"npm": ">=9.0.0 <11.0.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is a range necessary? We had a problem on another project caused by a range, as some packages may load different versions.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the range

* Bugfix: #1028 - Fixed inability to select checklist options in Post Apple News Options plugin.
* Bugfix: #1018 - Fixed bug deleting automation rules which removed all page contents.
* Bugfix: #1014 - Resolved invalid document exception while processing articles.
* Enhancement: Upgraded to Node.js 20 and npm 10.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the engines be set to these specifically?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

This update includes modifying the minimum required versions for node and npm in the Apple News plugin. Additionally, various dependencies associated with WordPress have been downgraded to match WP 6.4. Node version ranges have also been changed in the Github workflows.
The node and npm version specifications in package.json and package-lock.json files of the Apple News plugin are modified. Instead of specifying a fixed range, a more flexible "^20.x.x" for node and "^10.x.x" for npm are now used, indicating any minor version updates within the major versions 20 and 10 respectively are acceptable.
@attackant attackant requested a review from mslinnea February 2, 2024 13:16
Copy link
Member

@mslinnea mslinnea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 🐴

@attackant attackant merged commit 0593d42 into develop Feb 2, 2024
16 checks passed
@attackant attackant deleted the release/v2.4.6 branch February 2, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants