easyeda 0.0.359 → 0.0.360

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.
package/dist/main.cjs CHANGED
@@ -1078,7 +1078,7 @@ var import_promises = __toESM(require("fs/promises"), 1);
1078
1078
  var package_default = {
1079
1079
  name: "easyeda",
1080
1080
  type: "module",
1081
- version: "0.0.358",
1081
+ version: "0.0.359",
1082
1082
  files: [
1083
1083
  "dist"
1084
1084
  ],
@@ -8463,11 +8463,13 @@ var convertEasyEdaJsonToCircuitJson = (easyEdaJson, {
8463
8463
  );
8464
8464
  const pins = easyEdaJson.dataStr.shape.filter((shape) => shape.type === "PIN");
8465
8465
  const pinLabelSets = pads.map((pad) => {
8466
- const labels = [];
8467
- if (pad.number) labels.push(...getEasyEdaPinAliases(pad.number.toString()));
8466
+ const padAliases = pad.number ? getEasyEdaPinAliases(pad.number.toString()) : [];
8468
8467
  const pin = pins.find((p) => p.pinNumber === pad.number);
8469
- if (pin) labels.push(...getEasyEdaPinAliases(pin.label));
8470
- return labels;
8468
+ const schematicAliases = pin ? getEasyEdaPinAliases(pin.label) : [];
8469
+ const hasNamedSchematicAlias = schematicAliases.some(
8470
+ (alias) => !/^\d+$/.test(alias)
8471
+ );
8472
+ return hasNamedSchematicAlias ? [...schematicAliases, ...padAliases] : [...padAliases, ...schematicAliases];
8471
8473
  });
8472
8474
  const padNumberKeys = pads.map((pad, index) => {
8473
8475
  const padNumber = String(pad.number ?? "").trim();