Skip to content

Conversation

inxilpro
Copy link

@inxilpro inxilpro commented Mar 2, 2018

This is a sample implementation of the config() helper I mentioned in #397. I like the idea naming the raw user's config something like customUserConfig to remind plugin authors that relying on it may break because the end user will customize it. Then the config() helper becomes the primary way to pull things out of the config.

I flipped the signature so that you define the default value first, and then all other arguments are tried against the user's config first, and then the default config.

@adamwathan
Copy link
Member

Hey @inxilpro, very much appreciate your well-considered ideas here!

What I've decided on for now is to provide a simple config(key, defaultValue) function that lets you ask for a value from the user's customized config while providing your own fallback. You can still accomplish what you've laid out here (albeit with a few more keystrokes), and it keeps our implementation simple and avoids over-committing to anything too fancy too early in the development of the plugin stuff.

Doesn't mean we can't layer additional conveniences in later though as common plugin authoring patterns start to emerge 👍

@adamwathan adamwathan closed this Mar 2, 2018
@inxilpro
Copy link
Author

inxilpro commented Mar 2, 2018

Sounds good. I think this is a perfectly fine middle ground.

thecrypticace pushed a commit that referenced this pull request Sep 26, 2025
Here is everything you need to know about this update. Please take a
good look at what changed and the test results before merging this pull
request.

### What changed?




