fix: rpc npm: fix local desktop development (#5583)

typescript was complaining about missing `@deltachat/jsonrpc-client`
when it wasn't installed locally
This commit is contained in:
Simon Laux
2024-05-17 21:28:33 +02:00
committed by GitHub
parent f84f0d5ad9
commit ef6c3f8476
3 changed files with 11 additions and 1 deletions

View File

@@ -1,2 +1,3 @@
platform_package
*.tgz
*.tgz
package-lock.json

View File

@@ -29,3 +29,6 @@ subprocess.run(["python", "scripts/build_platform_package.py", host_target], cap
# 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)

View File

@@ -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));