Skip to content

Releases: HewlettPackard/dockerfile-parser-rs

Fix an issue where certain string escapes could cause a stack overflow

15 Oct 21:53
4b1a28c
Compare
Choose a tag to compare

This release includes a fix for an issue where certain quoted strings containing invalid escapes could cause a stack overflow, for example:

ARG FOO="hello\/world"

The error is now properly reported without causing an overflow, however strings like the example are still (for now) considered invalid. Docker may handle invalid escape sequences differently (and seems to consider this particular escape valid despite it being nonsensical).

Properly parse images containing hashes

25 Jun 21:58
3e66e75
Compare
Choose a tag to compare

This release tweaks the image parser to properly handle docker image strings containing hashes or digests, for example:

docker pull hello-world@sha256:90659bf80b44ce6be8234e6ff90a1ac34acbeb826903b02cfa0da11c82cbc042

This is another minor breaking change for any downstream dependencies that instantiate ImageRef directly in e.g. unit tests, as a new field has been added to the struct.

Stage improvements

24 Jun 22:40
ebc48f2
Compare
Choose a tag to compare

This refactors the Stage struct to add a number of new features:

  • stages now track their name (if set)
  • stages now track their parent and root (image / stage)
  • new Stages wrapper struct provides utility to get by name or index
  • reduced Span debug output, now prints as (1, 23)
  • additional testing

This is a mild breaking change for code that depends on the particular type signature of Dockerfile::iter_stages() or the Stage struct itself, as fields have been added.

Bugfix for ImageRef::parse()

22 Jun 20:11
0bc4fdd
Compare
Choose a tag to compare

Fixes a bug in ImageRef::parse(..) where the parsed image part truncated image names beyond the first /.

Improved spans

19 Jun 23:38
0dc4605
Compare
Choose a tag to compare

This release includes several Span improvements:

  • Add span to CopyInstruction
  • Add span and value_span to CopyFlag
  • Add From<(usize, usize)> to Span from prometheus-parser-rs
  • Add Span::relative_span(...) to create a line-relative span from a global span

Lastly, this renames dockerfile.rs to dockerfile_parser.rs since vscode decided it was a Dockerfile. This may be a minor breaking change if this module was referenced directly.

v0.2.2: Merge pull request #1 from HewlettPackard/tryfrom-impls

03 Apr 20:22
170a099
Compare
Choose a tag to compare
Extra docs and TryFrom Instruction impls

Fix improper whitespace handling for comments

31 Mar 18:59
Compare
Choose a tag to compare

This releases fixes a grammar issue where the comment rule improperly consumed trailing newlines. This could cause subsequent rules expecting a leading newline to fail.

Initial public release

26 Mar 19:51
Compare
Choose a tag to compare
v0.2.0

add CI badge to README.md

testing publish

26 Mar 19:49
Compare
Choose a tag to compare
testing publish Pre-release
Pre-release
v0.2.0-rc2

add CI badge to README.md