From f9f04cda2026722ddebbea903b19389cab393551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Dudak?= Date: Thu, 14 Nov 2024 22:35:03 +0100 Subject: [PATCH] Run tsc-alias on ESM type declaration files --- packages/mui-base/package.json | 3 +- packages/mui-base/tsconfig.build.json | 5 +++- pnpm-lock.yaml | 42 +++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 2 deletions(-) diff --git a/packages/mui-base/package.json b/packages/mui-base/package.json index d3c9d093d..4ceb391db 100644 --- a/packages/mui-base/package.json +++ b/packages/mui-base/package.json @@ -42,7 +42,7 @@ "build:node": "node ../../scripts/build.mjs node", "build:stable": "node ../../scripts/build.mjs stable", "build:copy-files": "node ../../scripts/copyFiles.mjs", - "build:types": "tsc -b tsconfig.build.json && tsc -b tsconfig.build.cjs.json", + "build:types": "tsc -b tsconfig.build.json && tsc -b tsconfig.build.cjs.json && tsc-alias -p tsconfig.build.json", "test:package-types": "attw --pack ./build --include-entrypoints ./Accordion ./Menu ./Tooltip", "prebuild": "rimraf --glob build build-tests \"*.tsbuildinfo\"", "release": "pnpm build && pnpm publish", @@ -78,6 +78,7 @@ "react": "19.0.0-rc-fb9a90fa48-20240614", "react-dom": "19.0.0-rc-fb9a90fa48-20240614", "sinon": "^19.0.2", + "tsc-alias": "^1.8.10", "typescript": "^5.6.3" }, "peerDependencies": { diff --git a/packages/mui-base/tsconfig.build.json b/packages/mui-base/tsconfig.build.json index a2bd2042c..75ef03aad 100644 --- a/packages/mui-base/tsconfig.build.json +++ b/packages/mui-base/tsconfig.build.json @@ -13,5 +13,8 @@ "outDir": "build/esm" }, "include": ["src/**/*.ts*"], - "exclude": ["src/**/*.spec.ts*", "src/**/*.test.ts*"] + "exclude": ["src/**/*.spec.ts*", "src/**/*.test.ts*"], + "tsc-alias": { + "resolveFullPaths": true + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f9b1bb096..8a2d239ad 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -681,6 +681,9 @@ importers: sinon: specifier: ^19.0.2 version: 19.0.2 + tsc-alias: + specifier: ^1.8.10 + version: 1.8.10 typescript: specifier: ^5.6.3 version: 5.6.3 @@ -4186,6 +4189,10 @@ packages: resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} engines: {node: '>= 12'} + commander@9.5.0: + resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==} + engines: {node: ^12.20.0 || >=14} + common-ancestor-path@1.0.1: resolution: {integrity: sha512-L3sHRo1pXXEqX8VU28kfgUY+YGsk09hPqZiZmLacNib6XNTCM8ubYeT7ryXQw8asB1sKgcU5lkB7ONug08aB8w==} @@ -7058,6 +7065,10 @@ packages: resolution: {integrity: sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==} engines: {node: ^18.17.0 || >=20.5.0} + mylas@2.1.13: + resolution: {integrity: sha512-+MrqnJRtxdF+xngFfUUkIMQrUUL0KsxbADUkn23Z/4ibGg192Q+z+CQyiYwvWTsYjJygmMR8+w3ZDa98Zh6ESg==} + engines: {node: '>=12.0.0'} + mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} @@ -7675,6 +7686,10 @@ packages: engines: {node: '>=18'} hasBin: true + plimit-lit@1.6.1: + resolution: {integrity: sha512-B7+VDyb8Tl6oMJT9oSO2CW8XC/T4UcJGrwOVoNGwOQsQYhlpfajmrMj5xeejqaASq3V/EqThyOeATEOMuSEXiA==} + engines: {node: '>=12'} + possible-typed-array-names@1.0.0: resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} engines: {node: '>= 0.4'} @@ -7950,6 +7965,10 @@ packages: querystringify@2.2.0: resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} + queue-lit@1.5.2: + resolution: {integrity: sha512-tLc36IOPeMAubu8BkW8YDBV+WyIgKlYU7zUNs0J5Vk9skSZ4JfGlPOqplP0aHdfv7HL0B2Pg6nwiq60Qc6M2Hw==} + engines: {node: '>=12'} + queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -8954,6 +8973,10 @@ packages: ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + tsc-alias@1.8.10: + resolution: {integrity: sha512-Ibv4KAWfFkFdKJxnWfVtdOmB0Zi1RJVxcbPGiCDsFpCQSsmpWyuzHG3rQyI5YkobWwxFPEyQfu1hdo4qLG2zPw==} + hasBin: true + tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} @@ -13569,6 +13592,8 @@ snapshots: commander@8.3.0: {} + commander@9.5.0: {} + common-ancestor-path@1.0.1: {} common-path-prefix@3.0.0: {} @@ -17337,6 +17362,8 @@ snapshots: mute-stream@2.0.0: {} + mylas@2.1.13: {} + mz@2.7.0: dependencies: any-promise: 1.3.0 @@ -18059,6 +18086,10 @@ snapshots: optionalDependencies: fsevents: 2.3.2 + plimit-lit@1.6.1: + dependencies: + queue-lit: 1.5.2 + possible-typed-array-names@1.0.0: {} postcss-import@16.1.0(postcss@8.4.47): @@ -18258,6 +18289,8 @@ snapshots: querystringify@2.2.0: {} + queue-lit@1.5.2: {} + queue-microtask@1.2.3: {} quick-lru@4.0.1: {} @@ -19520,6 +19553,15 @@ snapshots: ts-interface-checker@0.1.13: {} + tsc-alias@1.8.10: + dependencies: + chokidar: 3.6.0 + commander: 9.5.0 + globby: 11.1.0 + mylas: 2.1.13 + normalize-path: 3.0.0 + plimit-lit: 1.6.1 + tsconfig-paths@3.15.0: dependencies: '@types/json5': 0.0.29