@go-avro/avro-js 0.0.89 → 0.0.90

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.
@@ -5,3 +5,4 @@ export interface Label {
5
5
  color: string;
6
6
  jobs: string[];
7
7
  }
8
+ export declare const resolveLabels: (labels: Label[] | undefined, ...refGroups: (readonly (string | null | undefined)[] | undefined)[]) => Label[];
@@ -1 +1,16 @@
1
- export {};
1
+ export const resolveLabels = (labels, ...refGroups) => {
2
+ const seen = new Set();
3
+ const resolved = [];
4
+ for (const refs of refGroups) {
5
+ for (const ref of refs ?? []) {
6
+ if (!ref)
7
+ continue;
8
+ const label = labels?.find((l) => l.id === ref || l.name === ref);
9
+ if (label && !seen.has(label.id)) {
10
+ seen.add(label.id);
11
+ resolved.push(label);
12
+ }
13
+ }
14
+ }
15
+ return resolved;
16
+ };
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const AVRO_JS_VERSION = "0.0.89";
1
+ export declare const AVRO_JS_VERSION = "0.0.90";
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED by scripts/gen-version.js — do not edit by hand.
2
2
  // Regenerated from package.json by the `prebuild` npm hook.
3
- export const AVRO_JS_VERSION = '0.0.89';
3
+ export const AVRO_JS_VERSION = '0.0.90';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-avro/avro-js",
3
- "version": "0.0.89",
3
+ "version": "0.0.90",
4
4
  "description": "JS client for Avro backend integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",