diff --git a/.prettierrc b/.prettierrc index 6b742b20e6d..3ad6ff50e58 100644 --- a/.prettierrc +++ b/.prettierrc @@ -5,5 +5,5 @@ "semi": true, "singleQuote": false, "printWidth": 120, - "bracketSameLine": true + "jsxBracketSameLine": true } diff --git a/app/target/target_test_log_card.tsx b/app/target/target_test_log_card.tsx index 158fc9a3fd2..6da501f2ff6 100644 --- a/app/target/target_test_log_card.tsx +++ b/app/target/target_test_log_card.tsx @@ -89,9 +89,8 @@ export default class TargetTestLogCardComponent extends React.Component log.name == "test.log" - )?.uri; + let testLogUrl = this.props.buildEvent?.testResult?.testActionOutput.find((log: any) => log.name == "test.log") + ?.uri; if (!testLogUrl) { return; diff --git a/docs/cli-plugins.md b/docs/cli-plugins.md index 4e455783f5a..64156759359 100644 --- a/docs/cli-plugins.md +++ b/docs/cli-plugins.md @@ -324,16 +324,16 @@ if __name__ == "__main__": The CLI exposes certain environment variables to your plugins. -#### $BUILD_WORKSPACE_DIRECTORY +#### \$BUILD_WORKSPACE_DIRECTORY This is the path to the Bazel workspace in which the CLI is run. It is the root path, containing the bazel `WORKSPACE`, `WORKSPACE.bazel`, `MODULE`, or `MODULE.bazel` file. -#### $PLUGIN_TEMPDIR +#### \$PLUGIN_TEMPDIR This is a temporary directory that can be used by your plugin to store temporary files. These files will be cleaned up after the invocation is complete. -#### $USER_CONFIG_DIR +#### \$USER_CONFIG_DIR This is a long-lived directory you can use to store user preferences, like whether or not a user always wants to automatically apply a particular fix. @@ -343,7 +343,7 @@ config dir, if needed, using something like you'll need to decide how to handle differences in preferences across different versions of your plugin. -#### $EXEC_ARGS_FILE +#### \$EXEC_ARGS_FILE This is the path of a file that contains the args that would be passed to an executable built by bazel as a result of a `bazel run` command. Specifically, diff --git a/enterprise/app/code/code.css b/enterprise/app/code/code.css index 0df7663a426..648fcea009d 100644 --- a/enterprise/app/code/code.css +++ b/enterprise/app/code/code.css @@ -411,11 +411,7 @@ background-color: #fff; padding: 8px 0; border-radius: 8px; - box-shadow: - 0 0 0 1px #0000000f, - 0 1px 1px -0.5px #0000000f, - 0 3px 3px -1.5px #0000000f, - 0 6px 6px -3px #0000000f; + box-shadow: 0 0 0 1px #0000000f, 0 1px 1px -0.5px #0000000f, 0 3px 3px -1.5px #0000000f, 0 6px 6px -3px #0000000f; } .code-editor .context-menu div { diff --git a/enterprise/app/filter/filter_util.tsx b/enterprise/app/filter/filter_util.tsx index 8328fb6a58d..e56af52311d 100644 --- a/enterprise/app/filter/filter_util.tsx +++ b/enterprise/app/filter/filter_util.tsx @@ -478,9 +478,9 @@ export function statusToString(status: invocation_status.OverallStatus) { } export function statusFromString(value: string) { - return invocation_status.OverallStatus[ + return (invocation_status.OverallStatus[ value.toUpperCase().replace(/-/g, "_") as any - ] as unknown as invocation_status.OverallStatus; + ] as unknown) as invocation_status.OverallStatus; } export function parseRoleParam(paramValue: string | null): string[] { diff --git a/enterprise/app/tap/flakes.tsx b/enterprise/app/tap/flakes.tsx index 8bbd52d4a93..9c398cdfa24 100644 --- a/enterprise/app/tap/flakes.tsx +++ b/enterprise/app/tap/flakes.tsx @@ -369,7 +369,7 @@ export default class FlakesComponent extends React.Component { ); } - let tableData = singleTarget ? [] : (this.state.tableData?.stats ?? []); + let tableData = singleTarget ? [] : this.state.tableData?.stats ?? []; let sortFn: (a: target.AggregateTargetStats, b: target.AggregateTargetStats) => number; if (this.state.tableSort === "Flakes") { sortFn = (a, b) => { diff --git a/package.json b/package.json index 43d3851f558..db565691657 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "moment": "^2.29.4", "monaco-editor": "0.47.0", "path-browserify": "^1.0.1", - "prettier": "3.3.3", + "prettier": "2.1.1", "protobufjs": "^7.2.5", "react": "^16.8.6", "react-date-range": "^1.3.0", diff --git a/tools/checkstyle/checkstyle.sh b/tools/checkstyle/checkstyle.sh index 00aeeff8099..bbb3fadd913 100755 --- a/tools/checkstyle/checkstyle.sh +++ b/tools/checkstyle/checkstyle.sh @@ -59,7 +59,7 @@ run ProtoFormat \ run PrettierFormat \ env PRETTIER_PATH="$PRETTIER_PATH" \ - tools/prettier/prettier.sh --log-level=warn --check + tools/prettier/prettier.sh --loglevel=warn --check wait diff --git a/tools/prettier/prettier.sh b/tools/prettier/prettier.sh index 8d55322d52b..0b91068b7dd 100755 --- a/tools/prettier/prettier.sh +++ b/tools/prettier/prettier.sh @@ -4,6 +4,7 @@ set -e : "${PRETTIER_PATH:=}" +: "${DIFF_BASE:=}" # File patterns to format using prettier, using git's file pattern syntax. GIT_FILE_PATTERNS=( @@ -15,7 +16,6 @@ GIT_FILE_PATTERNS=( '*.md' '*.ts' '*.tsx' - '*.xml' '*.yaml' ) @@ -31,14 +31,25 @@ realpath() { # If we are on the master branch already, then look one commit back. # This is needed to support workflows that run on push. function paths_to_format() { - if [[ "$(git rev-parse --abbrev-ref HEAD)" == master ]]; then - DIFF_BASE='HEAD~1' + if ! [[ "$DIFF_BASE" ]]; then + if [[ "$(git rev-parse --abbrev-ref HEAD)" == master ]]; then + DIFF_BASE='HEAD~1' + else + # If on a feature branch, use GIT_BASE_BRANCH env var set by BB workflows, + # or fall back to master (which should usually work when running locally). + DIFF_BASE=$(git merge-base HEAD "origin/${GIT_BASE_BRANCH:-master}") + fi + fi + + # If any of the following are changed, then all files need to be reformatted, + # not just changed files: + # - The prettier version in yarn.lock + # - Any prettier configuration in .prettierrc + if (git diff "$DIFF_BASE" -- yarn.lock | grep -q prettier) || (git diff "$DIFF_BASE" -- .prettierrc | grep -q .); then + git ls-files -- "${GIT_FILE_PATTERNS[@]}" else - # If on a feature branch, use GIT_BASE_BRANCH env var set by BB workflows, - # or fall back to master (which should usually work when running locally). - DIFF_BASE=$(git merge-base HEAD "origin/${GIT_BASE_BRANCH:-master}") + git diff --name-only --diff-filter=AMRCT "$DIFF_BASE" -- "${GIT_FILE_PATTERNS[@]}" fi - git diff --name-only --diff-filter=AMRCT "$DIFF_BASE" -- "${GIT_FILE_PATTERNS[@]}" } paths=() diff --git a/website/blog/redpoint-infrared-100.md b/website/blog/redpoint-infrared-100.md index 2de4c68437c..eac80c27f09 100644 --- a/website/blog/redpoint-infrared-100.md +++ b/website/blog/redpoint-infrared-100.md @@ -23,4 +23,4 @@ All companies included on the first annual InfraRed 100 are included [here](http **About BuildBuddy:** BuildBuddy provides an open-core suite of enterprise features for Bazel, including a Remote Build Execution service, a shared build artifact cache, and a build & test result UI. It's available as a fully-managed cloud service or as an easy to deploy on-prem solution. BuildBuddy is based in San Francisco, backed by Y Combinator, and founded by two ex-Googlers deeply passionate about making developers more productive. For more information visit: https://buildbuddy.io/ -**About Redpoint Ventures:** Redpoint has partnered with visionary founders to create new markets and redefine existing ones since 1999. We invest in startups across the seed, early and growth phases, and we’re proud to have backed over 578 companies—including Snowflake, Looker, Kustomer, Twilio, 2U, DraftKings, Duo Security, HashiCorp, Stripe, Guild, HomeAway, Heroku, Netflix, and Sonos—with 181 IPOs and M+A exits. Redpoint manages $7.2 billion across multiple funds. For more information visit: https://www.redpoint.com/ +**About Redpoint Ventures:** Redpoint has partnered with visionary founders to create new markets and redefine existing ones since 1999. We invest in startups across the seed, early and growth phases, and we’re proud to have backed over 578 companies—including Snowflake, Looker, Kustomer, Twilio, 2U, DraftKings, Duo Security, HashiCorp, Stripe, Guild, HomeAway, Heroku, Netflix, and Sonos—with 181 IPOs and M+A exits. Redpoint manages \$7.2 billion across multiple funds. For more information visit: https://www.redpoint.com/ diff --git a/website/blog/welcoming-george-li-head-of-sales.md b/website/blog/welcoming-george-li-head-of-sales.md index 997b5129a71..cb04916b75e 100644 --- a/website/blog/welcoming-george-li-head-of-sales.md +++ b/website/blog/welcoming-george-li-head-of-sales.md @@ -8,7 +8,7 @@ tags: [company, team] To fulfill our mission of bringing the world's best developer tools to every company, we're building a team that's ready to work with the world's best enterprises. That's why we're excited to share today that [**George Li**](https://www.linkedin.com/in/gli/) is joining BuildBuddy to lead our enterprise sales efforts as our Head of Sales. -George joins us from Looker where he served as Head of APAC Sales Engineering. He joined Google Cloud through their [acquisition](https://techcrunch.com/2020/02/13/google-closes-2-6b-looker-acquisition/) of Looker in February, having helped the company grow to a $2.6B valuation. +George joins us from Looker where he served as Head of APAC Sales Engineering. He joined Google Cloud through their [acquisition](https://techcrunch.com/2020/02/13/google-closes-2-6b-looker-acquisition/) of Looker in February, having helped the company grow to a \$2.6B valuation. ![](../static/img/blog/welcome-george.png) diff --git a/yarn.lock b/yarn.lock index 95e24c572bc..80b24d5de1c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -862,10 +862,10 @@ path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -prettier@3.3.3: - version "3.3.3" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105" - integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew== +prettier@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.1.tgz#d9485dd5e499daa6cb547023b87a6cf51bee37d6" + integrity sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw== prop-types@15, prop-types@^15.5.10, prop-types@^15.7.2: version "15.7.2"