-
-
Notifications
You must be signed in to change notification settings - Fork 778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: move to ESM-only and fix package exports #3380
Conversation
✅ Deploy Preview for unocss ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
36e997f
to
bd59719
Compare
ahaha, I was working also on this on my local, checking your PR @kwaa |
You should use I'll check I'll check this PR on my local in a few hours... NOTE: on my local I'm moving UnoCSS to ESM first |
I've pushed the changes. Currently building fine on my computer, running tests
Wow, that's cool! I can also modify this PR if needed. |
Create a new branch in your local from this branch (in your local) and follow these intructions (on
If everything is ok, just merge your new branch in this one (in your local) and push here. |
Hmm... I didn't quite get that part. Could you please explain it in detail? |
forgot it, don't change it |
Co-authored-by: userquin <userquin@gmail.com>
I ignored the
|
are you testing the tgz files? you can install publint and arethetypeswrong globally: https://www.npmjs.com/package/@arethetypeswrong/cli |
|
ok, so we only need to fix astro and postcss default exports in cjs, that's easy: https://github.com/antfu/vite-plugin-inspect/pull/99/files#diff-21462feba05a79008c54d9a3267569b27b8897540ac86e47110e57f25402d224R4-R11 |
@kwaa are you going to fix it? |
I'm on it. How do I write a Co-authored-by or code comment? |
There is no need, anyway I have no idea 😅 |
We need to fix all cjs files generated by You should create a new script in scripts folder and call it after |
The script currently looks like this: import { readFileSync, writeFileSync } from 'node:fs'
import { resolve } from 'node:path'
function patchCjs(cjsModulePath: string, name: string) {
const cjsModule = readFileSync(cjsModulePath, 'utf-8')
writeFileSync(
cjsModulePath,
cjsModule.replace(`module.exports = ${name};`, `exports.default = ${name};`),
{ encoding: 'utf-8' },
)
}
patchCjs(resolve('./packages/astro/dist/index.cjs'), 'UnoCSSAstroIntegration')
patchCjs(resolve('./packages/postcss/dist/index.cjs'), 'unocss')
patchCjs(resolve('./packages/unocss/dist/astro.cjs'), 'UnocssAstroIntegration')
patchCjs(resolve('./packages/unocss/dist/postcss.cjs'), 'postcss__default') It works fine. But considering that there are a lot of packages that also use the default export, maybe I should fix them as well.
|
yes, the script should fix all cjs files in all packages, |
It should be fine now, and it would be great if it would merge before |
We should stop using default package exports in new packages with dual ESM/CJS whenever possible |
🥺 |
🥲 |
packages/preset-uno/package.json
Outdated
"import": "./dist/index.mjs", | ||
"require": "./dist/index.cjs" | ||
"types": "./dist/index.d.mts", | ||
"import": "./dist/index.mjs" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iirc this should be "default" instead "import"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
root types should use .d.ts
, .d.mts
will use .js
extension and that's wrong in node10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm very busy at work, I'll check the changes this afternoon ( /cc @kwaa )
packages/eslint-config/package.json
Outdated
"sideEffects": false, | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove types here, we're masquerading CJS entry: dual ESM/CJS shouldn't have types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should remove types also in postcss and webpack packages
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@unocss/eslint-config](https://togithub.com/unocss/unocss/tree/main/packages/eslint-config#readme) ([source](https://togithub.com/unocss/unocss/tree/HEAD/packages/eslint-config)) | [`0.58.9` -> `0.60.2`](https://renovatebot.com/diffs/npm/@unocss%2feslint-config/0.58.9/0.60.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@unocss%2feslint-config/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@unocss%2feslint-config/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@unocss%2feslint-config/0.58.9/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@unocss%2feslint-config/0.58.9/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@unocss/preset-icons](https://togithub.com/unocss/unocss/tree/main/packages/preset-icons#readme) ([source](https://togithub.com/unocss/unocss/tree/HEAD/packages/preset-icons)) | [`0.58.9` -> `0.60.2`](https://renovatebot.com/diffs/npm/@unocss%2fpreset-icons/0.58.9/0.60.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@unocss%2fpreset-icons/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@unocss%2fpreset-icons/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@unocss%2fpreset-icons/0.58.9/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@unocss%2fpreset-icons/0.58.9/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@unocss/preset-uno](https://togithub.com/unocss/unocss/tree/main/packages/preset-uno#readme) ([source](https://togithub.com/unocss/unocss/tree/HEAD/packages/preset-uno)) | [`0.58.9` -> `0.60.2`](https://renovatebot.com/diffs/npm/@unocss%2fpreset-uno/0.58.9/0.60.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@unocss%2fpreset-uno/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@unocss%2fpreset-uno/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@unocss%2fpreset-uno/0.58.9/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@unocss%2fpreset-uno/0.58.9/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@unocss/preset-web-fonts](https://togithub.com/unocss/unocss/tree/main/packages/preset-web-fonts#readme) ([source](https://togithub.com/unocss/unocss/tree/HEAD/packages/preset-web-fonts)) | [`0.58.9` -> `0.60.2`](https://renovatebot.com/diffs/npm/@unocss%2fpreset-web-fonts/0.58.9/0.60.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@unocss%2fpreset-web-fonts/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@unocss%2fpreset-web-fonts/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@unocss%2fpreset-web-fonts/0.58.9/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@unocss%2fpreset-web-fonts/0.58.9/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@unocss/reset](https://togithub.com/unocss/unocss) | [`0.58.9` -> `0.60.2`](https://renovatebot.com/diffs/npm/@unocss%2freset/0.58.9/0.60.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@unocss%2freset/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@unocss%2freset/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@unocss%2freset/0.58.9/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@unocss%2freset/0.58.9/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@unocss/transformer-directives](https://togithub.com/unocss/unocss/tree/main/packages/transformer-directives#readme) ([source](https://togithub.com/unocss/unocss/tree/HEAD/packages/transformer-directives)) | [`0.58.9` -> `0.60.2`](https://renovatebot.com/diffs/npm/@unocss%2ftransformer-directives/0.58.9/0.60.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@unocss%2ftransformer-directives/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@unocss%2ftransformer-directives/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@unocss%2ftransformer-directives/0.58.9/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@unocss%2ftransformer-directives/0.58.9/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@unocss/transformer-variant-group](https://togithub.com/unocss/unocss/tree/main/packages/transformer-variant-group#readme) ([source](https://togithub.com/unocss/unocss/tree/HEAD/packages/transformer-variant-group)) | [`0.58.9` -> `0.60.2`](https://renovatebot.com/diffs/npm/@unocss%2ftransformer-variant-group/0.58.9/0.60.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@unocss%2ftransformer-variant-group/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@unocss%2ftransformer-variant-group/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@unocss%2ftransformer-variant-group/0.58.9/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@unocss%2ftransformer-variant-group/0.58.9/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [unocss](https://togithub.com/unocss/unocss) | [`0.58.9` -> `0.60.2`](https://renovatebot.com/diffs/npm/unocss/0.58.9/0.60.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/unocss/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/unocss/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/unocss/0.58.9/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/unocss/0.58.9/0.60.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>unocss/unocss (@​unocss/eslint-config)</summary> ### [`v0.60.2`](https://togithub.com/unocss/unocss/releases/tag/v0.60.2) [Compare Source](https://togithub.com/unocss/unocss/compare/v0.60.1...v0.60.2) ##### 🐞 Bug Fixes - **directives**: Fix parsing positions, close [#​3795](https://togithub.com/unocss/unocss/issues/3795) - by [@​antfu](https://togithub.com/antfu) in [unocss/unocss#3795 [<samp>(84170)</samp>](https://togithub.com/unocss/unocss/commit/84170e14) ##### [View changes on GitHub](https://togithub.com/unocss/unocss/compare/v0.60.1...v0.60.2) ### [`v0.60.1`](https://togithub.com/unocss/unocss/releases/tag/v0.60.1) [Compare Source](https://togithub.com/unocss/unocss/compare/v0.60.0...v0.60.1) ##### 🚀 Features - **eslint-plugin**: - Blocklist meta with message - by [@​enkot](https://togithub.com/enkot) and [@​antfu](https://togithub.com/antfu) in [unocss/unocss#3783 [<samp>(20ed8)</samp>](https://togithub.com/unocss/unocss/commit/20ed897f) - Allow customize configPath via settings - by [@​antfu](https://togithub.com/antfu) [<samp>(9eb6e)</samp>](https://togithub.com/unocss/unocss/commit/9eb6e29b) ##### 🐞 Bug Fixes - **transformer-attributify-jsx**: MatchedRule - by [@​Simon-He95](https://togithub.com/Simon-He95) in [unocss/unocss#3791 [<samp>(da9c9)</samp>](https://togithub.com/unocss/unocss/commit/da9c9a5c) - **transformer-directive**: Get raw string in directive, support slash & hash - by [@​zyyv](https://togithub.com/zyyv) and [@​antfu](https://togithub.com/antfu) in [unocss/unocss#3790 [<samp>(fa497)</samp>](https://togithub.com/unocss/unocss/commit/fa49753e) ##### [View changes on GitHub](https://togithub.com/unocss/unocss/compare/v0.60.0...v0.60.1) ### [`v0.60.0`](https://togithub.com/unocss/unocss/releases/tag/v0.60.0) [Compare Source](https://togithub.com/unocss/unocss/compare/v0.59.4...v0.60.0) ##### 🚨 Breaking Changes - **CJS**: Remove `.default` suffix from d.ts and d.cts files - by [@​userquin](https://togithub.com/userquin) in [unocss/unocss#3750 [<samp>(e9f5b)</samp>](https://togithub.com/unocss/unocss/commit/e9f5b5b8) ##### 🚀 Features - **preset-icons**: Add svg props customization - by [@​zyyv](https://togithub.com/zyyv) and **Anthony Fu** in [unocss/unocss#3774 [<samp>(0b36a)</samp>](https://togithub.com/unocss/unocss/commit/0b36a603) - **preset-mini**: Add children variant (\*-{modifier}) - by [@​serkodev](https://togithub.com/serkodev) in [unocss/unocss#3763 [<samp>(249fe)</samp>](https://togithub.com/unocss/unocss/commit/249fe730) ##### 🐞 Bug Fixes - **preset-legacy-compat**: Update the split color string regex - by [@​zyyv](https://togithub.com/zyyv) in [unocss/unocss#3756 [<samp>(47eaf)</samp>](https://togithub.com/unocss/unocss/commit/47eafba2) - **preset-mini**: Align with `selection` - by [@​zyyv](https://togithub.com/zyyv) in [unocss/unocss#3771 [<samp>(18df5)</samp>](https://togithub.com/unocss/unocss/commit/18df52cb) - **shared-integration**: Vscode match php \<? stuck - by [@​Simon-He95](https://togithub.com/Simon-He95) in [unocss/unocss#3745 [<samp>(38274)</samp>](https://togithub.com/unocss/unocss/commit/38274449) - **vite**: Move [@​import](https://togithub.com/import) before other rules - by [@​lzl0304](https://togithub.com/lzl0304) in [unocss/unocss#3743 [<samp>(0b84d)</samp>](https://togithub.com/unocss/unocss/commit/0b84df44) ##### [View changes on GitHub](https://togithub.com/unocss/unocss/compare/v0.59.4...v0.60.0) ### [`v0.59.4`](https://togithub.com/unocss/unocss/releases/tag/v0.59.4) [Compare Source](https://togithub.com/unocss/unocss/compare/v0.59.3...v0.59.4) ##### 🚀 Features - **core**: Support safelist access to RuleContext - by [@​Simon-He95](https://togithub.com/Simon-He95), [@​zyyv](https://togithub.com/zyyv), **Chris** and [@​antfu](https://togithub.com/antfu) in [unocss/unocss#3693 [<samp>(04c27)</samp>](https://togithub.com/unocss/unocss/commit/04c27754) ##### 🐞 Bug Fixes - **eslint-plugin**: Compactible with eslint v9 - by [@​antfu](https://togithub.com/antfu) [<samp>(09e3b)</samp>](https://togithub.com/unocss/unocss/commit/09e3bea7) - **preset-mini**: Transform-cpu - by [@​Simon-He95](https://togithub.com/Simon-He95) in [unocss/unocss#3730 [<samp>(a3170)</samp>](https://togithub.com/unocss/unocss/commit/a3170ae1) - **webpack**: SourceMap - by [@​Simon-He95](https://togithub.com/Simon-He95) in [unocss/unocss#3732 [<samp>(0dab7)</samp>](https://togithub.com/unocss/unocss/commit/0dab7878) ##### [View changes on GitHub](https://togithub.com/unocss/unocss/compare/v0.59.3...v0.59.4) ### [`v0.59.3`](https://togithub.com/unocss/unocss/releases/tag/v0.59.3) [Compare Source](https://togithub.com/unocss/unocss/compare/v0.59.2...v0.59.3) ##### 🐞 Bug Fixes - **preset-mini**: - Remove LF in question mark rule - by [@​userquin](https://togithub.com/userquin) in [unocss/unocss#3717 [<samp>(c51bf)</samp>](https://togithub.com/unocss/unocss/commit/c51bf4c6) - Transform-cpu - by [@​Simon-He95](https://togithub.com/Simon-He95) in [unocss/unocss#3729 [<samp>(9a371)</samp>](https://togithub.com/unocss/unocss/commit/9a371344) - Use `borderRadius` from theme to autosuggest `rounded` values - by [@​DamianOsipiuk](https://togithub.com/DamianOsipiuk) in [unocss/unocss#3727 [<samp>(18346)</samp>](https://togithub.com/unocss/unocss/commit/18346b48) - **shared-integration**: - Improve ide matching regex - by [@​Simon-He95](https://togithub.com/Simon-He95) and [@​antfu](https://togithub.com/antfu) in [unocss/unocss#3712 [<samp>(ddcf2)</samp>](https://togithub.com/unocss/unocss/commit/ddcf2dc6) - **vscode**: - ContextLoader with workspace - by [@​Simon-He95](https://togithub.com/Simon-He95) in [unocss/unocss#3728 [<samp>(351a4)</samp>](https://togithub.com/unocss/unocss/commit/351a4f16) ##### [View changes on GitHub](https://togithub.com/unocss/unocss/compare/v0.59.2...v0.59.3) ### [`v0.59.2`](https://togithub.com/unocss/unocss/releases/tag/v0.59.2) [Compare Source](https://togithub.com/unocss/unocss/compare/v0.59.1...v0.59.2) ##### 🐞 Bug Fixes - Move `@unocss/webpack` to ESM First - by [@​userquin](https://togithub.com/userquin) in [unocss/unocss#3708 [<samp>(25e97)</samp>](https://togithub.com/unocss/unocss/commit/25e97ca0) - Revert [#​3696](https://togithub.com/unocss/unocss/issues/3696) - by [@​antfu](https://togithub.com/antfu) in [unocss/unocss#3696 [<samp>(8e615)</samp>](https://togithub.com/unocss/unocss/commit/8e615ab5) - **preset-mini**: Negative custom spacing - by [@​Simon-He95](https://togithub.com/Simon-He95) in [unocss/unocss#3694 [<samp>(0f4ad)</samp>](https://togithub.com/unocss/unocss/commit/0f4ad400) ##### [View changes on GitHub](https://togithub.com/unocss/unocss/compare/v0.59.1...v0.59.2) ### [`v0.59.1`](https://togithub.com/unocss/unocss/releases/tag/v0.59.1) [Compare Source](https://togithub.com/unocss/unocss/compare/v0.59.0...v0.59.1) ##### 🐞 Bug Fixes - **eslint-plugin**: - Support ESLint v9 - by [@​antfu](https://togithub.com/antfu) [<samp>(0cc40)</samp>](https://togithub.com/unocss/unocss/commit/0cc40911) - **postcss**: - Too many open files error - by [@​sonofmagic](https://togithub.com/sonofmagic) in [unocss/unocss#3695 [<samp>(11918)</samp>](https://togithub.com/unocss/unocss/commit/119187fa) - Support async rule in directives, fix [#​3699](https://togithub.com/unocss/unocss/issues/3699) - by [@​DarkHole1](https://togithub.com/DarkHole1) in [unocss/unocss#3701 and [unocss/unocss#3699 [<samp>(f4ca5)</samp>](https://togithub.com/unocss/unocss/commit/f4ca55c8) - **preset-mini**: - `marker` pesudo element - by [@​Simon-He95](https://togithub.com/Simon-He95) in [unocss/unocss#3702 [<samp>(0b4a9)</samp>](https://togithub.com/unocss/unocss/commit/0b4a901e) - **shared-integration**: - DefaultIdeMatchInclude - by [@​Simon-He95](https://togithub.com/Simon-He95) in [unocss/unocss#3696 [<samp>(7f85b)</samp>](https://togithub.com/unocss/unocss/commit/7f85b396) ##### [View changes on GitHub](https://togithub.com/unocss/unocss/compare/v0.59.0...v0.59.1) ### [`v0.59.0`](https://togithub.com/unocss/unocss/releases/tag/v0.59.0) [Compare Source](https://togithub.com/unocss/unocss/compare/v0.58.9...v0.59.0) ##### 🚨 Breaking Changes - Move to ESM-only and fix package exports - by [@​kwaa](https://togithub.com/kwaa), [@​userquin](https://togithub.com/userquin), [@​antfu](https://togithub.com/antfu), **Chris** and **Anthony Fu** in [unocss/unocss#3380 [<samp>(41bc8)</samp>](https://togithub.com/unocss/unocss/commit/41bc87b1) - **preset-mini**: RingWidth default changed to `3px` to align with Tailwind - by [@​NamesMT](https://togithub.com/NamesMT) and [@​antfu](https://togithub.com/antfu) in [unocss/unocss#3673 [<samp>(274d3)</samp>](https://togithub.com/unocss/unocss/commit/274d3960) ##### 🐞 Bug Fixes - **autocomplete**: Disable autocomplete for attributify props when not using - by [@​Simon-He95](https://togithub.com/Simon-He95) and [@​antfu](https://togithub.com/antfu) in [unocss/unocss#3685 [<samp>(4dfc3)</samp>](https://togithub.com/unocss/unocss/commit/4dfc3194) - **nuxt**: Custom option priority in cssnano - by [@​Simon-He95](https://togithub.com/Simon-He95) in [unocss/unocss#3679 [<samp>(4e11d)</samp>](https://togithub.com/unocss/unocss/commit/4e11d623) - **packages**: Add types versions - by [@​kwaa](https://togithub.com/kwaa) in [unocss/unocss#3677 [<samp>(42187)</samp>](https://togithub.com/unocss/unocss/commit/42187e20) - **postcss**: Move to ESM first + dual ESM/CJS + missing `@unocss/postcss/esm` subpackage export - by [@​userquin](https://togithub.com/userquin) in [unocss/unocss#3678 [<samp>(7eda3)</samp>](https://togithub.com/unocss/unocss/commit/7eda3ab8) - **scope**: Fix export types & main entry - by [@​kwaa](https://togithub.com/kwaa) in [unocss/unocss#3676 [<samp>(ae44a)</samp>](https://togithub.com/unocss/unocss/commit/ae44ad24) - **vscode**: The information displayed by hover and autocomplete is inconsistent - by [@​Simon-He95](https://togithub.com/Simon-He95) in [unocss/unocss#3680 [<samp>(623c2)</samp>](https://togithub.com/unocss/unocss/commit/623c21c1) - **webpack**: Correctly output CSS string - by [@​lzl0304](https://togithub.com/lzl0304) in [unocss/unocss#3686 [<samp>(a03c2)</samp>](https://togithub.com/unocss/unocss/commit/a03c25c8) ##### [View changes on GitHub](https://togithub.com/unocss/unocss/compare/v0.58.9...v0.59.0) </details> <details> <summary>unocss/unocss (@​unocss/reset)</summary> ### [`v0.60.2`](https://togithub.com/unocss/unocss/compare/v0.60.1...v0.60.2) [Compare Source](https://togithub.com/unocss/unocss/compare/v0.60.1...v0.60.2) ### [`v0.60.1`](https://togithub.com/unocss/unocss/releases/tag/v0.60.1) [Compare Source](https://togithub.com/unocss/unocss/compare/v0.60.0...v0.60.1) ##### 🚀 Features - **eslint-plugin**: - Blocklist meta with message - by [@​enkot](https://togithub.com/enkot) and [@​antfu](https://togithub.com/antfu) in [unocss/unocss#3783 [<samp>(20ed8)</samp>](https://togithub.com/unocss/unocss/commit/20ed897f) - Allow customize configPath via settings - by [@​antfu](https://togithub.com/antfu) [<samp>(9eb6e)</samp>](https://togithub.com/unocss/unocss/commit/9eb6e29b) ##### 🐞 Bug Fixes - **transformer-attributify-jsx**: MatchedRule - by [@​Simon-He95](https://togithub.com/Simon-He95) in [unocss/unocss#3791 [<samp>(da9c9)</samp>](https://togithub.com/unocss/unocss/commit/da9c9a5c) - **transformer-directive**: Get raw string in directive, support slash & hash - by [@​zyyv](https://togithub.com/zyyv) and [@​antfu](https://togithub.com/antfu) in [unocss/unocss#3790 [<samp>(fa497)</samp>](https://togithub.com/unocss/unocss/commit/fa49753e) ##### [View changes on GitHub](https://togithub.com/unocss/unocss/compare/v0.60.0...v0.60.1) ### [`v0.60.0`](https://togithub.com/unocss/unocss/releases/tag/v0.60.0) [Compare Source](https://togithub.com/unocss/unocss/compare/v0.59.4...v0.60.0) ##### 🚨 Breaking Changes - **CJS**: Remove `.default` suffix from d.ts and d.cts files - by [@​userquin](https://togithub.com/userquin) in [unocss/unocss#3750 [<samp>(e9f5b)</samp>](https://togithub.com/unocss/unocss/commit/e9f5b5b8) ##### 🚀 Features - **preset-icons**: Add svg props customization - by [@​zyyv](https://togithub.com/zyyv) and **Anthony Fu** in [unocss/unocss#3774 [<samp>(0b36a)</samp>](https://togithub.com/unocss/unocss/commit/0b36a603) - **preset-mini**: Add children variant (\*-{modifier}) - by [@​serkodev](https://togithub.com/serkodev) in [unocss/unocss#3763 [<samp>(249fe)</samp>](https://togithub.com/unocss/unocss/commit/249fe730) ##### 🐞 Bug Fixes - **preset-legacy-compat**: Update the split color string regex - by [@​zyyv](https://togithub.com/zyyv) in [unocss/unocss#3756 [<samp>(47eaf)</samp>](https://togithub.com/unocss/unocss/commit/47eafba2) - **preset-mini**: Align with `selection` - by [@​zyyv](https://togithub.com/zyyv) in [unocss/unocss#3771 [<samp>(18df5)</samp>](https://togithub.com/unocss/unocss/commit/18df52cb) - **shared-integration**: Vscode match php \<? stuck - by [@​Simon-He95](https://togithub.com/Simon-He95) in [unocss/unocss#3745 [<samp>(38274)</samp>](https://togithub.com/unocss/unocss/commit/38274449) - **vite**: Move [@​import](https://togithub.com/import) before other rules - by [@​lzl0304](https://togithub.com/lzl0304) in [unocss/unocss#3743 [<samp>(0b84d)</samp>](https://togithub.com/unocss/unocss/commit/0b84df44) ##### [View changes on GitHub](https://togithub.com/unocss/unocss/compare/v0.59.4...v0.60.0) ### [`v0.59.4`](https://togithub.com/unocss/unocss/releases/tag/v0.59.4) [Compare Source](https://togithub.com/unocss/unocss/compare/v0.59.3...v0.59.4) ##### 🚀 Features - **core**: Support safelist access to RuleContext - by [@​Simon-He95](https://togithub.com/Simon-He95), [@​zyyv](https://togithub.com/zyyv), **Chris** and [@​antfu](https://togithub.com/antfu) in [unocss/unocss#3693 [<samp>(04c27)</samp>](https://togithub.com/unocss/unocss/commit/04c27754) ##### 🐞 Bug Fixes - **eslint-plugin**: Compactible with eslint v9 - by [@​antfu](https://togithub.com/antfu) [<samp>(09e3b)</samp>](https://togithub.com/unocss/unocss/commit/09e3bea7) - **preset-mini**: Transform-cpu - by [@​Simon-He95](https://togithub.com/Simon-He95) in [unocss/unocss#3730 [<samp>(a3170)</samp>](https://togithub.com/unocss/unocss/commit/a3170ae1) - **webpack**: SourceMap - by [@​Simon-He95](https://togithub.com/Simon-He95) in [unocss/unocss#3732 [<samp>(0dab7)</samp>](https://togithub.com/unocss/unocss/commit/0dab7878) ##### [View changes on GitHub](https://togithub.com/unocss/unocss/compare/v0.59.3...v0.59.4) ### [`v0.59.3`](https://togithub.com/unocss/unocss/releases/tag/v0.59.3) [Compare Source](https://togithub.com/unocss/unocss/compare/v0.59.2...v0.59.3) ##### 🐞 Bug Fixes - **preset-mini**: - Remove LF in question mark rule - by [@​userquin](https://togithub.com/userquin) in [unocss/unocss#3717 [<samp>(c51bf)</samp>](https://togithub.com/unocss/unocss/commit/c51bf4c6) - Transform-cpu - by [@​Simon-He95](https://togithub.com/Simon-He95) in [unocss/unocss#3729 [<samp>(9a371)</samp>](https://togithub.com/unocss/unocss/commit/9a371344) - Use `borderRadius` from theme to autosuggest `rounded` values - by [@​DamianOsipiuk](https://togithub.com/DamianOsipiuk) in [unocss/unocss#3727 [<samp>(18346)</samp>](https://togithub.com/unocss/unocss/commit/18346b48) - **shared-integration**: - Improve ide matching regex - by [@​Simon-He95](https://togithub.com/Simon-He95) and [@​antfu](https://togithub.com/antfu) in [unocss/unocss#3712 [<samp>(ddcf2)</samp>](https://togithub.com/unocss/unocss/commit/ddcf2dc6) - **vscode**: - ContextLoader with workspace - by [@​Simon-He95](https://togithub.com/Simon-He95) in [unocss/unocss#3728 [<samp>(351a4)</samp>](https://togithub.com/unocss/unocss/commit/351a4f16) ##### [View changes on GitHub](https://togithub.com/unocss/unocss/compare/v0.59.2...v0.59.3) ### [`v0.59.2`](https://togithub.com/unocss/unocss/releases/tag/v0.59.2) [Compare Source](https://togithub.com/unocss/unocss/compare/v0.59.1...v0.59.2) ##### 🐞 Bug Fixes - Move `@unocss/webpack` to ESM First - by [@​userquin](https://togithub.com/userquin) in [unocss/unocss#3708 [<samp>(25e97)</samp>](https://togithub.com/unocss/unocss/commit/25e97ca0) - Revert [#​3696](https://togithub.com/unocss/unocss/issues/3696) - by [@​antfu](https://togithub.com/antfu) in [unocss/unocss#3696 [<samp>(8e615)</samp>](https://togithub.com/unocss/unocss/commit/8e615ab5) - **preset-mini**: Negative custom spacing - by [@​Simon-He95](https://togithub.com/Simon-He95) in [unocss/unocss#3694 [<samp>(0f4ad)</samp>](https://togithub.com/unocss/unocss/commit/0f4ad400) ##### [View changes on GitHub](https://togithub.com/unocss/unocss/compare/v0.59.1...v0.59.2) ### [`v0.59.1`](https://togithub.com/unocss/unocss/releases/tag/v0.59.1) [Compare Source](https://togithub.com/unocss/unocss/compare/v0.59.0...v0.59.1) ##### 🐞 Bug Fixes - **eslint-plugin**: - Support ESLint v9 - by [@​antfu](https://togithub.com/antfu) [<samp>(0cc40)</samp>](https://togithub.com/unocss/unocss/commit/0cc40911) - **postcss**: - Too many open files error - by [@​sonofmagic](https://togithub.com/sonofmagic) in [unocss/unocss#3695 [<samp>(11918)</samp>](https://togithub.com/unocss/unocss/commit/119187fa) - Support async rule in directives, fix [#​3699](https://togithub.com/unocss/unocss/issues/3699) - by [@​DarkHole1](https://togithub.com/DarkHole1) in [unocss/unocss#3701 and [unocss/unocss#3699 [<samp>(f4ca5)</samp>](https://togithub.com/unocss/unocss/commit/f4ca55c8) - **preset-mini**: - `marker` pesudo element - by [@​Simon-He95](https://togithub.com/Simon-He95) in [unocss/unocss#3702 [<samp>(0b4a9)</samp>](https://togithub.com/unocss/unocss/commit/0b4a901e) - **shared-integration**: - DefaultIdeMatchInclude - by [@​Simon-He95](https://togithub.com/Simon-He95) in [unocss/unocss#3696 [<samp>(7f85b)</samp>](https://togithub.com/unocss/unocss/commit/7f85b396) ##### [View changes on GitHub](https://togithub.com/unocss/unocss/compare/v0.59.0...v0.59.1) ### [`v0.59.0`](https://togithub.com/unocss/unocss/compare/v0.58.9...v0.59.0) [Compare Source](https://togithub.com/unocss/unocss/compare/v0.58.9...v0.59.0) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/ramackersjp/Piped). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNTEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjM1MS4yIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
Description
unbuild
outputs.d.mts
and.d.cts
at build time, butunocss
doesn't use it.This PR updates the export map for most packages to export types correctly.
References
https://publint.dev/unocss@0.57.7
https://arethetypeswrong.github.io/?p=unocss
https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md
microsoft/TypeScript#50466
unjs/unbuild#238