easyeda 0.0.96 → 0.0.98

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/README.md CHANGED
@@ -123,3 +123,16 @@ const MyCircuit = () => {
123
123
  ```
124
124
 
125
125
  These components include proper typing for props and integrate seamlessly with the tscircuit ecosystem.
126
+
127
+ ## Development
128
+
129
+ ### Adding a test for a new part
130
+
131
+ Just run the following command. Use `git status` to see the files it introduces.
132
+
133
+ ```bash
134
+ bun run add-test-for-part C46749
135
+ ```
136
+
137
+ You can then run the test with `bun test path/to/file.test.ts` until you can
138
+ successfully get the part working!
@@ -2660,7 +2660,6 @@ var convertBetterEasyToTsx = async ({
2660
2660
  });
2661
2661
  const rawPn = betterEasy.dataStr.head.c_para["Manufacturer Part"];
2662
2662
  const pn = normalizeManufacturerPartNumber(rawPn);
2663
- const [cad_component2] = su_default(circuitJson).cad_component.list();
2664
2663
  const sourcePorts = su_default(circuitJson).source_port.list();
2665
2664
  const pinLabels = {};
2666
2665
  const sortedPorts = sourcePorts.sort((a, b) => {
@@ -2674,13 +2673,14 @@ var convertBetterEasyToTsx = async ({
2674
2673
  ...sourcePort.port_hints ?? []
2675
2674
  ];
2676
2675
  }
2676
+ const [cadComponent] = su_default(circuitJson).cad_component.list();
2677
2677
  let modelObjUrl;
2678
- if (cad_component2.model_obj_url) {
2678
+ if (cadComponent?.model_obj_url) {
2679
2679
  const isValidUrl = await checkModelObjUrlValidity(
2680
- cad_component2.model_obj_url
2680
+ cadComponent.model_obj_url
2681
2681
  );
2682
2682
  if (isValidUrl) {
2683
- modelObjUrl = cad_component2.model_obj_url;
2683
+ modelObjUrl = cadComponent.model_obj_url;
2684
2684
  }
2685
2685
  }
2686
2686
  const supplierPartNumbers = {
@@ -2796,4 +2796,4 @@ export {
2796
2796
  convertRawEasyToTsx,
2797
2797
  convertEasyEdaJsonToVariousFormats
2798
2798
  };
2799
- //# sourceMappingURL=chunk-CNAN353Z.js.map
2799
+ //# sourceMappingURL=chunk-3MCLFQGF.js.map