Skip to content

Commit

Permalink
fix: rpc npm: fix local desktop development (#5583)
Browse files Browse the repository at this point in the history
typescript was complaining about missing `@deltachat/jsonrpc-client`
when it wasn't installed locally
  • Loading branch information
Simon-Laux authored May 17, 2024
1 parent f84f0d5 commit ef6c3f8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deltachat-rpc-server/npm-package/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
platform_package
*.tgz
*.tgz
package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@

# run update_optional_dependencies_and_version.js to adjust the package / make it installable locally
subprocess.run(["node", "scripts/update_optional_dependencies_and_version.js", "--local"], capture_output=False, check=True)

# typescript / npm local package installing/linking needs that this package has it's own node_modules folder
subprocess.run(["npm", "i"], capture_output=False, check=True)
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,10 @@ for (const { folder_name, package_name } of platform_package_names) {
: version;
}

if (is_local) {
package_json.peerDependencies["@deltachat/jsonrpc-client"] = 'file:../../deltachat-jsonrpc/typescript'
} else {
package_json.peerDependencies["@deltachat/jsonrpc-client"] = "*"
}

await fs.writeFile("./package.json", JSON.stringify(package_json, null, 4));

0 comments on commit ef6c3f8

Please sign in to comment.