head	1.22;
access;
symbols
	pkgsrc-2026Q1:1.22.0.10
	pkgsrc-2026Q1-base:1.22
	pkgsrc-2025Q4:1.22.0.8
	pkgsrc-2025Q4-base:1.22
	pkgsrc-2025Q3:1.22.0.6
	pkgsrc-2025Q3-base:1.22
	pkgsrc-2025Q2:1.22.0.4
	pkgsrc-2025Q2-base:1.22
	pkgsrc-2025Q1:1.22.0.2
	pkgsrc-2025Q1-base:1.22
	pkgsrc-2024Q4:1.21.0.2
	pkgsrc-2024Q4-base:1.21
	pkgsrc-2024Q3:1.20.0.6
	pkgsrc-2024Q3-base:1.20
	pkgsrc-2024Q2:1.20.0.4
	pkgsrc-2024Q2-base:1.20
	pkgsrc-2024Q1:1.20.0.2
	pkgsrc-2024Q1-base:1.20
	pkgsrc-2023Q4:1.18.0.6
	pkgsrc-2023Q4-base:1.18
	pkgsrc-2023Q3:1.18.0.4
	pkgsrc-2023Q3-base:1.18
	pkgsrc-2023Q2:1.18.0.2
	pkgsrc-2023Q2-base:1.18
	pkgsrc-2023Q1:1.17.0.2
	pkgsrc-2023Q1-base:1.17
	pkgsrc-2022Q4:1.15.0.2
	pkgsrc-2022Q4-base:1.15
	pkgsrc-2022Q3:1.14.0.4
	pkgsrc-2022Q3-base:1.14
	pkgsrc-2022Q2:1.14.0.2
	pkgsrc-2022Q2-base:1.14
	pkgsrc-2022Q1:1.12.0.6
	pkgsrc-2022Q1-base:1.12
	pkgsrc-2021Q4:1.12.0.4
	pkgsrc-2021Q4-base:1.12
	pkgsrc-2021Q3:1.12.0.2
	pkgsrc-2021Q3-base:1.12
	pkgsrc-2021Q2:1.9.0.2
	pkgsrc-2021Q2-base:1.9
	pkgsrc-2021Q1:1.6.0.2
	pkgsrc-2021Q1-base:1.6
	pkgsrc-2020Q4:1.4.0.2
	pkgsrc-2020Q4-base:1.4
	pkgsrc-2020Q3:1.3.0.2
	pkgsrc-2020Q3-base:1.3
	pkgsrc-2020Q2:1.2.0.8
	pkgsrc-2020Q2-base:1.2
	pkgsrc-2020Q1:1.2.0.4
	pkgsrc-2020Q1-base:1.2
	pkgsrc-2019Q4:1.2.0.6
	pkgsrc-2019Q4-base:1.2
	pkgsrc-2019Q3:1.2.0.2
	pkgsrc-2019Q3-base:1.2;
locks; strict;
comment	@# @;


1.22
date	2025.01.12.14.22.09;	author mef;	state Exp;
branches;
next	1.21;
commitid	xr3kETitR49uGcFF;

1.21
date	2024.10.26.05.45.17;	author mef;	state Exp;
branches;
next	1.20;
commitid	Bx00t9COjYhzk8vF;

1.20
date	2024.02.18.14.22.58;	author mef;	state Exp;
branches;
next	1.19;
commitid	gXyeZzERBQDngVYE;

1.19
date	2024.02.05.21.19.44;	author mef;	state Exp;
branches;
next	1.18;
commitid	jhHYONRYOPqbZhXE;

1.18
date	2023.06.03.13.40.21;	author mef;	state Exp;
branches;
next	1.17;
commitid	4kKDzQqqjYAVnvrE;

1.17
date	2023.02.19.12.48.24;	author mef;	state Exp;
branches;
next	1.16;
commitid	y4FqfI57zydlr8eE;

1.16
date	2022.12.31.12.44.14;	author mef;	state Exp;
branches;
next	1.15;
commitid	JZ29lRZZo9oA1I7E;

1.15
date	2022.12.18.05.08.39;	author mef;	state Exp;
branches;
next	1.14;
commitid	WdOEiAd62yvbVZ5E;

1.14
date	2022.05.30.15.11.36;	author mef;	state Exp;
branches;
next	1.13;
commitid	CRXJVAYJ0xmBK5GD;

1.13
date	2022.04.23.01.54.49;	author mef;	state Exp;
branches;
next	1.12;
commitid	oV95R3t5vlxZwgBD;

1.12
date	2021.09.18.14.23.00;	author mef;	state Exp;
branches;
next	1.11;
commitid	vgYpx6ajbNU5Er9D;

1.11
date	2021.08.17.14.37.59;	author mef;	state Exp;
branches;
next	1.10;
commitid	qRgtjJKsz9p5Lk5D;

1.10
date	2021.08.17.14.10.15;	author mef;	state Exp;
branches;
next	1.9;
commitid	bKykcQ9qdFYqBk5D;

1.9
date	2021.05.31.23.48.58;	author mef;	state Exp;
branches;
next	1.8;
commitid	LXl7yaiQLgqyjmVC;

