From 82d866c9e39deaca2b243073d6b253f2d3a62804 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Dec 2023 07:34:35 +0000 Subject: [PATCH 1/2] Bump prettier from 3.0.3 to 3.1.0 Bumps [prettier](https://github.com/prettier/prettier) from 3.0.3 to 3.1.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.0.3...3.1.0) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 7 ++++--- package.json | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 182e176cd..641cc0723 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,7 +31,7 @@ "eslint-plugin-import": "^2.28.0", "eslint-plugin-n": "^16.3.1", "jest": "^29.7.0", - "prettier": "^3.0.0", + "prettier": "^3.1.0", "typescript": "^5.2.2" }, "engines": { @@ -4987,9 +4987,10 @@ } }, "node_modules/prettier": { - "version": "3.0.3", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz", + "integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==", "dev": true, - "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, diff --git a/package.json b/package.json index 4c5495b58..1de235517 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "eslint-plugin-import": "^2.28.0", "eslint-plugin-n": "^16.3.1", "jest": "^29.7.0", - "prettier": "^3.0.0", + "prettier": "^3.1.0", "typescript": "^5.2.2" }, "//": "avoid hoisting, see packages/protoplugin/src/ecmascript/transpile.ts", From 13c83f10f315e6a20b540ba7407844f2044ac8d4 Mon Sep 17 00:00:00 2001 From: Timo Stamm Date: Fri, 1 Dec 2023 10:19:50 +0100 Subject: [PATCH 2/2] make format --- packages/protobuf/src/create-descriptor-set.ts | 4 ++-- packages/protobuf/src/private/json-format-common.ts | 4 ++-- .../protoplugin/src/ecmascript/custom-options.ts | 1 + packages/upstream-protobuf/index.mjs | 12 +++--------- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/packages/protobuf/src/create-descriptor-set.ts b/packages/protobuf/src/create-descriptor-set.ts index b863492ef..92d83dd9f 100644 --- a/packages/protobuf/src/create-descriptor-set.ts +++ b/packages/protobuf/src/create-descriptor-set.ts @@ -84,8 +84,8 @@ export function createDescriptorSet( input instanceof FileDescriptorSet ? input.file : input instanceof Uint8Array - ? FileDescriptorSet.fromBinary(input).file - : input; + ? FileDescriptorSet.fromBinary(input).file + : input; const files = fileDescriptors.map((proto) => newFile(proto, cart)); return { files, ...cart }; } diff --git a/packages/protobuf/src/private/json-format-common.ts b/packages/protobuf/src/private/json-format-common.ts index cd41a4157..698062ac2 100644 --- a/packages/protobuf/src/private/json-format-common.ts +++ b/packages/protobuf/src/private/json-format-common.ts @@ -214,8 +214,8 @@ export function makeJsonFormatCommon( ? jsonMapKey == "true" ? true : jsonMapKey == "false" - ? false - : jsonMapKey + ? false + : jsonMapKey : jsonMapKey, LongType.BIGINT, ).toString() diff --git a/packages/protoplugin/src/ecmascript/custom-options.ts b/packages/protoplugin/src/ecmascript/custom-options.ts index a0bb1f685..7518864e9 100644 --- a/packages/protoplugin/src/ecmascript/custom-options.ts +++ b/packages/protoplugin/src/ecmascript/custom-options.ts @@ -114,6 +114,7 @@ export function findCustomEnumOption( return findCustomScalarOption(desc, extensionNumber, ScalarType.INT32); } +// prettier-ignore /** * ScalarValue is a conditional type that pairs a ScalarType value with its concrete type. */ diff --git a/packages/upstream-protobuf/index.mjs b/packages/upstream-protobuf/index.mjs index 212ceaafd..47644da37 100644 --- a/packages/upstream-protobuf/index.mjs +++ b/packages/upstream-protobuf/index.mjs @@ -332,9 +332,7 @@ export class UpstreamProtobuf { } break; } - const url = `https://github.com/protocolbuffers/protobuf/releases/download/v${ - this.#version - }/protoc-${this.#version}-${build}.zip`; + const url = `https://github.com/protocolbuffers/protobuf/releases/download/v${this.#version}/protoc-${this.#version}-${build}.zip`; return this.#download(url, "protoc.zip"); } @@ -413,9 +411,7 @@ export class UpstreamProtobuf { `Unable to find conformance runner binary release for ${os.platform()} / ${os.arch()}`, ); } - const url = `https://github.com/bufbuild/protobuf-conformance/releases/download/v${ - this.#version - }/conformance_test_runner-${this.#version}-${build}.zip`; + const url = `https://github.com/bufbuild/protobuf-conformance/releases/download/v${this.#version}/conformance_test_runner-${this.#version}-${build}.zip`; return this.#download(url, "conformance_test_runner.zip"); } @@ -423,9 +419,7 @@ export class UpstreamProtobuf { * @return {Promise} */ async #downloadProtobufSource() { - const url = `https://github.com/protocolbuffers/protobuf/releases/download/v${ - this.#version - }/protobuf-${this.#version}.zip`; + const url = `https://github.com/protocolbuffers/protobuf/releases/download/v${this.#version}/protobuf-${this.#version}.zip`; return this.#download(url, "protobuf.zip"); }