From 2a668946e94a960e1276162669eaedbdc5a1857c Mon Sep 17 00:00:00 2001 From: Bnaya Peretz Date: Tue, 15 Oct 2019 01:48:39 +0300 Subject: [PATCH] Iteration --- examples/data-generator/tsconfig.esm.json | 3 +++ package.json | 9 +++++---- packages/ra-core/tsconfig.esm.json | 3 ++- packages/ra-core/tsconfig.json | 3 ++- packages/ra-data-fakerest/tsconfig.esm.json | 5 ++++- packages/ra-data-fakerest/tsconfig.json | 5 ++++- packages/ra-data-graphcool/tsconfig.esm.json | 5 ++++- packages/ra-data-graphcool/tsconfig.json | 5 ++++- .../ra-data-graphql-simple/tsconfig.esm.json | 5 ++++- packages/ra-data-graphql-simple/tsconfig.json | 5 ++++- packages/ra-data-graphql/tsconfig.esm.json | 5 ++++- packages/ra-data-graphql/tsconfig.json | 5 ++++- packages/ra-data-json-server/tsconfig.esm.json | 5 ++++- packages/ra-data-json-server/tsconfig.json | 5 ++++- packages/ra-data-simple-rest/tsconfig.esm.json | 5 ++++- packages/ra-data-simple-rest/tsconfig.json | 5 ++++- packages/ra-i18n-polyglot/tsconfig.esm.json | 5 ++++- packages/ra-i18n-polyglot/tsconfig.json | 5 ++++- packages/ra-input-rich-text/tsconfig.esm.json | 6 +++++- packages/ra-input-rich-text/tsconfig.json | 6 +++++- packages/ra-realtime/tsconfig.esm.json | 6 +++++- packages/ra-realtime/tsconfig.json | 6 +++++- .../ra-tree-ui-materialui/tsconfig.esm.json | 7 ++++++- packages/ra-tree-ui-materialui/tsconfig.json | 7 ++++++- packages/ra-ui-materialui/tsconfig.esm.json | 5 ++++- packages/ra-ui-materialui/tsconfig.json | 5 ++++- packages/react-admin/tsconfig.esm.json | 7 ++++++- packages/react-admin/tsconfig.json | 7 ++++++- tsconfig.base.esm.json | 18 +----------------- tsconfig.base.json | 18 +----------------- tsconfig.build-all.all.json | 11 +++++++++++ tsconfig.json => tsconfig.build-all.cjs.json | 6 +++--- ...fig.esm.json => tsconfig.build-all.esm.json | 0 33 files changed, 136 insertions(+), 67 deletions(-) create mode 100644 examples/data-generator/tsconfig.esm.json create mode 100644 tsconfig.build-all.all.json rename tsconfig.json => tsconfig.build-all.cjs.json (95%) rename tsconfig.esm.json => tsconfig.build-all.esm.json (100%) diff --git a/examples/data-generator/tsconfig.esm.json b/examples/data-generator/tsconfig.esm.json new file mode 100644 index 00000000000..970d4f77610 --- /dev/null +++ b/examples/data-generator/tsconfig.esm.json @@ -0,0 +1,3 @@ +{ + "extends": "./tsconfig" +} diff --git a/package.json b/package.json index b08b25a5627..ea4e87736f0 100644 --- a/package.json +++ b/package.json @@ -16,11 +16,12 @@ "run-tutorial": "yarn run -s build && cd examples/tutorial && yarn -s start", "run-demo": "cd examples/demo && cross-env REACT_APP_DATA_PROVIDER=rest yarn -s start", "run-graphql-demo": "cd examples/demo && cross-env REACT_APP_DATA_PROVIDER=graphql yarn -s start", - "build-with-composite": "yarn tsc --build", - "build-with-composite-esm": "yarn tsc --build tsconfig.esm.json --incremental", - "watch-with-composite": "yarn tsc --build --incremental --watch", + "build-with-composite": "yarn tsc --build tsconfig.build-all.all.json", + "watch-with-composite": "yarn tsc --build tsconfig.build-all.all.json --incremental --watch", + "cleanup": "lerna exec --parallel \"rm -fr lib && rm -fr esm\"", "validate-emitted-declarations": "tsc -p declarationsSanityTest/tsconfig.json", - "cleanup": "lerna exec --parallel \"rm -fr lib && rm -fr esm\"" + "validate-project-refs": "yarn cleanup && yarn lerna exec --no-bail --concurrency 1 \"cd ../../ yarn cleanup && cd - && tsc --build tsconfig.json\"", + "validate-project-refs-esm": "yarn cleanup && yarn lerna exec --no-bail --concurrency 1 \"cd ../../ yarn cleanup && cd - && tsc --build tsconfig.esm.json\"" }, "jest": { "setupFilesAfterEnv": [ diff --git a/packages/ra-core/tsconfig.esm.json b/packages/ra-core/tsconfig.esm.json index 6ac899081cc..ba3e10429ea 100644 --- a/packages/ra-core/tsconfig.esm.json +++ b/packages/ra-core/tsconfig.esm.json @@ -6,5 +6,6 @@ "tsBuildInfoFile": "./esm/.tsbuildinfo" }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [] } diff --git a/packages/ra-core/tsconfig.json b/packages/ra-core/tsconfig.json index 3b27da693ea..c5a31223622 100644 --- a/packages/ra-core/tsconfig.json +++ b/packages/ra-core/tsconfig.json @@ -6,5 +6,6 @@ "tsBuildInfoFile": "./lib/.tsbuildinfo" }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [] } diff --git a/packages/ra-data-fakerest/tsconfig.esm.json b/packages/ra-data-fakerest/tsconfig.esm.json index 6ac899081cc..41685dd2632 100644 --- a/packages/ra-data-fakerest/tsconfig.esm.json +++ b/packages/ra-data-fakerest/tsconfig.esm.json @@ -6,5 +6,8 @@ "tsBuildInfoFile": "./esm/.tsbuildinfo" }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/" }, + ] } diff --git a/packages/ra-data-fakerest/tsconfig.json b/packages/ra-data-fakerest/tsconfig.json index 3b27da693ea..098160a4bf1 100644 --- a/packages/ra-data-fakerest/tsconfig.json +++ b/packages/ra-data-fakerest/tsconfig.json @@ -6,5 +6,8 @@ "tsBuildInfoFile": "./lib/.tsbuildinfo" }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/tsconfig.json" }, + ] } diff --git a/packages/ra-data-graphcool/tsconfig.esm.json b/packages/ra-data-graphcool/tsconfig.esm.json index 67e71c99dac..384eb5a9f7e 100644 --- a/packages/ra-data-graphcool/tsconfig.esm.json +++ b/packages/ra-data-graphcool/tsconfig.esm.json @@ -7,5 +7,8 @@ "checkJs": false }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/" }, + ] } diff --git a/packages/ra-data-graphcool/tsconfig.json b/packages/ra-data-graphcool/tsconfig.json index 67228298bea..0dea68eaa8e 100644 --- a/packages/ra-data-graphcool/tsconfig.json +++ b/packages/ra-data-graphcool/tsconfig.json @@ -7,5 +7,8 @@ "checkJs": false }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/tsconfig.json" }, + ] } diff --git a/packages/ra-data-graphql-simple/tsconfig.esm.json b/packages/ra-data-graphql-simple/tsconfig.esm.json index 67e71c99dac..384eb5a9f7e 100644 --- a/packages/ra-data-graphql-simple/tsconfig.esm.json +++ b/packages/ra-data-graphql-simple/tsconfig.esm.json @@ -7,5 +7,8 @@ "checkJs": false }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/" }, + ] } diff --git a/packages/ra-data-graphql-simple/tsconfig.json b/packages/ra-data-graphql-simple/tsconfig.json index 67228298bea..0dea68eaa8e 100644 --- a/packages/ra-data-graphql-simple/tsconfig.json +++ b/packages/ra-data-graphql-simple/tsconfig.json @@ -7,5 +7,8 @@ "checkJs": false }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/tsconfig.json" }, + ] } diff --git a/packages/ra-data-graphql/tsconfig.esm.json b/packages/ra-data-graphql/tsconfig.esm.json index 67e71c99dac..384eb5a9f7e 100644 --- a/packages/ra-data-graphql/tsconfig.esm.json +++ b/packages/ra-data-graphql/tsconfig.esm.json @@ -7,5 +7,8 @@ "checkJs": false }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/" }, + ] } diff --git a/packages/ra-data-graphql/tsconfig.json b/packages/ra-data-graphql/tsconfig.json index 67228298bea..0dea68eaa8e 100644 --- a/packages/ra-data-graphql/tsconfig.json +++ b/packages/ra-data-graphql/tsconfig.json @@ -7,5 +7,8 @@ "checkJs": false }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/tsconfig.json" }, + ] } diff --git a/packages/ra-data-json-server/tsconfig.esm.json b/packages/ra-data-json-server/tsconfig.esm.json index 6ac899081cc..41685dd2632 100644 --- a/packages/ra-data-json-server/tsconfig.esm.json +++ b/packages/ra-data-json-server/tsconfig.esm.json @@ -6,5 +6,8 @@ "tsBuildInfoFile": "./esm/.tsbuildinfo" }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/" }, + ] } diff --git a/packages/ra-data-json-server/tsconfig.json b/packages/ra-data-json-server/tsconfig.json index 3b27da693ea..098160a4bf1 100644 --- a/packages/ra-data-json-server/tsconfig.json +++ b/packages/ra-data-json-server/tsconfig.json @@ -6,5 +6,8 @@ "tsBuildInfoFile": "./lib/.tsbuildinfo" }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/tsconfig.json" }, + ] } diff --git a/packages/ra-data-simple-rest/tsconfig.esm.json b/packages/ra-data-simple-rest/tsconfig.esm.json index 6ac899081cc..41685dd2632 100644 --- a/packages/ra-data-simple-rest/tsconfig.esm.json +++ b/packages/ra-data-simple-rest/tsconfig.esm.json @@ -6,5 +6,8 @@ "tsBuildInfoFile": "./esm/.tsbuildinfo" }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/" }, + ] } diff --git a/packages/ra-data-simple-rest/tsconfig.json b/packages/ra-data-simple-rest/tsconfig.json index 3b27da693ea..098160a4bf1 100644 --- a/packages/ra-data-simple-rest/tsconfig.json +++ b/packages/ra-data-simple-rest/tsconfig.json @@ -6,5 +6,8 @@ "tsBuildInfoFile": "./lib/.tsbuildinfo" }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/tsconfig.json" }, + ] } diff --git a/packages/ra-i18n-polyglot/tsconfig.esm.json b/packages/ra-i18n-polyglot/tsconfig.esm.json index 6ac899081cc..41685dd2632 100644 --- a/packages/ra-i18n-polyglot/tsconfig.esm.json +++ b/packages/ra-i18n-polyglot/tsconfig.esm.json @@ -6,5 +6,8 @@ "tsBuildInfoFile": "./esm/.tsbuildinfo" }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/" }, + ] } diff --git a/packages/ra-i18n-polyglot/tsconfig.json b/packages/ra-i18n-polyglot/tsconfig.json index 3b27da693ea..58d0e94a9c2 100644 --- a/packages/ra-i18n-polyglot/tsconfig.json +++ b/packages/ra-i18n-polyglot/tsconfig.json @@ -6,5 +6,8 @@ "tsBuildInfoFile": "./lib/.tsbuildinfo" }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/tsconfig.json" } + ] } diff --git a/packages/ra-input-rich-text/tsconfig.esm.json b/packages/ra-input-rich-text/tsconfig.esm.json index 67e71c99dac..ef81d3759a6 100644 --- a/packages/ra-input-rich-text/tsconfig.esm.json +++ b/packages/ra-input-rich-text/tsconfig.esm.json @@ -7,5 +7,9 @@ "checkJs": false }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/" }, + { "path": "../ra-ui-materialui/" } + ] } diff --git a/packages/ra-input-rich-text/tsconfig.json b/packages/ra-input-rich-text/tsconfig.json index 67228298bea..40a95bcba57 100644 --- a/packages/ra-input-rich-text/tsconfig.json +++ b/packages/ra-input-rich-text/tsconfig.json @@ -7,5 +7,9 @@ "checkJs": false }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/tsconfig.json" }, + { "path": "../ra-ui-materialui/tsconfig.json" } + ] } diff --git a/packages/ra-realtime/tsconfig.esm.json b/packages/ra-realtime/tsconfig.esm.json index 6ac899081cc..2e6e9d29424 100644 --- a/packages/ra-realtime/tsconfig.esm.json +++ b/packages/ra-realtime/tsconfig.esm.json @@ -6,5 +6,9 @@ "tsBuildInfoFile": "./esm/.tsbuildinfo" }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/" }, + { "path": "../react-admin/" } + ] } diff --git a/packages/ra-realtime/tsconfig.json b/packages/ra-realtime/tsconfig.json index 3b27da693ea..d8ff177e2ee 100644 --- a/packages/ra-realtime/tsconfig.json +++ b/packages/ra-realtime/tsconfig.json @@ -6,5 +6,9 @@ "tsBuildInfoFile": "./lib/.tsbuildinfo" }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/tsconfig.json" }, + { "path": "../react-admin/tsconfig.json" } + ] } diff --git a/packages/ra-tree-ui-materialui/tsconfig.esm.json b/packages/ra-tree-ui-materialui/tsconfig.esm.json index 67e71c99dac..0c9dc83b10b 100644 --- a/packages/ra-tree-ui-materialui/tsconfig.esm.json +++ b/packages/ra-tree-ui-materialui/tsconfig.esm.json @@ -7,5 +7,10 @@ "checkJs": false }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/" }, + { "path": "../ra-tree-core/" }, + { "path": "../ra-ui-materialui/" } + ] } diff --git a/packages/ra-tree-ui-materialui/tsconfig.json b/packages/ra-tree-ui-materialui/tsconfig.json index 67228298bea..dec72157cc5 100644 --- a/packages/ra-tree-ui-materialui/tsconfig.json +++ b/packages/ra-tree-ui-materialui/tsconfig.json @@ -7,5 +7,10 @@ "checkJs": false }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/tsconfig.json" }, + { "path": "../ra-tree-core/tsconfig.json" }, + { "path": "../ra-ui-materialui/tsconfig.json" } + ] } diff --git a/packages/ra-ui-materialui/tsconfig.esm.json b/packages/ra-ui-materialui/tsconfig.esm.json index 67e71c99dac..384eb5a9f7e 100644 --- a/packages/ra-ui-materialui/tsconfig.esm.json +++ b/packages/ra-ui-materialui/tsconfig.esm.json @@ -7,5 +7,8 @@ "checkJs": false }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/" }, + ] } diff --git a/packages/ra-ui-materialui/tsconfig.json b/packages/ra-ui-materialui/tsconfig.json index 6ea962c3538..fac48726608 100644 --- a/packages/ra-ui-materialui/tsconfig.json +++ b/packages/ra-ui-materialui/tsconfig.json @@ -9,5 +9,8 @@ "noImplicitAny": false }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-core/tsconfig.json" }, + ] } diff --git a/packages/react-admin/tsconfig.esm.json b/packages/react-admin/tsconfig.esm.json index 6ac899081cc..e98b7a28daf 100644 --- a/packages/react-admin/tsconfig.esm.json +++ b/packages/react-admin/tsconfig.esm.json @@ -6,5 +6,10 @@ "tsBuildInfoFile": "./esm/.tsbuildinfo" }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-ui-materialui/" }, + { "path": "../ra-i18n-polyglot/" }, + { "path": "../ra-core/" }, + ] } diff --git a/packages/react-admin/tsconfig.json b/packages/react-admin/tsconfig.json index 3b27da693ea..205a08a3d5e 100644 --- a/packages/react-admin/tsconfig.json +++ b/packages/react-admin/tsconfig.json @@ -6,5 +6,10 @@ "tsBuildInfoFile": "./lib/.tsbuildinfo" }, "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.spec.js"], - "include": ["src"] + "include": ["src"], + "references": [ + { "path": "../ra-ui-materialui/tsconfig.json" }, + { "path": "../ra-i18n-polyglot/tsconfig.json" }, + { "path": "../ra-core/tsconfig.json" }, + ] } diff --git a/tsconfig.base.esm.json b/tsconfig.base.esm.json index f74547b2324..d5b99a6404a 100644 --- a/tsconfig.base.esm.json +++ b/tsconfig.base.esm.json @@ -2,21 +2,5 @@ "extends": "./tsconfig.base", "compilerOptions": { "module": "es2015" - }, - "references": [ - { "path": "packages/ra-core" }, - { "path": "packages/ra-i18n-polyglot" }, - { "path": "packages/ra-ui-materialui" }, - { "path": "packages/react-admin" }, - { "path": "packages/ra-data-fakerest" }, - { "path": "packages/ra-data-graphcool" }, - { "path": "packages/ra-data-graphql" }, - { "path": "packages/ra-data-graphql-simple" }, - { "path": "packages/ra-data-json-server" }, - { "path": "packages/ra-data-simple-rest" }, - { "path": "packages/ra-input-rich-text" }, - { "path": "packages/ra-realtime" }, - { "path": "packages/ra-tree-core" }, - { "path": "packages/ra-tree-ui-materialui" } - ] + } } \ No newline at end of file diff --git a/tsconfig.base.json b/tsconfig.base.json index f5ed52f8a01..5217d7b7c98 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -26,21 +26,5 @@ "skipLibCheck": true, "noEmitHelpers": false, "noEmitOnError": false - }, - "references": [ - { "path": "packages/ra-core" }, - { "path": "packages/ra-i18n-polyglot" }, - { "path": "packages/ra-ui-materialui" }, - { "path": "packages/react-admin" }, - { "path": "packages/ra-data-fakerest" }, - { "path": "packages/ra-data-graphcool" }, - { "path": "packages/ra-data-graphql" }, - { "path": "packages/ra-data-graphql-simple" }, - { "path": "packages/ra-data-json-server" }, - { "path": "packages/ra-data-simple-rest" }, - { "path": "packages/ra-input-rich-text" }, - { "path": "packages/ra-realtime" }, - { "path": "packages/ra-tree-core" }, - { "path": "packages/ra-tree-ui-materialui" } - ] + } } \ No newline at end of file diff --git a/tsconfig.build-all.all.json b/tsconfig.build-all.all.json new file mode 100644 index 00000000000..4be86d5199e --- /dev/null +++ b/tsconfig.build-all.all.json @@ -0,0 +1,11 @@ +{ + "references": [ + { + "path": "./tsconfig.build-all.cjs.json" + }, + { + "path": "./tsconfig.build-all.esm.json" + } + ], + "include": [] +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.build-all.cjs.json similarity index 95% rename from tsconfig.json rename to tsconfig.build-all.cjs.json index efec17639f9..bd94354e93e 100644 --- a/tsconfig.json +++ b/tsconfig.build-all.cjs.json @@ -1,14 +1,14 @@ { "compilerOptions": { - "outDir": "lib-composite" + "outDir": "lib-top-level" }, "references": [ - { "path": "packages/ra-core" }, + { "path": "packages/ra-data-graphcool" }, { "path": "packages/ra-i18n-polyglot" }, { "path": "packages/ra-ui-materialui" }, + { "path": "packages/ra-core" }, { "path": "packages/react-admin" }, { "path": "packages/ra-data-fakerest" }, - { "path": "packages/ra-data-graphcool" }, { "path": "packages/ra-data-graphql" }, { "path": "packages/ra-data-graphql-simple" }, { "path": "packages/ra-data-json-server" }, diff --git a/tsconfig.esm.json b/tsconfig.build-all.esm.json similarity index 100% rename from tsconfig.esm.json rename to tsconfig.build-all.esm.json