Skip to content

Commit

Permalink
Prevent code gen and formatter fighting over whitespace (#620)
Browse files Browse the repository at this point in the history
  • Loading branch information
timostamm authored Nov 17, 2023
1 parent 4bf739e commit d33b2ca
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ perf: $(BUILD)/protobuf-test
bootstrap: $(BUILD)/upstream-protobuf $(BUILD)/protoc-gen-es node_modules ## Bootstrap well-known types and edition features-set defaults in @bufbuild/protobuf from upstream protobuf
npm run -w packages/protobuf bootstrap:wkt
npm run -w packages/protobuf bootstrap:featureset-defaults
@# If the generated code differs, use it, and run tests again
#npm run -w packages/protobuf bootstrap-diff || $(MAKE) build test format lint

.PHONY: setversion
setversion: ## Set a new version in for the project, i.e. make setversion SET_VERSION=1.2.3
Expand Down
2 changes: 1 addition & 1 deletion packages/protobuf/src/private/feature-set-defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ import { protoBase64 } from "../proto-base64.js";

export const featureSetDefaults = FeatureSetDefaults.fromBinary(
protoBase64.dec(
/*upstream-inject-feature-defaults-start*/"ChESDAgBEAIYAiABKAEwAhjmBwoREgwIAhABGAEgAigBMAEY5wcKERIMCAEQARgBIAIoATABGOgHIOYHKOgH"/*upstream-inject-feature-defaults-end*/,
/*upstream-inject-feature-defaults-start*/ "ChESDAgBEAIYAiABKAEwAhjmBwoREgwIAhABGAEgAigBMAEY5wcKERIMCAEQARgBIAIoATABGOgHIOYHKOgH" /*upstream-inject-feature-defaults-end*/,
),
);
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async function main(args) {
);
for (const path of positionals) {
const content = readFileSync(path, "utf-8");
const r = inject(content, `"${defaults.toString("base64url")}"`);
const r = inject(content, ` "${defaults.toString("base64url")}" `);
if (!r.ok) {
stderr.write(`Error injecting into ${path}: ${r.message}\n`);
exit(1);
Expand Down

0 comments on commit d33b2ca

Please sign in to comment.