Skip to content

Commit

Permalink
fix jlcpcb imports with arc issues, update for shared pin label suppo…
Browse files Browse the repository at this point in the history
…rt, fix errors in local dev to show jlcpcb import errors (#80)

* fix jlcpcb imports, update for shared pin label support, fix errors in local dev to show details

* update core with rotation fix
  • Loading branch information
seveibar authored Oct 16, 2024
1 parent 5413390 commit 4e456d3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Binary file modified bun.lockb
Binary file not shown.
10 changes: 6 additions & 4 deletions fake-snippets-api/routes/api/snippets/generate_from_jlcpcb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ export default withRouteSpec({
try {
// Fetch the EasyEDA component data
const rawEasyJson = await fetchEasyEDAComponent(jlcpcb_part_number).catch(
(e) => `Error in fetchEasyEDAComponent: ${e.toString()}`,
(e) => {
throw new Error(`Error in fetchEasyEDAComponent: ${e.toString()}`)
},
)

// Convert to TypeScript React component
const tsxComponent = await convertRawEasyEdaToTs(rawEasyJson).catch(
(e) => `Error in convertRawEasyEdaToTs ${e.toString()}`,
)
const tsxComponent = await convertRawEasyEdaToTs(rawEasyJson).catch((e) => {
throw new Error(`Error in convertRawEasyEdaToTs ${e.toString()}`)
})

// Create a new snippet
const newSnippet = {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"@tscircuit/footprinter": "^0.0.70",
"@tscircuit/mm": "^0.0.8",
"@tscircuit/pcb-viewer": "^1.10.5",
"@tscircuit/props": "^0.0.73",
"@types/file-saver": "^2.0.7",
"@types/ms": "^0.7.34",
"@typescript/ata": "^0.9.7",
Expand All @@ -73,7 +74,7 @@
"cmdk": "1.0.0",
"codemirror": "^6.0.1",
"date-fns": "^4.1.0",
"easyeda": "^0.0.49",
"easyeda": "^0.0.51",
"embla-carousel-react": "^8.3.0",
"fflate": "^0.8.2",
"file-saver": "^2.0.5",
Expand Down Expand Up @@ -103,7 +104,7 @@
"@babel/standalone": "^7.25.6",
"@biomejs/biome": "^1.9.2",
"@playwright/test": "^1.48.0",
"@tscircuit/core": "^0.0.116",
"@tscircuit/core": "^0.0.120",
"@tscircuit/prompt-benchmarks": "^0.0.14",
"@types/babel__standalone": "^7.1.7",
"@types/bun": "^1.1.10",
Expand Down

0 comments on commit 4e456d3

Please sign in to comment.