This repository was archived by the owner on Jan 23, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Bun/Node: remove the --no-save which seems to cause issues sometimes #412
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -106,7 +106,7 @@ func installSourceMapSupportIfNeeded(ctx BundleContext, dir string) error { | |
| // only bun needs to install this library to aide in parsing the source maps | ||
| path := filepath.Join(dir, "node_modules", "source-map-js", "package.json") | ||
| if !util.Exists(path) { | ||
| cmd := exec.CommandContext(ctx.Context, "bun", "add", "source-map-js", "--no-save", "--silent", "--no-progress", "--no-summary", "--ignore-scripts") | ||
| cmd := exec.CommandContext(ctx.Context, "bun", "add", "source-map-js", "--silent", "--no-progress", "--no-summary", "--ignore-scripts") | ||
| cmd.Dir = dir | ||
| out, err := cmd.CombinedOutput() | ||
| if err != nil { | ||
|
|
@@ -147,9 +147,9 @@ func bundleJavascript(ctx BundleContext, dir string, outdir string, theproject * | |
| var install *exec.Cmd | ||
| switch theproject.Bundler.Runtime { | ||
| case "nodejs": | ||
| install = exec.CommandContext(ctx.Context, "npm", "install", "--no-save", "--no-audit", "--no-fund", "--include=prod", "--ignore-scripts") | ||
| install = exec.CommandContext(ctx.Context, "npm", "install", "--no-audit", "--no-fund", "--include=prod", "--ignore-scripts") | ||
| case "bunjs": | ||
| args := []string{"install", "--production", "--no-save", "--ignore-scripts"} | ||
| args := []string{"install", "--production", "--ignore-scripts"} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Behavioral change: bun install will now save dependencies to package.json. Removing Consider the following impacts:
If the goal is to ensure dependencies are tracked, this change makes sense. However, if temporary installation was intended, consider using 🤖 Prompt for AI Agents |
||
| if ctx.CI { | ||
| args = append(args, "--verbose", "--no-cache") | ||
| } else { | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Behavioral change: npm install will now save dependencies to package.json.
Removing
--no-savefrom the npm install command means dependencies will be saved to package.json. This is a significant change in dependency management behavior.Since this command is used for installing production dependencies (note the
--include=prodflag), consider:If the intent is to install without saving, consider using
--no-saveexplicitly or use a different approach likenpm cifor production installs.🤖 Prompt for AI Agents