Skip to content

Commit

Permalink
use posinstall to do deprecation warnings (#3917)
Browse files Browse the repository at this point in the history
* use posinstall to do deprecation warnings

* add to change log

* add preinstall warning

* remove preinstall

* add warnings to bzz and shh package.json

Co-authored-by: Wyatt Barnes <[email protected]>
  • Loading branch information
frankiebee and spacesailor24 authored Mar 16, 2021
1 parent 2c5a8ec commit d37d187
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,5 +361,6 @@ Released with 1.0.0-beta.37 code base.
### Changed

- Unified babel compiler for `web3-eth2-core` and `web3-eth2-beaconchain` (#3892)
- moved deprecation warnings to postinstall scripts (#3917)
- Upgrade `@chainsafe/geth-dev-assistant` from `0.1.5` to `0.1.9` (#3950)
- Replaced hardcoded infura link with Github Secret for some tests (#3943)
3 changes: 2 additions & 1 deletion packages/web3-bzz/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"types": "types/index.d.ts",
"scripts": {
"tsc": "tsc -b tsconfig.json",
"dtslint": "dtslint --localTs ../../node_modules/typescript/lib types"
"dtslint": "dtslint --localTs ../../node_modules/typescript/lib types",
"postinstall": "echo \"WARNING: the web3-bzz api will be deprecated in the next version\""
},
"main": "lib/index.js",
"dependencies": {
Expand Down
4 changes: 0 additions & 4 deletions packages/web3-bzz/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ var swarm = require("swarm-js");

var Bzz = function Bzz(provider) {


console.warn('web3-bzz package will be deprecated in version 1.3.5 and will no longer be supported.')


this.givenProvider = Bzz.givenProvider;

if (provider && provider._requestManager) {
Expand Down
3 changes: 2 additions & 1 deletion packages/web3-shh/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"types": "types/index.d.ts",
"scripts": {
"tsc": "tsc -b tsconfig.json",
"dtslint": "dtslint --localTs ../../node_modules/typescript/lib types"
"dtslint": "dtslint --localTs ../../node_modules/typescript/lib types",
"postinstall": "echo \"WARNING: the web3-shh api will be deprecated in the next version\""
},
"main": "lib/index.js",
"dependencies": {
Expand Down
3 changes: 0 additions & 3 deletions packages/web3-shh/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ var Net = require('web3-net');
var Shh = function Shh() {


console.warn('web3-shh package will be deprecated in version 1.3.5 and will no longer be supported.')


var _this = this;

// sets _requestmanager
Expand Down
3 changes: 2 additions & 1 deletion packages/web3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"types": "types/index.d.ts",
"scripts": {
"tsc": "tsc -b tsconfig.json",
"dtslint": "dtslint --localTs ../../node_modules/typescript/lib types"
"dtslint": "dtslint --localTs ../../node_modules/typescript/lib types",
"postinstall": "echo \"WARNING: the web3-shh and web3-bzz api will be deprecated in the next version\""
},
"authors": [
{
Expand Down

0 comments on commit d37d187

Please sign in to comment.