Skip to content

Commit 655114f

Browse files
committed
Bump to v1.0.0
1 parent 15a016d commit 655114f

File tree

4 files changed

+22
-7
lines changed

4 files changed

+22
-7
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
66

77
## [Unreleased]
88

9+
## [1.0.0] - 2022-10-17
10+
11+
### Added
12+
13+
* `breakable_space` - a shortcut for `breakable`
14+
* `breakable_empty` - a shortcut for `breakable("")`
15+
* `breakable_force` - a shortcut for `breakable("", force: true)`
16+
* `breakable_return` - a shortcut for `breakable(" ", indent: false, force: true)`
17+
* Strings can now be added directly to the output buffer, which means they don't have to be placed into the `Text` node. This cuts down on quite a bit of allocations.
18+
19+
### Changed
20+
21+
* `trim` now strips its whitespace using `rstrip!` instead of a custom `gsub!`. This means that other forms of whitespace beyond tabs and spaces are included. This shouldn't really impact anyone unless they're using vertical tab or something in combination with `trim` and wanted them to stay in.
22+
23+
### Removed
24+
25+
* There is no longer a `PrettierPrint::DefaultBuffer` class. Since there were only ever two implementations, those implementations now no longer share a parent.
26+
* `PrettierPrint::IndentLevel` is now entirely gone. This was mostly an implementation detail, and no one should have been relying on it anyway. However, it means that the ability to use nest with a string literal is now gone as well. It can be created again by using seplist though, so the functionality just isn't there in the shortcut version. This means we're able to keep track of indentation as a single integer again, which drastically simplifies the code.
27+
928
## [0.1.0] - 2022-05-13
1029

1130
### Added

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
prettier_print (0.1.0)
4+
prettier_print (1.0.0)
55

66
GEM
77
remote: https://rubygems.org/

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,7 @@ This node increases the indentation by a fixed number of spaces or a string. It
137137
q.nest(2) {}
138138
```
139139

140-
It accepts a block that specifies the contents of the alignment node. The value that you're indenting by can be positive or negative. It can also be a string, in which case that value will be used at the beginning of each line, as in:
141-
142-
```ruby
143-
q.nest("-->") {}
144-
```
140+
It accepts a block that specifies the contents of the alignment node. The value that you're indenting by can be positive or negative.
145141

146142
#### `BreakParent`
147143

lib/prettier_print/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
class PrettierPrint
4-
VERSION = "0.1.0"
4+
VERSION = "1.0.0"
55
end

0 commit comments

Comments
 (0)