@bufbuild/protoc-gen-es 2.2.5 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bufbuild/protoc-gen-es",
3
- "version": "2.2.5",
3
+ "version": "2.3.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Protocol Buffers code generator for ECMAScript",
6
6
  "keywords": [
@@ -24,25 +24,22 @@
24
24
  "scripts": {
25
25
  "prebuild": "rm -rf ./dist/cjs/*",
26
26
  "build": "../../node_modules/typescript/bin/tsc --project tsconfig.json --outDir ./dist/cjs",
27
- "format": "prettier --write --ignore-unknown '.' '!dist' '!.turbo'",
27
+ "format": "biome format --write",
28
28
  "license-header": "license-header",
29
- "lint": "eslint --max-warnings 0 ."
29
+ "lint": "biome lint --error-on-warnings"
30
30
  },
31
31
  "preferUnplugged": true,
32
32
  "dependencies": {
33
- "@bufbuild/protobuf": "^2.2.5",
34
- "@bufbuild/protoplugin": "2.2.5"
33
+ "@bufbuild/protobuf": "^2.3.0",
34
+ "@bufbuild/protoplugin": "2.3.0"
35
35
  },
36
36
  "peerDependencies": {
37
- "@bufbuild/protobuf": "2.2.5"
37
+ "@bufbuild/protobuf": "2.3.0"
38
38
  },
39
39
  "peerDependenciesMeta": {
40
40
  "@bufbuild/protobuf": {
41
41
  "optional": true
42
42
  }
43
43
  },
44
- "files": [
45
- "dist/**",
46
- "bin/**"
47
- ]
44
+ "files": ["dist/**", "bin/**"]
48
45
  }
@@ -49,7 +49,7 @@ function parseOptions(options) {
49
49
  // tree-shaking if it is unused.
50
50
  // See https://github.com/bufbuild/protobuf-es/pull/470
51
51
  const pure = "/*@__PURE__*/";
52
- // prettier-ignore
52
+ // biome-ignore format: want this to read well
53
53
  function generateTs(schema) {
54
54
  for (const file of schema.files) {
55
55
  const f = schema.generateFile(file.name + "_pb.ts");
@@ -130,7 +130,7 @@ function generateTs(schema) {
130
130
  }
131
131
  }
132
132
  }
133
- // prettier-ignore
133
+ // biome-ignore format: want this to read well
134
134
  function generateJs(schema) {
135
135
  for (const file of schema.files) {
136
136
  const f = schema.generateFile(file.name + "_pb.js");
@@ -198,7 +198,7 @@ function generateJs(schema) {
198
198
  }
199
199
  }
200
200
  }
201
- // prettier-ignore
201
+ // biome-ignore format: want this to read well
202
202
  function generateDts(schema) {
203
203
  for (const file of schema.files) {
204
204
  const f = schema.generateFile(file.name + "_pb.d.ts");
@@ -295,7 +295,7 @@ function generateDescDoc(f, desc) {
295
295
  text: lines.join("\n"),
296
296
  });
297
297
  }
298
- // prettier-ignore
298
+ // biome-ignore format: want this to read well
299
299
  function getFileDescCall(f, file, schema) {
300
300
  // Schema provides files with source retention options. Since we do not want to
301
301
  // embed source retention options in generated code, we use FileDescriptorProto
@@ -321,7 +321,7 @@ function getFileDescCall(f, file, schema) {
321
321
  }
322
322
  return (0, util_1.functionCall)(fileDesc, [f.string(info.base64())]);
323
323
  }
324
- // prettier-ignore
324
+ // biome-ignore format: want this to read well
325
325
  function getServiceShapeExpr(f, service) {
326
326
  const p = ["{\n"];
327
327
  for (const method of service.methods) {
@@ -335,7 +335,7 @@ function getServiceShapeExpr(f, service) {
335
335
  p.push("}");
336
336
  return p;
337
337
  }
338
- // prettier-ignore
338
+ // biome-ignore format: want this to read well
339
339
  function generateEnumShape(f, enumeration) {
340
340
  f.print(f.jsDoc(enumeration));
341
341
  f.print(f.export("enum", f.importShape(enumeration).name), " {");
@@ -349,7 +349,7 @@ function generateEnumShape(f, enumeration) {
349
349
  f.print("}");
350
350
  f.print();
351
351
  }
352
- // prettier-ignore
352
+ // biome-ignore format: want this to read well
353
353
  function generateEnumJsonShape(f, enumeration, target) {
354
354
  f.print(f.jsDoc(enumeration));
355
355
  const declaration = target == "ts" ? "type" : "declare type";
@@ -368,7 +368,7 @@ function generateEnumJsonShape(f, enumeration, target) {
368
368
  f.print(f.export(declaration, f.importJson(enumeration).name), " = ", values, ";");
369
369
  f.print();
370
370
  }
371
- // prettier-ignore
371
+ // biome-ignore format: want this to read well
372
372
  function generateMessageShape(f, message, target) {
373
373
  const { Message } = f.runtime;
374
374
  const declaration = target == "ts" ? "type" : "declare type";
@@ -409,7 +409,7 @@ function generateMessageShape(f, message, target) {
409
409
  f.print("};");
410
410
  f.print();
411
411
  }
412
- // prettier-ignore
412
+ // biome-ignore format: want this to read well
413
413
  function generateMessageJsonShape(f, message, target) {
414
414
  const exp = f.export(target == "ts" ? "type" : "declare type", f.importJson(message).name);
415
415
  f.print(f.jsDoc(message));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bufbuild/protoc-gen-es",
3
- "version": "2.2.5",
3
+ "version": "2.3.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Protocol Buffers code generator for ECMAScript",
6
6
  "keywords": [
@@ -24,25 +24,22 @@
24
24
  "scripts": {
25
25
  "prebuild": "rm -rf ./dist/cjs/*",
26
26
  "build": "../../node_modules/typescript/bin/tsc --project tsconfig.json --outDir ./dist/cjs",
27
- "format": "prettier --write --ignore-unknown '.' '!dist' '!.turbo'",
27
+ "format": "biome format --write",
28
28
  "license-header": "license-header",
29
- "lint": "eslint --max-warnings 0 ."
29
+ "lint": "biome lint --error-on-warnings"
30
30
  },
31
31
  "preferUnplugged": true,
32
32
  "dependencies": {
33
- "@bufbuild/protobuf": "^2.2.5",
34
- "@bufbuild/protoplugin": "2.2.5"
33
+ "@bufbuild/protobuf": "^2.3.0",
34
+ "@bufbuild/protoplugin": "2.3.0"
35
35
  },
36
36
  "peerDependencies": {
37
- "@bufbuild/protobuf": "2.2.5"
37
+ "@bufbuild/protobuf": "2.3.0"
38
38
  },
39
39
  "peerDependenciesMeta": {
40
40
  "@bufbuild/protobuf": {
41
41
  "optional": true
42
42
  }
43
43
  },
44
- "files": [
45
- "dist/**",
46
- "bin/**"
47
- ]
44
+ "files": ["dist/**", "bin/**"]
48
45
  }