From 4b481b404c5bd9b93b3a94fabc70dc11cac33529 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Fri, 19 Oct 2018 18:56:47 +0200 Subject: [PATCH 1/2] build(schematics): version placeholders not replaced * 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); ``` ilease enter the commit message for your changes. Lines starting --- tools/package-tools/build-release.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/package-tools/build-release.ts b/tools/package-tools/build-release.ts index 238e15573657..4d3698938872 100644 --- a/tools/package-tools/build-release.ts +++ b/tools/package-tools/build-release.ts @@ -48,16 +48,16 @@ export function composeRelease(buildPackage: BuildPackage) { copyFiles(packagesDir, 'README.md', releasePath); copyFiles(sourceDir, 'package.json', releasePath); + if (buildPackage.hasSchematics) { + copyFiles(join(packageOut, 'schematics'), '**/*', join(releasePath, 'schematics')); + } + replaceVersionPlaceholders(releasePath); insertPackageJsonVersionStamp(join(releasePath, 'package.json')); createTypingsReexportFile(releasePath, './typings/index', name); createMetadataReexportFile(releasePath, './typings/index', name, importAsName); - if (buildPackage.hasSchematics) { - copyFiles(join(packageOut, 'schematics'), '**/*', join(releasePath, 'schematics')); - } - if (buildPackage.secondaryEntryPoints.length) { createFilesForSecondaryEntryPoint(buildPackage, releasePath); } From 9acb263c57484492118ce60026121fa52c771613 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 25 Oct 2018 21:09:52 +0200 Subject: [PATCH 2/2] Address feedback --- tools/package-tools/build-release.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/package-tools/build-release.ts b/tools/package-tools/build-release.ts index 4d3698938872..8bcffdbd1063 100644 --- a/tools/package-tools/build-release.ts +++ b/tools/package-tools/build-release.ts @@ -48,6 +48,8 @@ export function composeRelease(buildPackage: BuildPackage) { copyFiles(packagesDir, 'README.md', releasePath); copyFiles(sourceDir, 'package.json', releasePath); + // This must happen before replacing the version placeholders because the schematics + // could use the version placeholders for setting up specific dependencies within `ng-add`. if (buildPackage.hasSchematics) { copyFiles(join(packageOut, 'schematics'), '**/*', join(releasePath, 'schematics')); }