release: add ng update package group metadata to angular (#22482)

"ng update" supports having multiple packages as part of a group which should be updated together, meaning that e.g. calling "ng update @angular/core" would be equivalent to updating all packages of the group (that are part of the package.json already).

In order to support the grouping feature, the package.json of the version the user is updating to needs to include an "ng-update" key that points to this metadata.

The entire specification for the update workflow can be found here: 2e8b12a4ef/docs/specifications/update.md

PR Close #22482
This commit is contained in:
Hans Larsen 2018-02-27 15:04:35 -08:00 committed by Alex Eagle
parent 9eaf1bbe67
commit 288851c41e
17 changed files with 57 additions and 1 deletions

View File

@ -33,6 +33,11 @@ TSC_PACKAGES=(compiler-cli
NODE_PACKAGES=(compiler-cli
benchpress)
NG_UPDATE_PACKAGE_GROUP=$(
echo \[\"${PACKAGES[@]}\"] | sed 's/ /", "/g'
)
BUILD_ALL=true
BUNDLE=true
VERSION_PREFIX=$(node -p "require('./package.json').version")
@ -491,6 +496,9 @@ do
rsync -am --include="package.json" --include="*/" --exclude=* ${SRC_DIR}/ ${NPM_DIR}/
rsync -am --include="*.externs.js" --include="*/" --exclude=* ${SRC_DIR}/ ${NPM_DIR}/
# Replace the NG_UPDATE_PACKAGE_GROUP value with the JSON array of packages.
perl -p -i -e "s/\"NG_UPDATE_PACKAGE_GROUP\"/${NG_UPDATE_PACKAGE_GROUP}/g" ${NPM_DIR}/package.json < /dev/null 2> /dev/null
cp ${ROOT_DIR}/README.md ${NPM_DIR}/
fi

View File

@ -17,5 +17,8 @@
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.git"
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
}

View File

@ -19,5 +19,8 @@
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.git"
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
}

View File

@ -34,5 +34,8 @@
"bugs": {
"url": "https://github.com/angular/angular/issues"
},
"homepage": "https://github.com/angular/angular/tree/master/packages/compiler-cli"
"homepage": "https://github.com/angular/angular/tree/master/packages/compiler-cli",
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
}

View File

@ -14,5 +14,8 @@
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.git"
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
}

View File

@ -18,5 +18,8 @@
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.git"
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
}

View File

@ -20,5 +20,8 @@
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.git"
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
}

View File

@ -19,5 +19,8 @@
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.git"
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
}

View File

@ -10,5 +10,8 @@
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.git"
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
}

View File

@ -20,5 +20,8 @@
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.git"
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
}

View File

@ -18,5 +18,8 @@
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.git"
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
}

View File

@ -24,5 +24,8 @@
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.git"
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
}

View File

@ -21,5 +21,8 @@
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.git"
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
}

View File

@ -19,5 +19,8 @@
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.git"
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
}

View File

@ -28,5 +28,8 @@
"@angular/common": "0.0.0-PLACEHOLDER",
"@angular/platform-browser": "0.0.0-PLACEHOLDER",
"rxjs": "^5.5.0"
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
}

View File

@ -21,5 +21,8 @@
},
"bin": {
"ngsw-config": "./ngsw-config.js"
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
}

View File

@ -20,5 +20,8 @@
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.git"
},
"ng-update": {
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
}
}