Skip to content

Commit 3237787

Browse files
committed
Merge branch 'main' of https://github.com/jetify-com/devbox into feature/json-plugin-schema
2 parents ce5e13f + dc50eb5 commit 3237787

File tree

18 files changed

+401
-310
lines changed

18 files changed

+401
-310
lines changed

docs/app/pnpm-lock.yaml

Lines changed: 225 additions & 208 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
asgiref==3.6.0
2-
Django==4.2.16
2+
Django==4.2.17
33
psycopg2==2.9.5
44
sqlparse==0.5.0

examples/stacks/jekyll/myblog/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ GEM
5656
rb-fsevent (0.11.2)
5757
rb-inotify (0.11.1)
5858
ffi (~> 1.0)
59-
rexml (3.3.7)
59+
rexml (3.3.9)
6060
rouge (3.30.0)
6161
safe_yaml (1.0.5)
6262
sass (3.7.4)

examples/stacks/rails/blog/Gemfile.lock

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,67 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (7.0.8.4)
5-
actionpack (= 7.0.8.4)
6-
activesupport (= 7.0.8.4)
4+
actioncable (7.0.8.7)
5+
actionpack (= 7.0.8.7)
6+
activesupport (= 7.0.8.7)
77
nio4r (~> 2.0)
88
websocket-driver (>= 0.6.1)
9-
actionmailbox (7.0.8.4)
10-
actionpack (= 7.0.8.4)
11-
activejob (= 7.0.8.4)
12-
activerecord (= 7.0.8.4)
13-
activestorage (= 7.0.8.4)
14-
activesupport (= 7.0.8.4)
9+
actionmailbox (7.0.8.7)
10+
actionpack (= 7.0.8.7)
11+
activejob (= 7.0.8.7)
12+
activerecord (= 7.0.8.7)
13+
activestorage (= 7.0.8.7)
14+
activesupport (= 7.0.8.7)
1515
mail (>= 2.7.1)
1616
net-imap
1717
net-pop
1818
net-smtp
19-
actionmailer (7.0.8.4)
20-
actionpack (= 7.0.8.4)
21-
actionview (= 7.0.8.4)
22-
activejob (= 7.0.8.4)
23-
activesupport (= 7.0.8.4)
19+
actionmailer (7.0.8.7)
20+
actionpack (= 7.0.8.7)
21+
actionview (= 7.0.8.7)
22+
activejob (= 7.0.8.7)
23+
activesupport (= 7.0.8.7)
2424
mail (~> 2.5, >= 2.5.4)
2525
net-imap
2626
net-pop
2727
net-smtp
2828
rails-dom-testing (~> 2.0)
29-
actionpack (7.0.8.4)
30-
actionview (= 7.0.8.4)
31-
activesupport (= 7.0.8.4)
29+
actionpack (7.0.8.7)
30+
actionview (= 7.0.8.7)
31+
activesupport (= 7.0.8.7)
3232
rack (~> 2.0, >= 2.2.4)
3333
rack-test (>= 0.6.3)
3434
rails-dom-testing (~> 2.0)
3535
rails-html-sanitizer (~> 1.0, >= 1.2.0)
36-
actiontext (7.0.8.4)
37-
actionpack (= 7.0.8.4)
38-
activerecord (= 7.0.8.4)
39-
activestorage (= 7.0.8.4)
40-
activesupport (= 7.0.8.4)
36+
actiontext (7.0.8.7)
37+
actionpack (= 7.0.8.7)
38+
activerecord (= 7.0.8.7)
39+
activestorage (= 7.0.8.7)
40+
activesupport (= 7.0.8.7)
4141
globalid (>= 0.6.0)
4242
nokogiri (>= 1.8.5)
43-
actionview (7.0.8.4)
44-
activesupport (= 7.0.8.4)
43+
actionview (7.0.8.7)
44+
activesupport (= 7.0.8.7)
4545
builder (~> 3.1)
4646
erubi (~> 1.4)
4747
rails-dom-testing (~> 2.0)
4848
rails-html-sanitizer (~> 1.1, >= 1.2.0)
49-
activejob (7.0.8.4)
50-
activesupport (= 7.0.8.4)
49+
activejob (7.0.8.7)
50+
activesupport (= 7.0.8.7)
5151
globalid (>= 0.3.6)
52-
activemodel (7.0.8.4)
53-
activesupport (= 7.0.8.4)
54-
activerecord (7.0.8.4)
55-
activemodel (= 7.0.8.4)
56-
activesupport (= 7.0.8.4)
57-
activestorage (7.0.8.4)
58-
actionpack (= 7.0.8.4)
59-
activejob (= 7.0.8.4)
60-
activerecord (= 7.0.8.4)
61-
activesupport (= 7.0.8.4)
52+
activemodel (7.0.8.7)
53+
activesupport (= 7.0.8.7)
54+
activerecord (7.0.8.7)
55+
activemodel (= 7.0.8.7)
56+
activesupport (= 7.0.8.7)
57+
activestorage (7.0.8.7)
58+
actionpack (= 7.0.8.7)
59+
activejob (= 7.0.8.7)
60+
activerecord (= 7.0.8.7)
61+
activesupport (= 7.0.8.7)
6262
marcel (~> 1.0)
6363
mini_mime (>= 1.1.0)
64-
activesupport (7.0.8.4)
64+
activesupport (7.0.8.7)
6565
concurrent-ruby (~> 1.0, >= 1.0.2)
6666
i18n (>= 1.6, < 2)
6767
minitest (>= 5.1)
@@ -84,7 +84,7 @@ GEM
8484
xpath (~> 3.2)
8585
concurrent-ruby (1.3.4)
8686
crass (1.0.6)
87-
date (3.3.4)
87+
date (3.4.1)
8888
debug (1.9.2)
8989
irb (~> 1.10)
9090
reline (>= 0.3.8)
@@ -105,7 +105,7 @@ GEM
105105
actionview (>= 5.0.0)
106106
activesupport (>= 5.0.0)
107107
logger (1.6.1)
108-
loofah (2.22.0)
108+
loofah (2.23.1)
109109
crass (~> 1.0.2)
110110
nokogiri (>= 1.12.0)
111111
mail (2.8.1)
@@ -117,9 +117,9 @@ GEM
117117
matrix (0.4.2)
118118
method_source (1.1.0)
119119
mini_mime (1.1.5)
120-
minitest (5.25.1)
120+
minitest (5.25.4)
121121
msgpack (1.7.2)
122-
net-imap (0.4.16)
122+
net-imap (0.4.19)
123123
date
124124
net-protocol
125125
net-pop (0.1.2)
@@ -129,45 +129,45 @@ GEM
129129
net-smtp (0.5.0)
130130
net-protocol
131131
nio4r (2.7.3)
132-
nokogiri (1.16.7-arm64-darwin)
132+
nokogiri (1.17.1-arm64-darwin)
133133
racc (~> 1.4)
134-
nokogiri (1.16.7-x86_64-darwin)
134+
nokogiri (1.17.1-x86_64-darwin)
135135
racc (~> 1.4)
136-
nokogiri (1.16.7-x86_64-linux)
136+
nokogiri (1.17.1-x86_64-linux)
137137
racc (~> 1.4)
138138
psych (5.1.2)
139139
stringio
140140
public_suffix (6.0.1)
141141
puma (5.6.9)
142142
nio4r (~> 2.0)
143143
racc (1.8.1)
144-
rack (2.2.9)
144+
rack (2.2.10)
145145
rack-test (2.1.0)
146146
rack (>= 1.3)
147-
rails (7.0.8.4)
148-
actioncable (= 7.0.8.4)
149-
actionmailbox (= 7.0.8.4)
150-
actionmailer (= 7.0.8.4)
151-
actionpack (= 7.0.8.4)
152-
actiontext (= 7.0.8.4)
153-
actionview (= 7.0.8.4)
154-
activejob (= 7.0.8.4)
155-
activemodel (= 7.0.8.4)
156-
activerecord (= 7.0.8.4)
157-
activestorage (= 7.0.8.4)
158-
activesupport (= 7.0.8.4)
147+
rails (7.0.8.7)
148+
actioncable (= 7.0.8.7)
149+
actionmailbox (= 7.0.8.7)
150+
actionmailer (= 7.0.8.7)
151+
actionpack (= 7.0.8.7)
152+
actiontext (= 7.0.8.7)
153+
actionview (= 7.0.8.7)
154+
activejob (= 7.0.8.7)
155+
activemodel (= 7.0.8.7)
156+
activerecord (= 7.0.8.7)
157+
activestorage (= 7.0.8.7)
158+
activesupport (= 7.0.8.7)
159159
bundler (>= 1.15.0)
160-
railties (= 7.0.8.4)
160+
railties (= 7.0.8.7)
161161
rails-dom-testing (2.2.0)
162162
activesupport (>= 5.0.0)
163163
minitest
164164
nokogiri (>= 1.6)
165-
rails-html-sanitizer (1.6.0)
165+
rails-html-sanitizer (1.6.1)
166166
loofah (~> 2.21)
167-
nokogiri (~> 1.14)
168-
railties (7.0.8.4)
169-
actionpack (= 7.0.8.4)
170-
activesupport (= 7.0.8.4)
167+
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
168+
railties (7.0.8.7)
169+
actionpack (= 7.0.8.7)
170+
activesupport (= 7.0.8.7)
171171
method_source
172172
rake (>= 12.2)
173173
thor (~> 1.0)
@@ -200,7 +200,7 @@ GEM
200200
railties (>= 6.0.0)
201201
stringio (3.1.1)
202202
thor (1.3.2)
203-
timeout (0.4.1)
203+
timeout (0.4.3)
204204
turbo-rails (2.0.10)
205205
actionpack (>= 6.0.0)
206206
railties (>= 6.0.0)

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.sum

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/boxcli/list.go

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2024 Jetify Inc. and contributors. All rights reserved.
1+
// Copyright 2025 Jetify Inc. and contributors. All rights reserved.
22
// Use of this source code is governed by the license in the LICENSE file.
33

