Use ESM in JavaScript examples

As it is what JS projects would use when using the js-waku npm package.
This commit is contained in:
F 2021-11-26 15:54:54 +11:00
parent de9b313b65
commit 8909164f6d
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
5 changed files with 20 additions and 10 deletions

View File

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Changed
- Examples: JS examples uses local ESM folder to replicate behaviour of js-waku publish package.
### Fixed
- `TypeError` issue related to constructors using js-waku in a JS project

View File

@ -11,7 +11,7 @@
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"js-waku": "../../build/main",
"js-waku": "../../build/esm",
"protons": "^2.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
@ -19,7 +19,10 @@
"web-vitals": "^1.0.1"
}
},
"../../build/main": {},
"../../build/esm": {},
"../../build/main": {
"extraneous": true
},
"node_modules/@babel/code-frame": {
"version": "7.14.5",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz",
@ -12157,7 +12160,7 @@
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
},
"node_modules/js-waku": {
"resolved": "../../build/main",
"resolved": "../../build/esm",
"link": true
},
"node_modules/js-yaml": {
@ -30850,7 +30853,7 @@
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
},
"js-waku": {
"version": "file:../../build/main"
"version": "file:../../build/esm"
},
"js-yaml": {
"version": "3.14.1",

View File

@ -6,7 +6,7 @@
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"js-waku": "../../build/main",
"js-waku": "../../build/esm",
"protons": "^2.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",

View File

@ -11,7 +11,7 @@
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"js-waku": "../../build/main",
"js-waku": "../../build/esm",
"protons": "^2.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
@ -19,7 +19,10 @@
"web-vitals": "^1.1.2"
}
},
"../../build/main": {},
"../../build/esm": {},
"../../build/main": {
"extraneous": true
},
"node_modules/@babel/code-frame": {
"version": "7.14.5",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz",
@ -12158,7 +12161,7 @@
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
},
"node_modules/js-waku": {
"resolved": "../../build/main",
"resolved": "../../build/esm",
"link": true
},
"node_modules/js-yaml": {
@ -30857,7 +30860,7 @@
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
},
"js-waku": {
"version": "file:../../build/main"
"version": "file:../../build/esm"
},
"js-yaml": {
"version": "3.14.1",

View File

@ -6,7 +6,7 @@
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"js-waku": "../../build/main",
"js-waku": "../../build/esm",
"protons": "^2.0.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",