Closed JustinGol closed 1 year ago
Hey, @JustinGol, that is actually an expectation. The same versions of the SDK are built and shipped to NPM and Bower, but historically were set up with different structures therein. The build processes are different, as the process for Bower involves building everything into a single file for, say, hosted-fields. In NPM it doesn't do that, so they aren't going to match.
While the means of interacting with them through the different package managers is unfortunately different, the functionality and integration pattern itself therein are identical.
Hey, @JustinGol, that is actually an expectation. The same versions of the SDK are built and shipped to NPM and Bower, but historically were set up with different structures therein. The build processes are different, as the process for Bower involves building everything into a single file for, say, hosted-fields. In NPM it doesn't do that, so they aren't going to match.
While the means of interacting with them through the different package managers is unfortunately different, the functionality and integration pattern itself therein are identical.
Thanks for your reply. We currently have a reference to a single file which is bundled braintree-web-bower/client.js
. Would we technically need to bundle all the files in npm to achieve the same effect?
You can still import the modules within independently, so you can reference braintree-web/client
. The docs on that are here as well: https://developer.paypal.com/braintree/docs/guides/client-sdk/setup/javascript/v3#npm
General information
Issue description
I am moving away from Bower as our package manager to NPM but theres a discrepancy in getting the packages in NPM vs Bower.
Expected
bower install braintree-web@3.16.0
installs the same files asnpm install braintree-web@3.16.0
Current
client.debug.js
doesnt exist in the npm install. When comparing Bowersclient.debug.js
to NPM'sclient.js
its very differenthosting.debug.js
doesnt exist in the npm install. When comparing Bowershosting.debug.js
to NPM'shosting.js
its very differentIn my npm package.json
devDependency
I tried to use the braintree-web-bower git repository 3.16.0 as the source as an alternative but it doesnt have a package.json file so that doesnt work either.Ive resorted to running this script as a last resort but I dont get vulnerability scanning with this which is one of the goals for moving to npm.