8000 Comparing v0.1.1...trunk · WordPress/abilities-api · GitHub
[go: up one dir, main page]

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: WordPress/abilities-api
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.1
Choose a base ref
...
head repository: WordPress/abilities-api
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: trunk
Choose a head ref
  • 18 commits
  • 57 files changed
  • 26 contributors

Commits on Sep 9, 2025

  1. Refactor the usage of $properties param to $args to align with Wo…

    …rdPress usage (#59)
    
    * dev: replace `WP_Ability::validate_properties()` with `::prepare_args()`
    
    * Rename properties to args in `WP_Ability`
    
    * Improve coding style according to conventions
    
    * Update since version
    
    * Fix coding style issue reported in WP core
    
    * Ensure there are no deprecation warning in PHP 8.3+
    
    * Update version to account for the API changes applied
    
    ---------
    
    Co-authored-by: Dovid Levine <david@axepress.dev>
    
    Co-authored-by: justlevine <justlevine@git.wordpress.org>
    Co-authored-by: gziolo <gziolo@git.wordpress.org>
    Co-authored-by: emdashcodes <emdashcodes@git.wordpress.org>
    4 people authored Sep 9, 2025
    Configuration menu
    Copy the full SHA
    118c476 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2025

  1. Add HEAD method support for performance optimization (#71)

    * Add HEAD method support for performance optimization in REST API list controller
    
    * Address review feedback: include pagination links for HEAD requests and enhance test coverage
    
    * Fix HEAD test: remove incorrect assertion for self link in collection
    
    ---------
    
    Co-authored-by: Mohamed Khaled <mohamed.khaled@9hdigital.com>
    
    Unlinked contributors: mohamed.khaled@9hdigital.com.
    
    Co-authored-by: gziolo <gziolo@git.wordpress.org>
    Co-authored-by: Ref34t <mokhaled@git.wordpress.org>
    3 people authored Sep 12, 2025
    Configuration menu
    Copy the full SHA
    2796a60 View commit details
    Browse the repository at this point in the history
  2. Fix $input type hint in WP_Ability (#61)

    * Fix `$input` type hint in `WP_Ability`
    
    * Update REST API usage for the input param to account for mixed type
    
    * Add unit tests covering input types
    
    * Make input optional on execute callback when no schema and input provided
    
    * Prefix data providers with `data_` to follow WP Core conventions
    
    * Extend testing code coverage
    
    * Add additional test for array input
    
    * Improve the tests
    
    * Update documentation to account for input type changes
    
    * Update includes/abilities-api/class-wp-ability.php
    
    Co-authored-by: Felix Arntz <flixos90@gmail.com>
    
    * Update includes/abilities-api/class-wp-ability.php
    
    Co-authored-by: Felix Arntz <flixos90@gmail.com>
    
    * Update includes/abilities-api/class-wp-ability.php
    
    Co-authored-by: Felix Arntz <flixos90@gmail.com>
    
    * Change input schema validation handling according to the feedback
    
    * Adjust tests to ensure that input schema is handled correctly
    
    * Define the explicit types for run args in REST API endpoint
    
    * Update includes/abilities-api/class-wp-ability.php
    
    Co-authored-by: Felix Arntz <flixos90@gmail.com>
    
    ---------
    
    Co-authored-by: Felix Arntz <flixos90@gmail.com>
    
    Co-authored-by: gziolo <gziolo@git.wordpress.org>
    Co-authored-by: galatanovidiu <ovidiu-galatan@git.wordpress.org>
    Co-authored-by: felixarntz <flixos90@git.wordpress.org>
    Co-authored-by: justlevine <justlevine@git.wordpress.org>
    5 people authored Sep 12, 2025
    Configuration menu
    Copy the full SHA
    479dd5b View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2025

  1. chore: update dev-deps to latest (#72)

    Co-authored-by: justlevine <justlevine@git.wordpress.org>
    Co-authored-by: gziolo <gziolo@git.wordpress.org>
    3 people authored Sep 13, 2025
    Configuration menu
    Copy the full SHA
    59d8ec6 View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2025

  1. fix: Use link_header() instead of add_link() to keep the responses as…

    … a pure arrays (#81)
    
    Co-authored-by: emdashcodes <emdashcodes@git.wordpress.org>
    Co-authored-by: gziolo <gziolo@git.wordpress.org>
    3 people authored Sep 18, 2025
    Configuration menu
    Copy the full SHA
    6143ba3 View commit details
    Browse the repository at this point in the history
  2. Update CONTRIBUTING.md (#80)

    Co-authored-by: akkspros <passoniate@git.wordpress.org>
    Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org>
    Co-authored-by: justlevine <justlevine@git.wordpress.org>
    4 people authored Sep 18, 2025
    Configuration menu
    Copy the full SHA
    94d950a View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2025

  1. Docs: REST API Reference (#77)

    * Docs: REST API Reference
    
    * Update docs/5.rest-api.md
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * Improve the examples included in the document
    
    * Document user access requirements for REST API
    
    Added user access information for Abilities API.
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    Co-authored-by: gziolo <gziolo@git.wordpress.org>
    Co-authored-by: jonathanbossenger <psykro@git.wordpress.org>
    3 people authored Sep 19, 2025
    Configuration menu
    Copy the full SHA
    e48d165 View commit details
    Browse the repository at this point in the history
  2. Add execute actions to the ability object (#56)

    * Add execute actions to the ability object
    
    * Update includes/abilities-api/class-wp-ability.php
    
    Co-authored-by: Dovid Levine <david@axepress.dev>
    
    * Add WordPress actions for ability execution hooks
    
    - Add before_execute_ability action that fires before ability execution
    - Add after_execute_ability action that fires after successful execution
    - Include comprehensive unit tests for both actions with edge cases
    - Add extensibility documentation with usage examples and best practices
    - Update README with new documentation link
    - Fix PHPDoc formatting for action parameters
    
    🤖 Generated with [Claude Code](https://claude.ai/code)
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    
    * Improve code quality
    
    * Update README.md
    
    Co-authored-by: Dovid Levine <david@axepress.dev>
    
    * Address feedback from review
    
    ---------
    
    Co-authored-by: Dovid Levine <david@axepress.dev>
    Co-authored-by: Claude <noreply@anthropic.com>
    
    Co-authored-by: gziolo <gziolo@git.wordpress.org>
    Co-authored-by: justlevine <justlevine@git.wordpress.org>
    Co-authored-by: jonathanbossenger <psykro@git.wordpress.org>
    4 people authored Sep 19, 2025
    Configuration menu
    Copy the full SHA
    c9abf12 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2025

  1. Bump the PHPStan testing to PHP 8.4. (#82)

    Co-authored-by: johnbillion <johnbillion@git.wordpress.org>
    Co-authored-by: JasonTheAdams <jason_the_adams@git.wordpress.org>
    3 people authored Sep 23, 2025
    Configuration menu
    Copy the full SHA
    409a77e View commit details
    Browse the repository at this point in the history
  2. feat!: make permission_callback arg required (#73)

    * feat!: make `permission_callback` arg required
    
    * Update tests/unit/abilities-api/wpAbilitiesRegistry.php
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * tests: add WP_Ability::prepare_properties to coverage
    
    * Update includes/abilities-api/class-wp-ability.php
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl>
    
    Co-authored-by: justlevine <justlevine@git.wordpress.org>
    Co-authored-by: gziolo <gziolo@git.wordpress.org>
    Co-authored-by: felixarntz <flixos90@git.wordpress.org>
    Co-authored-by: johnbillion <johnbillion@git.wordpress.org>
    5 people authored Sep 23, 2025
    Configuration menu
    Copy the full SHA
    2f3cda7 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2025

  1. Add client-side package for Abilities API (#60)

    * WordPress Abilities API Client
    
    * Fix: minor formatting issues and test fix for pagination headers
    
    * fix: correct return type of wp_abilities_register_client_assets
    
    * fix: auto-init assets & use class pattern for registration
    
    * Normalize paths for asset loading
    
    * fix: package structure, pull in rules from gutenberg for eslint and tsconfig, and unify deps where possible
    
    * docs: Remove NPM package mention for now
    
    * refactor: Rename listAbilities to getAbilities & update reducer naming
    
    * fix: Update AbilityInput type to accept any JSON value
    
    * fix: correct package.json after rebase with trunk
    
    * fix: Use per_page=-1 instead of recursion in resolver
    
    * update: use addQueryArgs to build GET requests
    
    * fix: wrap strings with @wordpress/i18n
    
    * fix: phpstan issues in register_assets
    
    * fix: additional phpstan error
    
    * Add client-only ability registration (#69)
    
    * Client only abilities
    
    * fix: Add proper server ability validation in registerAbility
    
    * feat: Add ClientAbility and ServerAbility types for better type safety
    
    * refactor: Remove location field, use callback presence for execution type
    
    * feat: add permissionCallback on the client
    
    * update: check if ability is already registered in registerAbility
    
    * fix: wrap client errors in i18n
    
    * Add client library tests and code quality infrastructure  (#70)
    
    * Add testing & linting infa
    
    * Remove uncessary combined checks
    
    * Add client tests
    
    * test: Use proper TypeScript types instead of 'as any' in tests
    
    * Fix typescript check for extra server check
    
    * test: update tests for client-only abilities API changes
    
    * chore: add build:client and dev:client scripts to root package.json
    
    * fix: formatting
    
    * fix: prettier issues
    
    * fix: apply Prettier formatting to README and validation.ts
    
    * deps: remove 		@types/wordpress__api-fetch since types are already shipped
    
    * fix: move validation to the store
    
    * fix: validate ability name uses same format as server
    
    * tests: clean up CI checks
    
    * deps: fix dev dependencies and remove extra package-lock.json
    
    * fix: rename main dev and build commands
    
    * fix: better match server validation rules for schema
    
    * Fix remaining validation issues
    
    Co-authored-by: emdashcodes <emdashcodes@git.wordpress.org>
    Co-authored-by: gziolo <gziolo@git.wordpress.org>
    Co-authored-by: justlevine <justlevine@git.wordpress.org>
    Co-authored-by: jonathanbossenger <psykro@git.wordpress.org>
    
    ---------
    
    Co-authored-by: emdashcodes <emdashcodes@git.wordpress.org>
    Co-authored-by: gziolo <gziolo@git.wordpress.org>
    Co-authored-by: justlevine <justlevine@git.wordpress.org>
    Co-authored-by: jonathanbossenger <psykro@git.wordpress.org>
    Co-authored-by: swissspidy <swissspidy@git.wordpress.org>
    
    * Do not translate thrown developer errors
    
    * use rimraf for cleaning files, move to root package.json
    
    * Use correct versions for CI
    
    * fix: move scripts to main package.json and prefer wp-scripts
    
    * Simplify client readme by linking to CONTRIBUTING.md for dev and testing commands
    
    * align tsconfig with gutenberg
    
    * fix wp-scripts build command
    
    * Build JS assets for the plugin zip
    
    * allow asset class prefix
    
    * Optimize npm dependencies
    
    * Fix Prettier config and format files accordingly
    
    * Use correct ajv-draft-04 import. Remove unusued jest libs
    
    * Only store valid ability keys in the store
    
    ---------
    
    Co-authored-by: emdashcodes <emdashcodes@git.wordpress.org>
    Co-authored-by: gziolo <gziolo@git.wordpress.org>
    Co-authored-by: justlevine <justlevine@git.wordpress.org>
    Co-authored-by: jonathanbossenger <psykro@git.wordpress.org>
    Co-authored-by: swissspidy <swissspidy@git.wordpress.org>
    Co-authored-by: Grzegorz Ziolkowski <grzegorz@gziolo.pl>
    
    Co-authored-by: emdashcodes <emdashcodes@git.wordpress.org>
    Co-authored-by: gziolo <gziolo@git.wordpress.org>
    Co-authored-by: justlevine <justlevine@git.wordpress.org>
    Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
    Co-authored-by: jsnajdr <jsnajdr@git.wordpress.org>
    Co-authored-by: t-hamano <wildworks@git.wordpress.org>
    Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
    8 people authored Sep 26, 2025
    Configuration menu
    Copy the full SHA
    4beab25 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2025

  1. dev: add register_ability_args filter [Proposal] (#74)

    * dev: add `wp_ability_args` filter
    
    * Update docs/5.hooks.md
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    
    * docs: fix `has_permissions` overload example
    
    * fix: rename/relocate filter and fix docs usage
    
    Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl>
    
    * docs: update remaining references
    
    * docs: merge hook docs
    
    * docs: code indentation
    
    * tests: add PHPUnit tests for `register_ability_args`
    
    * Update docs/6.hooks.md
    
    Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl>
    
    * tests: remove prior filters in _every_ setup/teardown
    
    ---------
    
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
    Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl>
    
    Co-authored-by: justlevine <justlevine@git.wordpress.org>
    Co-authored-by: gziolo <gziolo@git.wordpress.org>
    3 people authored Sep 29, 2025
    Configuration menu
    Copy the full SHA
    309f5a0 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2025

  1. docs: Fix the variable name (#92)

    Typo in the variable name caused confusion in the documentation.
    Changed `$result` to `$site_info` for consistency with later usage
    (e.g., is_wp_error($site_info) and $site_info["'name'"]).
    
    Co-authored-by: mrabbani <mrabbani@git.wordpress.org>
    mrabbani and mrabbani authored Sep 30, 2025
    Configuration menu
    Copy the full SHA
    a33e2be View commit details
    Browse the repository at this point in the history
  2. Fix has_permission() return type inconsistency (Issue #67) (#76)

    * Rename has_permission() to check_permission() with deprecation logic
    
    * Update tests to use check_permission() and add deprecation test
    
    * Fix remaining has_permission test usage that was causing CI failure
    
    * Remove specific deprecation test that was causing CI failures
    
    * Fix internal execute() method to use new check_permission() method
    
    * Add test coverage for deprecated has_permission method
    
    * Use WordPress test framework method for deprecated function coverage per maintainer feedback
    
    * Switch to @expectedDeprecated PHPDoc annotation for cleaner deprecation test
    
    ---------
    
    Co-authored-by: Mohamed Khaled <mohamed.khaled@9hdigital.com>
    Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl>
    
    Unlinked contributors: mohamed.khaled@9hdigital.com.
    
    Co-authored-by: Ref34t <mokhaled@git.wordpress.org>
    Co-authored-by: justlevine <justlevine@git.wordpress.org>
    Co-authored-by: gziolo <gziolo@git.wordpress.org>
    Co-authored-by: johnbillion <johnbillion@git.wordpress.org>
    5 people authored Sep 30, 2025
    Configuration menu
    Copy the full SHA
    cbe8a59 View commit details
    Browse the repository at this point in the history
  3. Docs/semantic headings (#96)

    * Updated semantic headings for intro
    
    * Semantic headings for registering and using abilities
    jonathanbossenger authored Sep 30, 2025
    Configuration menu
    Copy the full SHA
    8e0b08a View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2025

  1. Rename check_permission() to check_permissions() on WP_Ability (#…

    …94)
    
    Co-authored-by: gziolo <gziolo@git.wordpress.org>
    Co-authored-by: justlevine <justlevine@git.wordpress.org>
    Co-authored-by: Ref34t <mokhaled@git.wordpress.org>
    Co-authored-by: johnbillion <johnbillion@git.wordpress.org>
    5 people authored Oct 1, 2025
    Configuration menu
    Copy the full SHA
    80f47ee View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2025

  1. Fix backwards compatibility with WP_REST_Request API (#98)

    Replace is_method() with get_method() for WordPress compatibility. The is_method() method does not exist on WP_REST_Request in earlier WordPress versions.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-authored-by: Claude <noreply@anthropic.com>
    
    Co-authored-by: budzanowski <budzanowski@git.wordpress.org>
    Co-authored-by: gziolo <gziolo@git.wordpress.org>
    3 people authored Oct 2, 2025
    Configuration menu
    Copy the full SHA
    41ec679 View commit details
    Browse the repository at this point in the history
  2. Prepare the branch for v0.2.0 release (#90)

    * Fix issues reported by PHPCS in WP core
    
    * Set the next release version in PHPDoc
    
    * Set the proper next version
    
    Co-authored-by: gziolo <gziolo@git.wordpress.org>
    Co-authored-by: jonathanbossenger <psykro@git.wordpress.org>
    3 people authored Oct 2, 2025
    Configuration menu
    Copy the full SHA
    45cfa27 View commit details
    Browse the repository at this point in the history
Loading
0