1.8
date	2021.05.31.23.48.13;	author mef;	state Exp;
branches;
next	1.7;
commitid	GK3PwwKpnkcijmVC;

1.7
date	2021.05.31.23.39.12;	author mef;	state Exp;
branches;
next	1.6;
commitid	M0pGCQSQyqkTfmVC;

1.6
date	2021.02.08.12.20.48;	author mef;	state Exp;
branches;
next	1.5;
commitid	1GM1s5VkjMn66UGC;

1.5
date	2021.01.01.11.58.53;	author mef;	state Exp;
branches;
next	1.4;
commitid	DbeTSu9kFikGc1CC;

1.4
date	2020.10.03.13.59.16;	author mef;	state Exp;
branches;
next	1.3;
commitid	cztUrSFuWZfqLsqC;

1.3
date	2020.09.20.01.25.06;	author mef;	state Exp;
branches;
next	1.2;
commitid	4alui5oYql6z0JoC;

1.2
date	2019.08.08.19.53.41;	author brook;	state Exp;
branches;
next	1.1;
commitid	K2VPfA0XCw7xfgyB;

1.1
date	2019.07.31.01.29.17;	author brook;	state Exp;
branches;
next	;
commitid	8bEd6eLYGi60r8xB;


desc
@@


1.22
log
@(devel/R-xfun) Updated 0.48 to 0.50

# CHANGES IN xfun VERSION 0.50

- The function `isFALSE()` has been removed from this package. The
  deprecation notice was given two years ago:
  https://yihui.org/en/2023/02/xfun-isfalse/

- Added a new function `tabset()` to represent a list with a
  tabset. The representation is similar to `str()`, but uses a visual
  form.

- Factored out the function `taml_load()` and exported it (TAML is a
  tiny subset of YAML). Also added a new function `taml_save()` to
  convert simple lists to YAML.

- The `print` argument of `record()` can accept non-function values
  now, in which case `print()` (or `show()` for S4 objects) will be
  used as the print function.

- The `record()` results can also be formatted to Markdown via
  `format(record(), to = 'markdown')`.

- Moved `knitr::combine_words()` into this package as
  `xfun::join_words()`. The former has become a simple wrapper of the
  latter.

- Similarly, moved `knitr::write_bib()` into this package as
  `xfun::pkg_bib()`.

- Moved the internal function `str_wrap()` from **knitr** and exported
  it as `xfun::str_wrap()`.

- Exported the internal `find_globals()` and `find_locals()`
  functions.

- `md_table()` escapes `|` in the table to `\|` instead of `&#124;`
  now.

