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:
8
build.sh
8
build.sh
@ -33,6 +33,11 @@ TSC_PACKAGES=(compiler-cli
|
|||||||
NODE_PACKAGES=(compiler-cli
|
NODE_PACKAGES=(compiler-cli
|
||||||
benchpress)
|
benchpress)
|
||||||
|
|
||||||
|
NG_UPDATE_PACKAGE_GROUP=$(
|
||||||
|
echo \[\"${PACKAGES[@]}\"] | sed 's/ /", "/g'
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
BUILD_ALL=true
|
BUILD_ALL=true
|
||||||
BUNDLE=true
|
BUNDLE=true
|
||||||
VERSION_PREFIX=$(node -p "require('./package.json').version")
|
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="package.json" --include="*/" --exclude=* ${SRC_DIR}/ ${NPM_DIR}/
|
||||||
rsync -am --include="*.externs.js" --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}/
|
cp ${ROOT_DIR}/README.md ${NPM_DIR}/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -17,5 +17,8 @@
|
|||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/angular/angular.git"
|
"url": "https://github.com/angular/angular.git"
|
||||||
|
},
|
||||||
|
"ng-update": {
|
||||||
|
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,5 +19,8 @@
|
|||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/angular/angular.git"
|
"url": "https://github.com/angular/angular.git"
|
||||||
|
},
|
||||||
|
"ng-update": {
|
||||||
|
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,5 +34,8 @@
|
|||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/angular/angular/issues"
|
"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"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,5 +14,8 @@
|
|||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/angular/angular.git"
|
"url": "https://github.com/angular/angular.git"
|
||||||
|
},
|
||||||
|
"ng-update": {
|
||||||
|
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,5 +18,8 @@
|
|||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/angular/angular.git"
|
"url": "https://github.com/angular/angular.git"
|
||||||
|
},
|
||||||
|
"ng-update": {
|
||||||
|
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,5 +20,8 @@
|
|||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/angular/angular.git"
|
"url": "https://github.com/angular/angular.git"
|
||||||
|
},
|
||||||
|
"ng-update": {
|
||||||
|
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,5 +19,8 @@
|
|||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/angular/angular.git"
|
"url": "https://github.com/angular/angular.git"
|
||||||
|
},
|
||||||
|
"ng-update": {
|
||||||
|
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,5 +10,8 @@
|
|||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/angular/angular.git"
|
"url": "https://github.com/angular/angular.git"
|
||||||
|
},
|
||||||
|
"ng-update": {
|
||||||
|
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,5 +20,8 @@
|
|||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/angular/angular.git"
|
"url": "https://github.com/angular/angular.git"
|
||||||
|
},
|
||||||
|
"ng-update": {
|
||||||
|
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,5 +18,8 @@
|
|||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/angular/angular.git"
|
"url": "https://github.com/angular/angular.git"
|
||||||
|
},
|
||||||
|
"ng-update": {
|
||||||
|
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,5 +24,8 @@
|
|||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/angular/angular.git"
|
"url": "https://github.com/angular/angular.git"
|
||||||
|
},
|
||||||
|
"ng-update": {
|
||||||
|
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,5 +21,8 @@
|
|||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/angular/angular.git"
|
"url": "https://github.com/angular/angular.git"
|
||||||
|
},
|
||||||
|
"ng-update": {
|
||||||
|
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,5 +19,8 @@
|
|||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/angular/angular.git"
|
"url": "https://github.com/angular/angular.git"
|
||||||
|
},
|
||||||
|
"ng-update": {
|
||||||
|
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,5 +28,8 @@
|
|||||||
"@angular/common": "0.0.0-PLACEHOLDER",
|
"@angular/common": "0.0.0-PLACEHOLDER",
|
||||||
"@angular/platform-browser": "0.0.0-PLACEHOLDER",
|
"@angular/platform-browser": "0.0.0-PLACEHOLDER",
|
||||||
"rxjs": "^5.5.0"
|
"rxjs": "^5.5.0"
|
||||||
|
},
|
||||||
|
"ng-update": {
|
||||||
|
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,5 +21,8 @@
|
|||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"ngsw-config": "./ngsw-config.js"
|
"ngsw-config": "./ngsw-config.js"
|
||||||
|
},
|
||||||
|
"ng-update": {
|
||||||
|
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,5 +20,8 @@
|
|||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/angular/angular.git"
|
"url": "https://github.com/angular/angular.git"
|
||||||
|
},
|
||||||
|
"ng-update": {
|
||||||
|
"packageGroup": "NG_UPDATE_PACKAGE_GROUP"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user