Skip to content

Run npm install as part of install.py #24568

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

Merged
merged 1 commit into from
Jun 17, 2025
Merged

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Jun 13, 2025

No description provided.

@sbc100 sbc100 requested a review from dschuff June 13, 2025 22:30
Copy link
Member

@dschuff dschuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean we can omit from build.py? it looks like that one is using 'npm ci'... so what is this part for?

@sbc100
Copy link
Collaborator Author

sbc100 commented Jun 14, 2025

Does this mean we can omit from build.py? it looks like that one is using 'npm ci'... so what is this part for?

Exactly yes.

@dschuff
Copy link
Member

dschuff commented Jun 14, 2025

What's the difference between 'npm install' and 'npm ci' then?

@sbc100
Copy link
Collaborator Author

sbc100 commented Jun 14, 2025

What's the difference between 'npm install' and 'npm ci' then?

npm ci always uses the exact pinned versions I believe... its designed to be reproducible.

@sbc100 sbc100 enabled auto-merge (squash) June 14, 2025 00:41
@dschuff
Copy link
Member

dschuff commented Jun 14, 2025

So I guess switching from that to this would be a functional change then. If that's fine, then this PR LGTM. I guess it should be fine to just let it run twice for the few versions after this rolls into emscripten-releases and before we remove the one there?

@sbc100
Copy link
Collaborator Author

sbc100 commented Jun 14, 2025

The emscripten-releases build script is already using npm ci so it would not be a functional change. --omit=dev is the another (more modern) way to spell '--production'`

@sbc100
Copy link
Collaborator Author

sbc100 commented Jun 16, 2025

ping..

@dschuff
Copy link
Member

dschuff commented Jun 17, 2025

The emscripten-releases build script is already using npm ci so it would not be a functional change. --omit=dev is the another (more modern) way to spell '--production'`

Maybe I'm misunderstanding what the intention is then. If we put this into install.py and then remove npm ci from build.py it would be a functional change, right? Or is the intention to keep using the one in build.py, and running both?

@sbc100
Copy link
Collaborator Author

sbc100 commented Jun 17, 2025

The emscripten-releases build script is already using npm ci so it would not be a functional change. --omit=dev is the another (more modern) way to spell '--production'`

Maybe I'm misunderstanding what the intention is then. If we put this into install.py and then remove npm ci from build.py it would be a functional change, right?

Can you explain why you think its a functional change? We only need to run npm ci once, and running it twice should be a no-op.

Or is the intention to keep using the one in build.py, and running both?

My intention is to remove the one from build.py yes.

@dschuff
Copy link
Member

dschuff commented Jun 17, 2025

oh... uh, nevermind I misread the code, I was thinking we ran literally 'npm install' but it says 'npm ci' ... oops :)
Maybe we could update the PR description ?

@sbc100 sbc100 merged commit b9a4d13 into emscripten-core:main Jun 17, 2025
30 checks passed
@sbc100 sbc100 deleted the npm_install branch June 17, 2025 20:28
@sbc100
Copy link
Collaborator Author

sbc100 commented Jun 17, 2025

Ooops, sorry I had auto-commit on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants