Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not run npm commands but output instructions instead #1731

Merged
merged 4 commits into from
Nov 18, 2024
Merged

Do not run npm commands but output instructions instead #1731

merged 4 commits into from
Nov 18, 2024

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Nov 18, 2024

What

Do not run npm commands but output instructions instead.

Add friendly output describing what's happening in line with other commands that have been recently updated.

$ stellar contract bindings typescript --wasm contract.wasm --contract-id C --output-dir ./out
ℹ️ Loading contract spec from file...
ℹ️ Network: Test SDF Network ; September 2015
ℹ️ Embedding contract address: C
✅ Generated!
ℹ️ Run "npm install && npm run build" in "./out" to build the JavaScript NPM package.

Why

To make less assumptions about when and how folks will generate their packages.

It is reasonably simple for folks to run the npm commands afterwards, and it'll be less surprising for folks who don't currently have npm tools installed.

Note that this is a breaking change. Most breaking changes in the CLI are being made in a way that first a warning notice or deprecation notice is displayed in one version, then in a subsequent major version the functionality breaks. But in this case, the change is worth making sooner. Why: Due to past security incidents with packages in the npm ecosystem, straight up calling npm install on someones machine isn't great. There's little reason to force the npm install on folks as they can simply run the command themselves.

Close #1512

@leighmcculloch leighmcculloch marked this pull request as ready for review November 18, 2024 03:14
@fnando fnando merged commit 7778873 into main Nov 18, 2024
29 of 31 checks passed
@fnando fnando deleted the i1512 branch November 18, 2024 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Change the default to not npm build
2 participants