Skip to content
Merged
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
2 changes: 1 addition & 1 deletion bin/update-browsers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
# Update the browser regex in the version check script.
#
# Uses a browserslist query to generate this data.
# Needs you to run `npx browserslist-useragent-regexp "defaults, unreleased versions"` before first use
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, why is this required, because npx prompts for install?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes correct. I needed to enter "y"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

so I have npm/npx installed. But the command needed a one time only "y" manual enter to work

Copy link
Member

Choose a reason for hiding this comment

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

Got it; instead of this comment, let's add --yes to the npx command which should ensure it runs automatically instead :)

set -eo pipefail

BROWSER_QUERY="defaults, unreleased versions"

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
VERSION_CHECK_FOO="$SCRIPT_DIR/../inc/version-check/foo.txt"
VERSION_CHECK_FILE="$SCRIPT_DIR/../inc/version-check/namespace.php"

LINE_START="const BROWSER_REGEX = ";
Expand Down