diff --git a/change/@fluentui-react-migration-v8-v9-4bd9cb49-ba9c-4cd6-b0ea-bdca79750a22.json b/change/@fluentui-react-migration-v8-v9-4bd9cb49-ba9c-4cd6-b0ea-bdca79750a22.json new file mode 100644 index 00000000000000..8c5fede76a70c5 --- /dev/null +++ b/change/@fluentui-react-migration-v8-v9-4bd9cb49-ba9c-4cd6-b0ea-bdca79750a22.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "feat(scripts): enable ts processing via ts solution config for non v9 packages", + "packageName": "@fluentui/react-migration-v8-v9", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/packages/react-migration-v8-v9/config/api-extractor.json b/packages/react-migration-v8-v9/config/api-extractor.json index eee94ff6de902d..e36a29556f753c 100644 --- a/packages/react-migration-v8-v9/config/api-extractor.json +++ b/packages/react-migration-v8-v9/config/api-extractor.json @@ -1,5 +1,5 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "extends": "@fluentui/scripts/api-extractor/api-extractor.common.v-next.json", - "mainEntryPointFilePath": "/dist/types/index.d.ts" + "mainEntryPointFilePath": "/../../dist/out-tsc/types/packages//src/index.d.ts" } diff --git a/packages/react-migration-v8-v9/src/stories/DefaultButtonShim/index.tsx b/packages/react-migration-v8-v9/src/stories/DefaultButtonShim/index.stories.tsx similarity index 100% rename from packages/react-migration-v8-v9/src/stories/DefaultButtonShim/index.tsx rename to packages/react-migration-v8-v9/src/stories/DefaultButtonShim/index.stories.tsx diff --git a/packages/react-migration-v8-v9/tsconfig.lib.json b/packages/react-migration-v8-v9/tsconfig.lib.json index dc668078651554..978cb985cd5e4a 100644 --- a/packages/react-migration-v8-v9/tsconfig.lib.json +++ b/packages/react-migration-v8-v9/tsconfig.lib.json @@ -4,8 +4,8 @@ "noEmit": false, "lib": ["ES2019", "dom"], "declaration": true, - "declarationDir": "dist/types", - "outDir": "dist", + "declarationDir": "../../dist/out-tsc/types", + "outDir": "../../dist/out-tsc", "inlineSources": true, "types": ["static-assets", "environment"] }, diff --git a/scripts/just.config.ts b/scripts/just.config.ts index f5c24179e09549..6e730821b92579 100644 --- a/scripts/just.config.ts +++ b/scripts/just.config.ts @@ -90,7 +90,7 @@ export function preset() { task('ts', () => { return series( 'ts:compile', - condition('copy-compiled', () => isConvergedPackage({ projectType: 'library' })), + 'copy-compiled', 'ts:postprocess', condition('babel:postprocess', () => fs.existsSync(path.join(process.cwd(), '.babelrc.json'))), ); diff --git a/scripts/tasks/copy.ts b/scripts/tasks/copy.ts index 48c09fdc005699..069203fbb4e821 100644 --- a/scripts/tasks/copy.ts +++ b/scripts/tasks/copy.ts @@ -44,14 +44,15 @@ export function copyCompiled() { const packageDir = process.cwd(); if (!(isUsingTsSolutionConfigs && tsConfig)) { - throw new Error(`this task compliant only with packages that use TS solution config files.`); + logger.warn(`copy-compiled: works only with packages that use TS solution config files. Skipping...`); + return; } // TODO: remove after all v9 is migrated to new build and .d.ts API stripping const hasNewCompilationSetup = (tsConfig.compilerOptions.outDir as string).includes('dist/out-tsc'); if (!hasNewCompilationSetup) { - logger.info('copy-compiled: noop '); + logger.info('copy-compiled: noop'); return; }