Skip to content

Commit f679bd0

Browse files
authored
linera-web: improve package.jsons (#4512)
## Motivation The package metadata currently points to `linera-web`. Also, `npm publish --public` doesn't work for new packages, and could be missed by mistake. ## Proposal Add some stub documentation here in `linera-protocol`, and update the `package.json`s to point to it. Also, add the public publish option to the config. ## Test Plan Published it. ## Release Plan - These changes should be backported to the latest `devnet` branch - These changes should be backported to the latest `testnet` branch ## Links - [reviewer checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
1 parent ccf84f3 commit f679bd0

File tree

5 files changed

+48
-5
lines changed

5 files changed

+48
-5
lines changed

linera-web/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!-- cargo-rdme start -->
2+
3+
# `linera-web`
4+
5+
This module defines the JavaScript bindings to the client API.
6+
7+
It is compiled to Wasm, with a JavaScript wrapper to inject its imports, and published on
8+
NPM as `@linera/client`.
9+
10+
There is a supplementary package `@linera/signer`, contained within the `signer`
11+
subdirectory, that defines signer implementations for different transaction-signing
12+
policies, including in-memory keys and signing using an existing MetaMask wallet.
13+
14+
<!-- cargo-rdme end -->
15+
16+
## Building
17+
18+
Make sure your `cargo` invokes a nightly `rustc`. Then, you can build
19+
the package with `pnpm build` and publish it with `pnpm publish`.
20+
21+
## Contributing
22+
23+
See the [CONTRIBUTING](../CONTRIBUTING.md) file for how to help out.
24+
25+
## License
26+
27+
This project is available under the terms of the [Apache 2.0 license](../LICENSE).

linera-web/clippy.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
doc-valid-idents = ["MetaMask", ".."]

linera-web/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"name": "@linera/client",
33
"version": "0.16.0",
44
"description": "Web client for the Linera blockchain",
5+
"publishConfig": {
6+
"access": "public"
7+
},
58
"main": "dist/linera_web.js",
69
"types": "dist/linera_web.d.ts",
710
"files": [
@@ -22,12 +25,12 @@
2225
"license": "Apache-2.0",
2326
"repository": {
2427
"type": "git",
25-
"url": "git+https://github.com/linera-io/linera-web.git"
28+
"url": "git+https://github.com/linera-io/linera-protocol.git"
2629
},
2730
"bugs": {
28-
"url": "https://github.com/linera-io/linera-web/issues"
31+
"url": "https://github.com/linera-io/linera-protocol/issues"
2932
},
30-
"homepage": "https://github.com/linera-io/linera-web#readme",
33+
"homepage": "https://github.com/linera-io/linera-protocol/tree/main/linera-web#readme",
3134
"devDependencies": {
3235
"prettier": "3.5.3",
3336
"typedoc": "^0.28.5",

linera-web/signer/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"name": "@linera/signer",
33
"version": "0.1.0",
44
"description": "Implementations of Signer interface for the Linera blockchain",
5+
"publishConfig": {
6+
"access": "public"
7+
},
58
"files": [
69
"dist"
710
],

linera-web/src/lib.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,17 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
/*!
5-
This module defines the client API for the Web extension.
6-
*/
5+
# `linera-web`
6+
7+
This module defines the JavaScript bindings to the client API.
8+
9+
It is compiled to Wasm, with a JavaScript wrapper to inject its imports, and published on
10+
NPM as `@linera/client`.
11+
12+
There is a supplementary package `@linera/signer`, contained within the `signer`
13+
subdirectory, that defines signer implementations for different transaction-signing
14+
policies, including in-memory keys and signing using an existing MetaMask wallet.
15+
*/
716

817
// We sometimes need functions in this module to be async in order to
918
// ensure the generated code will return a `Promise`.

0 commit comments

Comments
 (0)