Commit Graph

269 Commits

Author SHA1 Message Date
status-bors-ng[bot] d7181da98b
Merge #892
892: fix: type export via `typesVersions` r=fryorcraken a=filoozom

## Problem

Importing anything from TypeScript in `js-waku/lib/` (`v0.25.0-rc.0`) does not work. It can't find the types despite the `exports.*.types` in `package.json`.

## Solution

This solution was inspired by `libp2p` ([example in ``@libp2p/interfaces`](https://github.com/libp2p/js-libp2p-interfaces/blob/master/packages/interfaces/package.json#L24-L39)),` and just adds `typesVersions` to `package.json`.

Documentation: https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#folder-redirects-using-

## Notes

- See https://github.com/status-im/js-waku/issues/891#issuecomment-1217388556


Co-authored-by: Philippe Schommers <philippe@schommers.be>
2022-08-19 04:52:27 +00:00
Philippe Schommers 5137f28cbf
fix: type export via `typesVersions` 2022-08-19 12:41:49 +10:00
fryorcraken.eth 9cad6d5d72
fix: add peer_discovery_static_list to exports map
Needed to access `PeerDiscoveryStaticPeers`.
2022-08-17 23:29:23 +10:00
fryorcraken.eth 1c2df434e0
fix(deps): freeze @libp2p/interface-connection 2022-08-16 15:24:11 +10:00
fryorcraken.eth 38e39e71be
fix(deps): free uint8arraylist
Some issue with transient dependencies.
2022-08-16 15:06:11 +10:00
fryorcraken.eth 574e99c768
chore(deps): upgrade it-pipe 2022-08-16 14:48:31 +10:00
fryorcraken.eth b866c650bb
chore(deps): install used transient dep 2022-08-16 14:47:16 +10:00
fryorcraken.eth d560f8ce0e
fix: bundling with exports map 2022-08-07 12:03:05 +10:00
fryorcraken.eth 731318fa66
feat: export create_waku 2022-08-07 12:03:04 +10:00
fryorcraken.eth bcbf40ee10
chore: rename test scripts
both tests are `unit`, also script name shouldn't change
if a different framework (karma) is used.
2022-08-06 01:02:15 +10:00
fryorcraken.eth 187287a28c
feat: all buffer dependencies have been removed 2022-08-05 21:31:41 +10:00
fryorcraken.eth 334e331090
fix: remove nyc
Not used.
2022-08-05 16:43:05 +10:00
fryorcraken.eth bf47803631
fix: size-limit by setting buffer false in webpack 2022-08-03 16:46:53 +10:00
fryorcraken.eth 69b3595d6f
chore: bump size-limit to 8.0.0 2022-08-03 16:46:53 +10:00
fryorcraken.eth b67848d2d5
style: lint cjs files 2022-08-03 16:05:36 +10:00
Franck Royer 8126e96f33
chore: remove multiformats (unused) 2022-08-03 09:30:40 +10:00
Franck Royer 2004bf193e
chore: remove @types/varint (unused) 2022-08-03 09:30:40 +10:00
Franck Royer 9297ad6021
chore: remove @types/secp256k1 (unused) 2022-08-03 09:30:40 +10:00
Franck Royer 157b5bd3c2
chore: remove webpack-cli 2022-08-03 09:30:40 +10:00
Franck Royer 3b93583848
fix: size-limit 2022-08-03 09:30:40 +10:00
Franck Royer c3991a2987
fix: fix tsc incremental build feature
dist folder is deleted automatically but not tsbuildinfo file so nothing
is built as it is assumed already built by tsc.
2022-08-03 09:30:39 +10:00
Franck Royer 8b350f4272
feat: remove node polyfilling
Does not seem necessary.
2022-08-03 09:30:39 +10:00
Franck Royer 94a21bc75e
feat! remove esm package folder 2022-08-03 09:30:39 +10:00
Franck Royer 785a220dff
fix: remove unused stream-browserify 2022-08-03 09:30:39 +10:00
Franck Royer 50890b5206
feat: remove umd build, minimize esm bundle 2022-08-03 09:30:39 +10:00
Franck Royer 338e3c9964
feat: add esm bundling 2022-08-03 09:30:38 +10:00
Franck Royer d2703d081e
feat!: remove cjs build 2022-08-03 09:30:38 +10:00
Franck Royer ee12ec0ab5
chore: bump dns-query to 0.11.2 2022-08-03 09:30:37 +10:00
Franck Royer 9965ba9059
chore: bump @libp2p/mplex to 4.0.1 2022-08-03 09:30:37 +10:00
Franck Royer d7b08f7e24
fix: Wait for remote peer for Waku Relay
The promise resolves only if a remote peer is added to the gossipsub
mesh.
2022-08-03 09:30:37 +10:00
Franck Royer da9b7b31f5
chore: bump @chainsafe/libp2p-gossipsub to 3.4.0 2022-08-03 09:30:36 +10:00
Franck Royer 4eeca93d47
chore: bump libp2p to next (0.38.0 rc) 2022-08-03 09:30:36 +10:00
Franck Royer c346361940
chore: bump @libp2p/mplex to 4.0.0 2022-08-03 09:30:36 +10:00
Franck Royer 4669c4d149
chore: upgrade @chainsafe/libp2p-gossipsub to 3.3.0 2022-08-03 09:30:36 +10:00
Franck Royer 61e6ec8ed4
chore: upgrade rollup-plugin-polyfill-node 2022-08-03 09:30:36 +10:00
Franck Royer 1f9a12cddb
chore: upgrade libp2p-gossipsub and libp2p-noise 2022-08-03 09:30:36 +10:00
Franck Royer f768686e51
fix: fix pipe usage 2022-08-03 09:30:33 +10:00
Franck Royer 51d5bc19a2
fix: removed usage of buffer in streams 2022-07-20 12:45:14 +10:00
Franck Royer 157e42e148
fix: Do not use `names` import 2022-07-20 12:44:47 +10:00
Franck Royer 9e27a0082e
Sort out ENR key generation, upgrade to @libp2p/crypto 2022-07-20 12:44:44 +10:00
Franck Royer 4cf197e54d
Implement libp2p bootstrap interface 2022-07-20 12:43:40 +10:00
Franck Royer 081f62b07b
Upgrade libp2p-noise 2022-07-20 12:42:26 +10:00
Franck Royer 8e5318dc4a
Upgrade libp2p-gossipsub 2022-07-20 12:42:24 +10:00
Franck Royer 98c93c8283
Upgrade libp2p, peer-id, multiaddr
Use new packages and fix most compilation errors.
Remaining error to be dealt with in waku.ts.
2022-07-20 12:40:37 +10:00
Franck Royer 0cec093a4d
chore!: upgrade dns-query 2022-07-19 16:31:21 +10:00
Franck Royer 1fcf84b348
Fix size-limit 2022-06-20 14:32:22 +10:00
Franck Royer 3dde86fcb7
Revert to webpack for UMD 2022-06-20 14:32:22 +10:00
Franck Royer 7432aaca25
Add `main` and `module` properties 2022-06-20 14:32:22 +10:00
Franck Royer e3b6292a6e
Use rollup instead of tsc to generate cjs files 2022-06-20 14:32:22 +10:00
Franck Royer ebbb0a2713
Re-introduce cjs build 2022-06-20 14:32:22 +10:00
Franck Royer 7ea98c1af0
Script to add js extension to esm files 2022-06-20 14:32:21 +10:00
Franck Royer 58006e1e38
Include root source files 2022-06-20 14:32:21 +10:00
Franck Royer 43580dd093
Add types export 2022-06-20 14:32:21 +10:00
Franck Royer 792c84ec31
Fix exports field 2022-06-20 14:32:21 +10:00
Franck Royer c4758a8737
Setup rollup, move files to dist/ 2022-06-20 14:32:20 +10:00
Franck Royer 82aba32f9e
Migrate from ts-proto to protons
The latter does not bring Buffer/Long and is ESM compatible.
2022-06-20 14:32:20 +10:00
Franck Royer 75d2cf1113
Fix size-limit 2022-06-20 14:32:20 +10:00
Franck Royer 35a4cba37a
Include src files in package
To remove source map warning
2022-06-20 14:32:20 +10:00
Franck Royer 4352cb923d
Replace karma-env-preproc with webpack 2022-06-20 14:32:20 +10:00
Franck Royer cb10ca16d1
Migrate package to ESM 2022-06-20 14:32:20 +10:00
Franck Royer 04fbc55fdf
Use `npm ci` in CI
So there is no attempt to update the lock file.
2022-06-17 16:30:03 +10:00
Franck Royer 1a53a35358
Release 0.24.0 2022-05-27 23:46:18 +10:00
Franck Royer ec10dcd0ad
Add `prepublish` script 2022-05-27 23:38:12 +10:00
Franck Royer 7b54dd1b59
Run build in parallel
They use to have intra-dependencies but not the case anymore.
2022-05-27 23:29:28 +10:00
Franck Royer 5baf42c76e
Remove `build:dev`
This is a type check, already done with `test:tsc`
2022-05-27 23:29:27 +10:00
Franck Royer 354ca4e7b5
Delete build folder before building 2022-05-27 23:24:04 +10:00
Franck Royer c66927668b
Run tsc as part of test script instead of building 2022-05-20 10:32:43 +10:00
Franck Royer 7d9406bcfc
Release 0.23.0 2022-05-19 15:36:24 +10:00
Franck Royer 1d8e3837ea
Replace deprecated `multihashes` with `multiformats` 2022-05-19 15:17:16 +10:00
Franck Royer 48efcc1562
Add all used deps 2022-05-18 20:41:10 +10:00
Franck Royer b708077483
Remove assert usage 2022-05-13 17:28:38 +10:00
Franck Royer 920668c54c
Release 0.22.0 2022-05-10 16:44:17 +10:00
Franck Royer 00be6b147d
Remove crypto-browserify 2022-05-09 23:32:43 +10:00
Franck Royer 556e060335
Replace `secp256k1` with `@noble/secp256k1` 2022-05-09 23:10:15 +10:00
Franck Royer fd15b190d5
Release 0.21.0 2022-05-05 16:45:55 +10:00
Franck Royer dee587d644
Remove unneeded dev dep 2022-05-02 16:37:27 +10:00
Franck Royer 882ddac94e
Run prettier on GitHub workflows 2022-05-02 16:37:25 +10:00
Franck Royer 929f05968b
Release 0.20.0 2022-03-30 10:14:25 +11:00
Franck Royer 13d12f8284
Froze `libp2p-gossipsub` version to 0.13.0
0.13.2 moved heartbeat class which is a breaking change.
2022-03-29 21:28:03 +11:00
Franck Royer 483b11723c
Release 0.19.2 2022-03-21 10:36:27 +11:00
Dylan Oliver 565ffb18fb
fix package.json exports to work in node as well as browser 2022-03-18 14:41:23 +11:00
Franck R ac337855aa
Release 0.19.1 (#610) 2022-03-10 16:25:51 +11:00
Franck R e4024d5c72
Release 0.19.0 (#607) 2022-03-09 14:29:35 +11:00
Franck R 2798376776
Remove ecies-geth (#598)
* test: specify encryption method

Makes debugging easier.

* Fix log typo

* Remove ecies-geth

Start removal of elliptic dependency and move towards exclusive usage to
CryptoSubtle.
2022-03-06 23:20:59 +11:00
Franck Royer fe30449861
Add exports field for node
While this library targets the browser, it is sometimes helpful to use
it in need for experiments.
For example: https://github.com/status-im/js-waku/pull/588
2022-03-04 14:49:33 +11:00
Franck Royer 8029200984
Get eslint to fix files in precommit git hook
We need the hook to fix things when possible.
2022-03-01 17:04:03 +11:00
Franck Royer 0bbefe70f3
Add git hook to format & lint file 2022-02-25 14:18:46 +11:00
Franck R d838f53c78
Release 0.18.0 (#576) 2022-02-24 16:40:14 +11:00
Franck R a488988f37
Implement Waku Store 2.0.0-beta4 (#566) 2022-02-24 16:25:58 +11:00
jemboh da52903357
Angular js example for relay best practices (#549)
Co-authored-by: Franck Royer <franck@status.im>
2022-02-22 14:02:08 +11:00
Franck R 64657a250f
Replace rlp with ethers' rlp (#526) 2022-02-16 14:08:48 +11:00
Franck R 297d65ce03
Reduce Buffer usage in ENR module (#522) 2022-02-16 12:11:54 +11:00
Franck R 9931011c93
Release 0.17.0 (#538) 2022-02-16 11:55:53 +11:00
Franck R 30faaf91d3
Add size-limit (#536) 2022-02-16 11:13:18 +11:00
Franck R 2dc8764be2
Remove axios (#520) 2022-02-14 09:26:22 +11:00
Franck R 0f678750df
Improve docs (#519) 2022-02-11 17:27:15 +11:00
Franck R 4c80f7f0df
Remove odd prettier config (#500) 2022-02-04 14:12:00 +11:00
Franck R 91d6e436d4
Do not run bootstrap live data test as part of normal CI (#468) 2022-02-03 16:58:53 +11:00
dependabot[bot] ce9609a376
Bump @types/mocha from 8.2.2 to 9.1.0 (#486)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-03 15:57:36 +11:00
Franck R 69f0005445
Bump libp2p from 0.32.4 to 0.36.2, libp2p-gossipsub from 0.12.1 to 0.13.0 (#470)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-02 15:12:08 +11:00