44
package boxcli
@@ -15,7 +15,8 @@ import (
1515
)
1616

1717
type listCmdFlags struct {
18-
config configFlags
18+
config configFlags
19+
outdated bool
1920
}
2021

2122
func listCmd() *cobra.Command {
@@ -34,6 +35,10 @@ func listCmd() *cobra.Command {
3435
return errors.WithStack(err)
3536
}
3637

38+
if flags.outdated {
39+
return printOutdatedPackages(cmd, box)
40+
}
41+
3742
for _, pkg := range box.AllPackagesIncludingRemovedTriggerPackages() {
3843
resolvedVersion, err := pkg.ResolvedVersion()
3944
if err != nil {
@@ -57,6 +62,28 @@ func listCmd() *cobra.Command {
5762
return nil
5863
},
5964
}
65+
66+
cmd.Flags().BoolVar(&flags.outdated, "outdated", false, "List outdated packages")
6067
flags.config.register(cmd)
6168
return cmd
6269
}
70+
71+
// printOutdatedPackages prints a list of outdated packages.
72+
func printOutdatedPackages(cmd *cobra.Command, box *devbox.Devbox) error {
73+
results, err := box.Outdated(cmd.Context())
74+
if err != nil {
75+
return errors.WithStack(err)
76+
}
77+
78+
if len(results) == 0 {
79+
cmd.Println("Your packages are up to date!")
80+
return nil
81+
}
82+
83+
cmd.Println("The following packages can be updated:")
84+
for pkg, version := range results {
85+
cmd.Printf(" * %-30s %s -> %s\n", pkg, version.Current, version.Latest)
86+
}
87+
88+
return nil
89+
}

internal/boxcli/update.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ type updateCmdFlags struct {
1717
config configFlags
1818
sync bool
1919
allProjects bool
20+
noInstall bool
2021
}
2122

2223
func updateCmd() *cobra.Command {
@@ -49,6 +50,12 @@ func updateCmd() *cobra.Command {
4950
false,
5051
"update all projects in the working directory, recursively.",
5152
)
53+
command.Flags().BoolVar(
54+
&flags.noInstall,
55+
"no-install",
56+
false,
57+
"update lockfile but don't install anything",
58+
)
5259
return command
5360
}
5461

@@ -75,7 +82,8 @@ func updateCmdFunc(cmd *cobra.Command, args []string, flags *updateCmdFlags) err
7582
}
7683

7784
return box.Update(cmd.Context(), devopt.UpdateOpts{
78-
Pkgs: args,
85+
Pkgs: args,
86+
NoInstall: flags.noInstall,
7987
})
8088
}
8189

internal/devbox/devopt/devboxopts.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ type AddOpts struct {
5858

5959
type UpdateOpts struct {
6060
Pkgs []string
61+
NoInstall bool
6162
IgnoreMissingPackages bool
6263
}
6364

0 commit comments

Comments
 (0)