Skip to content

Commit 4ed6ff3

Browse files
fix: ECMAScript Modules in Node.js (radix-ui#2130)
* fix: ECMAScript Modules in Node.js * Create 12851a18.yml --------- Co-authored-by: Benoît Grélard <[email protected]>
1 parent 63d50b7 commit 4ed6ff3

File tree

61 files changed

+1194
-252
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1194
-252
lines changed

.yarn/versions/12851a18.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
releases:
2+
"@radix-ui/number": patch
3+
"@radix-ui/primitive": patch
4+
"@radix-ui/react-accessible-icon": patch
5+
"@radix-ui/react-accordion": patch
6+
"@radix-ui/react-alert-dialog": patch
7+
"@radix-ui/react-announce": patch
8+
"@radix-ui/react-arrow": patch
9+
"@radix-ui/react-aspect-ratio": patch
10+
"@radix-ui/react-avatar": patch
11+
"@radix-ui/react-checkbox": patch
12+
"@radix-ui/react-collapsible": patch
13+
"@radix-ui/react-collection": patch
14+
"@radix-ui/react-compose-refs": patch
15+
"@radix-ui/react-context": patch
16+
"@radix-ui/react-context-menu": patch
17+
"@radix-ui/react-dialog": patch
18+
"@radix-ui/react-direction": patch
19+
"@radix-ui/react-dismissable-layer": patch
20+
"@radix-ui/react-dropdown-menu": patch
21+
"@radix-ui/react-focus-guards": patch
22+
"@radix-ui/react-focus-scope": patch
23+
"@radix-ui/react-form": patch
24+
"@radix-ui/react-hover-card": patch
25+
"@radix-ui/react-id": patch
26+
"@radix-ui/react-label": patch
27+
"@radix-ui/react-menu": patch
28+
"@radix-ui/react-menubar": patch
29+
"@radix-ui/react-navigation-menu": patch
30+
"@radix-ui/react-popover": patch
31+
"@radix-ui/react-popper": patch
32+
"@radix-ui/react-portal": patch
33+
"@radix-ui/react-presence": patch
34+
"@radix-ui/react-primitive": patch
35+
"@radix-ui/react-progress": patch
36+
"@radix-ui/react-radio-group": patch
37+
"@radix-ui/react-roving-focus": patch
38+
"@radix-ui/react-scroll-area": patch
39+
"@radix-ui/react-select": patch
40+
"@radix-ui/react-separator": patch
41+
"@radix-ui/react-slider": patch
42+
"@radix-ui/react-slot": patch
43+
"@radix-ui/react-switch": patch
44+
"@radix-ui/react-tabs": patch
45+
"@radix-ui/react-toast": patch
46+
"@radix-ui/react-toggle": patch
47+
"@radix-ui/react-toggle-group": patch
48+
"@radix-ui/react-toolbar": patch
49+
"@radix-ui/react-tooltip": patch
50+
"@radix-ui/react-use-callback-ref": patch
51+
"@radix-ui/react-use-controllable-state": patch
52+
"@radix-ui/react-use-escape-keydown": patch
53+
"@radix-ui/react-use-layout-effect": patch
54+
"@radix-ui/react-use-previous": patch
55+
"@radix-ui/react-use-rect": patch
56+
"@radix-ui/react-use-size": patch
57+
"@radix-ui/react-visually-hidden": patch
58+
"@radix-ui/rect": patch
59+
60+
declined:
61+
- primitives

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"@testing-library/user-event": "^14.1.0",
5555
"@types/babel__template": "^7.4.1",
5656
"@types/eslint": "^7.28.0",
57+
"@types/fs-extra": "^11",
5758
"@types/jest": "^27.4.1",
5859
"@types/jest-axe": "^3.5.3",
5960
"@types/react": "^18.0.5",
@@ -73,6 +74,8 @@
7374
"eslint-plugin-jsx-a11y": "^6.3.1",
7475
"eslint-plugin-react": "^7.24.0",
7576
"eslint-plugin-react-hooks": "^4.2.0",
77+
"fs-extra": "^11.1.1",
78+
"glob": "^10.2.2",
7679
"husky": "^4.3.6",
7780
"jest": "^27.5.1",
7881
"jest-axe": "^6.0.0",

packages/core/number/package.json

+16-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22
"name": "@radix-ui/number",
33
"version": "1.0.0",
44
"license": "MIT",
5-
"source": "src/index.ts",
6-
"main": "dist/index.js",
7-
"module": "dist/index.module.js",
8-
"types": "dist/index.d.ts",
5+
"exports": {
6+
".": {
7+
"import": {
8+
"types": "./dist/index.d.mts",
9+
"default": "./dist/index.mjs"
10+
},
11+
"require": {
12+
"types": "./dist/index.d.ts",
13+
"default": "./dist/index.js"
14+
}
15+
}
16+
},
17+
"source": "./src/index.ts",
18+
"main": "./dist/index.js",
19+
"module": "./dist/index.mjs",
20+
"types": "./dist/index.d.ts",
921
"files": [
1022
"dist",
1123
"README.md"

packages/core/primitive/package.json

+16-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22
"name": "@radix-ui/primitive",
33
"version": "1.0.0",
44
"license": "MIT",
5-
"source": "src/index.ts",
6-
"main": "dist/index.js",
7-
"module": "dist/index.module.js",
8-
"types": "dist/index.d.ts",
5+
"exports": {
6+
".": {
7+
"import": {
8+
"types": "./dist/index.d.mts",
9+
"default": "./dist/index.mjs"
10+
},
11+
"require": {
12+
"types": "./dist/index.d.ts",
13+
"default": "./dist/index.js"
14+
}
15+
}
16+
},
17+
"source": "./src/index.ts",
18+
"main": "./dist/index.js",
19+
"module": "./dist/index.mjs",
20+
"types": "./dist/index.d.ts",
921
"files": [
1022
"dist",
1123
"README.md"

packages/core/rect/package.json

+16-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22
"name": "@radix-ui/rect",
33
"version": "1.0.0",
44
"license": "MIT",
5-
"source": "src/index.ts",
6-
"main": "dist/index.js",
7-
"module": "dist/index.module.js",
8-
"types": "dist/index.d.ts",
5+
"exports": {
6+
".": {
7+
"import": {
8+
"types": "./dist/index.d.mts",
9+
"default": "./dist/index.mjs"
10+
},
11+
"require": {
12+
"types": "./dist/index.d.ts",
13+
"default": "./dist/index.js"
14+
}
15+
}
16+
},
17+
"source": "./src/index.ts",
18+
"main": "./dist/index.js",
19+
"module": "./dist/index.mjs",
20+
"types": "./dist/index.d.ts",
921
"files": [
1022
"dist",
1123
"README.md"

packages/react/accessible-icon/package.json

+16-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22
"name": "@radix-ui/react-accessible-icon",
33
"version": "1.0.3-rc.5",
44
"license": "MIT",
5-
"source": "src/index.ts",
6-
"main": "dist/index.js",
7-
"module": "dist/index.module.js",
8-
"types": "dist/index.d.ts",
5+
"exports": {
6+
".": {
7+
"import": {
8+
"types": "./dist/index.d.mts",
9+
"default": "./dist/index.mjs"
10+
},
11+
"require": {
12+
"types": "./dist/index.d.ts",
13+
"default": "./dist/index.js"
14+
}
15+
}
16+
},
17+
"source": "./src/index.ts",
18+
"main": "./dist/index.js",
19+
"module": "./dist/index.mjs",
20+
"types": "./dist/index.d.ts",
921
"files": [
1022
"dist",
1123
"README.md"

packages/react/accordion/package.json

+16-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22
"name": "@radix-ui/react-accordion",
33
"version": "1.1.2-rc.5",
44
"license": "MIT",
5-
"source": "src/index.ts",
6-
"main": "dist/index.js",
7-
"module": "dist/index.module.js",
8-
"types": "dist/index.d.ts",
5+
"exports": {
6+
".": {
7+
"import": {
8+
"types": "./dist/index.d.mts",
9+
"default": "./dist/index.mjs"
10+
},
11+
"require": {
12+
"types": "./dist/index.d.ts",
13+
"default": "./dist/index.js"
14+
}
15+
}
16+
},
17+
"source": "./src/index.ts",
18+
"main": "./dist/index.js",
19+
"module": "./dist/index.mjs",
20+
"types": "./dist/index.d.ts",
921
"files": [
1022
"dist",
1123
"README.md"

packages/react/alert-dialog/package.json

+16-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22
"name": "@radix-ui/react-alert-dialog",
33
"version": "1.0.4-rc.6",
44
"license": "MIT",
5-
"source": "src/index.ts",
6-
"main": "dist/index.js",
7-
"module": "dist/index.module.js",
8-
"types": "dist/index.d.ts",
5+
"exports": {
6+
".": {
7+
"import": {
8+
"types": "./dist/index.d.mts",
9+
"default": "./dist/index.mjs"
10+
},
11+
"require": {
12+
"types": "./dist/index.d.ts",
13+
"default": "./dist/index.js"
14+
}
15+
}
16+
},
17+
"source": "./src/index.ts",
18+
"main": "./dist/index.js",
19+
"module": "./dist/index.mjs",
20+
"types": "./dist/index.d.ts",
921
"files": [
1022
"src",
1123
"dist"

packages/react/announce/package.json

+16-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22
"name": "@radix-ui/react-announce",
33
"version": "0.1.8-rc.5",
44
"license": "MIT",
5-
"source": "src/index.ts",
6-
"main": "dist/index.js",
7-
"module": "dist/index.module.js",
8-
"types": "dist/index.d.ts",
5+
"exports": {
6+
".": {
7+
"import": {
8+
"types": "./dist/index.d.mts",
9+
"default": "./dist/index.mjs"
10+
},
11+
"require": {
12+
"types": "./dist/index.d.ts",
13+
"default": "./dist/index.js"
14+
}
15+
}
16+
},
17+
"source": "./src/index.ts",
18+
"main": "./dist/index.js",
19+
"module": "./dist/index.mjs",
20+
"types": "./dist/index.d.ts",
921
"files": [
1022
"dist",
1123
"README.md"

packages/react/arrow/package.json

+16-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22
"name": "@radix-ui/react-arrow",
33
"version": "1.0.3-rc.5",
44
"license": "MIT",
5-
"source": "src/index.ts",
6-
"main": "dist/index.js",
7-
"module": "dist/index.module.js",
8-
"types": "dist/index.d.ts",
5+
"exports": {
6+
".": {
7+
"import": {
8+
"types": "./dist/index.d.mts",
9+
"default": "./dist/index.mjs"
10+
},
11+
"require": {
12+
"types": "./dist/index.d.ts",
13+
"default": "./dist/index.js"
14+
}
15+
}
16+
},
17+
"source": "./src/index.ts",
18+
"main": "./dist/index.js",
19+
"module": "./dist/index.mjs",
20+
"types": "./dist/index.d.ts",
921
"files": [
1022
"dist",
1123
"README.md"

packages/react/aspect-ratio/package.json

+16-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22
"name": "@radix-ui/react-aspect-ratio",
33
"version": "1.0.3-rc.5",
44
"license": "MIT",
5-
"source": "src/index.ts",
6-
"main": "dist/index.js",
7-
"module": "dist/index.module.js",
8-
"types": "dist/index.d.ts",
5+
"exports": {
6+
".": {
7+
"import": {
8+
"types": "./dist/index.d.mts",
9+
"default": "./dist/index.mjs"
10+
},
11+
"require": {
12+
"types": "./dist/index.d.ts",
13+
"default": "./dist/index.js"
14+
}
15+
}
16+
},
17+
"source": "./src/index.ts",
18+
"main": "./dist/index.js",
19+
"module": "./dist/index.mjs",
20+
"types": "./dist/index.d.ts",
921
"files": [
1022
"dist",
1123
"README.md"

packages/react/avatar/package.json

+16-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22
"name": "@radix-ui/react-avatar",
33
"version": "1.0.3-rc.5",
44
"license": "MIT",
5-
"source": "src/index.ts",
6-
"main": "dist/index.js",
7-
"module": "dist/index.module.js",
8-
"types": "dist/index.d.ts",
5+
"exports": {
6+
".": {
7+
"import": {
8+
"types": "./dist/index.d.mts",
9+
"default": "./dist/index.mjs"
10+
},
11+
"require": {
12+
"types": "./dist/index.d.ts",
13+
"default": "./dist/index.js"
14+
}
15+
}
16+
},
17+
"source": "./src/index.ts",
18+
"main": "./dist/index.js",
19+
"module": "./dist/index.mjs",
20+
"types": "./dist/index.d.ts",
921
"files": [
1022
"dist",
1123
"README.md"

packages/react/checkbox/package.json

+16-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@
22
"name": "@radix-ui/react-checkbox",
33
"version": "1.0.4-rc.5",
44
"license": "MIT",
5-
"source": "src/index.ts",
6-
"main": "dist/index.js",
7-
"module": "dist/index.module.js",
8-
"types": "dist/index.d.ts",
5+
"exports": {
6+
".": {
7+
"import": {
8+
"types": "./dist/index.d.mts",
9+
"default": "./dist/index.mjs"
10+
},
11+
"require": {
12+
"types": "./dist/index.d.ts",
13+
"default": "./dist/index.js"
14+
}
15+
}
16+
},
17+
"source": "./src/index.ts",
18+
"main": "./dist/index.js",
19+
"module": "./dist/index.mjs",
20+
"types": "./dist/index.d.ts",
921
"files": [
1022
"dist",
1123
"README.md"

0 commit comments

Comments
 (0)