Skip to content

Commit

Permalink
chore(scripts-tasks): remove unused apis from api-extractor task
Browse files Browse the repository at this point in the history
  • Loading branch information
Hotell committed Apr 17, 2024
1 parent 14eb141 commit e4a3d8f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 0 additions & 2 deletions scripts/tasks/src/api-extractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ export function apiExtractor(): TaskFunction {
const compilerConfig = getTsPathAliasesApiExtractorConfig({
tsConfig: tsConfigs.lib,
packageJson,
pathAliasesTsConfigPath: isLocalBuild ? path.join(workspaceRoot, 'tsconfig.base.json') : undefined,
definitionsRootPath: 'dist/out-tsc/types',
});

// NOTE: internally just-tasks calls `options.onConfigLoaded?.(rawConfig);` so we need to mutate object properties (js passes objects by reference)
Expand Down
4 changes: 1 addition & 3 deletions scripts/tasks/src/generate-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ function generateTypeDeclarations() {
'--emitDeclarationOnly',
// turn off path aliases.
'--baseUrl .',
]
.filter(Boolean)
.join(' ');
].join(' ');

return execSync(cmd, { stdio: 'inherit' });
}
7 changes: 4 additions & 3 deletions scripts/tasks/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ function createNormalizedTsPaths(options: { definitionsRootPath: string; pathAli
export function getTsPathAliasesApiExtractorConfig(options: {
tsConfig: TsConfig;
packageJson: PackageJson;
definitionsRootPath: string;
pathAliasesTsConfigPath?: string;
// definitionsRootPath: string;
// pathAliasesTsConfigPath?: string;
}) {
const { packageJson, tsConfig /* , pathAliasesTsConfigPath, definitionsRootPath */ } = options;
/**
Expand Down Expand Up @@ -178,7 +178,8 @@ export function getTsPathAliasesApiExtractorConfig(options: {
* - see https://github.com/microsoft/rushstack/pull/3321, https://github.com/microsoft/rushstack/pull/3339
*
*/
paths: undefined,
// FIXME: overriding baseUrl effectively turns-off path aliases resolution, so probably this can be removed
// paths: undefined,
baseUrl: '.',
},
};
Expand Down

0 comments on commit e4a3d8f

Please sign in to comment.