Releases: jbangdev/jbang
v0.96.0
Lots of small bugfixes + stop generating class-path in jars that confuses graalvm native-image.
Changelog
🐛 Fixes
- 5c5049d don't add
Class-Path
by default to JARs (#1398) - bfbb744
wrapper install
now also copies jbang.ps1 (#1391) - b08c05b looking for compiler executables on Windows (#1395)
- 077422d properly detect existing JDK on Macs
- c89b4c5 fix problem with JDK paths containing spaces
- 648fc02 fixed certain commands not validating input correctly (#1376)
♻️ Changes
- 8d9582a fix typo in MarkdownSource.java
- b4b5d32 small change to
Builder
API - 9fedad4 minor refactor of the
IntegrationManager
- 13df254
SourceSet
no longer usesSource
- 5455a89 minor refactor of
RunContext
- aadbb34 added manifest attributes to
SourceSet
- c1fb77e using less
Optional
- e2686a9 introduced
BuildMixin
🧰 Tasks
- 82d955c changed many
File
references toPath
🛠 Build
- a77e83a added tests for additional deps and cp
📝 Documentation
- 1790790 minor update to PS1 script docs
- d7c2a77 Updating Integration documentation (#1380)
- 49a907e Updating Integration documentation (#1380)
- a230f53 [minor] release
- 5b5e364 Also reword //JAVA_OPTS to //JAVA_OPTIONS
- 4fe2268 Small typo when referring to
JAVAC_OPTIONS
- 35056e8 Add test with --fresh and --repos
Contributors
We'd like to thank the following people for their contributions:
Tako Schotanus, Ikko Ashimine, Jeremie Bresson, Max Rydahl Andersen, GitHub, Nándor Holozsnyák, Jordi Sola
v0.95.0
Changelog
This release introduces "globbing" for --sources
and --files
meaning you can do things like:
jbang --sources src/main/java --files src/main/resources script.java
or if you want only .java and only .html files:
jbang --sources src/main/java/**.java --files src/main/resources/**.html script.java
This lets you build bigger projects with more complex structures, while still being quite compact.
A interesting sideeffect of these features is that JBang can now be used to build JBang itself. See bootstrap.java if interested - still a few things needed to do a 100% bootstrap but we are getting closer :)
As been a while since a release also a good bunch of bugfixes, especially around alias handling that had a regression. If aliases was not behaving as you expect try this update and things should be better!
🚀 Features
- 902c8cb --sources and --files can now refer to directories
- 023d820 //FILES now supports globbing and new --resources option
- cd6a7eb added
--available
tojdk list
- 81ed889 add in-progress bootstrap.sh to build jbang with jbang
🐛 Fixes
- 8489101 make tests work on Windows
- b880866 sub folders are now properly handled for globbed resources
- 94bee92 inclusion of all resources
- 8057fba remove todo
- 26b7688 export can now build jbang with jbang
- 207ca62 make aliases work with --repos (#1372)
- 2d8e343 aliases now correctly added
- 07e99c8 --sources now handle comma separated input (#1365)
- f526a7d can now use globbing for
--sources
- d05dced move away from java.io.File to Path/Files
♻️ Changes
- 411507d extracted CLI source options into a mixin
- 9dc4741
--resource
/-r
are now--files
/-f
- 95adbfd removed
Vendor
enum - cf0b6c1 clean-up of the JdkManager code
- 047f51a remove ability to set Jdk release
🧰 Tasks
- d418f2a slightly improved error message when using globbing
- 08f0b99 minor code cleanup
- 38fd9a0 fix typo in configuration.adoc (#1366)
Contributors
We'd like to thank the following people for their contributions:
Tako Schotanus, Ikko Ashimine, Max Rydahl Andersen, GitHub
v0.94.0
Changelog
Repository fixes/improvements is the name of the game.
First off, --fresh
will now check for update to dependencies using SNAPSHOT and RELEASE names.
Then, adding spring-snapshot
, spring-milestone
, s01sonatype-snapshots
and sonatype-snapshots
possible shorthands for maven repositories and --deps
now properly suppport comma separated list. Means you can use snapshots in a much more compact version:
jbang --repos mavencentral,s01sonatype-snapshots -Dquarkus.version=999-SNAPSHOT myrest.java
🚀 Features
- 1a45a50 improve maven repo shorthand and logging (#1360)
- 60b7c5b Set Maven update policy to ALWAYS when --fresh is used
♻️ Changes
- acf4146 turned
isRunCommand
intoisMainRequired
Contributors
We'd like to thank the following people for their contributions:
Tako Schotanus, Jeremie Bresson, Max Rydahl Andersen, GitHub, andreaTP
v0.93.0
Changelog
Mainly small fixes.
JBang no longer uses @file for large classpath/command lines with JShell. This should allow it run for more things; but can also give problems with large dependency sets on Windows. Recommend to use powershell or a linux-like terminal on Windows to avoid problems.
Export now is possible for projects without a main, i.e. for building libraries.
Also //FILES
will now tell you what file pattern failed to be resolved. Making it easier to debug.
🚀 Features
🐛 Fixes
- 59b5483 do not use @file with jshell. Fixes #1349 (#1352)
- 018acde add sources to export (#1348)
- 5c8094c ignore dependencies without GVA for integration (#1350)
- 0397de4 Fixed problem with merging old PR #1271
- c62087c some errors in alias documentation page (#1329)
- 3f01dc8 Run locally with 'act' fails (jbangdev/jbang-action#28) (#1328)
🧰 Tasks
- e7391c1 add explicit cast
- 0750e62 switch code coverage to informational only
- 7d6b632 fix typo in StrictParameterPreprocessor.java (#1333)
🛠 Build
📝 Documentation
Contributors
We'd like to thank the following people for their contributions:
Andrea Peruffo, Tako Schotanus, George Gastaldi, Ikko Ashimine, Jeremie Bresson, Max Rydahl Andersen, GitHub, Pierre-Yves Fourmond, allcontributors[bot]
v0.92.2
Changelog
Fixed a bug that caused (Quarkus) external Integration to fail on Java 16+.
🐛 Fixes
🛠 Build
- 3bb37cc force ext integration
- 07b49e6 run only itests when feasible
- 4936280 fail-fast off
- 0a7b798 proper external ci test
- 7c48421 dont enable gradle cache when not building with cache
- 421a978 add java 17 and 18 runs
- eb98460 add java 17 and 18 runs
- bc68aca [patch] release
- 662a75a Revert "Revert "fall back to TTY when asking for input on Linux/Mac (#1312)""
- 211f020 Update copyright year to 2022 (#1315)
Contributors
We'd like to thank the following people for their contributions:
Claus Ibsen, Max Rydahl Andersen, GitHub
v0.92.1
Changelog
Had to revert zero install changes to avoid app install
bug.
- 048a68b [patch] release
- ef580a7 Revert ""zero" install now lives up to its name (#1219)"
- 9397a94 Revert "fall back to TTY when asking for input on Linux/Mac (#1312)"
Contributors
We'd like to thank the following people for their contributions:
Max Rydahl Andersen
v0.92.0
Changelog
This time with a mixed bag of features/improvements:
Console trust and "zero" install
Running using curl
will now download jbang to a temporary location if no local .jbang jar found. This ensures if you run curl
install it will use the latest available.
Also When installing or running jbang using curl
osx and linux will now use /dev/tty
to
allow using console to approve/trust scripts. Windows will still use the UI based approach if necessary.
We also now don't ask to trust a script you already downloaded and not running with --fresh
.
This should all make the installation of jbang and running of scripts simpler and more reliable.
Integrations can run externally
Today when using jbang integrations (i.q. Quarkus integration) it runs in the same jvm/classloader
as jbang itself. This works normally great, but if you are targeting a Java higher than the Java you are running JBang with (i.e. uses --java 17
when running with Java 11) you can get errors about mismatched Java versions.
In this release JBang now will run the integration in an external process when Java versions does not match.
This also enables a future possible improvement of making jbang
a native binary.
Allow aliases for //SOURCES
You can now use aliases in //SOURCES
. This is mainly interesting when running jshell based scripts. For example in a .jsh file you can use //SOURCES faker@jbangdev
and you get the faker script included.
Enjoy!
🚀 Features
- ea20eff "zero" install now lives up to its name (#1219)
- d942ada fall back to TTY when asking for input on Linux/Mac (#1312)
- b44d783 enable integrations to run externally (#1290)
- d3e726c allow aliases for
//SOURCES
(#1287) - c032ce2 don't ask for trust when resource is cached (#1291)
🐛 Fixes
- e379591 fixed problem
--deps
and//REPOS
(#1296) - 2d0ecd4 updated to latest java-properties (#1307)
- 82e03f8 give proper error when
-s
file is missing (#1308) - 6337f4e don't copy classpath files more than once (#1300)
- 97cd36d add missing contributors
- 3ff4446 add code for manikmagar
🧰 Tasks
- b259d74 make codecov less critical
📝 Documentation
Contributors
We'd like to thank the following people for their contributions:
Manik Magar, Tako Schotanus, Max Rydahl Andersen, GitHub
v0.91.0
Changelog
Buckle up - this is a fun release enabling some long-awaited mythical features!
- Aliases for sources:
cat logs.txt | jbang -s prelude@maxandersen -c '$$(l -> l.s(2))'
- Websites as implicit catalog
jbang tree@xam.dk
- Custom JDK Install:
j! jdk install 18 $(sdk home java 18-open)
Details below:
Use of aliases for sources
You can now use an alias to load additional sources, i.e. jbang -s myscript@mycatalog ...
- all thanks to @quintesse super refactoring!.
At first, that might not look that interesting but combining it with the previous release where we added support
for running snippets with jbang -c
you can now load in a custom source that fetches dependencies and add
use case-specific top-level methods and classes.
As an example I'll use Edoardo Vacchi's idea about implementing AWK in JBang using a script called Prelude.jsh
.
Imagine you have a logs.txt
with the following content:
GET /robots.txt HTTP/1.1
HEAD /README.md HTTP/1.1
GET /wp-admin/ HTTP/1.0
And you want to print out all the paths in that log.
There is a ton of ways to do that but if you use raw java it might be quite verbose.
Now with aliases we can cut this down to:
cat logs.txt | jbang -s prelude@evacchi -c '$$(l -> l.s(2))'
This will load the script behind prelude@evacchi
which provides a method named $$
which iterates all input and give you a Line
instance where there are various methods to extract
content, i.e. l.s(2)
gives you the second column.
You can load multiple scripts from anywhere making it possible for everyone to make
interesting toplevel methods available to do useful things like the AWK example above; or maybe
just to make it fun/easier to try out your framework/api.
Looking forward to see what crazy ways you find to use this.
Websites as implicit catalog
Until now jbang's implicit catalogs allow you to have a jbang-catalog
repository, i.e. @maxandersen
was shorthand for catalog found in https://github.com/maxandersen/jbang-catalog
. Very useful to have short and recognizable names.
Thus now if there is a '.' in the name jbang will lookup a website with that name first.
For example: jbang tree@xam.dk
will use the catalog available at https://xam.dk/jbang-catalog.json.
There are more ways this can be used and expanded - those are covered in the docs.
Install of custom JDK's
We've had many requests on having jbang
utilize existing Java installs on your machine rather
than download Java separately. i.e. use sdkman's jdk installs.
We don't do that for various reasons (mainly portability), but with @nandorholozsnyak's great contribution you
can now install custom JDK's using: jbang jdk install <version> <pathtojdk>
.
Example:
Lets say you use sdkman and you want to try out Java 18 with JBang - something that today will fail
unless you have Java 18 installed as default jdk.
You can then run:
j! jdk install 18 `sdk home java 18-open`
which setup the path printed by sdk home java 18-open
to be what what JBang treat as Java 18.
Then you can run:
j! --java 18 -c 'println(javax.lang.model.SourceVersion.RELEASE_18)'
🚀 Features
- 64d7a27 enable jbang tree@jbang.dev and jbang tree@https:/jbang.dev (#1274)
- b9c4b1b Made
--sources script@repo
work (#1283) - c8bcd40 add jbang jdk install (#1252)
🐛 Fixes
- 2dceffb fixed problem with additional sources and aliases (#1284)
- 056ca3b properly quote edit command on Windows (#1279)
- 8a516bb some minor Jshell fixes (#1278)
- 4ffc15f no longer throws NPE for config list (#1276)
- 238ef90 jbang alias list and jbang alias add prints/add empty properties… (#1273)
♻️ Changes
Contributors
We'd like to thank the following people for their contributions:
Tako Schotanus, Max Rydahl Andersen, GitHub, Pierre-Yves Fourmond, Nándor Holozsnyák
v0.90.2
Changelog
Critical fix to avoid untrusted code to run and not auto-install vscode.
Plus if you have a M1 based machine jbang will no longer fail on first run.
jbang will now download Java 17 by default as Java 11 is not yet available from Adoptium.
🐛 Fixes
- 99ed4b8 support M1 initial macs java downloads (#1269)
- ef36242 do not trust nor install editor by default (#1262)
- 81fa1f6 upgrade to latest gradle plugin (#1251)
📝 Documentation
- fd86798 Make explicit why groovy is needed (#1270)
- 5f903c5 Use reload4j in the example instead of log4j (#1266)
- b87d386 [patch] bugfix
Contributors
We'd like to thank the following people for their contributions:
Chromico Rek, Max Rydahl Andersen, GitHub, Jérémie Bresson
v0.90.1
Changelog
Bug fix + add lines(String) top-level method to read a file into lines.
🚀 Features
- 8a25fcf add lines(String) toplevel to read path into stream
🐛 Fixes
- 8e77cef [patch] release
Contributors
We'd like to thank the following people for their contributions:
Tako Schotanus, Max Rydahl Andersen, GitHub