#### ✳️ @​tailwindcss/typography (0.5.16 → 0.5.19) ·
[Repo](https://github.com/tailwindlabs/tailwindcss-typography) ·
[Changelog](https://github.com/tailwindlabs/tailwindcss-typography/blob/main/CHANGELOG.md)



<details>
<summary>Release Notes</summary>
<h4><a
href="https://github.com/tailwindlabs/tailwindcss-typography/releases/tag/v0.5.19">0.5.19</a></h4>

<blockquote><h3 dir="auto">Fixed</h3>
<ul dir="auto">
<li>Fixed broken color styles (<a
href="https://bounce.depfu.com/github.com/tailwindlabs/tailwindcss-typography/pull/405">#405</a>)</li>
</ul></blockquote>
<h4><a
href="https://github.com/tailwindlabs/tailwindcss-typography/releases/tag/v0.5.18">0.5.18</a></h4>

<blockquote><h3 dir="auto">Fixed</h3>
<ul dir="auto">
<li>Fixed undefined variable error (<a
href="https://bounce.depfu.com/github.com/tailwindlabs/tailwindcss-typography/pull/403">#403</a>)</li>
</ul></blockquote>
<h4><a
href="https://github.com/tailwindlabs/tailwindcss-typography/releases/tag/v0.5.17">0.5.17</a></h4>

<blockquote><h3 dir="auto">Added</h3>
<ul dir="auto">
<li>Add modifiers for description list elements (<a
href="https://bounce.depfu.com/github.com/tailwindlabs/tailwindcss-typography/pull/357">#357</a>)</li>
<li>Add <code class="notranslate">prose-picture</code> modifier (<a
href="https://bounce.depfu.com/github.com/tailwindlabs/tailwindcss-typography/pull/367">#367</a>)</li>
</ul>
<h3 dir="auto">Fixed</h3>
<ul dir="auto">
<li>Include unit in <code class="notranslate">hr</code> border-width
value (<a
href="https://bounce.depfu.com/github.com/tailwindlabs/tailwindcss-typography/pull/379">#379</a>)</li>
<li>Ensure <code class="notranslate">&lt;kbd&gt;</code> styles work with
Tailwind CSS v4 (<a
href="https://bounce.depfu.com/github.com/tailwindlabs/tailwindcss-typography/pull/387">#387</a>)</li>
</ul>
<h3 dir="auto">Changed</h3>
<ul dir="auto">
<li>Remove lodash dependencies (<a
href="https://bounce.depfu.com/github.com/tailwindlabs/tailwindcss-typography/pull/402">#402</a>)</li>
</ul></blockquote>
<p><em>Does any of this look wrong? <a
href="https://depfu.com/packages/npm/@tailwindcss%2Ftypography/feedback">Please
let us know.</a></em></p>
</details>

<details>
<summary>Commits</summary>
<p><a
href="https://github.com/tailwindlabs/tailwindcss-typography/compare/39d20e194940903046f2e2733ce0a9b59ccd464b...e002ab89ad8f4202638249c1c300c0cf0b3739c5">See
the full diff on Github</a>. The new version differs by 22 commits:</p>
<ul>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/e002ab89ad8f4202638249c1c300c0cf0b3739c5"><code>0.5.19</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/bbb1c21099e34ff4d1d7f82f7528b85e71ed3c5a"><code>Fix
bad RGB syntax (#405)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/b316f958af5bc12a981526c3091d8319626e274e"><code>0.5.18</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/ed952066e698dbb65a2f082eeb903ccba5a6834a"><code>Fix
variable declaration in opacity function (#403)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/7efcb4a499e6ede67088e28393a906d4d089e580"><code>0.5.17</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/e0ec248bafa002d589509e29bfd9f054570e6d85"><code>chore(ci):
update actions for release insiders</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/511afcb0bd9732eb8fcdc703f35ff76e57bfcd7b"><code>Add
modifiers for description list elements (#357)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/042a531528cd3ddecafda94fe972394dc8aab6ae"><code>Add
`prose-picture` modifiers (#367)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/f822222ae6e289e8cc0b23636891dc3545d5682a"><code>Fix
`kbd` shadow colors not being calculated on oklch colors
(#387)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/ecb7e87a52d86afbbff64200d40f05fe59433039"><code>Add
Tailwind v4 custom color theme example to README (#396)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/ecb7d5c435fbdf907a1224a453539143c802a75c"><code>Remove
lodash dependencies (#402)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/b7cdf1e1ec98381e337800bc78863c0bbc72d6a5"><code>Clarify
&#39;not-prose&#39; usage when using prefixes (#399)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/25051fbfd7c7058708233b1b4c6280f039e5855d"><code>Fix
syntax highlighting in readme</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/d3c1fbdc604902bc20049ce936d1410adbd6771c"><code>Include
v3 installation instructions alongside v4 (#388)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/632970e3ce6fc10d1bfd8fb46cc9083d0d32986d"><code>Readme:
Remove unused `{theme}` (#385)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/c92dc1c120f71d402a54becd6958af692ff426dd"><code>Fix
typo in comments (#378)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/3e75cb04808f80b0e30b8c6fad2e4212917b194f"><code>Change
the borderTopWidth value for hr from integer to a pixel value
(#379)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/1a6972e6902df5ff63c85399e0418cbfce7855fb"><code>Rectify
variant order Closes #376</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/0ab25dc0ff97505a75c966d3f9a020cd8a543ceb"><code>Fix
plugin import path in README.md (#382)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/fb252ece730f228dfc9ae1c61de79c3ac0025d5c"><code>Fix
syntax errors in Readme.md (#381)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/43a4c2c2fa1932a9b39f84188b2a6bef6e1a0131"><code>Update
README for Tailwind CSS v4 (#380)</code></a></li>
<li><a
href="https://github.com/tailwindlabs/tailwindcss-typography/commit/d1e6421d4c07c15b3e1db6b6b10549df96fb129d"><code>Update
README.md</code></a></li>
</ul>
</details>












---
![Depfu
Status](https://depfu.com/badges/edd6acd35d74c8d41cbb540c30442adf/stats.svg)

[Depfu](https://depfu.com) will automatically keep this PR
conflict-free, as long as you don't add any commits to this branch
yourself. You can also trigger a rebase manually by commenting with
`@depfu rebase`.

<details><summary>All Depfu comment commands</summary>
<blockquote><dl>
<dt>@​depfu rebase</dt><dd>Rebases against your default branch and
redoes this update</dd>
<dt>@​depfu recreate</dt><dd>Recreates this PR, overwriting any edits
that you've made to it</dd>
<dt>@​depfu merge</dt><dd>Merges this PR once your tests are passing and
conflicts are resolved</dd>
<dt>@​depfu cancel merge</dt><dd>Cancels automatic merging of this
PR</dd>
<dt>@​depfu close</dt><dd>Closes this PR and deletes the branch</dd>
<dt>@​depfu reopen</dt><dd>Restores the branch and reopens this PR (if
it's closed)</dd>
<dt>@​depfu pause</dt><dd>Ignores all future updates for this dependency
and closes this PR</dd>
<dt>@​depfu pause [minor|major]</dt><dd>Ignores all future minor/major
updates for this dependency and closes this PR</dd>
<dt>@​depfu resume</dt><dd>Future versions of this dependency will
create PRs again (leaves this PR as is)</dd>
</dl></blockquote>
</details>

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
thecrypticace pushed a commit that referenced this pull request Sep 29, 2025
Here is everything you need to know about this update. Please take a
good look at what changed and the test results before merging this pull
request.

### What changed?




#### ✳️ jiti (2.5.1 → 2.6.0) · [Repo](https://github.com/unjs/jiti) ·
[Changelog](https://github.com/unjs/jiti/blob/main/CHANGELOG.md)



<details>
<summary>Release Notes</summary>
<h4><a
href="https://github.com/unjs/jiti/releases/tag/v2.6.0">2.6.0</a></h4>

<blockquote><p dir="auto"><a
href="https://bounce.depfu.com/github.com/unjs/jiti/compare/v2.5.1...v2.6.0">compare
changes</a></p>
<h3 dir="auto">🌟 What is new?</h3>
<p dir="auto">This release fixes minor issues, migrates to Rspack for
dist, and lazily imports the Babel transformer only when needed, which
should noticeably improve startup times.</p>
<ul dir="auto">
<li>Install size reduced from <code class="notranslate">2.03MB</code> to
<code class="notranslate">1.67MB</code>
</li>
<li>Loading times improved <code class="notranslate">150ms</code> =&gt;
<code class="notranslate">22ms</code> (full transform: <code
class="notranslate">180ms</code> =&gt; <code
class="notranslate">115ms</code>)</li>
</ul>
<h3 dir="auto">🔥 Performance</h3>
<ul dir="auto">
<li>Lazy load transformer (<a
href="https://bounce.depfu.com/github.com/unjs/jiti/pull/405">#405</a>)</li>
</ul>
<h3 dir="auto">🩹 Fixes</h3>
<ul dir="auto">
<li>
<strong>cjs-interop:</strong> Handle function default exports (<a
href="https://bounce.depfu.com/github.com/unjs/jiti/pull/396">#396</a>)</li>
<li>Always use native require/import for <code
class="notranslate">node:</code> specifiers (<a
href="https://bounce.depfu.com/github.com/unjs/jiti/pull/392">#392</a>)</li>
</ul>
<h3 dir="auto">📦 Build</h3>
<ul dir="auto">
<li>Migrate to rspack (<a
href="https://bounce.depfu.com/github.com/unjs/jiti/pull/404">#404</a>)</li>
<li>Updated bundled dependencies (<a
href="https://bounce.depfu.com/github.com/unjs/jiti/compare/v2.5.1...v2.6.0#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519">diff</a>)</li>
</ul>
<h3 dir="auto">✅ Tests</h3>
<ul dir="auto">
<li>Update deno and bun native test coverage (<a
href="https://bounce.depfu.com/github.com/unjs/jiti/commit/df844f8">df844f8</a>)</li>
</ul>
<h3 dir="auto">❤️ Contributors</h3>
<ul dir="auto">
<li>Pooya Parsa (<a
href="https://bounce.depfu.com/github.com/pi0">@pi0</a>)</li>
<li>Volodymyr Kolesnykov (<a
href="https://bounce.depfu.com/github.com/sjinks">@sjinks</a>)</li>
<li>Jungwoo LEE (<a
href="https://bounce.depfu.com/github.com/jungwoo3490">@jungwoo3490</a>)</li>
</ul></blockquote>
<p><em>Does any of this look wrong? <a
href="https://depfu.com/packages/npm/jiti/feedback">Please let us
know.</a></em></p>
</details>

<details>
<summary>Commits</summary>
<p><a
href="https://github.com/unjs/jiti/compare/61fa80358bc71708daf104c1205315d8e5867e4b...82919cff8b7a37109b07bf0fcc24a6289976de4d">See
the full diff on Github</a>. The new version differs by 11 commits:</p>
<ul>
<li><a
href="https://github.com/unjs/jiti/commit/82919cff8b7a37109b07bf0fcc24a6289976de4d"><code>chore(release):
v2.6.0</code></a></li>
<li><a
href="https://github.com/unjs/jiti/commit/c48a5d5d55628786268386e5efc1cf0175d4e952"><code>perf:
lazy load babel transform (#405)</code></a></li>
<li><a
href="https://github.com/unjs/jiti/commit/c3f6ff4fcb420d94e488d7b8f85cac63ed0ffbe6"><code>fix:
always use native for `node:` specifiers (#392)</code></a></li>
<li><a
href="https://github.com/unjs/jiti/commit/7aa365b8132349a3946a1ab8720a06339ccd7e92"><code>fix(cjs-interop):
handle function default exports (#396)</code></a></li>
<li><a
href="https://github.com/unjs/jiti/commit/f9d67d2d89a9f6dfe2aff8bdbee97b160b6a2887"><code>build:
migrate to rspack (#404)</code></a></li>
<li><a
href="https://github.com/unjs/jiti/commit/64044278c6e46ebfca4bb9bc8315f4d043bea9c0"><code>test:
new bench script</code></a></li>
<li><a
href="https://github.com/unjs/jiti/commit/df844f8868500527f8cc46c1093147021c7b0a36"><code>test:
update deno and bun native test ignores</code></a></li>
<li><a
href="https://github.com/unjs/jiti/commit/5123334eb2856bf3c758fbbf583f13f2f3488915"><code>chore:
update deps</code></a></li>
<li><a
href="https://github.com/unjs/jiti/commit/cdb86cbeeb1f9abbce89c868172601659ad36a9c"><code>chore(deps):
update all non-major dependencies (#393)</code></a></li>
<li><a
href="https://github.com/unjs/jiti/commit/e615852fb0f906d611dbcef8309cd3feb5bb9eec"><code>chore(deps):
update actions/checkout action to v5 (#394)</code></a></li>
<li><a
href="https://github.com/unjs/jiti/commit/d2d9aebb8c2685b65bb2eb8c01559d614e1e5a79"><code>chore(deps):
update actions/setup-node action to v5 (#399)</code></a></li>
</ul>
</details>












---
![Depfu
Status](https://depfu.com/badges/edd6acd35d74c8d41cbb540c30442adf/stats.svg)

[Depfu](https://depfu.com) will automatically keep this PR
conflict-free, as long as you don't add any commits to this branch
yourself. You can also trigger a rebase manually by commenting with
`@depfu rebase`.

<details><summary>All Depfu comment commands</summary>
<blockquote><dl>
<dt>@​depfu rebase</dt><dd>Rebases against your default branch and
redoes this update</dd>
<dt>@​depfu recreate</dt><dd>Recreates this PR, overwriting any edits
that you've made to it</dd>
<dt>@​depfu merge</dt><dd>Merges this PR once your tests are passing and
conflicts are resolved</dd>
<dt>@​depfu cancel merge</dt><dd>Cancels automatic merging of this
PR</dd>
<dt>@​depfu close</dt><dd>Closes this PR and deletes the branch</dd>
<dt>@​depfu reopen</dt><dd>Restores the branch and reopens this PR (if
it's closed)</dd>
<dt>@​depfu pause</dt><dd>Ignores all future updates for this dependency
and closes this PR</dd>
<dt>@​depfu pause [minor|major]</dt><dd>Ignores all future minor/major
updates for this dependency and closes this PR</dd>
<dt>@​depfu resume</dt><dd>Future versions of this dependency will
create PRs again (leaves this PR as is)</dd>
</dl></blockquote>
</details>

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants