Skip to content

Commit

Permalink
feat: PromptUpdateDependency now shows a warning when version is locked
Browse files Browse the repository at this point in the history
  • Loading branch information
Icaruk committed Dec 13, 2024
1 parent cfd4270 commit 24f45bb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
3 changes: 2 additions & 1 deletion package3.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"node": "20.5.0"
},
"dependencies": {
"surrealdb.js": "^0.11.1"
"dame": "^0.11.1",
"axios": "0.11.1"
},
"volta": {
"node": "20.5.0"
Expand Down
4 changes: 1 addition & 3 deletions pkg/updater/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,7 @@ func Init(cfg npm.CmdFlags, binVersion string) {

response := cli.PromptUpdateDependency(
key,
value.Current,
value.Latest,
value.VersionType,
value,
currentUpdateCount,
maxUpdateCount,
)
Expand Down
10 changes: 9 additions & 1 deletion pkg/utils/packagejson/getDependenciesFromPackageJson.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ type PackageJSON struct {
DevDependencies map[string]string `json:"devDependencies"`
}

func GetDependenciesFromPackageJson(packageJsonFilename string, preventDevDependencies bool) (dependencies map[string]string, devDependencies map[string]string, jsonFile []byte, err error) {
func GetDependenciesFromPackageJson(
packageJsonFilename string,
preventDevDependencies bool,
) (
dependencies map[string]string,
devDependencies map[string]string,
jsonFile []byte,
err error,
) {

// Read json file
jsonFile, err = os.ReadFile(packageJsonFilename)
Expand Down

0 comments on commit 24f45bb

Please sign in to comment.