Skip to content

Commit f96142c

Browse files
chuckjazIgorMinar
authored andcommitted
build: remove references to tsc-wrapped (angular#19298)
With this commit `ngc` is used instead of `tsc-wrapped` for collecting metadata and tsickle rewriting and `tsc-wrapped` is removed from the repository. `@angular/tsc-wrapped@5` is now deprecated and is no longer used, updated, or maintained as part as of Angular 5.x.x. `@angular/tsc-wrapped@4` is still maintained and required by Angular 4.x.x and will be maintained as long as 4.x.x is in LTS. PR Close angular#19298
1 parent 4c73b52 commit f96142c

File tree

104 files changed

+336
-6594
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+336
-6594
lines changed

.pullapprove.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ groups:
135135
compiler-cli:
136136
conditions:
137137
files:
138-
- "packages/tsc-wrapped/*"
139138
- "packages/compiler-cli/*"
140139
- "packages/bazel/*"
141140
users:

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ The following is the list of supported scopes:
221221
* **platform-webworker-dynamic**
222222
* **router**
223223
* **upgrade**
224-
* **tsc-wrapped**
225224

226225
There are currently a few exceptions to the "use package name" rule:
227226

aio/content/guide/metadata.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ You can think of `.metadata.json` as a diagram of the overall structure of a dec
6666
6767
<div class="l-sub-section">
6868
69-
Angular's [schema.ts](https://github.com/angular/angular/blob/master/packages/tsc-wrapped/src/schema.ts)
69+
Angular's [schema.ts](https://github.com/angular/angular/blob/master/packages/compiler-cli/src/metadata/schema.ts)
7070
describes the JSON format as a collection of TypeScript interfaces.
7171
7272
</div>

aio/tools/example-zipper/customizer/package-json/base.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"@angular/platform-browser-dynamic",
1515
"@angular/platform-server",
1616
"@angular/router",
17-
"@angular/tsc-wrapped",
1817
"@angular/upgrade",
1918
"angular-in-memory-web-api",
2019
"core-js",

aio/tools/examples/example-boilerplate.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ const ANGULAR_PACKAGES = [
4141
'platform-browser-dynamic',
4242
'platform-server',
4343
'router',
44-
'tsc-wrapped',
4544
'upgrade',
4645
];
4746

aio/tools/examples/example-boilerplate.spec.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@ describe('example-boilerplate tool', () => {
2626

2727
it('should override the Angular node_modules with the locally built Angular packages if `useLocal` is true', () => {
2828
const numberOfAngularPackages = 12;
29-
const numberOfAngularToolsPackages = 1;
3029
exampleBoilerPlate.add(true);
31-
expect(exampleBoilerPlate.overridePackage).toHaveBeenCalledTimes(numberOfAngularPackages + numberOfAngularToolsPackages);
30+
expect(exampleBoilerPlate.overridePackage).toHaveBeenCalledTimes(numberOfAngularPackages);
3231
// for example
3332
expect(exampleBoilerPlate.overridePackage).toHaveBeenCalledWith(path.resolve(__dirname, '../../../dist/packages-dist'), 'common');
3433
expect(exampleBoilerPlate.overridePackage).toHaveBeenCalledWith(path.resolve(__dirname, '../../../dist/packages-dist'), 'core');
35-
expect(exampleBoilerPlate.overridePackage).toHaveBeenCalledWith(path.resolve(__dirname, '../../../dist/packages-dist'), 'tsc-wrapped');
3634
});
3735

3836
it('should process all the example folders', () => {

aio/tools/examples/shared/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"@angular/platform-browser-dynamic": "~4.3.1",
2424
"@angular/platform-server": "~4.3.1",
2525
"@angular/router": "~4.3.1",
26-
"@angular/tsc-wrapped": "~4.3.1",
2726
"@angular/upgrade": "~4.3.1",
2827
"angular-in-memory-web-api": "~0.4.0",
2928
"core-js": "^2.4.1",

build.sh

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ PACKAGES=(core
2525
language-service
2626
benchpress)
2727

28+
TSC_PACKAGES=(compiler-cli
29+
language-service
30+
benchpress)
31+
2832
NODE_PACKAGES=(compiler-cli
29-
benchpress
30-
tsc-wrapped)
33+
benchpress)
3134

3235
BUILD_ALL=true
3336
BUNDLE=true
@@ -38,6 +41,7 @@ BUILD_EXAMPLES=true
3841
COMPILE_SOURCE=true
3942
TYPECHECK_ALL=true
4043
BUILD_TOOLS=true
44+
export NODE_PATH=${NODE_PATH:-}:${currentDir}/dist/tools
4145

4246
for ARG in "$@"; do
4347
case "$ARG" in
@@ -156,7 +160,7 @@ runRollup() {
156160
if [[ -f "${1}/rollup.config.js" ]]; then
157161
cd ${1}
158162

159-
echo "====== $ROLLUP -c ${1}/rollup.config.js"
163+
echo "====== $ROLLUP -c ${1}/rollup.config.js --sourcemap"
160164
$ROLLUP -c rollup.config.js --sourcemap >/dev/null 2>&1
161165

162166
# Recurse for sub directories
@@ -216,11 +220,12 @@ minify() {
216220
# None
217221
#######################################
218222
compilePackage() {
219-
echo "====== [${3}]: COMPILING: ${NGC} -p ${1}/tsconfig-build.json"
220-
# For NODE_PACKAGES items (not getting rolled up)
221-
if containsElement "${3}" "${NODE_PACKAGES[@]}"; then
223+
# For TSC_PACKAGES items
224+
if containsElement "${3}" "${TSC_PACKAGES[@]}"; then
225+
echo "====== [${3}]: COMPILING: ${TSC} -p ${1}/tsconfig-build.json"
222226
$TSC -p ${1}/tsconfig-build.json
223227
else
228+
echo "====== [${3}]: COMPILING: ${NGC} -p ${1}/tsconfig-build.json"
224229
local package_name=$(basename "${2}")
225230
$NGC -p ${1}/tsconfig-build.json
226231
echo "====== Create ${1}/../${package_name}.d.ts re-export file for tsickle"
@@ -247,9 +252,15 @@ compilePackage() {
247252
# None
248253
#######################################
249254
compilePackageES5() {
250-
echo "====== [${3}]: COMPILING: ${NGC} -p ${1}/tsconfig-build.json --target es5 -d false --outDir ${2} --importHelpers true --sourceMap"
251-
local package_name=$(basename "${2}")
252-
$NGC -p ${1}/tsconfig-build.json --target es5 -d false --outDir ${2} --importHelpers true --sourceMap
255+
if containsElement "${3}" "${TSC_PACKAGES[@]}"; then
256+
echo "====== [${3}]: COMPILING: ${TSC} -p ${1}/tsconfig-build.json --target es5 -d false --outDir ${2} --importHelpers true --sourceMap"
257+
local package_name=$(basename "${2}")
258+
$TSC -p ${1}/tsconfig-build.json --target es5 -d false --outDir ${2} --importHelpers true --sourceMap
259+
else
260+
echo "====== [${3}]: COMPILING: ${NGC} -p ${1}/tsconfig-build.json --target es5 -d false --outDir ${2} --importHelpers true --sourceMap"
261+
local package_name=$(basename "${2}")
262+
$NGC -p ${1}/tsconfig-build.json --target es5 -d false --outDir ${2} --importHelpers true --sourceMap
263+
fi
253264

254265
for DIR in ${1}/* ; do
255266
[ -d "${DIR}" ] || continue
@@ -315,7 +326,7 @@ echo "====== BUILDING: Version ${VERSION}"
315326
N="
316327
"
317328
TSC=`pwd`/node_modules/.bin/tsc
318-
NGC="node --max-old-space-size=3000 `pwd`/dist/packages-dist/tsc-wrapped/src/main"
329+
NGC="node --max-old-space-size=3000 `pwd`/dist/tools/@angular/compiler-cli/src/main"
319330
UGLIFYJS=`pwd`/node_modules/.bin/uglifyjs
320331
TSCONFIG=./tools/tsconfig.json
321332
ROLLUP=`pwd`/node_modules/.bin/rollup
@@ -394,14 +405,12 @@ if [[ ${BUILD_ALL} == true ]]; then
394405
fi
395406

396407
if [[ ${BUILD_TOOLS} == true || ${BUILD_ALL} == true ]]; then
397-
echo "====== (tsc-wrapped)COMPILING: \$(npm bin)/tsc -p packages/tsc-wrapped/tsconfig.json ====="
398-
$(npm bin)/tsc -p packages/tsc-wrapped/tsconfig.json
399-
echo "====== (tsc-wrapped)COMPILING: \$(npm bin)/tsc -p packages/tsc-wrapped/tsconfig-build.json ====="
400-
$(npm bin)/tsc -p packages/tsc-wrapped/tsconfig-build.json
401-
cp ./packages/tsc-wrapped/package.json ./dist/packages-dist/tsc-wrapped
402-
cp ./packages/tsc-wrapped/README.md ./dist/packages-dist/tsc-wrapped
403-
updateVersionReferences dist/packages-dist/tsc-wrapped
408+
echo "====== (compiler)COMPILING: \$(npm bin)/tsc -p packages/compiler/tsconfig-tools.json"
409+
$(npm bin)/tsc -p packages/compiler/tsconfig-tools.json
410+
echo "====== (compiler)COMPILING: \$(npm bin)/tsc -p packages/compiler-cli/tsconfig-tools.json"
411+
$(npm bin)/tsc -p packages/compiler-cli/tsconfig-tools.json
404412

413+
mkdir -p ./dist/packages-dist
405414
rsync -a packages/bazel/ ./dist/packages-dist/bazel
406415
# Remove BEGIN-INTERNAL...END-INTERAL blocks
407416
# https://stackoverflow.com/questions/24175271/how-can-i-match-multi-line-patterns-in-the-command-line-with-perl-style-regex

integration/hello_world__closure/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"@angular/core": "file:../../dist/packages-dist/core",
1111
"@angular/platform-browser": "file:../../dist/packages-dist/platform-browser",
1212
"@angular/platform-server": "file:../../dist/packages-dist/platform-server",
13-
"@angular/tsc-wrapped": "file:../../dist/packages-dist/tsc-wrapped",
1413
"google-closure-compiler": "git+https://github.com/alexeagle/closure-compiler.git#packagejson.dist",
1514
"rxjs": "file:../../node_modules/rxjs",
1615
"typescript": "file:../../node_modules/typescript",

integration/i18n/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"@angular/core": "file:../../dist/packages-dist/core",
1111
"@angular/platform-browser": "file:../../dist/packages-dist/platform-browser",
1212
"@angular/platform-server": "file:../../dist/packages-dist/platform-server",
13-
"@angular/tsc-wrapped": "file:../../dist/packages-dist/tsc-wrapped",
1413
"google-closure-compiler": "git+https://github.com/alexeagle/closure-compiler.git#packagejson.dist",
1514
"rxjs": "file:../../node_modules/rxjs",
1615
"typescript": "file:../../node_modules/typescript",

0 commit comments

Comments
 (0)