Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/js-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Run ESLint, Stylelint, package.json linting, and unit tests in a single job.
#
# Each check runs only when the project defines an npm script for it, so this
# file is safe to sync to a repository that has only some of them. A check the
# project is half set up for is reported on the pull request rather than failed.
#
# This file is managed in https://github.com/happyprime/projects
name: JavaScript checks

on: pull_request

# The consolidated workflow comments on the pull request when a project is set
# up for a check it cannot run. A workflow level permissions block caps what a
# reusable workflow receives, so the write scope is granted here.
permissions:
contents: read
pull-requests: write

jobs:
call-workflow:
uses: happyprime/workflows/.github/workflows/js-checks.yml@trunk
with:
node-version: 24
107 changes: 89 additions & 18 deletions package-lock.json

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

33 changes: 27 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,39 @@
{
"name": "query-loop-filter",
"private": true,
"version": "1.0.0",
"description": "Filter blocks for query loops",
"author": "Human Made Limited",
"license": "GPL-2.0-or-later",
"keywords": [
"wordpress",
"wordpress-plugin"
],
"homepage": "https://github.com/happyprime/query-filter/",
"repository": {
"type": "git",
"url": "git+https://github.com/happyprime/query-filter.git"
},
"bugs": {
"url": "https://github.com/happyprime/query-filter/issues"
},
"dependencies": {
"@wordpress/scripts": "^28.6.0"
},
"devDependencies": {
"@wordpress/npm-package-json-lint-config": "^5.10.0",
"npm-package-json-lint": "^8.0.0"
},
"scripts": {
"build": "wp-scripts build --experimental-modules",
"start": "wp-scripts start --experimental-modules",
"format": "wp-scripts format",
"lint:css": "wp-scripts lint-style --fix",
"lint:js": "wp-scripts lint-js",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"lint:package": "node ./node_modules/npm-package-json-lint/dist/cli.js ./package.json"
},
"author": "Human Made Limited",
"license": "GPL-2.0-or-later",
"dependencies": {
"@wordpress/scripts": "^28.6.0"
"private": true,
"npmpackagejsonlint": {
"extends": "@wordpress/npm-package-json-lint-config"
}
}
4 changes: 3 additions & 1 deletion src/taxonomy/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ const { state } = store( 'query-filter', {
}

// Don't navigate if the search didn't really change.
if ( value === state.searchValue ) return;
if ( value === state.searchValue ) {
return;
}

state.searchValue = value;

Expand Down
Loading