diff options
author | Thijs Schreijer <thijs@thijsschreijer.nl> | 2022-01-10 14:51:39 +0300 |
---|---|---|
committer | Thijs Schreijer <thijs@thijsschreijer.nl> | 2022-01-10 16:15:26 +0300 |
commit | a2fa921d0924d71a96eb9404639c54ebcb1b00b2 (patch) | |
tree | 2e429d583c033587d18e633f720301599781e021 | |
parent | 73aa91d3881c771ea1e906035baa2382fdd5adf0 (diff) |
deprecate(xml) deprecate the 'pl.xml' module
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | lua/pl/text.lua | 2 | ||||
-rw-r--r-- | lua/pl/xml.lua | 10 |
3 files changed, 13 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index d8112ea..2c2cb7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ see [CONTRIBUTING.md](CONTRIBUTING.md#release-instructions-for-a-new-version) fo ## 1.12.0 (unreleased) - deprecate: module `pl.text` the contents have moved to `pl.stringx` (removal later) [#407](https://github.com/lunarmodules/Penlight/pull/407) + - deprecate: module `pl.xml`, please switch to a more specialized library (removal later) + [#409](https://github.com/lunarmodules/Penlight/pull/409) - feat: `utils.npairs` added. An iterator with a range that honours the `n` field [#387](https://github.com/lunarmodules/Penlight/pull/387) - fix: `xml.maptags` would hang if it encountered text-nodes diff --git a/lua/pl/text.lua b/lua/pl/text.lua index fe07754..8b6a53f 100644 --- a/lua/pl/text.lua +++ b/lua/pl/text.lua @@ -15,7 +15,7 @@ local utils = require("pl.utils") -require("pl.utils").raise_deprecation { +utils.raise_deprecation { source = "Penlight " .. utils._VERSION, message = "the contents of module 'pl.text' has moved into 'pl.stringx'", version_removed = "2.0.0", diff --git a/lua/pl/xml.lua b/lua/pl/xml.lua index c593738..7956de9 100644 --- a/lua/pl/xml.lua +++ b/lua/pl/xml.lua @@ -51,6 +51,16 @@ local pcall = pcall local require = require +utils.raise_deprecation { + source = "Penlight " .. utils._VERSION, + message = "the contents of module 'pl.xml' has been deprecated, please use a more specialized library instead", + version_removed = "2.0.0", + deprecated_after = "1.11.0", + no_trace = true, +} + + + local _M = {} local Doc = { __type = "doc" }; Doc.__index = Doc; |