Skip to content

Commit

Permalink
Revert "chore: fix tsconfig and pbjs issue (#574)" (#577)
Browse files Browse the repository at this point in the history
Reverts because it failed to load RPC components from rings_node_pb.js
  • Loading branch information
RyanKung committed Apr 27, 2024
1 parent ab74421 commit db78a22
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
8 changes: 3 additions & 5 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import init from "./rings_node.js";
import init from "./rings_node";

export default init;

export * from "./rings_node.js";
import Long from "long";

export * from "./rings_node_proto.js";
export * from "./rings_node";
export * from "./rings_node_proto";
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,22 @@
"description": "Rings is a structured peer-to-peer network implementation using WebRTC, Chord algorithm, and full WebAssembly (WASM) support.\n",
"version": "0.6.1",
"license": "GPL-3.0",
"type": "module",
"repository": {
"type": "git",
"url": "https://github.com/RingsNetwork/rings-node"
},
"scripts": {
"wasm_pack": "wasm-pack build crates/node --release --scope ringsnetwork -t web --no-default-features --features browser_default --features console_error_panic_hook",
"proto_generate": "mkdir -p dist && pbjs -t static-module --keep-case -o dist/rings_node_proto.js crates/rpc/src/protos/rings_node.proto && pbts -o dist/rings_node_proto.d.ts dist/rings_node_proto.js",
"prepare": "npm run wasm_pack && npm run proto_generate && cp crates/node/pkg/rings_node* ./dist && cp index.ts ./dist && tsc --target es6 --moduleResolution nodenext --module nodenext ./dist/index.ts"
"prepare": "npm run wasm_pack && npm run proto_generate && cp crates/node/pkg/rings_node* ./dist && cp index.ts ./dist && tsc ./dist/index.ts"
},
"dependencies": {
"circomlib": "^2.0.5",
"protobufjs": "https://github.com/RingsNetwork/protobuf.js#83686a0",
"long": "^3.2.0"
"protobufjs": "https://github.com/RingsNetwork/protobuf.js#83686a0"
},
"devDependencies": {
"protobufjs-cli": "^1.1.2",
"typescript": "^5"
"typescript": "^4.9.5"
},
"files": [
"dist/"
Expand Down
8 changes: 8 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"outDir": "./dist",
"target": "es6",
"declaration": true,
"esModuleInterop": true
}
}

0 comments on commit db78a22

Please sign in to comment.