Skip to content

Commit

Permalink
Merge branch 'master' into robertd/batch
Browse files Browse the repository at this point in the history
  • Loading branch information
robertd committed May 3, 2022
2 parents 5170549 + fc2cd48 commit fef6e25
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tools/@aws-cdk/ubergen/bin/ubergen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ async function prepareSourceFiles(libraries: readonly LibraryReference[], packag
indexStatements.push(`export * from './${library.shortName}';`);
} else {
indexStatements.push(`export * as ${library.shortName.replace(/-/g, '_')} from './${library.shortName}';`);
copySubmoduleExports(packageJson.exports, library, library.shortName);
}
copySubmoduleExports(packageJson.exports, library, library.shortName);
}

await fs.writeFile(path.join(libRoot, 'index.ts'), indexStatements.join('\n'), { encoding: 'utf8' });
Expand All @@ -317,9 +317,11 @@ function copySubmoduleExports(targetExports: Record<string, string>, library: Li
}
}

// If there was an export for '.' in the original submodule, this assignment will overwrite it,
// which is exactly what we want.
targetExports[`./${unixPath(visibleName)}`] = `./${unixPath(subdirectory)}/index.js`;
if (visibleName !== 'core') {
// If there was an export for '.' in the original submodule, this assignment will overwrite it,
// which is exactly what we want.
targetExports[`./${unixPath(visibleName)}`] = `./${unixPath(subdirectory)}/index.js`;
}
}

async function combineRosettaFixtures(libraries: readonly LibraryReference[], uberPackageJson: PackageJson) {
Expand Down

0 comments on commit fef6e25

Please sign in to comment.