143: Prepare for publishing r=D4nte a=D4nte

- Test out tarball generated with `npm pack`
- Change name to `web3-waku`
- Introduce changelog file
- Ensure test files are not included in the package

Co-authored-by: Franck Royer <franck@status.im>
This commit is contained in:
bors[bot] 2021-05-11 05:36:29 +00:00 committed by GitHub
commit acdd4ce601
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 53 additions and 28 deletions

View File

@ -1,7 +1,7 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": { "project": "./tsconfig.json" },
"parserOptions": { "project": "./tsconfig.dev.json" },
"env": { "es6": true },
"ignorePatterns": ["node_modules", "build", "coverage", "proto"],
"plugins": ["import", "eslint-comments", "functional"],

17
CHANGELOG.md Normal file
View File

@ -0,0 +1,17 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added
- Support of [Waku v2 Relay](https://rfc.vac.dev/spec/11/).
- Support of [Waku v2 Store](https://rfc.vac.dev/spec/13/).
- [Node Chat App example](./examples/cli-chat).
- [ReactJS Chat App example](./examples/web-chat).
- [Typedoc Documentation](https://status-im.github.io/js-waku/docs).
[Unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/f46ce77f57c08866873b5c80acd052e0ddba8bc9..HEAD

View File

@ -11,7 +11,7 @@
"dependencies": {
"libp2p-tcp": "^0.15.4",
"prompt-sync": "^4.2.0",
"waku": "../../build/main"
"web3-waku": "../../build/main"
},
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^1.0.1",
@ -7509,7 +7509,7 @@
"integrity": "sha512-jkjy6pjU1fxUvI51P+gCsxg1u2n8LSt0W6KrCNQceaziKzff74GoWmjVG46KieVzybO1sttPQmYfrwSHey7GUA==",
"dev": true
},
"node_modules/waku": {
"node_modules/web3-waku": {
"resolved": "../../build/main",
"link": true
},
@ -13563,7 +13563,7 @@
"integrity": "sha512-jkjy6pjU1fxUvI51P+gCsxg1u2n8LSt0W6KrCNQceaziKzff74GoWmjVG46KieVzybO1sttPQmYfrwSHey7GUA==",
"dev": true
},
"waku": {
"web3-waku": {
"version": "file:../../build/main"
},
"which": {

View File

@ -33,7 +33,7 @@
"dependencies": {
"libp2p-tcp": "^0.15.4",
"prompt-sync": "^4.2.0",
"waku": "../../build/main"
"web3-waku": "../../build/main"
},
"devDependencies": {
"@istanbuljs/nyc-config-typescript": "^1.0.1",

View File

@ -1,5 +1,5 @@
import { expect } from 'chai';
import { ChatMessage } from 'waku';
import { ChatMessage } from 'web3-waku';
import { formatMessage } from './chat';

View File

@ -3,7 +3,7 @@ import util from 'util';
import TCP from 'libp2p-tcp';
import { multiaddr, Multiaddr } from 'multiaddr';
import { ChatMessage, StoreCodec, Waku, WakuMessage } from 'waku';
import { ChatMessage, StoreCodec, Waku, WakuMessage } from 'web3-waku';
const ChatContentTopic = 'dingpu';

View File

@ -11,8 +11,8 @@
"react": "^16.14.0",
"react-dom": "^16.14.0",
"server-name-generator": "^1.0.5",
"waku": "../../build/main",
"web-vitals": "^1.1.1"
"web-vitals": "^1.1.1",
"web3-waku": "../../build/main"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.11.10",
@ -22885,10 +22885,6 @@
"node": ">=10"
}
},
"node_modules/waku": {
"resolved": "../../build/main",
"link": true
},
"node_modules/walker": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz",
@ -23230,6 +23226,10 @@
"resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-1.1.1.tgz",
"integrity": "sha512-jYOaqu01Ny1NvMwJ3dBJDUOJ2PGWknZWH4AUnvFOscvbdHMERIKT2TlgiAey5rVyfOePG7so2JcXXZdSnBvioQ=="
},
"node_modules/web3-waku": {
"resolved": "../../build/main",
"link": true
},
"node_modules/webidl-conversions": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz",
@ -43270,9 +43270,6 @@
"xml-name-validator": "^3.0.0"
}
},
"waku": {
"version": "file:../../build/main"
},
"walker": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz",
@ -43571,6 +43568,9 @@
"resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-1.1.1.tgz",
"integrity": "sha512-jYOaqu01Ny1NvMwJ3dBJDUOJ2PGWknZWH4AUnvFOscvbdHMERIKT2TlgiAey5rVyfOePG7so2JcXXZdSnBvioQ=="
},
"web3-waku": {
"version": "file:../../build/main"
},
"webidl-conversions": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz",

