We have a weird flow right now where in the develop branch, origin points to github. But in master, origin points to npm.
This is bad practice and requires us to manually revert this change every time we merge develop into master. If someone forgets or doesn't realize this is supposed to happen, things mysteriously don't work. @joshfraser ran into this yesterday.
I am proposing that we simply keep both branches pointing to npm. When a new version of origin is published to npm, we simply update the package.json to point to the new npm version; we do this in the develop branch. Then we test things, make sure everything works, and once we're happy we merge develop into master to create a new release.
As far as concerns about the origin in npm getting out of sync with the develop branch of demo-dapp: this is a non-issue because we are instructing people to run npm run install:dev, which does an npm link and bypasses whatever version is specified in package.json.
In other words:
master, people will use the origin specified in package.json - this should be the latest npm origin.develop, it won't matter what's in package.json. People will be expected to use npm run install:dev/npm link and use the local origin. Thus it will also be safe to specify the latest published npm origin on the develop branch.Additionally, our current setup actually doesn't add any value. The github origin will never be usable because it does not contain a built package with deployed contracts to test nets, and does not start ganache/truffle locally. There is absolutely no value in having a github reference in any branch.
@wanderingstan How does this sound to you?
Thanks for walking through this @tyleryasaka & I'm in full support of this change.
BTW - @wanderingstan I think this is a much better solution to the issue we ran into last week re: multiple versions of origin-js in package.json that prompted me to recommend temporarily disabling package-lock.json. Much cleaner and long-term solution.
CC @tyleryasaka 馃憤
Most helpful comment
BTW - @wanderingstan I think this is a much better solution to the issue we ran into last week re: multiple versions of origin-js in
package.jsonthat prompted me to recommend temporarily disablingpackage-lock.json. Much cleaner and long-term solution.CC @tyleryasaka 馃憤