Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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": "[email protected]",
"dependentChangeType": "none"
}
2 changes: 1 addition & 1 deletion packages/react-migration-v8-v9/config/api-extractor.json
Original file line number Diff line number Diff line change
@@ -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": "<projectFolder>/dist/types/index.d.ts"
"mainEntryPointFilePath": "<projectFolder>/../../dist/out-tsc/types/packages/<unscopedPackageName>/src/index.d.ts"
}
4 changes: 2 additions & 2 deletions packages/react-migration-v8-v9/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/just.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'))),
);
Expand Down
5 changes: 3 additions & 2 deletions scripts/tasks/copy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down