From 84a8fe038f9f9c14a90de1c40a68bdfe1e8cb429 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 1 Aug 2023 08:39:32 -0500 Subject: [PATCH 1/2] Rename to hrefPure --- src/Node/URL.js | 2 +- src/Node/URL.purs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Node/URL.js b/src/Node/URL.js index e669819..ac624d6 100644 --- a/src/Node/URL.js +++ b/src/Node/URL.js @@ -15,7 +15,7 @@ export const hostnameImpl = (u) => u.hostname; export const setHostnameImpl = (val, u) => { u.hostname = val; }; -export const uneffectfulHref = (u) => u.href; +export const hrefPure = (u) => u.href; export const hrefImpl = (u) => u.href; export const setHrefImpl = (val, u) => { u.href = val; diff --git a/src/Node/URL.purs b/src/Node/URL.purs index e5bf177..af93e04 100644 --- a/src/Node/URL.purs +++ b/src/Node/URL.purs @@ -49,7 +49,7 @@ import Prim.Row as Row foreign import data URL :: Type instance Show URL where - show x = "URL(" <> uneffectfulHref x <> ")" + show x = "URL(" <> hrefPure x <> ")" new :: String -> Effect URL new input = runEffectFn1 newImpl input @@ -96,7 +96,8 @@ setHostname val url = runEffectFn2 setHostnameImpl val url foreign import setHostnameImpl :: EffectFn2 String URL Unit -foreign import uneffectfulHref :: URL -> String +-- do not export +foreign import hrefPure :: URL -> String href :: URL -> Effect String href url = runEffectFn1 hrefImpl url From 9422bb2eca55193f7ec438e117ec60f432522747 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Tue, 1 Aug 2023 08:52:04 -0500 Subject: [PATCH 2/2] Add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2533bae..3128f8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ New features: Bugfixes: Other improvements: +- Rename `uneffectfulHref` to `hrefPure` (used in `Show` instance) (#21 by @JordanMartinez) ## [v7.0.0](https://github.com/purescript-node/purescript-node-url/releases/tag/v7.0.0) - 2023-07-31