Skip to content

Releases: jbangdev/jbang

v0.96.0

14 Jul 08:05
Compare
Choose a tag to compare

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 uses Source
  • 5455a89 minor refactor of RunContext
  • aadbb34 added manifest attributes to SourceSet
  • c1fb77e using less Optional
  • e2686a9 introduced BuildMixin

🧰 Tasks

  • 82d955c changed many File references to Path

🛠 Build

  • a77e83a added tests for additional deps and cp

📝 Documentation


  • 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

09 Jun 21:19
Compare
Choose a tag to compare

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 to jdk 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

13 May 06:20
Compare
Choose a tag to compare

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 into isMainRequired

  • 2a67ca5 [minor] release
  • ac0b344 Allow no main if not non-interactive(batch) run

Contributors

We'd like to thank the following people for their contributions:
Tako Schotanus, Jeremie Bresson, Max Rydahl Andersen, GitHub, andreaTP

v0.93.0

30 Apr 23:47
Compare
Choose a tag to compare

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

🧰 Tasks

  • e7391c1 add explicit cast
  • 0750e62 switch code coverage to informational only
  • 7d6b632 fix typo in StrictParameterPreprocessor.java (#1333)

🛠 Build

  • d2b246d add a test with a version range
  • 7856810 added docker compose file for testing proxy (#1339)

📝 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

20 Mar 19:11
Compare
Choose a tag to compare

Changelog

Fixed a bug that caused (Quarkus) external Integration to fail on Java 16+.

🐛 Fixes

  • e61fcb4 upgrade gson to avoid breaking quarkus integration (#1317)

🛠 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

19 Mar 00:30
Compare
Choose a tag to compare

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

18 Mar 23:53
Compare
Choose a tag to compare

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

🐛 Fixes

🧰 Tasks

  • b259d74 make codecov less critical

📝 Documentation

  • 8a67177 Minor updates to installation pre-instructions (#1286)

Contributors

We'd like to thank the following people for their contributions:
Manik Magar, Tako Schotanus, Max Rydahl Andersen, GitHub

v0.91.0

10 Mar 00:19
Compare
Choose a tag to compare

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

🐛 Fixes

♻️ 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

03 Mar 10:36
Compare
Choose a tag to compare

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

📝 Documentation


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

20 Feb 10:58
Compare
Choose a tag to compare

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

  • c80c910 showing proper error when using -c without code (#1247)

Contributors

We'd like to thank the following people for their contributions:
Tako Schotanus, Max Rydahl Andersen, GitHub