- `yaml_load(use_yaml = FALSE)` allows for indenting sub-fields by any
  number of spaces now (thanks, @@J-Moravec, #95). Previously, one
  level of indentation must use exactly 2 spaces.

- `divide_chunk()` no longer requires every line of chunk options to
  be commented out when the engine uses a pair of comment delimiters
  (such as `/*` and `*/` for CSS) instead of a single comment
  character. It suffices to use the opening delimiter at the beginning
  and closing delimiter at the end, e.g.,

  ````md
  ```{css}
  /*| echo=FALSE,
      label='foo' */
  ```
  ````

  Previously, every line must be commented out like:

  ````md
  ```{css}
  /*| echo=FALSE, */
  /*| label='foo' */
  ```
  ````

# CHANGES IN xfun VERSION 0.49

- Added an argument `use_block = FALSE` to `protect_math()`. When
  `use_block = TRUE`, a `$$ $$` expression that spans across multiple
  lines will be protected in a code block.

- `protect_math()` will ignore `$ $` if there are backticks after the
  opening `$` or before the closing `$`, e.g., ``$`this is not
  math`$``.

- `protect_math()` allows for parentheses `()` around math expressions
  now, e.g., `($x$)` was previously not recognized but is recognized
  now (thanks, @@AlbertLei, yihui/litedown#34).

- `record()` works with `quote()` now (thanks, @@ben-schwen,
  yihui/litedown#38).

- `html_escape()` will not escape double quotes (i.e., convert `"`" to
  `&quot;`) by default, and the conversion will be done only for
  `html_escape(attr = TRUE)`.

- The arguments `before` and `after` of `read_all()` can take
  functions of two arguments now, with the second argument being the
  content of each file.

- Added an argument `start` to `make_fence()`.
@
text
@# $NetBSD: Makefile,v 1.21 2024/10/26 05:45:17 mef Exp $

R_PKGNAME=	xfun
R_PKGVER=	0.50
CATEGORIES=	devel

MAINTAINER=	pkgsrc-users@@NetBSD.org
COMMENT=	Miscellaneous functions by 'Yihui Xie'
LICENSE=	mit

# Packages suggested but not available: 'litedown', 'rhub', 'magick', 'qs'
# VignetteBuilder package required for checking but not installed: 'litedown'

TEST_DEPENDS+=	R-knitr>=1.47:../../print/R-knitr
TEST_DEPENDS+=	R-pak-[0-9]*:../../devel/R-pak
TEST_DEPENDS+=	R-remotes-[0-9]*:../../devel/R-remotes
TEST_DEPENDS+=	R-renv-[0-9]*:../../devel/R-renv
TEST_DEPENDS+=	R-rmarkdown-[0-9]*:../../textproc/R-rmarkdown
TEST_DEPENDS+=	R-rstudioapi-[0-9]*:../../math/R-rstudioapi
TEST_DEPENDS+=	R-testit-[0-9]*:../../devel/R-testit
TEST_DEPENDS+=	R-tinytex>=0.31:../../print/R-tinytex

USE_LANGUAGES=	c c++

.include "../../math/R/Makefile.extension"
.include "../../mk/bsd.pkg.mk"
@


1.21
log
@(devel/R-xfun) Updated 0.42 to 0.48

# CHANGES IN xfun VERSION 0.48

- Added utilities for HTML tags: `html_tag()`, `html_escape()`,
  `html_escape()`, and `html_view()`. Removed the soft dependency on
  the **htmltools** package accordingly.

- `base_pkgs()` is faster now: it calls
  `tools::standard_package_names()` if the function exists (R >=
  4.4.0), otherwise it just returns a constant vector of base package
  names (thanks, @@arnaudgallou, #91).

- Added a function `mime_type()` to obtain the MIME types of files via
  `mime::guess_type()` if **mime** is installed, otherwise it will
  call `tools:::mime_type()`, and fall back to using a system command
  (e.g., `file --mime-type`) to obtain the types.

- Added a function `file_rename()` to deal with `file.rename()`
  failures by calling `file.copy()` (thanks, @@Giqles @@katrinabrock,
  rstudio/bookdown#804).

- `new_app()` will use `utils::browseURL()` to open the app if
  `options('viewer')` is not configured (thanks, @@AlbertLei,
  yihui/litedown#29).

- Added a method `record_print.record_asis()` to return the object as is.

# CHANGES IN xfun VERSION 0.47

- Added functions `lazy_save()` and `lazy_load()` to save objects to
  files and lazy-load them.

- Fixed a bug in `record(dev = svglite::svglite)` that misplaced plots
  when low-level plot functions are used (thanks, @@liao961120,
  yihui/litedown#17).

- Specified the lowest R version required (v3.2.0) for this package.

# CHANGES IN xfun VERSION 0.46

- `md_table()` should add a vertical ellipsis to row names when rows
  are truncated by the `limit` argument.

- `session_info()` recognizes Positron now (thanks, @@chuxinyuan, #89).

# CHANGES IN xfun VERSION 0.45

- For `record()` with `verbose = 1` or `2`, invisible `NULL` is no
  longer printed.

- `Rscript_call()` will show the actual error message (if an error
  occurred) during calling the function in a new R session.

# CHANGES IN xfun VERSION 0.44

- Added a function `cache_exec()` to cache the execution of an
  expression either in memory or on disk. It is much more general and
  flexible than `cache_rds()`. For example, it supports custom
  reading/writing methods for cache files, and can load locally
  created variables in the expression while loading cache.

- Added an argument `cache` to `record()` to make it possible to enable caching.

- Added arguments `message` and `warning` to `record()` to decide
  whether messages and warnings should be recorded.

- Changed the default value of the argument `error` of `record()` from
  `FALSE` to `NA`. Now `FALSE` means to suppress error messages, and
  `NA` means to throw errors normally. This is for consistency with
  the `message` and `warning` arguments.

- Added an S3 generic function `record_print()`, which is similar to
  `knitr::knit_print()` but for the purpose of printing visible values
  in `record()`.

- The `record()` function gained new arguments `print` and
  `print.args` to support custom printing functions and arguments.

- Added a function `md_table()`, which is a minimal Markdown table
  generator.

- Exported the internal function `md5()` to calculate the MD5
  checksums of R objects. The function is essentially a workaround for
  `tools::md5sum()` (see HenrikBengtsson/Wishlist-for-R#21).

- For `fenced_block()`, a space is added between the backticks and the
  language name, e.g., ```` ```r ```` has become ```` ``` r ````
  now. This will affect snapshot tests based on Markdown ([an
  example](https://github.com/yihui/knitr-examples/commit/931e0a2)).

- Added a shorthand `fenced_div()` for `fenced_block(char = ':')`.

- `write_utf8()` returns the `con` argument (typically a file path)
  now. Previously, it returns `NULL`.

- Added an experimental function `new_app()` to create a local web application.

- The returned value of `yaml_body()` contains a new element `lines`
  in the list indicating the line numbers of YAML metadata if exists.

- Removed the `skip` argument from `split_source()`.

- For `split_source(line_number = TRUE)`, the attribute name for line
  numbers in the returned value was changed from `line_start` (a
  single starting line number) to `lines` (both the starting and
  ending numbers).

- Fixed an edge case in `prose_index()`, in which inline code was
  incorrectly recognized as a code block fence.

# CHANGES IN xfun VERSION 0.43

- Added a function `upload_imgur()`, which was adapted from
  `knitr::imgur_upload()`. The latter will call the former in the
  future. `xfun::upload_imgur()` allows users to choose whether to use
  the system command `curl` or the R package **curl** to upload the
  image. It also has a new argument `include_xml` to specify whether
  the XML response needs to be included in the returned value.

- Added a function `fenced_block()` to create a fenced block in
  Markdown (thanks, @@cderv, yihui/knitr#2331). The block can be either
  a code block or a fenced Div.

- Fixed a bug in `xfun::record()` when the argument `verbose = 1` or `2`.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.20 2024/02/18 14:22:58 mef Exp $
d4 1
a4 1
R_PKGVER=	0.48
@


1.20
log
@(devel/R-xfun) Updated 0.41 to 0.42

# CHANGES IN xfun VERSION 0.42

- `isFALSE()` has been fully deprecated for R >= 3.5.0, and will be
  completely removed from this package in the future
  (<https://yihui.org/en/2023/02/xfun-isfalse/>).

- Added a function `record()` to run R code and record the results,
  which is similar to `evaluate::evaluate()` but less sophisticated
  and technically simpler. One major difference is that
  `xfun::record()` records plots directly to files instead of saving
  them as display lists.

- `yaml_load()` gained an `envir` argument, which can be used to
  specify the environment to evaluate R expressions in YAML (i.e.,
  expressions written after `!expr` or `!r`). This is not
  straightforward in the upstream **yaml** package (thanks, @@viking,
  vubiostat/r-yaml#54).

- `yaml_body()` gained the `...` argument to pass more arguments to
  `yaml_load()`.

- `split_source()` gained a `merge_comments` argument to merge
  consecutive lines of comments into the next code block, a
  `line_number` argument to store the line number of each expression
  in the returned value, and a `skip` argument to skip the rest of the
  code when the skip token is found.

- `check_old_package()` has been vectorized, i.e., the arguments
  `name` and `version` can take vectors now.

- Factored out the code for parsing chunk options and dividing a chunk
  into chunk options and chunk body from **knitr** to this package as
  functions `csv_options()` and `divide_chunk()`, respectively. They
  will be used by **knitr** and other packages in future.

- Added a function `decimal_dot()` to evaluate an expression after
  forcing `options(OutDec = '.')` and `Sys.setlocale(LC_NUMERIC =
  'C')` (for rstudio/rmarkdown#2525).
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.19 2024/02/05 21:19:44 mef Exp $
d4 1
a4 1
R_PKGVER=	0.42
d11 4
a14 2
# Packages suggested but not available: 'rhub', 'magick'
TEST_DEPENDS+=	R-knitr-[0-9]*:../../print/R-knitr
@


1.19
log
@(devel/R-xfun) Updated 0.36 to 0.41, make test missing TEST_DEPENDS

# CHANGES IN xfun VERSION 0.41

- `process_file()` will write to the file only if the processed text
  is different with the input text. This is to avoid writing files
  unnecessarily.

- `session_info()` will remove extra blank lines (thanks, @@chuxinyuan,
  #82) and also omit the time zone info.

# CHANGES IN xfun VERSION 0.40

- `number_to_words()` supports decimal numbers now (thanks,
  @@harshvardhaniimi, #80).

- `is_ascii()` is more robust now (thanks, @@bastistician, #81).

# CHANGES IN xfun VERSION 0.39

- Fixed a bug that `protect_math()` fails to protect the starting `$$`
  that has leading white spaces.

- Added a function `strip_html()` to remove HTML tags and comments from text.

- The function `alnum_id()` will remove HTML tags and comments from
  text (using `strip_html()`) before converting it to an ID string.

- Added a function `env_option()` to retrieve an option value from
  `options()`. If the option does not exist there, check the
  environment variables. This provides a way for users to set an
  option via either `options()` or an environment variable.

# CHANGES IN xfun VERSION 0.38

- Added an object `download_cache`, which is a list of methods to
  download a URL, cache the result, retrieve the result from the
  cache, and clear the cache.

- Added an argument `default` to `url_filename()` to provide a default
  filename when it cannot be determined from the URL.

- Added a function `yaml_load()` to read YAML data when the **yaml**
  package is not available. It only supports a limited number of data
  types and is supposed to be used as a fallback method. See the help
  page `?xfun::yaml_load` for details.

- Added a function `yaml_body()` to split a document into YAML metadata and the body.

- `is_arm64()` also supports Linux now (thanks, @@eitsupi, #74).

- `is_blank()` returns a logical vector of the same length as the
  input vector now, indicating if each element of the input is
  blank. Previously it returns a logical scalar indicating whether
  *all* elements are blank. If you want the old behavior, you can use
  `all(is_blank())`.

# CHANGES IN xfun VERSION 0.37

- Added a function `is_arm64()` to test the CPU type (thanks, @@AlbanSagouis, #72).

- Started deprecating `xfun::isFALSE()` in favor of `base::isFALSE()`
  for R >= 3.5.0 (thanks, @@mmaechler, #66); `isFALSE()` will
  eventually be removed from **xfun** when we do not need to support R
  < 3.5.0.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.18 2023/06/03 13:40:21 mef Exp $
d4 1
a4 1
R_PKGVER=	0.41
@


1.18
log
@(devel/R-xfun) Updated 0.37 to 0.39

# CHANGES IN xfun VERSION 0.39

- Fixed a bug that `protect_math()` fails to protect the starting `$$`
  that has leading white spaces.

- Added a function `strip_html()` to remove HTML tags and comments
  from text.

- The function `alnum_id()` will remove HTML tags and comments from
  text (using `strip_html()`) before converting it to an ID string.

- Added a function `env_option()` to retrieve an option value from
  `options()`. If the option does not exist there, check the
  environment variables. This provides a way for users to set an
  option via either `options()` or an environment variable.

# CHANGES IN xfun VERSION 0.38

- Added an object `download_cache`, which is a list of methods to
  download a URL, cache the result, retrieve the result from the
  cache, and clear the cache.

- Added an argument `default` to `url_filename()` to provide a default
  filename when it cannot be determined from the URL.

- Added a function `yaml_load()` to read YAML data when the **yaml**
  package is not available. It only supports a limited number of data
  types and is supposed to be used as a fallback method. See the help
  page `?xfun::yaml_load` for details.

- Added a function `yaml_body()` to split a document into YAML
  metadata and the body.

- `is_arm64()` also supports Linux now (thanks, @@eitsupi, #74).

- `is_blank()` returns a logical vector of the same length as the
  input vector now, indicating if each element of the input is
  blank. Previously it returns a logical scalar indicating whether
  *all* elements are blank. If you want the old behavior, you can use
  `all(is_blank())`.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.17 2023/02/19 12:48:24 mef Exp $
d4 1
a4 1
R_PKGVER=	0.39
a12 3
TEST_DEPENDS+=	R-rmarkdown-[0-9]*:../../textproc/R-rmarkdown
TEST_DEPENDS+=	R-tinytex>=0.31:../../print/R-tinytex
TEST_DEPENDS+=	R-testit-[0-9]*:../../devel/R-testit
a13 1
TEST_DEPENDS+=	R-rstudioapi-[0-9]*:../../math/R-rstudioapi
d16 4
@


1.17
log
@(devel/R-xfun) Updated 0.36 to 0.37

# CHANGES IN xfun VERSION 0.37

- Added a function `is_arm64()` to test the CPU type (thanks, @@AlbanSagouis, #72).

- Started deprecating `xfun::isFALSE()` in favor of `base::isFALSE()`
  for R >= 3.5.0 (thanks, @@mmaechler, #66); `isFALSE()` will
  eventually be removed from **xfun** when we do not need to support R
  < 3.5.0.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.16 2022/12/31 12:44:14 mef Exp $
d4 1
a4 1
R_PKGVER=	0.37
@


1.16
log
@(devel/R-xfun) Updated 0.35 to 0.36

# CHANGES IN xfun VERSION 0.36

- Added a new argument `resolve_symlink` to `normalize_path()` to get
  the absolute paths of symlinks without resolving them (with
  `resolve_symlink = FALSE`).
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.15 2022/12/18 05:08:39 mef Exp $
d4 1
a4 1
R_PKGVER=	0.36
@


1.15
log
@(devel/R-xfun) Updated 0.31 to 0.35

# CHANGES IN xfun VERSION 0.35

- Added a new argument `token` to `protect_math()` to optionally
  include a token around math expressions.

- `base64_uri()` relies less on the **mime** package now. For some
  common file extensions (e.g., `.jpg`/`.png`), this function knows
  their MIME types.

- `stringsAsStrings()` has been removed from this package.

# CHANGES IN xfun VERSION 0.34

- Added a new function `alnum_id()` to generate ID strings from a character vector.

- The function `stringsAsStrings()` has been deprecated.

# CHANGES IN xfun VERSION 0.33

- Reverted the change for #68: the characters `-+!_#` are no longer
  accepted by default in filename extensions, since they are
  relatively rare and caused a breakage in rstudio/bookdown#1369. If
  you wish to allow for these characters, you may use the new `extra`
  argument in `file_ext()` and related functions, e.g.,
  `xfun::file_ext(x, extra = '-+!_#')`.

- The function `stringsAsStrings()` will be deprecated in a future
  release of **xfun**, because the global option `stringsAsFactors =
  FALSE` has become the default in base R since 4.0.0.

# CHANGES IN xfun VERSION 0.32

- Added a function `shrink_images()` to shrink images to a maximum
  width using the **magick** package (thanks, @@apreshill,
  rstudio/blogdown#614).

- Added a function `tinify_dir()` as a wrapper of `tinify()` to
  compress images under a directory.

- `file_ext()` supports more file extensions now, such as `.c++`,
  `.FB2K-COMPONENT`, and so on (thanks, @@tentacles-from-outer-space,
  #68).

- Fixed the issue that `xfun::base_pkgs()` could hang R (thanks,
  @@mmaechler, #66).

- The `...` argument in `dir_create()` was not passed to `dir.create()`.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.14 2022/05/30 15:11:36 mef Exp $
d4 1
a4 1
R_PKGVER=	0.35
@


1.14
log
@(devel/R-xfun) Updated 0.30 to 0.31

# CHANGES IN xfun VERSION 0.31

- `github_releases(use_jsonlite = FALSE)` supports R versions below 4.1.0 now.

- `session_info()` silently drops empty package names now (thanks, @@phargarten2, #65).
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.13 2022/04/23 01:54:49 mef Exp $
d4 1
a4 1
R_PKGVER=	0.31
d11 1
a11 1
# Package suggested but not available: 'rhub'
@


1.13
log
@(devel/R-xfun) Updated 0.26 to 0.30

# CHANGES IN xfun VERSION 0.30

- Added a new function `is_blank()` (previously existed in **knitr**)
  to test if all elements of a character vector are blank (white
  spaces or empty strings).

- Added a new argument `error = TRUE` to `existing_files()`.

# CHANGES IN xfun VERSION 0.29

- `github_releases()` can fetch all releases (tags) of a Github repo
  now.

- Added an argument `.error` to `download_file()` so that users can
  customize the error message when the download fails.

- Added functions `rest_api_raw()` and `rest_api()` to get data from a
  REST API; also added the function `github_api()` to get data from
  the Github API based on `rest_api_raw()`.

- Added a wrapper function `system3()` based on `system2()` to mark
  the character output of `system2()` as UTF-8 if appropriate.

- Added a function `existing_files()` to return file paths that exist
  (a shorthand of `x[file.exists(x)]`).

- Added a function `read_all()` to read multiple files and concatenate
  the content into a character vector.

- `url_accessible()` uses `curlGetHeaders()` by default (instead of
  `download_file()`) to test if a URL is accessible when the **curl**
  package is not available.

- When `options(xfun.rev_check.compare = FALSE)`, `rev_check()` will
  run `R CMD check` on reverse dependencies against a source package
  but not the CRAN version of this package. By default, this option is
  `TRUE`, meaning that `R CMD check` will run against both versions of
  the package.

# CHANGES IN xfun VERSION 0.28

- Added a new function `url_accessible()` to test if a URL can be
  downloaded.

- Added a new function `try_error()` to try an expression and see if
  it throws an error.

# CHANGES IN xfun VERSION 0.27

- Exported and documented the function `xfun::base_pkgs()` (to return
  base R package names).

- Changed the default value of the `status_only` argument of
  `compare_Rcheck()` from `FALSE` to `TRUE`.

- Added new functions `crandalf_check()` and `crandalf_results()` for
  checking (especially large numbers of) reverse dependencies of
  packages via [**crandalf**](https://github.com/yihui/crandalf).

- Added new functions `append_utf8()` and `append_unique()` based on
  `read_utf8()` and `write_utf8()` to append content to files or
  connections.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.12 2021/09/18 14:23:00 mef Exp $
d4 1
a4 1
R_PKGVER=	0.30
@


1.12
log
@(math/R-xfun) Updated 0.25 to 0.26

# CHANGES IN xfun VERSION 0.26

- The `windows_only` argument of `native_encode()` has been
  removed. Now `native_encode()` only tries the conversion to native
  encoding on platforms where `l10n_info()[['UTF-8']]` does not return
  `TRUE`.

- Added a `solaris` argument to `upload_win_builder()`.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.11 2021/08/17 14:37:59 mef Exp $
d4 1
a4 1
R_PKGVER=	0.26
@


1.11
log
@(devel/R-xfun) Remove outdated comment lines
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.10 2021/08/17 14:10:15 mef Exp $
d4 1
a4 1
R_PKGVER=	0.25
d11 1
@


1.10
log
@(devel/R-xfun) Updated 0.23 to 0.25

# CHANGES IN xfun VERSION 0.25

- Fixed a bug in `broken_packages()` (thanks, @@PythonCoderUnicorn,
  rstudio/rmarkdown#1990).

- Added a  `files` argument to  `optipng()` so that users  can specify
  the  list of  PNG  files instead  of running  `optipng`  on a  whole
  directory.

# CHANGES IN xfun VERSION 0.24

- Exported the internal function `broken_packages()` to reinstall
  broken R packages.

- Fixed the bug in `proj_root()` #54 (thanks, @@clarkliming).
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.9 2021/05/31 23:48:58 mef Exp $
a10 3

# Packages suggested but not available: 'rstudioapi', 'remotes', 'renv'

@


1.9
log
@(devel/R-xfun) Update TEST_DEPENDS+, fix typo
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.8 2021/05/31 23:48:13 mef Exp $
d4 1
a4 1
R_PKGVER=	0.23
d11 3
d19 3
a21 1
#EST_DEPENDS+=	R-renv-[0-9]*:../../devel/R-renv
@


1.8
log
@(devel/R-xfun) Update TEST_DEPENDS+, but still failing
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.7 2021/05/31 23:39:12 mef Exp $
d15 1
a15 1
TEST_DEPENDS+=	R-pa-[0-9]*:../../devel/R-pakk
@


1.7
log
@(devel/R-xfun) Updated 0.2.0 to 0.23

# CHANGES IN xfun VERSION 0.23

## NEW FEATURES

- Added a `tinify()` function to compress PNG/JPEG images via [the Tinify API](https://tinypng.com/developers).

- Added a `news2md()` function to convert package news to the Markdown format. This is mainly for converting the plain-text `NEWS` file and the `NEWS.Rd` file to `NEWS.md`.

- Added a `format_bytes()` function to format numbers of bytes using a specified unit, e.g., `1024` can be formatted as `1 Kb`.

- When using `pkg_load2()` in an **renv** project, it will use `renv::install()` to install missing packages by default to take advantage of **renv**'s caching feature (thanks, @@chunyunma @@cderv, #52).

- `upload_win_builder()` no longer requires the system command `curl` to be available; if `curl` is not available, the R package **curl** will be used instead, which means this R package must be installed. In addition to uploading to the `ftp` server of win-builder, it's also possible to upload to <https://win-builder.r-project.org/upload.aspx>: call `upload_win_builder(..., server = 'https')`. This change was made so that it would be possible to continue to upload to win-builder in case it should stop supporting `ftp` (CRAN has discouraged package authors from using `ftp://`).

## BUG FIXES

- Backticks are added to math environments by mistake when `\begin{}` and `\end{}` do not match (thanks, @@oliviergimenez, #51).

## MINOR CHANGES

- The argument `src` was renamed to `pkg` in `install_dir()`.

- The argument `file` of `upload_win_builder()` defaults to `pkg_build()` now, i.e., by default, it will build a source package and upload it, so you do not need to build the package separately.

# CHANGES IN xfun VERSION 0.22

## NEW FEATURES

- `relative_path()` is vectorized now.

- Added a new function `retry()` to retry calling a function for a number of times in case of errors.

- Added a new function `sort_file()`, which is a shorthand for `process_file(fun = sort)` to sort the lines in a text file.

## MAJOR CHANGES

- The argument `FUN` was renamed to `fun` in `process_file()`.

## MINOR CHANGES

- Inside `download_file()`, the `timeout` option in `options()` is set to 3600 seconds when it takes the default value of 60 seconds, which may not be enough for downloading large files (thanks, @@matthewgson, yihui/tinytex#286).

# CHANGES IN xfun VERSION 0.21

## NEW FEATURES

- Added a new function `pkg_available()` to test if a package with a minimal version is available (thanks, @@cderv, #45).

- Added a new function `set_envvar()` to set environment variables and return their old values, so they could be restored later.

- Added a new function `exit_call()` to call a function when a parent function exits.

- Exported the internal function `read_bin()`.

- Added an argument `verbose` to `bg_process()`.

- `Rscript_call()` gains an `options` argument to pass command-line options to `Rscript` (thanks, @@cderv, #48).
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.6 2021/02/08 12:20:48 mef Exp $
a10 2
# Packages suggested but not available:
#  'testit', 'pak'
d13 1
a13 1
TEST_DEPENDS+=	R-tinytex-[0-9]*:../../print/R-tinytex
d15 2
a16 1
TEST_DEPENDS+=	R-pak-[0-9]*:../../devel/R-pak
@


1.6
log
@(devel/R-xfun) Updated 0.19 to 0.20

# CHANGES IN xfun VERSION 0.20

## NEW FEATURES

- Added a function `msg_cat()` to generate a message with `cat()`. See
  the help page `?xfun::msg_cat` for more information.

- Added a function `mark_dirs()` to mark directories with a trailing
  slash in a vector of paths to differentiate them from normal
  filenames (#44).

## BUG FIXES

- `xfun::proc_kill()` failed to work on *nix.

- `xfun::del_empty_dir()` failed to delete empty dirs.

- `xfun::file_string()` preserves emptiness (thanks, @@MichaelChirico,
  #38).

- `xfun::raw_string()` preserves the class(es) of the input now
  (thanks, @@MichaelChirico, #40).

## MINOR CHANGES

- Exported the function `dir_create()`.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.5 2021/01/01 11:58:53 mef Exp $
d4 1
a4 1
R_PKGVER=	0.20
@


1.5
log
@(devel/R-xfun) Updated 0.18 to 0.19

# CHANGES IN xfun VERSION 0.19

## NEW FEATURES

- Added functions `bg_process()` to run a command in a background
  process, and `proc_kill()` to kill a process.

- Added a function `del_empty_dir()` to delete a directory if it is
  empty.

- Added functions `is_abs_path()` and `is_rel_path()` to check if
  paths are absolute or relative.

- Added a function `is_sub_path()` to test if a path is under a
  directory.

- Added a function `is_web_path()` to test if a path is a web path
  that starts with `http://` or `https://` or `ftp://` or `ftps://`.

- Documented and exported the previously internal functions
  `dir_exists()` and `file_exists()` (thanks, @@cderv, #36).

- Added a function `dir_create()` to create a directory recursively by
  default when it does not exist.

- Added an argument `fail` to `Rscript_call()` to allow users to
  customize the error message when an error occurred in calling the
  function in a new R session.

## MINOR CHANGES

- `file_ext()`, `sans_ext()`, and `with_ext()` no longer use
  `tools::file_ext()` or `tools::file_path_sans_ext()`, but provide a
  slightly different implementation. They treat `tar.(gz|bz2|xz)` and
  `nb.html` as file extensions, and also allow extensions to contain a
  trailing `~` or `#`.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4 2020/10/03 13:59:16 mef Exp $
d4 1
a4 1
R_PKGVER=	0.19
@


1.4
log
@(devel/R-xfun)  Updated 0.17 to 0.18

# CHANGES IN xfun VERSION 0.18

## NEW FEATURES

- Added a function `grep_sub()` to perform replacement with `gsub()` on elements
  matched from `grep()`.

- Added a function `github_releases()` to obtain the tags from the Github
  releases of a repo.

- Added a function `bump_version()` to increase the last digit of version
  numbers by one.

- Moved a function `process_file()` from the **blogdown** package to this
  package, and documented it.

- Added a function `valid_syntax()` to check if an R code fragment is
 syntactically valid. This function was moved from the **highr** package.

- Added a function `url_filename()` to extract filenames from URLs.
  This function is used by `download_file()` to determine the default
  output filename.

- Added a function `do_once()` to perform a task once in an R session.

- Added a function `proj_root()` to find the root directory of a project.
  Currently it only supports R package projects and RStudio projects by default.

- Added a function `relative_path()` to calculate the relative path of a path
  relative to a directory.

- Added a function `from_root()`, which is similar to `here::here()` but
  returns a relative path instead of an absolute path.

- Added a function `magic_path()` that, given an incomplete input path,
  tries to find the actual path recursively under subdirectories of a root
  directory. For example, users may only provide a base filename, and
  `magic_path()` will look for this file under subdirectories and return
  the actual path if it is found.

## MINOR CHANGES

- Now `download_file()` tries the download method `winnet` first (previously
  it was `libcurl`) on Windows (thanks, @@cderv, #33).
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3 2020/09/20 01:25:06 mef Exp $
d4 1
a4 1
R_PKGVER=	0.18
d16 2
@


1.3
log
@(devel/R-xfun) Updated 0.8 to 0.17

# CHANGES IN xfun VERSION 0.17

## NEW FEATURES

- Supports `xfun::pkg_attach(packages, install = "pak")`, i.e., use `pak::pkg_install()` to install a package when it is not installed (thanks, @@GitHunter0, #32).

- Added a new function `xfun::split_source()` to split lines of R source code into minimal complete expressions.

# CHANGES IN xfun VERSION 0.16

- Added a new function `base64_decode()` to decode data from the base64 encoding (thanks, @@wush978, #31).

# CHANGES IN xfun VERSION 0.15

## NEW FEATURES

- Added a new function `tree()`, which is based on `str()` in base R, but changes the output of `str()` into a tree diagram to make it easier to understand nested data structures.

- Added a new function `base64_encode()` to encode data into the base64 encoding (thanks, @@wush978, #27).

- Added a new function `base64_uri()` to generate the Data URI (or Data URL) for a file.

## BUG FIXES

- Fenced code blocks commented out in `<!-- -->` are not longer recognized as code blocks but prose (thanks, @@jarauh, #25).

# CHANGES IN xfun VERSION 0.14

## NEW FEATURES

- The `cache_rds()` function can invalidate the cache automatically when the code passed to its `expr` argument has changed. Two new arguments, `hash` and `clean` were added to this function to make it more useful and powerful. See the help page `?xfun::cache_rds()` for more information.

# CHANGES IN xfun VERSION 0.13

## NEW FEATURES

- Added a new function `cache_rds()` to cache an R expression to a `*.rds` file.

- Added a new function `Rscript_call()` to call a function (with arguments) in a new R session via the command `Rscript`.

- The `recheck` argument of `rev_check()` can take a vector of package names, and only these packages will be checked. See `?xfun::rev_check` for more details.

# CHANGES IN xfun VERSION 0.12

## NEW FEATURES

- Added a new function `split_lines()`.

# CHANGES IN xfun VERSION 0.11

## BUG FIXES

- `read_utf8()` will read the file with `options(encoding = 'native.enc')` and ignore user's setting such as `options(encoding = 'UTF-8')` (#21).

# CHANGES IN xfun VERSION 0.10

## NEW FEATURES

- Added the function `as_strict_list()` to convert an existing object to a strict list without wrapping it in another list if the object already is of type list (in contrast to how `strict_list()` behaves) (thanks, @@salim-b, #20).

# CHANGES IN xfun VERSION 0.9

## NEW FEATURES

- Added a function `rename_seq()` to rename files to add an incremental numeric prefix to the filenames, e.g., rename `a.txt`, `b.txt`, `c.txt` to `1-a.txt`, `2-b.txt`, `3-c.txt`.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.2 2019/08/08 19:53:41 brook Exp $
d4 1
a4 1
R_PKGVER=	0.17
@


1.2
log
@Update all R packages to canonical form.

The canonical form [1] of an R package Makefile includes the
following:

- The first stanza includes R_PKGNAME, R_PKGVER, PKGREVISION (as
  needed), and CATEGORIES.

- HOMEPAGE is not present but defined in math/R/Makefile.extension to
  refer to the CRAN web page describing the package.  Other relevant
  web pages are often linked from there via the URL field.

This updates all current R packages to this form, which will make
regular updates _much_ easier, especially using pkgtools/R2pkg.

[1] http://mail-index.netbsd.org/tech-pkg/2019/08/02/msg021711.html
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.1 2019/07/31 01:29:17 brook Exp $
d4 1
a4 1
R_PKGVER=	0.8
d11 7
a17 1
USE_LANGUAGES=	# none
@


1.1
log
@R-xfun: initial commit.

Miscellaneous functions commonly used in other packages maintained by
'Yihui Xie'.
@
text
@d1 1
a1 1
# $NetBSD$
d3 3
a5 1
CATEGORIES=	devel R
a7 1
HOMEPAGE=	${R_HOMEPAGE_BASE}/xfun/
a10 3
R_PKGNAME=	xfun
R_PKGVER=	0.8

@

