mirror of
https://github.com/janet-lang/janet
synced 2024-12-26 00:10:27 +00:00
Update changelog and sort listing.
This commit is contained in:
parent
a45509d28e
commit
3358811788
@ -2,6 +2,7 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
## Unreleased - ???
|
## Unreleased - ???
|
||||||
|
- Add `jpm list-pkgs` subcommand to see which package aliases are in the listing.
|
||||||
- Add `jpm list-installed` subcommand to see which packages are installed.
|
- Add `jpm list-installed` subcommand to see which packages are installed.
|
||||||
- Add `math/int-min`, `math/int-max`, `math/int32-min`, and `math/int32-max` for getting integer limits.
|
- Add `math/int-min`, `math/int-max`, `math/int32-min`, and `math/int32-max` for getting integer limits.
|
||||||
- The gc interval is now autotuned, to prevent very bad gc behavior.
|
- The gc interval is now autotuned, to prevent very bad gc behavior.
|
||||||
|
23
jpm
23
jpm
@ -1191,17 +1191,26 @@ Flags are:
|
|||||||
|
|
||||||
(defn list-installed
|
(defn list-installed
|
||||||
[]
|
[]
|
||||||
(each x (os/dir (find-manifest-dir))
|
(def xs
|
||||||
(if (string/has-suffix? ".jdn" x)
|
(seq [x :in (os/dir (find-manifest-dir))
|
||||||
(print (string/slice x 0 -5)))))
|
:when (string/has-suffix? ".jdn" x)]
|
||||||
|
(string/slice x 0 -5)))
|
||||||
|
(sort xs)
|
||||||
|
(each x xs (print x)))
|
||||||
|
|
||||||
(defn list-pkgs
|
(defn list-pkgs
|
||||||
[&opt search]
|
[&opt search]
|
||||||
|
(def [ok _] (module/find "pkgs"))
|
||||||
|
(unless ok
|
||||||
|
(eprint "no local package listing found. Run `jpm update-pkgs` to get listing.")
|
||||||
|
(os/exit 1))
|
||||||
(def pkgs-mod (require "pkgs"))
|
(def pkgs-mod (require "pkgs"))
|
||||||
(eachk p (get-in pkgs-mod ['packages :value] [])
|
(def ps
|
||||||
(if search
|
(seq [p :keys (get-in pkgs-mod ['packages :value] [])
|
||||||
(if (string/find search p) (print p))
|
:when (if search (string/find search p) true)]
|
||||||
(print p))))
|
p))
|
||||||
|
(sort ps)
|
||||||
|
(each p ps (print p)))
|
||||||
|
|
||||||
(defn update-pkgs
|
(defn update-pkgs
|
||||||
[]
|
[]
|
||||||
|
Loading…
Reference in New Issue
Block a user