Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

build(core): replace tsup with Babel CLI for precise 'use client' boundaries (#2472)

Xinzi Zhou649d664d6fc2
diff --git a/.github/SAMPLE_PR_COMMENT.md b/.github/SAMPLE_PR_COMMENT.md
index a53f92d514..e763846429 100644
--- a/.github/SAMPLE_PR_COMMENT.md
+++ b/.github/SAMPLE_PR_COMMENT.md
@@ -11,28 +11,26 @@ This is an example of what the PR enrichment workflow will post as a comment on
<details>
<summary><strong>DatePicker</strong></summary>
-| Metric | Value |
-|--------|-------|
-| Bundle Size (ESM) | 4.2KB |
-| Bundle Size (CJS) | 4.8KB |
-| Exports | XDSDatePicker, DatePickerProps |
-| Props Count | 12 |
-| Has Tests | Yes |
-| Has Stories | Yes |
+| Metric | Value |
+| ----------------- | ------------------------------ |
+| Bundle Size (ESM) | 4.2KB |
+| Exports | XDSDatePicker, DatePickerProps |
+| Props Count | 12 |
+| Has Tests | Yes |
+| Has Stories | Yes |
</details>
<details>
<summary><strong>TimePicker</strong></summary>
-| Metric | Value |
-|--------|-------|
-| Bundle Size (ESM) | 3.1KB |
-| Bundle Size (CJS) | 3.5KB |
-| Exports | XDSTimePicker |
-| Props Count | 8 |
-| Has Tests | No |
-| Has Stories | Yes |
+| Metric | Value |
+| ----------------- | ------------- |
+| Bundle Size (ESM) | 3.1KB |
+| Exports | XDSTimePicker |
+| Props Count | 8 |
+| Has Tests | No |
+| Has Stories | Yes |
</details>
@@ -41,26 +39,26 @@ This is an example of what the PR enrichment workflow will post as a comment on
<details>
<summary><strong>Button</strong></summary>
-| Metric | Before | After | Delta |
-|--------|--------|-------|-------|
-| Bundle Size (ESM) | 2.2KB | 2.4KB | +200B |
+| Metric | Before | After | Delta |
+| ----------------- | ------ | ----- | ----- |
+| Bundle Size (ESM) | 2.2KB | 2.4KB | +200B |
</details>
<details>
<summary><strong>TextInput</strong></summary>
-| Metric | Before | After | Delta |
-|--------|--------|-------|-------|
-| Bundle Size (ESM) | 2.9KB | 3.0KB | +130B |
+| Metric | Before | After | Delta |
+| ----------------- | ------ | ----- | ----- |
+| Bundle Size (ESM) | 2.9KB | 3.0KB | +130B |
</details>
### Bundle Size Summary
-| Package | Size (ESM) | Size (CJS) | Gzipped |
-|---------|------------|------------|----------|
-| @xds/core | 45.2KB | 52.1KB | 12.4KB |
+| Package | Size (ESM) | Gzipped |
+| --------- | ---------- | ------- |
+| @xds/core | 45.2KB | 12.4KB |
**Bundle size increased:** +850 bytes
diff --git a/apps/sandbox/README.md b/apps/sandbox/README.md
index 58e6fe7a48..b8d2857b07 100644
--- a/apps/sandbox/README.md
+++ b/apps/sandbox/README.md
@@ -83,7 +83,7 @@ pnpm -F @xds/core dev
pnpm -F @xds/sandbox dev
```
-Best of both worlds — edits trigger incremental dist rebuilds via tsup (a few seconds), and CSS layer ordering is correct. Theming works properly.
+Best of both worlds — edits trigger incremental dist rebuilds via Babel CLI (a few seconds), and CSS layer ordering is correct. Theming works properly.
## File manifest
diff --git a/packages/core/babel.config.json b/packages/core/babel.config.json
index 0de7dbaa01..a5e6b0b200 100644
--- a/packages/core/babel.config.json
+++ b/packages/core/babel.config.json
@@ -1,5 +1,8 @@
{
- "presets": ["@babel/preset-react", "@babel/preset-typescript"],
+ "presets": [
+ ["@babel/preset-react", {"runtime": "automatic"}],
+ ["@babel/preset-typescript", {"isTSX": true, "allExtensions": true}]
+ ],
"plugins": [
[
"@stylexjs/babel-plugin",
diff --git a/packages/core/package.json b/packages/core/package.json
index f6a32cb34b..4e6fcc642e 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -24,13 +24,12 @@
"themeable",
"stylex"
],
+ "type": "module",
"main": "./dist/index.js",
- "module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"sideEffects": [
"**/*.stylex.ts",
"**/*.stylex.js",
- "**/*.stylex.mjs",
"**/componentStyles.ts",
"**/*.css"
],
@@ -38,8 +37,7 @@
".": {
"source": "./src/index.ts",
"types": "./dist/index.d.ts",
- "import": "./dist/index.mjs",
- "require": "./dist/index.js"
+ "default": "./dist/index.js"
},
"./reset.css": {
"types": "./src/reset.css.d.ts",
@@ -56,622 +54,519 @@
"./theme/tokens.stylex": {
"source": "./src/theme/tokens.stylex.ts",
"types": "./dist/theme/tokens.stylex.d.ts",
- "import": "./dist/theme/tokens.stylex.mjs",
- "require": "./dist/theme/tokens.stylex.js"
+ "default": "./dist/theme/tokens.stylex.js"
},
"./theme/syntax": {
"source": "./src/theme/syntax/index.ts",
"types": "./dist/theme/syntax/index.d.ts",
- "import": "./dist/theme/syntax/index.mjs",
- "require": "./dist/theme/syntax/index.js"
+ "default": "./dist/theme/syntax/index.js"
},
"./docs.mjs": "./docs.mjs",
"./groups.doc.mjs": "./groups.doc.mjs",
"./AlertDialog": {
"source": "./src/AlertDialog/index.ts",
"types": "./dist/AlertDialog/index.d.ts",
- "import": "./dist/AlertDialog/index.mjs",
- "require": "./dist/AlertDialog/index.js"
+ "default": "./dist/AlertDialog/index.js"
},
"./AppShell": {
"source": "./src/AppShell/index.ts",
"types": "./dist/AppShell/index.d.ts",
- "import": "./dist/AppShell/index.mjs",
- "require": "./dist/AppShell/index.js"
+ "default": "./dist/AppShell/index.js"
},
"./AspectRatio": {
"source": "./src/AspectRatio/index.ts",
"types": "./dist/AspectRatio/index.d.ts",
- "import": "./dist/AspectRatio/index.mjs",
- "require": "./dist/AspectRatio/index.js"
+ "default": "./dist/AspectRatio/index.js"
},
"./Avatar": {
"source": "./src/Avatar/index.ts",
"types": "./dist/Avatar/index.d.ts",
- "import": "./dist/Avatar/index.mjs",
- "require": "./dist/Avatar/index.js"
+ "default": "./dist/Avatar/index.js"
},
"./AvatarGroup": {
"source": "./src/AvatarGroup/index.ts",
"types": "./dist/AvatarGroup/index.d.ts",
- "import": "./dist/AvatarGroup/index.mjs",
- "require": "./dist/AvatarGroup/index.js"
+ "default": "./dist/AvatarGroup/index.js"
},
"./Badge": {
"source": "./src/Badge/index.ts",
"types": "./dist/Badge/index.d.ts",
- "import": "./dist/Badge/index.mjs",
- "require": "./dist/Badge/index.js"
+ "default": "./dist/Badge/index.js"
},
"./Banner": {
"source": "./src/Banner/index.ts",
"types": "./dist/Banner/index.d.ts",
- "import": "./dist/Banner/index.mjs",
- "require": "./dist/Banner/index.js"
+ "default": "./dist/Banner/index.js"
},
"./Blockquote": {
"source": "./src/Blockquote/index.ts",
"types": "./dist/Blockquote/index.d.ts",
- "import": "./dist/Blockquote/index.mjs",
- "require": "./dist/Blockquote/index.js"
+ "default": "./dist/Blockquote/index.js"
},
"./Breadcrumbs": {
"source": "./src/Breadcrumbs/index.ts",
"types": "./dist/Breadcrumbs/index.d.ts",
- "import": "./dist/Breadcrumbs/index.mjs",
- "require": "./dist/Breadcrumbs/index.js"
+ "default": "./dist/Breadcrumbs/index.js"
},
"./Button": {
"source": "./src/Button/index.ts",
"types": "./dist/Button/index.d.ts",
- "import": "./dist/Button/index.mjs",
- "require": "./dist/Button/index.js"
+ "default": "./dist/Button/index.js"
},
"./ButtonGroup": {
"source": "./src/ButtonGroup/index.ts",
"types": "./dist/ButtonGroup/index.d.ts",
- "import": "./dist/ButtonGroup/index.mjs",
- "require": "./dist/ButtonGroup/index.js"
+ "default": "./dist/ButtonGroup/index.js"
},
"./Calendar": {
"source": "./src/Calendar/index.ts",
"types": "./dist/Calendar/index.d.ts",
- "import": "./dist/Calendar/index.mjs",
- "require": "./dist/Calendar/index.js"
+ "default": "./dist/Calendar/index.js"
},
"./Card": {
"source": "./src/Card/index.ts",
"types": "./dist/Card/index.d.ts",
- "import": "./dist/Card/index.mjs",
- "require": "./dist/Card/index.js"
+ "default": "./dist/Card/index.js"
},
"./Carousel": {
"source": "./src/Carousel/index.ts",
"types": "./dist/Carousel/index.d.ts",
- "import": "./dist/Carousel/index.mjs",
- "require": "./dist/Carousel/index.js"
+ "default": "./dist/Carousel/index.js"
},
"./Center": {
"source": "./src/Center/index.ts",
"types": "./dist/Center/index.d.ts",
- "import": "./dist/Center/index.mjs",
- "require": "./dist/Center/index.js"
+ "default": "./dist/Center/index.js"
},
"./Chat": {
"source": "./src/Chat/index.ts",
"types": "./dist/Chat/index.d.ts",
- "import": "./dist/Chat/index.mjs",
- "require": "./dist/Chat/index.js"
+ "default": "./dist/Chat/index.js"
},
"./CheckboxInput": {
"source": "./src/CheckboxInput/index.ts",
"types": "./dist/CheckboxInput/index.d.ts",
- "import": "./dist/CheckboxInput/index.mjs",
- "require": "./dist/CheckboxInput/index.js"
+ "default": "./dist/CheckboxInput/index.js"
},
"./CheckboxList": {
"source": "./src/CheckboxList/index.ts",
"types": "./dist/CheckboxList/index.d.ts",
- "import": "./dist/CheckboxList/index.mjs",
- "require": "./dist/CheckboxList/index.js"
+ "default": "./dist/CheckboxList/index.js"
},
"./Citation": {
"source": "./src/Citation/index.ts",
"types": "./dist/Citation/index.d.ts",
- "import": "./dist/Citation/index.mjs",
- "require": "./dist/Citation/index.js"
+ "default": "./dist/Citation/index.js"
},
"./ClickableCard": {
"source": "./src/ClickableCard/index.ts",
"types": "./dist/ClickableCard/index.d.ts",
- "import": "./dist/ClickableCard/index.mjs",
- "require": "./dist/ClickableCard/index.js"
+ "default": "./dist/ClickableCard/index.js"
},
"./CodeBlock": {
"source": "./src/CodeBlock/index.ts",
"types": "./dist/CodeBlock/index.d.ts",
- "import": "./dist/CodeBlock/index.mjs",
- "require": "./dist/CodeBlock/index.js"
+ "default": "./dist/CodeBlock/index.js"
},
"./Collapsible": {
"source": "./src/Collapsible/index.ts",
"types": "./dist/Collapsible/index.d.ts",
- "import": "./dist/Collapsible/index.mjs",
- "require": "./dist/Collapsible/index.js"
+ "default": "./dist/Collapsible/index.js"
},
"./CommandPalette": {
"source": "./src/CommandPalette/index.ts",
"types": "./dist/CommandPalette/index.d.ts",
- "import": "./dist/CommandPalette/index.mjs",
- "require": "./dist/CommandPalette/index.js"
+ "default": "./dist/CommandPalette/index.js"
},
"./ContextMenu": {
"source": "./src/ContextMenu/index.ts",
"types": "./dist/ContextMenu/index.d.ts",
- "import": "./dist/ContextMenu/index.mjs",
- "require": "./dist/ContextMenu/index.js"
+ "default": "./dist/ContextMenu/index.js"
},
"./DateInput": {
"source": "./src/DateInput/index.ts",
"types": "./dist/DateInput/index.d.ts",
- "import": "./dist/DateInput/index.mjs",
- "require": "./dist/DateInput/index.js"
+ "default": "./dist/DateInput/index.js"
},
"./DateRangeInput": {
"source": "./src/DateRangeInput/index.ts",
"types": "./dist/DateRangeInput/index.d.ts",
- "import": "./dist/DateRangeInput/index.mjs",
- "require": "./dist/DateRangeInput/index.js"
+ "default": "./dist/DateRangeInput/index.js"
},
"./DateTimeInput": {
"source": "./src/DateTimeInput/index.ts",
"types": "./dist/DateTimeInput/index.d.ts",
- "import": "./dist/DateTimeInput/index.mjs",
- "require": "./dist/DateTimeInput/index.js"
+ "default": "./dist/DateTimeInput/index.js"
},
"./Dialog": {
"source": "./src/Dialog/index.ts",
"types": "./dist/Dialog/index.d.ts",
- "import": "./dist/Dialog/index.mjs",
- "require": "./dist/Dialog/index.js"
+ "default": "./dist/Dialog/index.js"
},
"./Divider": {
"source": "./src/Divider/index.ts",
"types": "./dist/Divider/index.d.ts",
- "import": "./dist/Divider/index.mjs",
- "require": "./dist/Divider/index.js"
+ "default": "./dist/Divider/index.js"
},
"./DropdownMenu": {
"source": "./src/DropdownMenu/index.ts",
"types": "./dist/DropdownMenu/index.d.ts",
- "import": "./dist/DropdownMenu/index.mjs",
- "require": "./dist/DropdownMenu/index.js"
+ "default": "./dist/DropdownMenu/index.js"
},
"./EmptyState": {
"source": "./src/EmptyState/index.ts",
"types": "./dist/EmptyState/index.d.ts",
- "import": "./dist/EmptyState/index.mjs",
- "require": "./dist/EmptyState/index.js"
+ "default": "./dist/EmptyState/index.js"
},
"./Field": {
"source": "./src/Field/index.ts",
"types": "./dist/Field/index.d.ts",
- "import": "./dist/Field/index.mjs",
- "require": "./dist/Field/index.js"
+ "default": "./dist/Field/index.js"
},
"./FileInput": {
"source": "./src/FileInput/index.ts",
"types": "./dist/FileInput/index.d.ts",
- "import": "./dist/FileInput/index.mjs",
- "require": "./dist/FileInput/index.js"
+ "default": "./dist/FileInput/index.js"
},
"./FormLayout": {
"source": "./src/FormLayout/index.ts",
"types": "./dist/FormLayout/index.d.ts",
- "import": "./dist/FormLayout/index.mjs",
- "require": "./dist/FormLayout/index.js"
+ "default": "./dist/FormLayout/index.js"
},
"./Grid": {
"source": "./src/Grid/index.ts",
"types": "./dist/Grid/index.d.ts",
- "import": "./dist/Grid/index.mjs",
- "require": "./dist/Grid/index.js"
+ "default": "./dist/Grid/index.js"
},
"./HoverCard": {
"source": "./src/HoverCard/index.ts",
"types": "./dist/HoverCard/index.d.ts",
- "import": "./dist/HoverCard/index.mjs",
- "require": "./dist/HoverCard/index.js"
+ "default": "./dist/HoverCard/index.js"
},
"./Icon": {
"source": "./src/Icon/index.ts",
"types": "./dist/Icon/index.d.ts",
- "import": "./dist/Icon/index.mjs",
- "require": "./dist/Icon/index.js"
+ "default": "./dist/Icon/index.js"
},
"./IconButton": {
"source": "./src/IconButton/index.ts",
"types": "./dist/IconButton/index.d.ts",
- "import": "./dist/IconButton/index.mjs",
- "require": "./dist/IconButton/index.js"
+ "default": "./dist/IconButton/index.js"
},
"./InputGroup": {
"source": "./src/InputGroup/index.ts",
"types": "./dist/InputGroup/index.d.ts",
- "import": "./dist/InputGroup/index.mjs",
- "require": "./dist/InputGroup/index.js"
+ "default": "./dist/InputGroup/index.js"
},
"./Item": {
"source": "./src/Item/index.ts",
"types": "./dist/Item/index.d.ts",
- "import": "./dist/Item/index.mjs",
- "require": "./dist/Item/index.js"
+ "default": "./dist/Item/index.js"
},
"./Kbd": {
"source": "./src/Kbd/index.ts",
"types": "./dist/Kbd/index.d.ts",
- "import": "./dist/Kbd/index.mjs",
- "require": "./dist/Kbd/index.js"
+ "default": "./dist/Kbd/index.js"
},
"./Layer": {
"source": "./src/Layer/index.ts",
"types": "./dist/Layer/index.d.ts",
- "import": "./dist/Layer/index.mjs",
- "require": "./dist/Layer/index.js"
+ "default": "./dist/Layer/index.js"
},
"./Layout": {
"source": "./src/Layout/index.ts",
"types": "./dist/Layout/index.d.ts",
- "import": "./dist/Layout/index.mjs",
- "require": "./dist/Layout/index.js"
+ "default": "./dist/Layout/index.js"
},
"./Lightbox": {
"source": "./src/Lightbox/index.ts",
"types": "./dist/Lightbox/index.d.ts",
- "import": "./dist/Lightbox/index.mjs",
- "require": "./dist/Lightbox/index.js"
+ "default": "./dist/Lightbox/index.js"
},
"./Link": {
"source": "./src/Link/index.ts",
"types": "./dist/Link/index.d.ts",
- "import": "./dist/Link/index.mjs",
- "require": "./dist/Link/index.js"
+ "default": "./dist/Link/index.js"
},
"./List": {
"source": "./src/List/index.ts",
"types": "./dist/List/index.d.ts",
- "import": "./dist/List/index.mjs",
- "require": "./dist/List/index.js"
+ "default": "./dist/List/index.js"
},
"./Markdown": {
"source": "./src/Markdown/index.ts",
"types": "./dist/Markdown/index.d.ts",
- "import": "./dist/Markdown/index.mjs",
- "require": "./dist/Markdown/index.js"
+ "default": "./dist/Markdown/index.js"
},
"./MetadataList": {
"source": "./src/MetadataList/index.ts",
"types": "./dist/MetadataList/index.d.ts",
- "import": "./dist/MetadataList/index.mjs",
- "require": "./dist/MetadataList/index.js"
+ "default": "./dist/MetadataList/index.js"
},
"./MobileNav": {
"source": "./src/MobileNav/index.ts",
"types": "./dist/MobileNav/index.d.ts",
- "import": "./dist/MobileNav/index.mjs",
- "require": "./dist/MobileNav/index.js"
+ "default": "./dist/MobileNav/index.js"
},
"./MoreMenu": {
"source": "./src/MoreMenu/index.ts",
"types": "./dist/MoreMenu/index.d.ts",
- "import": "./dist/MoreMenu/index.mjs",
- "require": "./dist/MoreMenu/index.js"
+ "default": "./dist/MoreMenu/index.js"
},
"./MultiSelector": {
"source": "./src/MultiSelector/index.ts",
"types": "./dist/MultiSelector/index.d.ts",
- "import": "./dist/MultiSelector/index.mjs",
- "require": "./dist/MultiSelector/index.js"
+ "default": "./dist/MultiSelector/index.js"
},
"./NavIcon": {
"source": "./src/NavIcon/index.ts",
"types": "./dist/NavIcon/index.d.ts",
- "import": "./dist/NavIcon/index.mjs",
- "require": "./dist/NavIcon/index.js"
+ "default": "./dist/NavIcon/index.js"
},
"./NavMenu": {
"source": "./src/NavMenu/index.ts",
"types": "./dist/NavMenu/index.d.ts",
- "import": "./dist/NavMenu/index.mjs",
- "require": "./dist/NavMenu/index.js"
+ "default": "./dist/NavMenu/index.js"
},
"./NumberInput": {
"source": "./src/NumberInput/index.ts",
"types": "./dist/NumberInput/index.d.ts",
- "import": "./dist/NumberInput/index.mjs",
- "require": "./dist/NumberInput/index.js"
+ "default": "./dist/NumberInput/index.js"
},
"./Outline": {
"source": "./src/Outline/index.ts",
"types": "./dist/Outline/index.d.ts",
- "import": "./dist/Outline/index.mjs",
- "require": "./dist/Outline/index.js"
+ "default": "./dist/Outline/index.js"
},
"./OverflowList": {
"source": "./src/OverflowList/index.ts",
"types": "./dist/OverflowList/index.d.ts",
- "import": "./dist/OverflowList/index.mjs",
- "require": "./dist/OverflowList/index.js"
+ "default": "./dist/OverflowList/index.js"
},
"./Overlay": {
"source": "./src/Overlay/index.ts",
"types": "./dist/Overlay/index.d.ts",
- "import": "./dist/Overlay/index.mjs",
- "require": "./dist/Overlay/index.js"
+ "default": "./dist/Overlay/index.js"
},
"./Pagination": {
"source": "./src/Pagination/index.ts",
"types": "./dist/Pagination/index.d.ts",
- "import": "./dist/Pagination/index.mjs",
- "require": "./dist/Pagination/index.js"
+ "default": "./dist/Pagination/index.js"
},
"./Popover": {
"source": "./src/Popover/index.ts",
"types": "./dist/Popover/index.d.ts",
- "import": "./dist/Popover/index.mjs",
- "require": "./dist/Popover/index.js"
+ "default": "./dist/Popover/index.js"
},
"./PowerSearch": {
"source": "./src/PowerSearch/index.ts",
"types": "./dist/PowerSearch/index.d.ts",
- "import": "./dist/PowerSearch/index.mjs",
- "require": "./dist/PowerSearch/index.js"
+ "default": "./dist/PowerSearch/index.js"
},
"./ProgressBar": {
"source": "./src/ProgressBar/index.ts",
"types": "./dist/ProgressBar/index.d.ts",
- "import": "./dist/ProgressBar/index.mjs",
- "require": "./dist/ProgressBar/index.js"
+ "default": "./dist/ProgressBar/index.js"
},
"./RadioList": {
"source": "./src/RadioList/index.ts",
"types": "./dist/RadioList/index.d.ts",
- "import": "./dist/RadioList/index.mjs",
- "require": "./dist/RadioList/index.js"
+ "default": "./dist/RadioList/index.js"
},
"./Resizable": {
"source": "./src/Resizable/index.ts",
"types": "./dist/Resizable/index.d.ts",
- "import": "./dist/Resizable/index.mjs",
- "require": "./dist/Resizable/index.js"
+ "default": "./dist/Resizable/index.js"
},
"./Section": {
"source": "./src/Section/index.ts",
"types": "./dist/Section/index.d.ts",
- "import": "./dist/Section/index.mjs",
- "require": "./dist/Section/index.js"
+ "default": "./dist/Section/index.js"
},
"./SegmentedControl": {
"source": "./src/SegmentedControl/index.ts",
"types": "./dist/SegmentedControl/index.d.ts",
- "import": "./dist/SegmentedControl/index.mjs",
- "require": "./dist/SegmentedControl/index.js"
+ "default": "./dist/SegmentedControl/index.js"
},
"./SelectableCard": {
"source": "./src/SelectableCard/index.ts",
"types": "./dist/SelectableCard/index.d.ts",
- "import": "./dist/SelectableCard/index.mjs",
- "require": "./dist/SelectableCard/index.js"
+ "default": "./dist/SelectableCard/index.js"
},
"./Selector": {
"source": "./src/Selector/index.ts",
"types": "./dist/Selector/index.d.ts",
- "import": "./dist/Selector/index.mjs",
- "require": "./dist/Selector/index.js"
+ "default": "./dist/Selector/index.js"
},
"./SideNav": {
"source": "./src/SideNav/index.ts",
"types": "./dist/SideNav/index.d.ts",
- "import": "./dist/SideNav/index.mjs",
- "require": "./dist/SideNav/index.js"
+ "default": "./dist/SideNav/index.js"
},
"./SizeContext": {
"source": "./src/SizeContext/index.ts",
"types": "./dist/SizeContext/index.d.ts",
- "import": "./dist/SizeContext/index.mjs",
- "require": "./dist/SizeContext/index.js"
+ "default": "./dist/SizeContext/index.js"
},
"./Skeleton": {
"source": "./src/Skeleton/index.ts",
"types": "./dist/Skeleton/index.d.ts",
- "import": "./dist/Skeleton/index.mjs",
- "require": "./dist/Skeleton/index.js"
+ "default": "./dist/Skeleton/index.js"
},
"./Slider": {
"source": "./src/Slider/index.ts",
"types": "./dist/Slider/index.d.ts",
- "import": "./dist/Slider/index.mjs",
- "require": "./dist/Slider/index.js"
+ "default": "./dist/Slider/index.js"
},
"./Spinner": {
"source": "./src/Spinner/index.ts",
"types": "./dist/Spinner/index.d.ts",
- "import": "./dist/Spinner/index.mjs",
- "require": "./dist/Spinner/index.js"
+ "default": "./dist/Spinner/index.js"
},
"./Stack": {
"source": "./src/Stack/index.ts",
"types": "./dist/Stack/index.d.ts",
- "import": "./dist/Stack/index.mjs",
- "require": "./dist/Stack/index.js"
+ "default": "./dist/Stack/index.js"
},
"./StatusDot": {
"source": "./src/StatusDot/index.ts",
"types": "./dist/StatusDot/index.d.ts",
- "import": "./dist/StatusDot/index.mjs",
- "require": "./dist/StatusDot/index.js"
+ "default": "./dist/StatusDot/index.js"
},
"./Switch": {
"source": "./src/Switch/index.ts",
"types": "./dist/Switch/index.d.ts",
- "import": "./dist/Switch/index.mjs",
- "require": "./dist/Switch/index.js"
+ "default": "./dist/Switch/index.js"
},
"./TabList": {
"source": "./src/TabList/index.ts",
"types": "./dist/TabList/index.d.ts",
- "import": "./dist/TabList/index.mjs",
- "require": "./dist/TabList/index.js"
+ "default": "./dist/TabList/index.js"
},
"./Table": {
"source": "./src/Table/index.ts",
"types": "./dist/Table/index.d.ts",
- "import": "./dist/Table/index.mjs",
- "require": "./dist/Table/index.js"
+ "default": "./dist/Table/index.js"
},
"./Text": {
"source": "./src/Text/index.ts",
"types": "./dist/Text/index.d.ts",
- "import": "./dist/Text/index.mjs",
- "require": "./dist/Text/index.js"
+ "default": "./dist/Text/index.js"
},
"./TextArea": {
"source": "./src/TextArea/index.ts",
"types": "./dist/TextArea/index.d.ts",
- "import": "./dist/TextArea/index.mjs",
- "require": "./dist/TextArea/index.js"
+ "default": "./dist/TextArea/index.js"
},
"./TextInput": {
"source": "./src/TextInput/index.ts",
"types": "./dist/TextInput/index.d.ts",
- "import": "./dist/TextInput/index.mjs",
- "require": "./dist/TextInput/index.js"
+ "default": "./dist/TextInput/index.js"
},
"./Thumbnail": {
"source": "./src/Thumbnail/index.ts",
"types": "./dist/Thumbnail/index.d.ts",
- "import": "./dist/Thumbnail/index.mjs",
- "require": "./dist/Thumbnail/index.js"
+ "default": "./dist/Thumbnail/index.js"
},
"./TimeInput": {
"source": "./src/TimeInput/index.ts",
"types": "./dist/TimeInput/index.d.ts",
- "import": "./dist/TimeInput/index.mjs",
- "require": "./dist/TimeInput/index.js"
+ "default": "./dist/TimeInput/index.js"
},
"./Timestamp": {
"source": "./src/Timestamp/index.ts",
"types": "./dist/Timestamp/index.d.ts",
- "import": "./dist/Timestamp/index.mjs",
- "require": "./dist/Timestamp/index.js"
+ "default": "./dist/Timestamp/index.js"
},
"./Toast": {
"source": "./src/Toast/index.ts",
"types": "./dist/Toast/index.d.ts",
- "import": "./dist/Toast/index.mjs",
- "require": "./dist/Toast/index.js"
+ "default": "./dist/Toast/index.js"
},
"./ToggleButton": {
"source": "./src/ToggleButton/index.ts",
"types": "./dist/ToggleButton/index.d.ts",
- "import": "./dist/ToggleButton/index.mjs",
- "require": "./dist/ToggleButton/index.js"
+ "default": "./dist/ToggleButton/index.js"
},
"./Token": {
"source": "./src/Token/index.ts",
"types": "./dist/Token/index.d.ts",
- "import": "./dist/Token/index.mjs",
- "require": "./dist/Token/index.js"
+ "default": "./dist/Token/index.js"
},
"./Tokenizer": {
"source": "./src/Tokenizer/index.ts",
"types": "./dist/Tokenizer/index.d.ts",
- "import": "./dist/Tokenizer/index.mjs",
- "require": "./dist/Tokenizer/index.js"
+ "default": "./dist/Tokenizer/index.js"
},
"./Toolbar": {
"source": "./src/Toolbar/index.ts",
"types": "./dist/Toolbar/index.d.ts",
- "import": "./dist/Toolbar/index.mjs",
- "require": "./dist/Toolbar/index.js"
+ "default": "./dist/Toolbar/index.js"
},
"./Tooltip": {
"source": "./src/Tooltip/index.ts",
"types": "./dist/Tooltip/index.d.ts",
- "import": "./dist/Tooltip/index.mjs",
- "require": "./dist/Tooltip/index.js"
+ "default": "./dist/Tooltip/index.js"
},
"./TopNav": {
"source": "./src/TopNav/index.ts",
"types": "./dist/TopNav/index.d.ts",
- "import": "./dist/TopNav/index.mjs",
- "require": "./dist/TopNav/index.js"
+ "default": "./dist/TopNav/index.js"
},
"./TreeList": {
"source": "./src/TreeList/index.ts",
"types": "./dist/TreeList/index.d.ts",
- "import": "./dist/TreeList/index.mjs",
- "require": "./dist/TreeList/index.js"
+ "default": "./dist/TreeList/index.js"
},
"./Typeahead": {
"source": "./src/Typeahead/index.ts",
"types": "./dist/Typeahead/index.d.ts",
- "import": "./dist/Typeahead/index.mjs",
- "require": "./dist/Typeahead/index.js"
+ "default": "./dist/Typeahead/index.js"
},
"./hooks": {
"source": "./src/hooks/index.ts",
"types": "./dist/hooks/index.d.ts",
- "import": "./dist/hooks/index.mjs",
- "require": "./dist/hooks/index.js"
+ "default": "./dist/hooks/index.js"
},
"./theme": {
"source": "./src/theme/index.ts",
"types": "./dist/theme/index.d.ts",
- "import": "./dist/theme/index.mjs",
- "require": "./dist/theme/index.js"
+ "default": "./dist/theme/index.js"
},
"./utils": {
"source": "./src/utils/index.ts",
"types": "./dist/utils/index.d.ts",
- "import": "./dist/utils/index.mjs",
- "require": "./dist/utils/index.js"
+ "default": "./dist/utils/index.js"
},
"./Calendar/utils": {
"source": "./src/Calendar/utils.ts",
"types": "./dist/Calendar/utils.d.ts",
- "import": "./dist/Calendar/utils.mjs",
- "require": "./dist/Calendar/utils.js"
+ "default": "./dist/Calendar/utils.js"
},
"./Markdown/utils": {
"source": "./src/Markdown/utils.ts",
"types": "./dist/Markdown/utils.d.ts",
- "import": "./dist/Markdown/utils.mjs",
- "require": "./dist/Markdown/utils.js"
+ "default": "./dist/Markdown/utils.js"
},
"./PowerSearch/utils": {
"source": "./src/PowerSearch/utils.ts",
"types": "./dist/PowerSearch/utils.d.ts",
- "import": "./dist/PowerSearch/utils.mjs",
- "require": "./dist/PowerSearch/utils.js"
+ "default": "./dist/PowerSearch/utils.js"
},
"./Selector/utils": {
"source": "./src/Selector/utils.ts",
"types": "./dist/Selector/utils.d.ts",
- "import": "./dist/Selector/utils.mjs",
- "require": "./dist/Selector/utils.js"
+ "default": "./dist/Selector/utils.js"
},
"./Table/utils": {
"source": "./src/Table/utils.ts",
"types": "./dist/Table/utils.d.ts",
- "import": "./dist/Table/utils.mjs",
- "require": "./dist/Table/utils.js"
+ "default": "./dist/Table/utils.js"
},
"./Typeahead/utils": {
"source": "./src/Typeahead/utils.ts",
"types": "./dist/Typeahead/utils.d.ts",
- "import": "./dist/Typeahead/utils.mjs",
- "require": "./dist/Typeahead/utils.js"
+ "default": "./dist/Typeahead/utils.js"
}
},
"files": [
@@ -684,29 +579,31 @@
],
"scripts": {
"prepack": "pnpm build",
- "build": "tsup && node ../../scripts/postbuild-use-client.mjs && tsc --project tsconfig.build.json && pnpm build:css && node ../../scripts/fix-use-client-dist.mjs",
- "dev": "tsup --watch",
+ "build": "rm -rf dist && pnpm build:esm && tsc --project tsconfig.build.json && pnpm build:css",
+ "build:esm": "babel src --out-dir dist --extensions '.ts,.tsx' --out-file-extension '.js' --ignore '**/*.test.ts,**/*.test.tsx,**/__tests__/**,**/*.perf.test.*,**/*.doc.mjs,**/*.d.ts,**/*.css,**/*.css.d.ts' --config-file ./babel.config.json",
+ "build:css": "node ../../scripts/build-css.mjs",
+ "dev": "babel src --watch --out-dir dist --extensions '.ts,.tsx' --out-file-extension '.js' --ignore '**/*.test.*,**/*.doc.mjs,**/*.d.ts,**/*.css*' --config-file ./babel.config.json",
"test": "vitest run --root ../..",
"test:watch": "vitest --root ../..",
"lint": "eslint src",
"typecheck:docs": "tsc --project tsconfig.docs.json",
- "typecheck": "tsc --project tsconfig.json --noEmit",
- "build:css": "node ../../scripts/build-css.mjs"
+ "typecheck": "tsc --project tsconfig.json --noEmit"
},
"peerDependencies": {
"react": ">=19.0.0",
"react-dom": ">=19.0.0"
},
+ "dependencies": {
+ "@stylexjs/stylex": "^0.18.3"
+ },
"devDependencies": {
+ "@babel/cli": "^7.29.7",
"@babel/core": "^7.29.7",
"@babel/preset-react": "^7.29.7",
"@babel/preset-typescript": "^7.29.7",
"@stylexjs/babel-plugin": "^0.18.3",
- "@stylexjs/esbuild-plugin": "^0.11.1",
+ "@testing-library/dom": "^10.0.0",
"@testing-library/jest-dom": "^6.6.0",
- "@testing-library/react": "^16.3.2",
- "esbuild-plugin-babel": "^0.2.3",
- "@stylexjs/stylex": "^0.18.3",
- "@testing-library/dom": "^10.0.0"
+ "@testing-library/react": "^16.3.2"
}
}
diff --git a/packages/core/tsup.config.ts b/packages/core/tsup.config.ts
deleted file mode 100644
index 519a345624..0000000000
--- a/packages/core/tsup.config.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Meta Platforms, Inc. and affiliates.
-
-/**
- * @file tsup.config.ts
- * @input Uses tsup
- * @output Bundle configuration for CJS/ESM outputs (DTS via separate tsc pass)
- * @position Build config; defines entry points and output formats for @xds/core
- *
- * DTS is generated by a separate `tsc --project tsconfig.build.json` step
- * instead of tsup's built-in `dts: true`. This avoids OOM — tsup instantiates
- * a full TypeScript program per entry point (60+), while tsc does one pass.
- *
- * SYNC: When modified, update this header and /packages/core/README.md
- */
-
-import {defineConfig} from 'tsup';
-import babel from 'esbuild-plugin-babel';
-
-export default defineConfig({
- entry: [
- 'src/index.ts',
- 'src/*/index.ts',
- 'src/*/utils.ts',
- 'src/theme/tokens.stylex.ts',
- 'src/theme/syntax/index.ts',
- ],
- format: ['cjs', 'esm'],
- dts: false,
- splitting: true,
- metafile: true,
- clean: true,
- external: ['react', 'react-dom'],
- noExternal: ['@stylexjs/stylex', 'styleq'],
- esbuildPlugins: [
- babel({
- filter: /\.[jt]sx?$/,
- config: {
- presets: [
- ['@babel/preset-react', {runtime: 'automatic'}],
- '@babel/preset-typescript',
- ],
- plugins: [
- [
- '@stylexjs/babel-plugin',
- {
- dev: false,
- runtimeInjection: false,
- genConditionalClasses: true,
- treeshakeCompensation: true,
-
- unstable_moduleResolution: {
- type: 'commonJS',
- rootDir: '.',
- },
- },
- ],
- ],
- },
- }),
- ],
-});
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 8133b6de21..8eca70d559 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -724,6 +724,9 @@ importers:
packages/core:
dependencies:
+ '@stylexjs/stylex':
+ specifier: ^0.18.3
+ version: 0.18.3
react:
specifier: '>=19.0.0'
version: 19.2.6
@@ -731,6 +734,9 @@ importers:
specifier: '>=19.0.0'
version: 19.2.6([email protected])
devDependencies:
+ '@babel/cli':
+ specifier: ^7.29.7
+ version: 7.29.7(@babel/[email protected])
'@babel/core':
specifier: ^7.29.7
version: 7.29.7
@@ -743,12 +749,6 @@ importers:
'@stylexjs/babel-plugin':
specifier: ^0.18.3
version: 0.18.3
- '@stylexjs/esbuild-plugin':
- specifier: ^0.11.1
- version: 0.11.1
- '@stylexjs/stylex':
- specifier: ^0.18.3
- version: 0.18.3
'@testing-library/dom':
specifier: ^10.0.0
version: 10.4.1
@@ -758,9 +758,6 @@ importers:
'@testing-library/react':
specifier: ^16.3.2
- esbuild-plugin-babel:
- specifier: ^0.2.3
- version: 0.2.3(@babel/[email protected])
packages/lab:
dependencies:
@@ -1008,6 +1005,13 @@ packages:
peerDependencies:
playwright-core: '>= 1.0.0'
+ '@babel/[email protected]':
+ resolution: {integrity: sha512-/75HwRbAYPqXv/Ax1h7Fg3IZfXgdU98jnA8H93/m/QBaPV3Hp5ICoLqzGYye1yHBCgpmXvtqgSUN8oOKX5tojQ==}
+ engines: {node: '>=6.9.0'}
+ hasBin: true
+ peerDependencies:
+ '@babel/core': ^7.0.0-0
+
resolution: {integrity: sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==}
engines: {node: '>=6.9.0'}
@@ -1432,12 +1436,6 @@ packages:
'@emnapi/[email protected]':
resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==}
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==}
- engines: {node: '>=18'}
- cpu: [ppc64]
- os: [aix]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==}
engines: {node: '>=18'}
@@ -1456,12 +1454,6 @@ packages:
cpu: [ppc64]
os: [aix]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==}
- engines: {node: '>=18'}
- cpu: [arm64]
- os: [android]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==}
engines: {node: '>=18'}
@@ -1480,12 +1472,6 @@ packages:
cpu: [arm64]
os: [android]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==}
- engines: {node: '>=18'}
- cpu: [arm]
- os: [android]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==}
engines: {node: '>=18'}
@@ -1504,12 +1490,6 @@ packages:
cpu: [arm]
os: [android]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==}
- engines: {node: '>=18'}
- cpu: [x64]
- os: [android]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==}
engines: {node: '>=18'}
@@ -1528,12 +1508,6 @@ packages:
cpu: [x64]
os: [android]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==}
- engines: {node: '>=18'}
- cpu: [arm64]
- os: [darwin]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==}
engines: {node: '>=18'}
@@ -1552,12 +1526,6 @@ packages:
cpu: [arm64]
os: [darwin]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==}
- engines: {node: '>=18'}
- cpu: [x64]
- os: [darwin]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==}
engines: {node: '>=18'}
@@ -1576,12 +1544,6 @@ packages:
cpu: [x64]
os: [darwin]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==}
- engines: {node: '>=18'}
- cpu: [arm64]
- os: [freebsd]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==}
engines: {node: '>=18'}
@@ -1600,12 +1562,6 @@ packages:
cpu: [arm64]
os: [freebsd]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==}
- engines: {node: '>=18'}
- cpu: [x64]
- os: [freebsd]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==}
engines: {node: '>=18'}
@@ -1624,12 +1580,6 @@ packages:
cpu: [x64]
os: [freebsd]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==}
- engines: {node: '>=18'}
- cpu: [arm64]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==}
engines: {node: '>=18'}
@@ -1648,12 +1598,6 @@ packages:
cpu: [arm64]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==}
- engines: {node: '>=18'}
- cpu: [arm]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==}
engines: {node: '>=18'}
@@ -1672,12 +1616,6 @@ packages:
cpu: [arm]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==}
- engines: {node: '>=18'}
- cpu: [ia32]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==}
engines: {node: '>=18'}
@@ -1696,12 +1634,6 @@ packages:
cpu: [ia32]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==}
- engines: {node: '>=18'}
- cpu: [loong64]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==}
engines: {node: '>=18'}
@@ -1720,12 +1652,6 @@ packages:
cpu: [loong64]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==}
- engines: {node: '>=18'}
- cpu: [mips64el]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==}
engines: {node: '>=18'}
@@ -1744,12 +1670,6 @@ packages:
cpu: [mips64el]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==}
- engines: {node: '>=18'}
- cpu: [ppc64]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==}
engines: {node: '>=18'}
@@ -1768,12 +1688,6 @@ packages:
cpu: [ppc64]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==}
- engines: {node: '>=18'}
- cpu: [riscv64]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==}
engines: {node: '>=18'}
@@ -1792,12 +1706,6 @@ packages:
cpu: [riscv64]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==}
- engines: {node: '>=18'}
- cpu: [s390x]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==}
engines: {node: '>=18'}
@@ -1816,12 +1724,6 @@ packages:
cpu: [s390x]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==}
- engines: {node: '>=18'}
- cpu: [x64]
- os: [linux]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==}
engines: {node: '>=18'}
@@ -1840,12 +1742,6 @@ packages:
cpu: [x64]
os: [linux]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==}
- engines: {node: '>=18'}
- cpu: [arm64]
- os: [netbsd]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==}
engines: {node: '>=18'}
@@ -1864,12 +1760,6 @@ packages:
cpu: [arm64]
os: [netbsd]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==}
- engines: {node: '>=18'}
- cpu: [x64]
- os: [netbsd]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==}
engines: {node: '>=18'}
@@ -1888,12 +1778,6 @@ packages:
cpu: [x64]
os: [netbsd]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==}
- engines: {node: '>=18'}
- cpu: [arm64]
- os: [openbsd]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==}
engines: {node: '>=18'}
@@ -1912,12 +1796,6 @@ packages:
cpu: [arm64]
os: [openbsd]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==}
- engines: {node: '>=18'}
- cpu: [x64]
- os: [openbsd]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==}
engines: {node: '>=18'}
@@ -1954,12 +1832,6 @@ packages:
cpu: [arm64]
os: [openharmony]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==}
- engines: {node: '>=18'}
- cpu: [x64]
- os: [sunos]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==}
engines: {node: '>=18'}
@@ -1978,12 +1850,6 @@ packages:
cpu: [x64]
os: [sunos]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==}
- engines: {node: '>=18'}
- cpu: [arm64]
- os: [win32]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==}
engines: {node: '>=18'}
@@ -2002,12 +1868,6 @@ packages:
cpu: [arm64]
os: [win32]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==}
- engines: {node: '>=18'}
- cpu: [ia32]
- os: [win32]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==}
engines: {node: '>=18'}
@@ -2026,12 +1886,6 @@ packages:
cpu: [ia32]
os: [win32]
- '@esbuild/[email protected]':
- resolution: {integrity: sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==}
- engines: {node: '>=18'}
- cpu: [x64]
- os: [win32]
-
'@esbuild/[email protected]':
resolution: {integrity: sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==}
engines: {node: '>=18'}
@@ -2469,6 +2323,9 @@ packages:
cpu: [x64]
os: [win32]
+ '@nicolo-ribaudo/[email protected]':
+ resolution: {integrity: sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==}
+
'@nodelib/[email protected]':
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
engines: {node: '>= 8'}
@@ -3501,29 +3358,15 @@ packages:
typescript:
optional: true
- '@stylexjs/[email protected]':
- resolution: {integrity: sha512-hQ02pz6VLjr/yC21NyVu5Lv1djQNiYkUI/vGAawv/TYly8SGI/N2ba7ea6E7vtkdE5K4idh8o3EhY2IA28xzsg==}
-
'@stylexjs/[email protected]':
resolution: {integrity: sha512-5VeMIChNaXWlizLUL6c7WrMfuhydHXl3ASTlbj3O0qlEkNOlcgZMH3zzZ0iUrOSFTSgbHAOWUsVJKX5bFeZk4A==}
- '@stylexjs/[email protected]':
- resolution: {integrity: sha512-3eBgoP8idR5FxC3+zQA3tnKzbiSxce17rAFwno51/DuWGI8xxza8l0NFwGBy6upr+VV2iNjpiGGd9e0gtHPXlA==}
- deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
-
'@stylexjs/[email protected]':
resolution: {integrity: sha512-7q/MA6Qa4+PhV7UonNmYrnadf6GfbyERi71sBneQ+QpX3mHzaIhP5cJR5OVTGWSviPdje+VcL7v6hb8+8q9JKw==}
- '@stylexjs/[email protected]':
- resolution: {integrity: sha512-siBoO0yg6KbhHbtkwWGhZWu0pH61gEAsdSYYv+vQRkaX3iSADByrqFuhD/KQku8AfKq78u5dWGc3FDA0H90VEw==}
- deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
-
'@stylexjs/[email protected]':
resolution: {integrity: sha512-g72AKGGhLTFsaez19zod2je9IQeaub2eM85jwJPvfmxymKW8Aleoxm5/pYIsnyxx3MZNOB5AVN6khfo90f9Lgw==}
- '@stylexjs/[email protected]':
- resolution: {integrity: sha512-1OofsiCP2DYV+Cw/iIuHYTAJRy34TtxQt0FDuQGTnNH915hb6NkPmX6iPa++9t4KP3HWR9oVRmAHkpP58BIYbw==}
-
'@stylexjs/[email protected]':
resolution: {integrity: sha512-15gDzAJAorOE0yzxaWLNxldW2aqdmCiLG5QcPD8nmVCVqvrWp0Asgv45zk7LtN86WJb/4Ym9eQ6qT5MJW59tWQ==}
@@ -3939,6 +3782,10 @@ packages:
resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==}
+ resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==}
+ engines: {node: '>= 8'}
+
resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==}
@@ -3979,9 +3826,6 @@ packages:
resolution: {integrity: sha512-KunSNx+TVpkAw/6ULfhnx+HWRecjqZGTOyquAoWHYLRSdK1tB5Ihce1ZW+UY3fj33bYAFWPu7W/GRSmmrCGuxA==}
engines: {node: '>=4'}
- resolution: {integrity: sha512-gU/U5ASnPmm1GY9vptiJF20BNsULFuetjJX6gvNdJCUsftbFQ1STGYMOfkFgVTtpZo+iGTz4tzDNA/IW0U8dvA==}
-
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
@@ -3997,6 +3841,10 @@ packages:
resolution: {integrity: sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==}
+ resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==}
+ engines: {node: '>=8'}
+
resolution: {integrity: sha512-VUpsf/qykW0heRlC8LooCq28Kxn3mAqKohhDG/49rrsQ1dT1CXyj/pgXS+5BSRzFTR/3DyIBOqQOrGyZOh71Aw==}
@@ -4043,6 +3891,10 @@ packages:
resolution: {integrity: sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==}
engines: {node: '>= 16'}
+ resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==}
+ engines: {node: '>= 8.10.0'}
+
resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==}
engines: {node: '>= 14.16.0'}
@@ -4089,6 +3941,10 @@ packages:
resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==}
engines: {node: '>= 6'}
+ resolution: {integrity: sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==}
+ engines: {node: '>= 6'}
+
resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==}
engines: {node: '>= 10'}
@@ -4326,16 +4182,6 @@ packages:
resolution: {integrity: sha512-5eNtXOs3tbfxXOj04tjjseeWkRWaoCjdEI+96DgwzZoe6c9juL49pXlzAFTI72aWC9Y8p7168g6XIKjh7k6pyQ==}
- resolution: {integrity: sha512-hGLL31n+GvBhkHUpPCt1sU4ynzOH7I1IUkKhera66jigi4mHFPL6dfJo44L6/1rfcZudXx+wGdf9VOifzDPqYQ==}
- peerDependencies:
- '@babel/core': ^7.0.0
-
- resolution: {integrity: sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==}
- engines: {node: '>=18'}
- hasBin: true
-
resolution: {integrity: sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==}
engines: {node: '>=18'}
@@ -4567,6 +4413,12 @@ packages:
resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==}
engines: {node: '>=6 <7 || >=8'}
+ resolution: {integrity: sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==}
+
+ resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}
+
resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
@@ -4613,6 +4465,10 @@ packages:
resolution: {integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==}
engines: {node: 18 || 20 || >=22}
+ resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
+ deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting [email protected]
+
resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==}
engines: {node: '>=10'}
@@ -4631,15 +4487,9 @@ packages:
resolution: {integrity: sha512-0wUoCcLp+5Ev5pDW2OriHC2MJCbwLwuRx+gAqMTOkGKJJiBCLjtrvy4PWUGn6MIVefecRpzoOZ/UV6iGdOr+Cw==}
- resolution: {integrity: sha512-If1T7lhfXnGlVLbnsmwerNB5cyJm2oIE8TN1UKEq6/OUX1nOGUhjXMpqAwZ1wkkn9Brda0VRyJEWOGT2GgVcAQ==}
-
resolution: {integrity: sha512-6pEjquH3rqaI6cYAXYPcz9MS4rY6R4ngRgrgfDshRptUZIc3lw0MCIJIGDj9++mfySOuPTHB4nrSW99BCvOPIA==}
- resolution: {integrity: sha512-fWT40jJ/BtlzuyiiQS7lzNIlB5h6flVZoN8Jn8v5l987HL5dK9s+/4+py0FaBmeIEROC2zxt5qMLwXFTPLQ7BA==}
-
resolution: {integrity: sha512-CV9TW3Y3f8/wT0BRFc1/KAVQ3TUHiXmaAb6VW9vtiMFf7SLoMd1PdAc4W3KFOFETBJUb90KatHqlsZMWV+R9Gg==}
engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
@@ -4694,6 +4544,13 @@ packages:
resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}
+ deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
+
+ resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
+
resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==}
engines: {node: '>=12'}
@@ -4701,6 +4558,10 @@ packages:
resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==}
+ resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==}
+ engines: {node: '>=8'}
+
resolution: {integrity: sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==}
engines: {node: '>= 0.4'}
@@ -5075,10 +4936,17 @@ packages:
resolution: {integrity: sha512-5WUyunoPMsvvEhS8AxHtRzP+oA8UCkJ7YRxatWKjngndhDGLiqEVAQKWjFAiAiuL8zMRGzGSJxFnLetoa43qGQ==}
+ resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}
+ engines: {node: '>=0.10.0'}
+
resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
engines: {node: '>=0.10.0'}
+ resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==}
+
resolution: {integrity: sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==}
engines: {node: '>=18'}
@@ -5146,6 +5014,10 @@ packages:
resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==}
engines: {node: '>=8'}
+ resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==}
+ engines: {node: '>=0.10.0'}
+
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
engines: {node: '>=8'}
@@ -5333,6 +5205,10 @@ packages:
resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==}
engines: {node: '>=6'}
+ resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==}
+ engines: {node: '>=8.10.0'}
+
resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==}
engines: {node: '>= 14.18.0'}
@@ -5453,6 +5329,10 @@ packages:
resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==}
+ resolution: {integrity: sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==}
+ engines: {node: '>=6'}
+
resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==}
engines: {node: '>=8'}
@@ -6041,6 +5921,9 @@ packages:
resolution: {integrity: sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==}
engines: {node: '>=18'}
+ resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
+
resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==}
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
@@ -6147,6 +6030,20 @@ snapshots:
axe-core: 4.11.4
playwright-core: 1.60.0
+ dependencies:
+ '@babel/core': 7.29.7
+ '@jridgewell/trace-mapping': 0.3.31
+ commander: 6.2.1
+ convert-source-map: 2.0.0
+ fs-readdir-recursive: 1.1.0
+ glob: 7.2.3
+ make-dir: 2.1.0
+ slash: 2.0.0
+ optionalDependencies:
+ '@nicolo-ribaudo/chokidar-2': 2.1.8-no-fsevents.3
+ chokidar: 3.6.0
+
dependencies:
'@babel/helper-validator-identifier': 7.29.7
@@ -6366,11 +6263,6 @@ snapshots:
'@babel/core': 7.29.0
'@babel/helper-plugin-utils': 7.29.7
- dependencies:
- '@babel/core': 7.29.7
- '@babel/helper-plugin-utils': 7.29.7
-
dependencies:
'@babel/core': 7.29.7
@@ -6381,11 +6273,6 @@ snapshots:
'@babel/core': 7.29.0
'@babel/helper-plugin-utils': 7.29.7
- dependencies:
- '@babel/core': 7.29.7
- '@babel/helper-plugin-utils': 7.29.7
-
dependencies:
'@babel/core': 7.29.7
@@ -6783,9 +6670,6 @@ snapshots:
tslib: 2.8.1
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -6795,9 +6679,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -6807,9 +6688,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -6819,9 +6697,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -6831,9 +6706,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -6843,9 +6715,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -6855,9 +6724,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -6867,9 +6733,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -6879,9 +6742,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -6891,9 +6751,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -6903,9 +6760,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -6915,9 +6769,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -6927,9 +6778,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -6939,9 +6787,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -6951,9 +6796,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -6963,9 +6805,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -6975,9 +6814,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -6987,9 +6823,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -6999,9 +6832,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -7011,9 +6841,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -7023,9 +6850,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -7044,9 +6868,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -7056,9 +6877,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -7068,9 +6886,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -7080,9 +6895,6 @@ snapshots:
'@esbuild/[email protected]':
optional: true
- '@esbuild/[email protected]':
- optional: true
-
'@esbuild/[email protected]':
optional: true
@@ -7477,6 +7289,9 @@ snapshots:
optional: true
+ '@nicolo-ribaudo/[email protected]':
+ optional: true
+
'@nodelib/[email protected]':
dependencies:
'@nodelib/fs.stat': 2.0.5
@@ -8352,18 +8167,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@stylexjs/[email protected]':
- dependencies:
- '@babel/core': 7.29.7
- '@babel/helper-module-imports': 7.29.7
- '@babel/traverse': 7.29.7
- '@babel/types': 7.29.7
- '@dual-bundle/import-meta-resolve': 4.2.1
- '@stylexjs/shared': 0.11.1
- '@stylexjs/stylex': 0.11.1
- transitivePeerDependencies:
- - supports-color
-
'@stylexjs/[email protected]':
dependencies:
'@babel/core': 7.29.0
@@ -8377,19 +8180,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@stylexjs/[email protected]':
- dependencies:
- '@babel/core': 7.29.7
- '@babel/plugin-syntax-flow': 7.28.6(@babel/[email protected])
- '@babel/plugin-syntax-jsx': 7.28.6(@babel/[email protected])
- '@babel/plugin-syntax-typescript': 7.28.6(@babel/[email protected])
- '@stylexjs/babel-plugin': 0.11.1
- '@stylexjs/shared': 0.11.1
- babel-plugin-syntax-hermes-parser: 0.26.0
- esbuild: 0.24.2
- transitivePeerDependencies:
- - supports-color
-
'@stylexjs/[email protected]':
dependencies:
'@babel/core': 7.29.0
@@ -8401,18 +8191,8 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@stylexjs/[email protected]':
- dependencies:
- postcss-value-parser: 4.2.0
-
'@stylexjs/[email protected]': {}
- '@stylexjs/[email protected]':
- dependencies:
- css-mediaquery: 0.1.2
- invariant: 2.2.4
- styleq: 0.2.1
-
'@stylexjs/[email protected]':
dependencies:
css-mediaquery: 0.1.2
@@ -8880,6 +8660,12 @@ snapshots:
+ dependencies:
+ normalize-path: 3.0.0
+ picomatch: 2.3.2
+ optional: true
+
dependencies:
sprintf-js: 1.0.3
@@ -8915,10 +8701,6 @@ snapshots:
- dependencies:
- hermes-parser: 0.26.0
-
@@ -8931,6 +8713,9 @@ snapshots:
dependencies:
require-from-string: 2.0.2
+ optional: true
+
@@ -8976,6 +8761,19 @@ snapshots:
+ dependencies:
+ anymatch: 3.1.3
+ braces: 3.0.3
+ glob-parent: 5.1.2
+ is-binary-path: 2.1.0
+ is-glob: 4.0.3
+ normalize-path: 3.0.0
+ readdirp: 3.6.0
+ optionalDependencies:
+ fsevents: 2.3.3
+ optional: true
+
dependencies:
readdirp: 4.1.2
@@ -9024,6 +8822,8 @@ snapshots:
+
@@ -9219,38 +9019,6 @@ snapshots:
- dependencies:
- '@babel/core': 7.29.7
-
- optionalDependencies:
- '@esbuild/aix-ppc64': 0.24.2
- '@esbuild/android-arm': 0.24.2
- '@esbuild/android-arm64': 0.24.2
- '@esbuild/android-x64': 0.24.2
- '@esbuild/darwin-arm64': 0.24.2
- '@esbuild/darwin-x64': 0.24.2
- '@esbuild/freebsd-arm64': 0.24.2
- '@esbuild/freebsd-x64': 0.24.2
- '@esbuild/linux-arm': 0.24.2
- '@esbuild/linux-arm64': 0.24.2
- '@esbuild/linux-ia32': 0.24.2
- '@esbuild/linux-loong64': 0.24.2
- '@esbuild/linux-mips64el': 0.24.2
- '@esbuild/linux-ppc64': 0.24.2
- '@esbuild/linux-riscv64': 0.24.2
- '@esbuild/linux-s390x': 0.24.2
- '@esbuild/linux-x64': 0.24.2
- '@esbuild/netbsd-arm64': 0.24.2
- '@esbuild/netbsd-x64': 0.24.2
- '@esbuild/openbsd-arm64': 0.24.2
- '@esbuild/openbsd-x64': 0.24.2
- '@esbuild/sunos-x64': 0.24.2
- '@esbuild/win32-arm64': 0.24.2
- '@esbuild/win32-ia32': 0.24.2
- '@esbuild/win32-x64': 0.24.2
-
optionalDependencies:
'@esbuild/aix-ppc64': 0.25.12
@@ -9659,6 +9427,10 @@ snapshots:
jsonfile: 4.0.0
universalify: 0.1.2
+
+
optional: true
@@ -9698,6 +9470,15 @@ snapshots:
minipass: 7.1.3
path-scurry: 2.0.2
+ dependencies:
+ fs.realpath: 1.0.0
+ inflight: 1.0.6
+ inherits: 2.0.4
+ minimatch: 9.0.9
+ once: 1.4.0
+ path-is-absolute: 1.0.1
+
dependencies:
array-union: 2.1.0
@@ -9717,16 +9498,10 @@ snapshots:
-
dependencies:
hermes-estree: 0.25.1
- dependencies:
- hermes-estree: 0.26.0
-
dependencies:
'@exodus/bytes': 1.15.0
@@ -9773,12 +9548,24 @@ snapshots:
+ dependencies:
+ once: 1.4.0
+ wrappy: 1.0.2
+
+
dependencies:
loose-envify: 1.4.0
+ dependencies:
+ binary-extensions: 2.3.0
+ optional: true
+
dependencies:
hasown: 2.0.3
@@ -10125,8 +9912,15 @@ snapshots:
+ optional: true
+
+ dependencies:
+ wrappy: 1.0.2
+
dependencies:
default-browser: 5.5.0
@@ -10238,6 +10032,8 @@ snapshots:
+
@@ -10395,6 +10191,11 @@ snapshots:
pify: 4.0.1
strip-bom: 3.0.0
+ dependencies:
+ picomatch: 4.0.4
+ optional: true
+
@@ -10556,6 +10357,8 @@ snapshots:
+
@@ -11312,6 +11115,8 @@ snapshots:
string-width: 7.2.0
strip-ansi: 7.2.0
+
dependencies:
imurmurhash: 0.1.4
diff --git a/scripts/bundle-analysis.mjs b/scripts/bundle-analysis.mjs
index eb0371d910..8aa5106320 100644
--- a/scripts/bundle-analysis.mjs
+++ b/scripts/bundle-analysis.mjs
@@ -5,8 +5,8 @@
/**
* XDS Bundle Size Analysis
*
- * Traces chunk dependencies and deduplicates shared code to show
- * the real shipped cost of XDS components.
+ * Traces file dependencies to show the real shipped cost of XDS components.
+ * Each component is a standalone file tree (no shared chunks).
*
* Usage:
* node scripts/bundle-analysis.mjs # full report
@@ -16,8 +16,8 @@
* node scripts/bundle-analysis.mjs --compare @chakra-ui/react # whole-library
*/
-import {readdirSync, readFileSync, existsSync} from 'fs';
-import {join} from 'path';
+import {readdirSync, readFileSync, existsSync, statSync} from 'fs';
+import {join, dirname, resolve} from 'path';
import {gzipSync} from 'zlib';
const DIST = join(import.meta.dirname, '..', 'packages', 'core', 'dist');
@@ -27,21 +27,41 @@ function gzSize(fp) {
return {raw: raw.length, gzip: gzipSync(raw, {level: 9}).length};
}
+function resolveImport(fromFile, specifier) {
+ const dir = dirname(fromFile);
+ const candidates = [
+ join(dir, specifier),
+ join(dir, specifier + '.js'),
+ join(dir, specifier + '.mjs'),
+ join(dir, specifier, 'index.js'),
+ join(dir, specifier, 'index.mjs'),
+ ];
+ for (const c of candidates) {
+ if (existsSync(c) && statSync(c).isFile()) return c;
+ }
+ return null;
+}
+
function getImports(fp) {
if (!existsSync(fp)) return new Set();
- const c = readFileSync(fp, 'utf-8'), s = new Set();
- for (const m of c.matchAll(/(?:from|import)\s+["'](?:\.\.\/|\.\/)?(chunk-[^"']+\.mjs)["']/g)) s.add(m[1]);
- return s;
+ const content = readFileSync(fp, 'utf-8');
+ const paths = new Set();
+ for (const m of content.matchAll(/(?:from|import)\s+["'](\.\.?\/[^"']+)["']/g)) {
+ const resolved = resolveImport(fp, m[1]);
+ if (resolved) paths.add(resolved);
+ }
+ return paths;
}
-function allChunks(entry) {
- const v = new Set(), q = [entry], c = new Set();
+function allFiles(entry) {
+ const visited = new Set(), q = [entry];
while (q.length) {
const f = q.pop();
- if (v.has(f)) continue; v.add(f);
- for (const ch of getImports(f)) { c.add(ch); q.push(join(DIST, ch)); }
+ if (visited.has(f)) continue;
+ visited.add(f);
+ for (const dep of getImports(f)) q.push(dep);
}
- return c;
+ return visited;
}
async function fetchSize(pkg) {
@@ -55,67 +75,63 @@ async function fetchSize(pkg) {
}
function buildMap() {
- const comps = {}, cu = {};
+ const comps = {};
for (const n of readdirSync(DIST)) {
- const e = join(DIST, n, 'index.mjs');
+ const e = existsSync(join(DIST, n, 'index.js')) ? join(DIST, n, 'index.js') : join(DIST, n, 'index.mjs');
if (!existsSync(e)) continue;
- const ch = allChunks(e);
- comps[n] = {entry: gzSize(e), chunks: ch};
- for (const c of ch) { if (!cu[c]) cu[c] = new Set(); cu[c].add(n); }
+ const files = allFiles(e);
+ let totalRaw = 0, totalGzip = 0;
+ for (const f of files) {
+ const s = gzSize(f);
+ totalRaw += s.raw;
+ totalGzip += s.gzip;
+ }
+ comps[n] = {entry: gzSize(e), files, totalRaw, totalGzip, fileCount: files.size};
}
- return {comps, cu};
+ return comps;
}
-function measure(names, comps, cu) {
- const ac = new Set(); let eG=0,eR=0; const found=[];
+function measure(names, comps) {
+ const allDeps = new Set();
+ let tG = 0, tR = 0;
+ const found = [];
for (const n of names) {
const comp = comps[n];
- if (!comp) { console.warn(` \u26a0 "${n}" not found`); continue; }
+ if (!comp) { console.warn(` ⚠ "${n}" not found`); continue; }
found.push(n);
- eG += comp.entry.gzip; eR += comp.entry.raw;
- for (const ch of comp.chunks) ac.add(ch);
+ for (const f of comp.files) allDeps.add(f);
}
- const ts = new Set(found), excl = new Set(), shr = new Set();
- for (const ch of ac) {
- const u = cu[ch] || new Set();
- [...u].some(x => !ts.has(x)) ? shr.add(ch) : excl.add(ch);
+ for (const f of allDeps) {
+ const s = gzSize(f);
+ tG += s.gzip;
+ tR += s.raw;
}
- let xG=0,xR=0,sG=0,sR=0;
- for (const c of excl) { const s = gzSize(join(DIST,c)); xG+=s.gzip; xR+=s.raw; }
- for (const c of shr) { const s = gzSize(join(DIST,c)); sG+=s.gzip; sR+=s.raw; }
- const xdsCss = existsSync(join(DIST, 'xds.css')) ? gzSize(join(DIST, 'xds.css')) : {raw:0,gzip:0};
+ const xdsCss = existsSync(join(DIST, 'xds.css')) ? gzSize(join(DIST, 'xds.css')) : {raw: 0, gzip: 0};
return {
count: found.length, found,
- entries: {gzip:eG, raw:eR}, exclusive: {gzip:xG, raw:xR, count:excl.size},
- shared: {gzip:sG, raw:sR, count:shr.size}, xdsCss,
- foundation: {gzip:sG+xdsCss.gzip, raw:sR+xdsCss.raw},
- incremental: {gzip:eG+xG, raw:eR+xR},
- total: {gzip:sG+xdsCss.gzip+eG+xG, raw:sR+xdsCss.raw+eR+xR},
+ js: {gzip: tG, raw: tR, files: allDeps.size},
+ xdsCss,
+ total: {gzip: tG + xdsCss.gzip, raw: tR + xdsCss.raw},
};
}
function fmt(b) {
return b >= 102400 ? `${(b/1024).toFixed(0)} KB` : b >= 1024 ? `${(b/1024).toFixed(1)} KB` : `${b.toLocaleString()}B`;
}
-const pad = (s,n,a='left') => { s=String(s); return a==='right' ? s.padStart(n) : s.padEnd(n); };
+const pad = (s, n, a = 'left') => { s = String(s); return a === 'right' ? s.padStart(n) : s.padEnd(n); };
function printSet(label, r) {
console.log();
- console.log('\u2500'.repeat(65));
+ console.log('─'.repeat(65));
console.log(`${label} (${r.count} components)`);
- console.log('\u2500'.repeat(65));
- console.log(` Entries: ${pad(fmt(r.entries.gzip),10,'right')} (${r.count} files)`);
- console.log(` Exclusive chunks: ${pad(fmt(r.exclusive.gzip),10,'right')} (${r.exclusive.count} chunks)`);
- console.log(` Shared chunks: ${pad(fmt(r.shared.gzip),10,'right')} (${r.shared.count} chunks)`);
- console.log(` xds.css: ${pad(fmt(r.xdsCss.gzip),10,'right')}`);
- console.log();
- console.log(` Foundation: ${pad(fmt(r.foundation.gzip),10,'right')} (shared chunks + xds.css)`);
- console.log(` Incremental: ${pad(fmt(r.incremental.gzip),10,'right')} (entries + exclusive + CSS)`);
- console.log(` ${'\u2500'.repeat(16)}`);
- console.log(` Total shipped: ${pad(fmt(r.total.gzip),10,'right')}`);
+ console.log('─'.repeat(65));
+ console.log(` JS: ${pad(fmt(r.js.gzip), 10, 'right')} (${r.js.files} files)`);
+ console.log(` xds.css: ${pad(fmt(r.xdsCss.gzip), 10, 'right')}`);
+ console.log(` ${'─'.repeat(16)}`);
+ console.log(` Total shipped: ${pad(fmt(r.total.gzip), 10, 'right')}`);
}
-async function printCompare(mappings, comps, cu) {
+async function printCompare(mappings, comps) {
const hasMap = mappings.some(m => m.xds);
console.log('\nFetching sizes from bundlephobia...');
const results = [];
@@ -128,54 +144,53 @@ async function printCompare(mappings, comps, cu) {
if (!results.length) { console.error('No packages fetched.'); return; }
if (hasMap) {
const xn = results.filter(r => r.xds).map(r => r.xds);
- const xr = measure(xn, comps, cu);
- const et = results.reduce((s,r) => s + r.bp.gzip, 0);
+ const xr = measure(xn, comps);
+ const et = results.reduce((s, r) => s + r.bp.gzip, 0);
console.log(`\n${'='.repeat(75)}\nXDS vs External\n${'='.repeat(75)}\n`);
- console.log(`${pad('XDS',20)} ${pad('XDS gz',14,'right')} ${pad('Ext gz',14,'right')} ${pad('Package',25)}`);
+ console.log(`${pad('XDS', 20)} ${pad('XDS gz', 14, 'right')} ${pad('Ext gz', 14, 'right')} ${pad('Package', 25)}`);
console.log('-'.repeat(75));
let xt = 0;
for (const r of results) {
if (!r.xds) continue;
const comp = comps[r.xds]; if (!comp) continue;
- const x = comp.entry.gzip; xt += x;
- console.log(`${pad(r.xds,20)} ${pad(fmt(x),14,'right')} ${pad(fmt(r.bp.gzip),14,'right')} ${r.bp.name}@${r.bp.version}`);
+ xt += comp.totalGzip;
+ console.log(`${pad(r.xds, 20)} ${pad(fmt(comp.totalGzip), 14, 'right')} ${pad(fmt(r.bp.gzip), 14, 'right')} ${r.bp.name}@${r.bp.version}`);
}
console.log('-'.repeat(75));
- console.log(`${pad('Entry+CSS total',20)} ${pad(fmt(xt),14,'right')} ${pad(fmt(et),14,'right')}`);
+ console.log(`${pad('Total', 20)} ${pad(fmt(xt), 14, 'right')} ${pad(fmt(et), 14, 'right')}`);
printSet(`XDS (${xn.length} matched)`, xr);
console.log(`\n External total: ${fmt(et)} (JS only)`);
- console.log(` XDS marginal: ${fmt(xr.incremental.gzip)} (fully styled)`);
+ console.log(` XDS total: ${fmt(xr.js.gzip)} (JS, fully styled)`);
} else {
const an = Object.keys(comps);
- const xr = measure(an, comps, cu);
+ const xr = measure(an, comps);
console.log(`\n${'='.repeat(65)}\nLibrary Comparison\n${'='.repeat(65)}\n`);
- console.log(`${pad('Package',42)} ${pad('Min',10,'right')} ${pad('Gzip',10,'right')}`);
+ console.log(`${pad('Package', 42)} ${pad('Min', 10, 'right')} ${pad('Gzip', 10, 'right')}`);
console.log('-'.repeat(65));
- console.log(`${pad(`XDS @xds/core (${an.length} groups)`,42)} ${pad(fmt(xr.total.raw),10,'right')} ${pad(fmt(xr.total.gzip),10,'right')}`);
+ console.log(`${pad(`XDS @xds/core (${an.length} groups)`, 42)} ${pad(fmt(xr.total.raw), 10, 'right')} ${pad(fmt(xr.total.gzip), 10, 'right')}`);
for (const r of results)
- console.log(`${pad(`${r.bp.name}@${r.bp.version}`,42)} ${pad(fmt(r.bp.size),10,'right')} ${pad(fmt(r.bp.gzip),10,'right')}`);
+ console.log(`${pad(`${r.bp.name}@${r.bp.version}`, 42)} ${pad(fmt(r.bp.size), 10, 'right')} ${pad(fmt(r.bp.gzip), 10, 'right')}`);
}
}
-function printFull(comps, cu) {
+function printFull(comps) {
const an = Object.keys(comps).sort();
console.log(`${'='.repeat(75)}\nXDS BUNDLE SIZE ANALYSIS\n${'='.repeat(75)}\n`);
- console.log(`${pad('Component',22)} ${pad('Entry',8,'right')} ${pad('Chunks',8,'right')} ${pad('Solo',10,'right')} ${pad('#ch',5,'right')}`);
- console.log('-'.repeat(65));
+ console.log(`${pad('Component', 22)} ${pad('Solo', 10, 'right')} ${pad('Files', 6, 'right')}`);
+ console.log('-'.repeat(40));
const sorted = an.map(n => {
- const comp = comps[n]; let cg = 0;
- for (const ch of comp.chunks) cg += gzSize(join(DIST, ch)).gzip;
- return {n, e: comp.entry.gzip, cg, solo: comp.entry.gzip + cg, ch: comp.chunks.size};
+ const comp = comps[n];
+ return {n, solo: comp.totalGzip, files: comp.fileCount};
}).sort((a, b) => b.solo - a.solo);
for (const c of sorted)
- console.log(`${pad(c.n,22)} ${pad(fmt(c.e),8,'right')} ${pad(fmt(c.cg),8,'right')} ${pad(fmt(c.solo),10,'right')} ${pad(String(c.ch),5,'right')}`);
+ console.log(`${pad(c.n, 22)} ${pad(fmt(c.solo), 10, 'right')} ${pad(String(c.files), 6, 'right')}`);
const scenarios = [
- ['Small app (5)', ['Button','Text','Dialog','TextInput','Stack']],
- ['Medium app (15)', ['Button','Text','Dialog','TextInput','Stack','Table','DropdownMenu','Selector','TabList','Card','Badge','Avatar','Tooltip','Banner','Spinner']],
+ ['Small app (5)', ['Button', 'Text', 'Dialog', 'TextInput', 'Stack']],
+ ['Medium app (15)', ['Button', 'Text', 'Dialog', 'TextInput', 'Stack', 'Table', 'DropdownMenu', 'Selector', 'TabList', 'Card', 'Badge', 'Avatar', 'Tooltip', 'Banner', 'Spinner']],
['Full library', an],
];
console.log(`\n${'='.repeat(65)}\nSCENARIOS\n${'='.repeat(65)}`);
- for (const [l, ns] of scenarios) printSet(l, measure(ns, comps, cu));
+ for (const [l, ns] of scenarios) printSet(l, measure(ns, comps));
}
// Main
@@ -183,20 +198,20 @@ if (!existsSync(DIST)) { console.error('Run `pnpm build` first.'); process.exit(
const args = process.argv.slice(2);
const jsonMode = args.includes('--json');
const cmpIdx = args.indexOf('--compare');
-const {comps, cu} = buildMap();
+const comps = buildMap();
if (jsonMode) {
const ca = args.filter(a => !a.startsWith('--'));
- console.log(JSON.stringify(measure(ca.length ? ca : Object.keys(comps), comps, cu), null, 2));
+ console.log(JSON.stringify(measure(ca.length ? ca : Object.keys(comps), comps), null, 2));
} else if (cmpIdx !== -1) {
const ca = args.slice(cmpIdx + 1).filter(a => !a.startsWith('--'));
const mappings = ca.map(a => {
const [pkg, xds] = a.includes('=') ? a.split('=', 2) : [a, null];
return {pkg, xds};
});
- await printCompare(mappings, comps, cu);
+ await printCompare(mappings, comps);
} else {
const ca = args.filter(a => !a.startsWith('--'));
- if (ca.length) printSet('Custom set', measure(ca, comps, cu));
- else printFull(comps, cu);
+ if (ca.length) printSet('Custom set', measure(ca, comps));
+ else printFull(comps);
}
diff --git a/scripts/check-use-client.mjs b/scripts/check-use-client.mjs
index cf187730da..32f60dae68 100644
--- a/scripts/check-use-client.mjs
+++ b/scripts/check-use-client.mjs
@@ -5,8 +5,8 @@
* Source check: verify files using React client APIs have "use client"
* as their FIRST LINE (before any comments or JSDoc).
*
- * This ensures tsup (with splitting: false) preserves the directive
- * in each self-contained entry point.
+ * This ensures the Babel CLI 1:1 build preserves the directive
+ * in each output file.
*
* Usage: node scripts/check-use-client.mjs
*/
diff --git a/scripts/fix-use-client-dist.mjs b/scripts/fix-use-client-dist.mjs
deleted file mode 100644
index 5fc6a32814..0000000000
--- a/scripts/fix-use-client-dist.mjs
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env node
-// Copyright (c) Meta Platforms, Inc. and affiliates.
-
-/**
- * Post-build: ensure "use client" is the FIRST LINE of dist files that need it.
- * tsup may insert babel helpers before the directive — this moves it to line 1.
- *
- * Only patches files that already have "use client" somewhere in the first 50 lines.
- * Skips files that don't have it (like theme/tokens).
- */
-import fs from 'fs';
-import path from 'path';
-import {fileURLToPath} from 'url';
-
-const __dirname = path.dirname(fileURLToPath(import.meta.url));
-const DIST = path.resolve(__dirname, '../packages/core/dist');
-
-function walk(dir) {
- const results = [];
- for (const entry of fs.readdirSync(dir, {withFileTypes: true})) {
- const full = path.join(dir, entry.name);
- if (entry.isDirectory()) results.push(...walk(full));
- else if (entry.name.endsWith('.mjs') || entry.name.endsWith('.js')) results.push(full);
- }
- return results;
-}
-
-let fixed = 0;
-for (const file of walk(DIST)) {
- const content = fs.readFileSync(file, 'utf-8');
- const lines = content.split('\n');
-
- // Check if file has "use client" in first 50 lines but not on line 1
- const first50 = lines.slice(0, 50);
- const hasDirective = first50.some(l => l.trim() === "'use client';" || l.trim() === '"use client";');
- const isFirstLine = lines[0].trim() === "'use client';" || lines[0].trim() === '"use client";';
-
- if (hasDirective && !isFirstLine) {
- // Remove directive from wherever it is
- const filtered = lines.filter(l => l.trim() !== "'use client';" && l.trim() !== '"use client";');
- // Prepend at top
- const patched = '"use client";\n' + filtered.join('\n');
- fs.writeFileSync(file, patched);
- fixed++;
- }
-}
-
-console.log(`✅ Fixed "use client" position in ${fixed} dist files`);
diff --git a/scripts/postbuild-use-client.mjs b/scripts/postbuild-use-client.mjs
deleted file mode 100644
index be7ff9cd73..0000000000
--- a/scripts/postbuild-use-client.mjs
+++ /dev/null
@@ -1,141 +0,0 @@
-#!/usr/bin/env node
-// Copyright (c) Meta Platforms, Inc. and affiliates.
-
-/**
- * @file postbuild-use-client.mjs
- * @position Post-build script for @xds/core
- *
- * When tsup runs with `splitting: true`, esbuild creates shared chunks that
- * may combine code from 'use client' source files with non-client code. The
- * 'use client' directive is dropped from the output because esbuild doesn't
- * understand React directives.
- *
- * This script restores the directive by:
- * 1. Scanning source files to find which ones have 'use client'
- * 2. Reading the esbuild metafile (written by tsup with `metafile: true`)
- * 3. For each output file, checking if ANY of its inputs are client files
- * 4. Prepending 'use client';\n to matching output files
- *
- * Usage: node scripts/postbuild-use-client.mjs
- */
-
-import {readFileSync, writeFileSync, readdirSync, existsSync} from 'fs';
-import {join, relative, resolve} from 'path';
-
-// When called from package.json build script, cwd is packages/core/
-// When called from repo root, we need packages/core/
-// Detect based on whether src/ exists in cwd
-const CORE_DIR = existsSync(join(process.cwd(), 'src'))
- ? process.cwd()
- : resolve(process.cwd(), 'packages/core');
-const SRC_DIR = join(CORE_DIR, 'src');
-const DIST_DIR = join(CORE_DIR, 'dist');
-
-const PROCESSABLE_EXTS = ['.mjs', '.js', '.cjs'];
-const SKIP_PATTERNS = ['.d.ts', '.d.mts', '.d.cts', '.css', '.json', '.map'];
-
-function walkDir(dir) {
- const results = [];
- for (const entry of readdirSync(dir, {withFileTypes: true})) {
- const fullPath = join(dir, entry.name);
- if (entry.isDirectory()) {
- results.push(...walkDir(fullPath));
- } else {
- results.push(fullPath);
- }
- }
- return results;
-}
-
-function findClientSourceFiles() {
- const clientFiles = new Set();
- for (const filePath of walkDir(SRC_DIR)) {
- if (!/\.[jt]sx?$/.test(filePath)) continue;
- try {
- const content = readFileSync(filePath, 'utf8');
- const firstLine = content.split('\n')[0].trim();
- if (firstLine === "'use client';" || firstLine === '"use client";' ||
- firstLine === "'use client'" || firstLine === '"use client"') {
- clientFiles.add(relative(CORE_DIR, filePath));
- }
- } catch { /* skip */ }
- }
- return clientFiles;
-}
-
-function shouldProcess(filePath) {
- if (SKIP_PATTERNS.some(pat => filePath.endsWith(pat))) return false;
- return PROCESSABLE_EXTS.some(ext => filePath.endsWith(ext));
-}
-
-function hasUseClientDirective(content) {
- const firstLine = content.split('\n')[0].trim();
- return firstLine === "'use client';" || firstLine === '"use client";' ||
- firstLine === "'use client'" || firstLine === '"use client"';
-}
-
-function main() {
- console.log('postbuild-use-client: scanning for client directives...');
-
- const clientSourceFiles = findClientSourceFiles();
- console.log(` Found ${clientSourceFiles.size} source files with 'use client'`);
-
- const formats = ['esm', 'cjs'];
- let totalAdded = 0;
- let totalSkipped = 0;
- let totalProcessed = 0;
-
- for (const format of formats) {
- const metafilePath = join(DIST_DIR, `metafile-${format}.json`);
-
- if (!existsSync(metafilePath)) {
- console.log(` No metafile found at ${metafilePath}, skipping ${format} format`);
- continue;
- }
-
- const metafile = JSON.parse(readFileSync(metafilePath, 'utf8'));
- const outputs = metafile.outputs || {};
-
- for (const [outputPath, outputInfo] of Object.entries(outputs)) {
- const absoluteOutputPath = resolve(process.cwd(), outputPath);
- if (!shouldProcess(absoluteOutputPath)) continue;
- totalProcessed++;
-
- const inputs = outputInfo.inputs || {};
- let isClient = false;
- const corePrefix = relative(process.cwd(), CORE_DIR);
-
- for (const inputPath of Object.keys(inputs)) {
- let relToCore = inputPath;
- if (inputPath.startsWith(corePrefix + '/')) {
- relToCore = inputPath.slice(corePrefix.length + 1);
- }
- if (clientSourceFiles.has(relToCore)) {
- isClient = true;
- break;
- }
- }
-
- if (isClient) {
- try {
- const content = readFileSync(absoluteOutputPath, 'utf8');
- if (hasUseClientDirective(content)) {
- totalSkipped++;
- continue;
- }
- writeFileSync(absoluteOutputPath, `'use client';\n${content}`, 'utf8');
- totalAdded++;
- } catch (err) {
- console.error(` Error processing ${outputPath}: ${err.message}`);
- }
- }
- }
- }
-
- console.log(`postbuild-use-client: Added 'use client' to ${totalAdded} of ${totalProcessed} output files`);
- if (totalSkipped > 0) {
- console.log(` (${totalSkipped} files already had the directive)`);
- }
-}
-
-main();
diff --git a/scripts/sync-exports.js b/scripts/sync-exports.js
index 345dbb3fdb..b7f8f9eb5a 100644
--- a/scripts/sync-exports.js
+++ b/scripts/sync-exports.js
@@ -5,7 +5,7 @@
* @file sync-exports.js
* @description Auto-generates the "exports" map in packages/core/package.json
* from the source tree. Ensures every component with src/Component/index.ts
- * has correct export entries with source, types, import, and require conditions.
+ * has correct export entries with source, types, and default conditions.
*
* Usage:
* node scripts/sync-exports.js # Update package.json in place
@@ -19,8 +19,7 @@
* Condition ordering matters — Node.js resolves top-to-bottom:
* 1. "source" — for bundlers configured with the "source" condition
* 2. "types" — for TypeScript
- * 3. "import" — for ESM consumers
- * 4. "require" — for CJS consumers
+ * 3. "default" — for all JS consumers (ESM-only)
*/
const fs = require('fs');
@@ -66,14 +65,12 @@ const STATIC_EXPORTS = {
'./theme/tokens.stylex': {
source: './src/theme/tokens.stylex.ts',
types: './dist/theme/tokens.stylex.d.ts',
- import: './dist/theme/tokens.stylex.mjs',
- require: './dist/theme/tokens.stylex.js',
+ default: './dist/theme/tokens.stylex.js',
},
'./theme/syntax': {
source: './src/theme/syntax/index.ts',
types: './dist/theme/syntax/index.d.ts',
- import: './dist/theme/syntax/index.mjs',
- require: './dist/theme/syntax/index.js',
+ default: './dist/theme/syntax/index.js',
},
'./docs.mjs': './docs.mjs',
'./groups.doc.mjs': './groups.doc.mjs',
@@ -121,14 +118,13 @@ function discoverExportDirs() {
/**
* Generate the export entry for a directory.
- * Condition order: source → types → import → require
+ * Condition order: source → types → default
*/
function makeExportEntry(dirName) {
return {
source: `./src/${dirName}/index.ts`,
types: `./dist/${dirName}/index.d.ts`,
- import: `./dist/${dirName}/index.mjs`,
- require: `./dist/${dirName}/index.js`,
+ default: `./dist/${dirName}/index.js`,
};
}
@@ -142,8 +138,7 @@ function buildExports() {
exports['.'] = {
source: './src/index.ts',
types: './dist/index.d.ts',
- import: './dist/index.mjs',
- require: './dist/index.js',
+ default: './dist/index.js',
};
// Static exports (CSS, markdown, etc.)
@@ -165,8 +160,7 @@ function buildExports() {
exports[`./${dir}/utils`] = {
source: `./src/${dir}/utils.ts`,
types: `./dist/${dir}/utils.d.ts`,
- import: `./dist/${dir}/utils.mjs`,
- require: `./dist/${dir}/utils.js`,
+ default: `./dist/${dir}/utils.js`,
};
}