Skip to content

Commit c433104

Browse files
devversionjelbourn
authored andcommitted
build(schematics): version placeholders not replaced (#13688)
Since we copy the schematics after the version placeholders have been inlined, the version range that uses the NG version placeholder is not replaced properly. This is not problematic because by default we determine the NG version based on the installed `@angular/core` version. ``` addPackageToPackageJson(host, '@angular/animations', ngCoreVersionTag || requiredAngularVersionRange); ```
1 parent ab5127b commit c433104

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tools/package-tools/build-release.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,18 @@ export function composeRelease(buildPackage: BuildPackage) {
4848
copyFiles(packagesDir, 'README.md', releasePath);
4949
copyFiles(sourceDir, 'package.json', releasePath);
5050

51+
// This must happen before replacing the version placeholders because the schematics
52+
// could use the version placeholders for setting up specific dependencies within `ng-add`.
53+
if (buildPackage.hasSchematics) {
54+
copyFiles(join(packageOut, 'schematics'), '**/*', join(releasePath, 'schematics'));
55+
}
56+
5157
replaceVersionPlaceholders(releasePath);
5258
insertPackageJsonVersionStamp(join(releasePath, 'package.json'));
5359

5460
createTypingsReexportFile(releasePath, './typings/index', name);
5561
createMetadataReexportFile(releasePath, './typings/index', name, importAsName);
5662

57-
if (buildPackage.hasSchematics) {
58-
copyFiles(join(packageOut, 'schematics'), '**/*', join(releasePath, 'schematics'));
59-
}
60-
6163
if (buildPackage.secondaryEntryPoints.length) {
6264
createFilesForSecondaryEntryPoint(buildPackage, releasePath);
6365
}

0 commit comments

Comments
 (0)