diff --git a/DESCRIPTION b/DESCRIPTION index 986be39e8..03fd7fa06 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: styler Title: Non-Invasive Pretty Printing of R Code -Version: 1.7.0.9003 +Version: 1.8.0 Authors@R: c(person(given = "Kirill", family = "Müller", diff --git a/NEWS.md b/NEWS.md index 1448134d5..2783c6a6c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,101 +1,116 @@ -# styler 1.7.0.9003 -**Performance and code quality improvements** +# styler 1.8.0 -- Use integer literals and avoid coercions where needed (\@IndrajeetPatil, #994). -- Don't preserve names for `unlist()` (\@IndrajeetPatil, #998). -- Remove unused variables (\@IndrajeetPatil, #999). -- Get rid of lints with performance implications (\@IndrajeetPatil, #1000). -- Use more efficient match() alternative (\@IndrajeetPatil, #1001). -- Don't use `nrow` arg in `new_tibble()` calls (\@IndrajeetPatil, #1003). -- Performance improvements with `if()` + `else()` instead of `ifelse()` (\@IndrajeetPatil, #1006). -- Replace tibbles with data frames to improve performance (\@IndrajeetPatil, #1007). -- Simplify `styler_df()` signature (\@IndrajeetPatil, #1009). -- Minor cleanup (\@IndrajeetPatil, #1016). +{styler} 1.8.0 comes with a host of new features, around 40% speed improvement, +bug fixes and the removal of 8 recursive dependencies. We also welcome +\@IndrajeetPatil as a new contributor to {styler}, who has contributed +significantly to this and and previous releases. +**Features** -**Dependency related changes** +- `style_dir()` and `style_pkg()` now default to styling all supported file + formats (`.R`, `.Rmd`, `.Rmarkdown`, `.Rnw`, and `.qmd`) in the (package) + directory (#965, #931, #1033). +- `style_pkg()` now excludes the auto-generated `R/cpp11.R` file (#977). +- minimum needed R version is now bumped to `3.5` (#986). -- Don't import entire tibble package (\@IndrajeetPatil, #1007). -- Drop {rematch2} dependency (\@IndrajeetPatil, #1011). +- alignment is now detected for function declaration in a similar way as for + function calls (#968). +- new R option `styler.ignore_alignment` controls if alignment should be + detected (and preserved) or not (#932). -**Other changes** -- Add flags to skip code coverage for zzz.R (\@IndrajeetPatil, #1005). +**Bug Fixes** +- alignment is detected in `tibble::tribble()` (and similar) calls with more + than 3 columns when left aligned (#945). -# styler 1.7.0.9002 (Development version) +- fix alignment detection for one column, mixed named/unnamed (#1035). -- Same as previous version. +- if there are only empty lines in a code chunk, they are all removed (#936). +- apply rules for [ to [[ and its closing counterpair (#1030) -# styler 1.7.0.9000 +- there is now at most one line break after `{` and before `#` (#952, #1022). -**User-facing changes** +- line breaks may be added to function calls to ensure indention symmetry for + round braces (#975). -- `style_dir()` and `style_pkg()` now default to styling all supported file - formats (`.R`, `.Rmd`, `.Rmarkdown`, `.Rnw`, and `.qmd`) in the (package) - directory (\@IndrajeetPatil, #965, #931). -- `style_pkg()` now excludes the auto-generated `R/cpp11.R` file (#977). -- Minimum needed R version is now bumped to `3.5` (\@IndrajeetPatil, #986). +- the cache is also invalidated on changing the stylerignore markers (#932). -**Features** +- `{` is not put on a new line after `=` and in `function() {` for some edge +cases (#939). -- alignment is now detected for function declaration in a similar way as for - function calls (#968). -- new R option `styler.ignore_alignment` controls if alignment should be - detected (and preserved) or not (#932). +- `while ({})` statements are now handled the same way as function statements + with regards to breaking lines (#967). -**Bug Fixes** +- parsing of {roxygen2} example comments now also works for edge cases when + there is no literal code immediately following after the end of the example + section (#940). -- alignment is detected in `tibble::tribble()` (and similar) calls with more - than 3 columns when left aligned (#945). +- files with no tokens in it are now transformed into zero-byte files (#962). + +**Documentation** + +- old (and outdated) vignettes have been removed (#955). To access them, do + `git checkout v1.0.0`. +- minor improvements to the documentation (#958). +- turned off `styler.colored_print.vertical` in vignettes so ANSI output of + {prettycode} not messing with {pkgdown} (#956, #957). -- If there are only empty lines in a code chunk, they are all removed (#936). -- There is now always one line break after `{` and before `#` (#952). +**Performance and code quality improvements** -- Line breaks may be added to function calls to ensure indention symmetry for - round braces (#975). +- use integer literals and avoid coercions where needed (#994). +- don't preserve names for `unlist()` (#998). +- remove unused variables (#999). +- get rid of lints with performance implications (#1000). +- use more efficient match() alternative (#1001). +- don't use `nrow` arg in `new_tibble()` calls (#1003). +- performance improvements with `if()` + `else()` instead of `ifelse()` (#1006). +- replace tibbles with data frames to improve performance (#1007). +- simplify `styler_df()` signature (#1009). +- minor cleanup (#1016). +- non-exported and unused functions `odd()` and `even()` were removed + (#989). +- all (R)md files in this project's source code are now formatted with default + pandoc markdown formatter. This conversion is required when using the visual + mode in RStudio (#941). +- improved code quality by fixing {lintr} warnings (#960, #1028). -- the cache is also invalidated on changing the stylerignore markers (#932). -- `{` is not put on a new line after `=` and in `function() {` for some edge - cases (#939). +**Dependency related changes** -- `while ({})` statements are now handled the same way as function statements - with regards to breaking lines (#967). +In total, 8 recursive dependencies are removed: {ellipsis}, {pillar}, +{rematch2}, {tibble}, {utf8}, {fansi}, {lifecycle}, {pkgconfig}. -- Parsing of {roxygen2} example comments now also works for edge cases when - there is no literal code immediately following after the end of the example - section (#940). +- don't import entire tibble package (#1007). +- drop {rematch2} dependency (#1011). -- Files with no tokens in it are now transformed into zero-byte files (#962). -**Other** +**Infrastructure** -- \@IndrajeetPatil is now a contributor to {styler}. Welcome and thanks for - everything you did so far! (#988). -- Old (and outdated) vignettes have been removed (\@IndrajeetPatil, #955). To - access them, do `git checkout v1.0.0`. -- Minor improvements to the documentation (\@IndrajeetPatil, #958). -- turned off `styler.print.Vertical` in vignettes so ANSI output of - {prettycode} not messing with {pkgdown} (\@IndrajeetPatil, #956, #957). -- Non-exported and unused functions `odd()` and `even()` were removed - (\@IndrajeetPatil, #989). -- Upgrade testing infra to testthat 3e (\@IndrajeetPatil, #949). -- All (R)md files in this project's source code are now formatted with - default pandoc markdown formatter. This conversion is required when using - the visual mode in RStudio (#941). -- Update {pkgdown} action to always build, but only deploy on default branch - (#946). -- Better stack tracing for profiling (#979, #980). -- Improved code quality by fixing {lintr} warnings (#960). -- Error now on R CMD note (\@IndrajeetPatil, #987). -- Test on latest Ubuntu instead of Ubuntu 18.04 (#982). -- Run tests in parallel (#978, \@krlmlr). +- upgrade testing infra to testthat 3e (#949). +- run tests in parallel (#978). +- run some tests sequentially (#1031) +- better stack tracing for profiling (#979, #980). +- add flags to skip code coverage for zzz.R (#1005). +- error now on R CMD note (#987). +- test on latest Ubuntu instead of Ubuntu 18.04 (#982). +- use latest GitHub Actions for R (#1034). +- update {pkgdown} action to always build, but only deploy on default branch + (#946). +- remove pre-commit push hook for news entry (#1023). + +A big hand to everyone who made this release possible: + +[@behrman](https://github.com/behrman), +[@EngineerDanny](https://github.com/EngineerDanny), [@gavinsimpson](https://github.com/gavinsimpson), [@IndrajeetPatil](https://github.com/IndrajeetPatil), [@jabenninghoff](https://github.com/jabenninghoff), +[@krlmlr](https://github.com/krlmlr), +[@lorenzwalthert](https://github.com/lorenzwalthert), [@MichaelChirico](https://github.com/MichaelChirico), [@moodymudskipper](https://github.com/moodymudskipper), [@RaymondBalise](https://github.com/RaymondBalise), [@Robinlovelace](https://github.com/Robinlovelace), [@sebffischer](https://github.com/sebffischer), +[@sgorm123](https://github.com/sgorm123), [@stefanoborini](https://github.com/stefanoborini), and [@wdkrnls](https://github.com/wdkrnls). # styler 1.7.0 diff --git a/cran-comments.md b/cran-comments.md index 7935d7e66..59027b212 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -4,15 +4,11 @@ editor_options: wrap: 79 --- -This release does not check for a specific error message from `parse()` anymore -when the input involves unparsable use of `_`. The release was requested by -Luke Tierney. - ## Test environments -- ubuntu 20.04 (on GitHub Actions): R devel, R 4.1.2, R 4.0.5, R 3.6, R 3.5, - R 3.4 -- Windows Server 10 (on GitHub Actions): R 3.6, R 4.0.5 +- ubuntu 20.04 (on GitHub Actions): R devel, R 4.2.1, 4.1.2, R 4.0.5, R 3.6, + R 3.5. +- Windows Server 10 (on GitHub Actions): R devel, R 4.2.1, R 4.1.2, R 3.6. - win-builder: R devel ## R CMD check results @@ -35,15 +31,7 @@ compliant with the requirements of CRAN. ## Downstream Dependencies -I also ran R CMD check on all downstream dependencies of styler using the -revdepcheck package. The downstream dependencies are: - -- Reverse imports: biocthis, boomer, exampletestr, flow, iNZightTools, - languageserver, questionr, shinymeta, shinyobjects, ShinyQuickStarter, - systemPipeShiny, tidypaleo. - -- Reverse suggests: admiral, autothresholdr, crunch, datastructures, drake, - epigraphdb, ghclass, knitr, multiverse, nph, precommit, reprex, - shiny.react, shinydashboardPlus, shinyMonacoEditor, upsetjs, usethis. +I also ran R CMD check on all 39 downstream dependencies of styler using the +revdepcheck package. All of them finished R CMD CHECK with zero (0) ERRORS, WARNINGS and NOTES. diff --git a/inst/WORDLIST b/inst/WORDLIST index d4c3a037e..4af72b2b6 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -27,6 +27,7 @@ coercions compat config CONST +counterpair coventions covr cpp @@ -63,6 +64,7 @@ examplesIf exampletestr expr expr EQ +fansi fileext filetype forcond @@ -150,6 +152,7 @@ patilindrajeet patilindrajeets pgkdown pkgapi +pkgconfig pkgdown pkgs pos