View File

@ -8,8 +8,8 @@
"react": "^16.14.0",
"react-dom": "^16.14.0",
"server-name-generator": "^1.0.5",
"waku": "../../build/main",
"web-vitals": "^1.1.1"
"web-vitals": "^1.1.1",
"web3-waku": "../../build/main"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.11.10",

View File

@ -2,7 +2,7 @@ import { multiaddr } from 'multiaddr';
import PeerId from 'peer-id';
import { useEffect, useState } from 'react';
import './App.css';
import { ChatMessage, WakuMessage, StoreCodec, Waku } from 'waku';
import { ChatMessage, WakuMessage, StoreCodec, Waku } from 'web3-waku';
import handleCommand from './command';
import Room from './Room';
import { WakuContext } from './WakuContext';

View File

@ -1,5 +1,5 @@
import { useEffect, useRef, useState } from 'react';
import { ChatMessage } from 'waku';
import { ChatMessage } from 'web3-waku';
import {
Message,
MessageText,

View File

@ -1,4 +1,4 @@
import { ChatMessage, WakuMessage } from 'waku';
import { ChatMessage, WakuMessage } from 'web3-waku';
import { ChatContentTopic } from './App';
import ChatList from './ChatList';
import MessageInput from './MessageInput';

View File

@ -1,5 +1,5 @@
import { createContext, useContext } from 'react';
import { Waku } from 'waku';
import { Waku } from 'web3-waku';
export type WakuContextType = {
waku?: Waku;

View File

@ -1,6 +1,6 @@
import { multiaddr } from 'multiaddr';
import PeerId from 'peer-id';
import { Waku } from 'waku';
import { Waku } from 'web3-waku';
function help(): string[] {
return [

View File

@ -1,5 +1,5 @@
{
"name": "js-waku",
"name": "web3-waku",
"version": "1.0.0",
"description": "TypeScript implementation of the Waku v2 protocol",
"main": "build/main/index.js",
@ -16,6 +16,7 @@
"build": "run-s build:*",
"build:main": "tsc -p tsconfig.json",
"build:module": "tsc -p tsconfig.module.json",
"build:dev": "tsc -p tsconfig.dev.json",
"fix": "run-s fix:*",
"fix:prettier": "prettier \"src/**/*.ts\" \"./*.json\" --write",
"fix:lint": "eslint src --ext .ts --fix",

View File

@ -16,7 +16,7 @@ export const RelayDefaultTopic = '/waku/2/default-waku/proto';
* We will send gossip to RelayGossipFactor * (total number of non-mesh peers), or
* RelayDlazy, whichever is greater.
*/
export declare const RelayGossipFactor = 0.25;
export const RelayGossipFactor = 0.25;
/**
* GossipsubHeartbeatInitialDelay is the short delay before the heartbeat timer begins
@ -74,4 +74,4 @@ export const RelayOpportunisticGraftPeers = 2;
* default if your system is pushing more than 5000 messages in GossipsubHistoryGossip heartbeats;
* with the defaults this is 1666 messages/s.
*/
export declare const RelayMaxIHaveLength = 5000;
export const RelayMaxIHaveLength = 5000;

7
tsconfig.dev.json Normal file
View File

@ -0,0 +1,7 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"noEmit": true
},
"exclude": ["node_modules/**"]
}

View File

@ -46,7 +46,7 @@
"typeRoots": ["node_modules/@types", "src/types"]
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules/**"],
"exclude": ["node_modules/**", "src/**/*.spec.ts", "src/test_utils"],
"compileOnSave": false,
"ts-node": {
"files": true

View File

@ -5,5 +5,5 @@
"outDir": "build/module",
"module": "esnext"
},
"exclude": ["node_modules/**"]
"exclude": ["node_modules/**", "src/**/*.spec.ts", "src/test_utils"]
}