Skip to content

Commit e147dc6

Browse files
authored
Merge pull request #11059 from marmelab/fix-exports-2
Fix package exports
2 parents d2c69e8 + 37f1b45 commit e147dc6

File tree

20 files changed

+1123
-951
lines changed

20 files changed

+1123
-951
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,11 @@ build-create-react-admin:
112112
@echo "Transpiling create-react-admin files...";
113113
@cd ./packages/create-react-admin && yarn build
114114

115-
build: build-ra-core build-ra-data-fakerest build-ra-ui-materialui build-ra-data-json-server build-ra-data-local-forage build-ra-data-local-storage build-ra-data-simple-rest build-ra-data-graphql build-ra-data-graphql-simple build-ra-input-rich-text build-data-generator build-ra-language-english build-ra-language-french build-ra-i18n-i18next build-ra-i18n-polyglot build-react-admin build-ra-no-code build-create-react-admin ## compile ES6 files to JS
115+
update-package-exports: ## Update the package.json "exports" field for all packages
116+
@echo "Updating package exports..."
117+
@yarn tsx ./scripts/update-package-exports.ts
118+
119+
build: build-ra-core build-ra-data-fakerest build-ra-ui-materialui build-ra-data-json-server build-ra-data-local-forage build-ra-data-local-storage build-ra-data-simple-rest build-ra-data-graphql build-ra-data-graphql-simple build-ra-input-rich-text build-data-generator build-ra-language-english build-ra-language-french build-ra-i18n-i18next build-ra-i18n-polyglot build-react-admin build-ra-no-code build-create-react-admin update-package-exports ## compile ES6 files to JS
116120

