Closed jantimon closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git βοΈ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
next-yak-benchmark | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:49am |
yacijs | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Jul 12, 2024 11:49am |
The changes in the next-yak
package improve the moduleβs internal structure and clarify the separation between public and internal APIs. Imports for CSS functionality are adjusted to reference internal paths. New mock implementations are added for testing, and the build configuration is updated for minification and sourcemap generation. These updates aim to enhance code clarity, maintainability, and testing capabilities.
File Path | Change Summary |
---|---|
packages/.../loaders/__tests__/tsloader.test.ts |
Updated css import statements from "next-yak" to "next-yak/internal" . |
packages/.../loaders/babel-yak-plugin.ts |
Modified node.source.value conditionally from "next-yak" to "next-yak/internal" . |
packages/.../package.json |
Added a new entry for "./internal" with paths to ./dist/internal.js and ./dist/internal.cjs . |
packages/.../runtime/index.ts |
Reorganized and updated exports for typings, mocks, and clarified their usage. Removed useTheme and YakThemeProvider exports. |
packages/.../runtime/internal.ts |
Provided internal implementation for core APIs, ensuring separation between public API and internal logic. |
packages/.../runtime/mocks/cssLiteral.ts , keyframes.ts , styled.ts |
Introduced new files exporting everything from their respective .js counterparts. |
packages/.../tsup.config.ts |
Added configuration for internal modules with entry points, formats, minification, sourcemap generation, module resolution, and output settings. |
packages/.../runtime/jsx-runtime.ts |
Updated StaticCSSProp import path to "./mocks/cssLiteral.js" . |
In the land of code, changes brew, Internal paths now clear, and new. With mocks and maps, we pave the way, For testing ease, night and day. Next-Yakβs strength, in structure lies, Hopping higher to the skies. πβ¨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Comparing feature/next-yak-internal
(30f22b6) with main
(5099856)
β 1 (π 1)
regressions
β
1
untouched benchmarks
Benchmark | main |
feature/next-yak-internal |
Change | |
---|---|---|---|---|
π | render KanjiLetterComponentYak |
124.1 ms | 152.1 ms | -18.37% |
LGTM But just something that came to my mind: Maybe it makes sense to change the import in
jsx-runtime.ts
as well. Wdyt?
Yes you are right - the mocks will be the public facing typing and jsx-runtime.ts too.. therefore jsx-runtime must not export the internal types
this is the very first step for #56
it creates the structure and the adjusts the babel plugin to split the internal and external usage
by now it should work exactly the same (this means pr does not include any improvements for testing)
Summary by CodeRabbit
New Features
Refactor
Documentation