From fdebd413a94a194bdeb8866aafab2aaa333bfcc8 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Fri, 6 Jul 2018 15:46:43 +0200 Subject: [PATCH] build: fix invalid required angular version * Right now the `package.json` of the release packages accepts every Angular 6.0.0 beta as a working dependency. This is not really correct since we depend on the `preserveWhitespaces` change from `beta.6` and also depend on the new `Injectable` / `provider` syntax from `beta.4`. We either need to require a version `>= beta.6` or just go to the `6.0.0` stable release. * Makes it easier to change the required angular version (right now it's easy to forget about the property in the build config) --- build-config.js | 2 +- package.json | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build-config.js b/build-config.js index f607cdd22b8a..eae00f78686b 100644 --- a/build-config.js +++ b/build-config.js @@ -13,7 +13,7 @@ const buildVersion = packageJson.version; * Required Angular version for all Angular Material packages. This version will be used * as the peer dependency version for Angular in all release packages. */ -const angularVersion = '>=6.0.0-beta.0 <7.0.0'; +const angularVersion = packageJson.requiredAngularVersion; /** License that will be placed inside of all created bundles. */ const buildLicense = `/** diff --git a/package.json b/package.json index e64b20480eeb..41f424b9271a 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,10 @@ "type": "git", "url": "https://github.com/angular/material2.git" }, + "license": "MIT", + "engines": { + "node": ">= 5.4.1" + }, "scripts": { "postinstall": "ngc -p angular.tsconfig.json", "build": "gulp :publish:build-releases", @@ -21,10 +25,7 @@ "api": "gulp api-docs" }, "version": "6.4.2", - "license": "MIT", - "engines": { - "node": ">= 5.4.1" - }, + "requiredAngularVersion": ">=6.0.0 <7.0.0", "dependencies": { "@angular/animations": "6.0.0", "@angular/common": "6.0.0",