117121
doc: ## compile doc as html and launch doc web server
118122
@yarn doc
Lines changed: 40 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,43 @@
11
{
2-
"name": "data-generator-retail",
3-
"version": "5.13.1",
4-
"homepage": "https://github.com/marmelab/react-admin/tree/master/examples/data-generator",
5-
"bugs": "https://github.com/marmelab/react-admin/issues",
6-
"license": "MIT",
7-
"zshy": "./src/index.ts",
8-
"main": "./dist/index.cjs",
9-
"module": "./dist/index.js",
10-
"types": "./dist/index.d.cts",
11-
"type": "module",
12-
"scripts": {
13-
"build": "zshy"
14-
},
15-
"dependencies": {
16-
"@faker-js/faker": "^10.0.0",
17-
"date-fns": "^3.6.0"
18-
},
19-
"devDependencies": {
20-
"ra-core": "^5.13.1",
21-
"typescript": "^5.1.3",
22-
"zshy": "^0.4.4"
23-
},
24-
"peerDependencies": {
25-
"ra-core": "^5.0.0"
26-
},
27-
"gitHead": "587df4c27bfcec4a756df4f95e5fc14728dfc0d7",
28-
"files": [
29-
"dist"
30-
],
31-
"exports": {
32-
".": {
33-
"types": "./dist/index.d.cts",
34-
"import": "./dist/index.js",
35-
"require": "./dist/index.cjs"
36-
}
2+
"name": "data-generator-retail",
3+
"version": "5.13.1",
4+
"homepage": "https://github.com/marmelab/react-admin/tree/master/examples/data-generator",
5+
"bugs": "https://github.com/marmelab/react-admin/issues",
6+
"license": "MIT",
7+
"zshy": "./src/index.ts",
8+
"main": "./dist/index.cjs",
9+
"module": "./dist/index.js",
10+
"types": "./dist/index.d.cts",
11+
"type": "module",
12+
"scripts": {
13+
"build": "zshy --silent"
14+
},
15+
"dependencies": {
16+
"@faker-js/faker": "^10.0.0",
17+
"date-fns": "^3.6.0"
18+
},
19+
"devDependencies": {
20+
"ra-core": "^5.13.1",
21+
"typescript": "^5.1.3",
22+
"zshy": "^0.5.0"
23+
},
24+
"peerDependencies": {
25+
"ra-core": "^5.0.0"
26+
},
27+
"gitHead": "587df4c27bfcec4a756df4f95e5fc14728dfc0d7",
28+
"files": [
29+
"dist"
30+
],
31+
"exports": {
32+
".": {
33+
"import": {
34+
"types": "./dist/index.d.ts",
35+
"default": "./dist/index.js"
36+
},
37+
"require": {
38+
"types": "./dist/index.d.cts",
39+
"default": "./dist/index.cjs"
40+
}
3741
}
42+
}
3843
}

packages/ra-core/package.json

Lines changed: 81 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,83 @@
11
{
2-
"name": "ra-core",
3-
"version": "5.13.1",
4-
"description": "Core components of react-admin, a frontend Framework for building admin applications on top of REST services, using ES6, React",
5-
"files": [
6-
"*.md",
7-
"dist",
8-
"src",
9-
"codemods"
10-
],
11-
"zshy": "./src/index.ts",
12-
"main": "./dist/index.cjs",
13-
"module": "./dist/index.js",
14-
"types": "./dist/index.d.cts",
15-
"type": "module",
16-
"exports": {
17-
".": {
18-
"types": "./dist/index.d.cts",
19-
"import": "./dist/index.js",
20-
"require": "./dist/index.cjs"
21-
}
22-
},
23-
"sideEffects": false,
24-
"authors": [
25-
"François Zaninotto",
26-
"Gildas Garcia"
27-
],
28-
"repository": "marmelab/react-admin",
29-
"homepage": "https://github.com/marmelab/react-admin#readme",
30-
"bugs": "https://github.com/marmelab/react-admin/issues",
31-
"license": "MIT",
32-
"scripts": {
33-
"build": "zshy"
34-
},
35-
"devDependencies": {
36-
"@hookform/resolvers": "^3.2.0",
37-
"@tanstack/react-query": "^5.90.2",
38-
"@tanstack/react-query-devtools": "^5.90.2",
39-
"@testing-library/react": "^15.0.7",
40-
"@types/jest": "^29.5.2",
41-
"@types/jscodeshift": "^0.11.11",
42-
"@types/node": "^20.10.7",
43-
"@types/node-polyglot": "^0.4.31",
44-
"@types/react": "^18.3.3",
45-
"echarts": "^5.6.0",
46-
"expect": "^27.4.6",
47-
"ignore-styles": "~5.0.1",
48-
"jscodeshift": "^0.15.2",
49-
"react": "^18.3.1",
50-
"react-dom": "^18.3.1",
51-
"react-hook-form": "^7.65.0",
52-
"react-router": "^6.28.1",
53-
"react-router-dom": "^6.28.1",
54-
"typescript": "^5.1.3",
55-
"yup": "^0.32.11",
56-
"zod": "^3.22.1",
57-
"zshy": "^0.4.4"
58-
},
59-
"peerDependencies": {
60-
"react": "^18.0.0 || ^19.0.0",
61-
"react-dom": "^18.0.0 || ^19.0.0",
62-
"react-hook-form": "^7.65.0",
63-
"react-router": "^6.28.1 || ^7.1.1",
64-
"react-router-dom": "^6.28.1 || ^7.1.1"
65-
},
66-
"dependencies": {
67-
"@tanstack/react-query": "^5.83.0",
68-
"date-fns": "^3.6.0",
69-
"eventemitter3": "^5.0.1",
70-
"inflection": "^3.0.0",
71-
"jsonexport": "^3.2.0",
72-
"lodash": "^4.17.21",
73-
"query-string": "^7.1.3",
74-
"react-error-boundary": "^4.0.13",
75-
"react-is": "^18.2.0 || ^19.0.0"
76-
},
77-
"gitHead": "587df4c27bfcec4a756df4f95e5fc14728dfc0d7"
2+
"name": "ra-core",
3+
"version": "5.13.1",
4+
"description": "Core components of react-admin, a frontend Framework for building admin applications on top of REST services, using ES6, React",
5+
"files": [
6+
"*.md",
7+
"dist",
8+
"src",
9+
"codemods"
10+
],
11+
"zshy": "./src/index.ts",
12+
"main": "./dist/index.cjs",
13+
"module": "./dist/index.js",
14+
"types": "./dist/index.d.cts",
15+
"type": "module",
16+
"exports": {
17+
".": {
18+
"import": {
19+
"types": "./dist/index.d.ts",
20+
"default": "./dist/index.js"
21+
},
22+
"require": {
23+
"types": "./dist/index.d.cts",
24+
"default": "./dist/index.cjs"
25+
}
26+
}
27+
},
28+
"sideEffects": false,
29+
"authors": [
30+
"François Zaninotto",
31+
"Gildas Garcia"
32+
],
33+
"repository": "marmelab/react-admin",
34+
"homepage": "https://github.com/marmelab/react-admin#readme",
35+
"bugs": "https://github.com/marmelab/react-admin/issues",
36+
"license": "MIT",
37+
"scripts": {
38+
"build": "zshy --silent"
39+
},
40+
"devDependencies": {
41+
"@hookform/resolvers": "^3.2.0",
42+
"@tanstack/react-query": "^5.90.2",
43+
"@tanstack/react-query-devtools": "^5.90.2",
44+
"@testing-library/react": "^15.0.7",
45+
"@types/jest": "^29.5.2",
46+
"@types/jscodeshift": "^0.11.11",
47+
"@types/node": "^20.10.7",
48+
"@types/node-polyglot": "^0.4.31",
49+
"@types/react": "^18.3.3",
50+
"echarts": "^5.6.0",
51+
"expect": "^27.4.6",
52+
"ignore-styles": "~5.0.1",
53+
"jscodeshift": "^0.15.2",
54+
"react": "^18.3.1",
55+
"react-dom": "^18.3.1",
56+
"react-hook-form": "^7.65.0",
57+
"react-router": "^6.28.1",
58+
"react-router-dom": "^6.28.1",
59+
"typescript": "^5.1.3",
60+
"yup": "^0.32.11",
61+
"zod": "^3.22.1",
62+
"zshy": "^0.5.0"
63+
},
64+
"peerDependencies": {
65+
"@tanstack/react-query": "^5.83.0",
66+
"react": "^18.0.0 || ^19.0.0",
67+
"react-dom": "^18.0.0 || ^19.0.0",
68+
"react-hook-form": "^7.65.0",
69+
"react-router": "^6.28.1 || ^7.1.1",
70+
"react-router-dom": "^6.28.1 || ^7.1.1"
71+
},
72+
"dependencies": {
73+
"date-fns": "^3.6.0",
74+
"eventemitter3": "^5.0.1",
75+
"inflection": "^3.0.0",
76+
"jsonexport": "^3.2.0",
77+
"lodash": "^4.17.21",
78+
"query-string": "^7.1.3",
79+
"react-error-boundary": "^4.0.13",
80+
"react-is": "^18.2.0 || ^19.0.0"
81+
},
82+
"gitHead": "587df4c27bfcec4a756df4f95e5fc14728dfc0d7"
7883
}
Lines changed: 61 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,64 @@
11
{
2-
"name": "ra-data-fakerest",
3-
"version": "5.13.1",
4-
"description": "JSON Server data provider for react-admin",
5-
"zshy": "./src/index.ts",
6-
"main": "./dist/index.cjs",
7-
"module": "./dist/index.js",
8-
"types": "./dist/index.d.cts",
9-
"type": "module",
10-
"sideEffects": false,
11-
"files": [
12-
"LICENSE",
13-
"*.md",
14-
"dist",
15-
"src"
16-
],
17-
"repository": {
18-
"type": "git",
19-
"url": "git+https://github.com/marmelab/react-admin.git"
20-
},
21-
"keywords": [
22-
"reactjs",
23-
"react",
24-
"react-admin",
25-
"rest",
26-
"fakerest",
27-
"local"
28-
],
29-
"author": "François Zaninotto",
30-
"license": "MIT",
31-
"bugs": {
32-
"url": "https://github.com/marmelab/react-admin/issues"
33-
},
34-
"homepage": "https://github.com/marmelab/react-admin#readme",
35-
"scripts": {
36-
"build": "zshy"
37-
},
38-
"dependencies": {
39-
"fakerest": "^4.0.1"
40-
},
41-
"devDependencies": {
42-
"@types/jest": "^29.5.2",
43-
"expect": "^27.4.6",
44-
"ra-core": "^5.13.1",
45-
"typescript": "^5.1.3",
46-
"zshy": "^0.4.4"
47-
},
48-
"peerDependencies": {
49-
"ra-core": "^5.0.0"
50-
},
51-
"gitHead": "587df4c27bfcec4a756df4f95e5fc14728dfc0d7",
52-
"exports": {
53-
".": {
54-
"types": "./dist/index.d.cts",
55-
"import": "./dist/index.js",
56-
"require": "./dist/index.cjs"
57-
}
2+
"name": "ra-data-fakerest",
3+
"version": "5.13.1",
4+
"description": "JSON Server data provider for react-admin",
5+
"zshy": "./src/index.ts",
6+
"main": "./dist/index.cjs",
7+
"module": "./dist/index.js",
8+
"types": "./dist/index.d.cts",
9+
"type": "module",
10+
"sideEffects": false,
11+
"files": [
12+
"LICENSE",
13+
"*.md",
14+
"dist",
15+
"src"
16+
],
17+
"repository": {
18+
"type": "git",
19+
"url": "git+https://github.com/marmelab/react-admin.git"
20+
},
21+
"keywords": [
22+
"reactjs",
23+
"react",
24+
"react-admin",
25+
"rest",
26+
"fakerest",
27+
"local"
28+
],
29+
"author": "François Zaninotto",
30+
"license": "MIT",
31+
"bugs": {
32+
"url": "https://github.com/marmelab/react-admin/issues"
33+
},
34+
"homepage": "https://github.com/marmelab/react-admin#readme",
35+
"scripts": {
36+
"build": "zshy --silent"
37+
},
38+
"dependencies": {
39+
"fakerest": "^4.0.1"
40+
},
41+
"devDependencies": {
42+
"@types/jest": "^29.5.2",
43+
"expect": "^27.4.6",
44+
"ra-core": "^5.13.1",
45+
"typescript": "^5.1.3",
46+
"zshy": "^0.5.0"
47+
},
48+
"peerDependencies": {
49+
"ra-core": "^5.0.0"
50+
},
51+
"gitHead": "587df4c27bfcec4a756df4f95e5fc14728dfc0d7",
52+
"exports": {
53+
".": {
54+
"import": {
55+
"types": "./dist/index.d.ts",
56+
"default": "./dist/index.js"
57+
},
58+
"require": {
59+
"types": "./dist/index.d.cts",
60+
"default": "./dist/index.cjs"
61+
}
5862
}
63+
}
5964
}

0 commit comments

Comments
 (0)