Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ minify() {
base_file=$( basename "${file}" )
if [[ "${base_file}" =~ $regex && "${base_file##*.}" != "map" ]]; then
local out_file=$(dirname "${file}")/${BASH_REMATCH[1]}.min.js
$UGLIFYJS -c --screw-ie8 --comments -o ${out_file} --source-map ${out_file}.map --prefix relative --source-map-include-sources ${file}
echo "====== $UGLIFY -c --comments -o ${out_file} --source-map "includeSources=true,content='${file}.map',filename='${out_file}.map'" ${file}"
$UGLIFY -c --comments -o ${out_file} --source-map "includeSources=true,content='${file}.map',filename='${out_file}.map'" ${file}
fi
done
}
Expand Down Expand Up @@ -344,7 +345,7 @@ N="
"
TSC=`pwd`/node_modules/.bin/tsc
NGC="node --max-old-space-size=3000 `pwd`/dist/tools/@angular/compiler-cli/src/main"
UGLIFYJS=`pwd`/node_modules/.bin/uglifyjs
UGLIFY=`pwd`/node_modules/.bin/uglifyjs
TSCONFIG=./tools/tsconfig.json
ROLLUP=`pwd`/node_modules/.bin/rollup

Expand Down
2 changes: 1 addition & 1 deletion integration/cli-hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
"protractor": "~5.1.2",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "2.4.2"
"typescript": "file:../../node_modules/typescript"
}
}
61 changes: 30 additions & 31 deletions integration/cli-hello-world/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
rxjs "^5.5.6"

"@angular/animations@file:../../dist/packages-dist/animations":
version "6.0.0-beta.1-b36cc7db7"
version "6.0.0-beta.7-2027ec8895"
dependencies:
tslib "^1.7.1"
tslib "^1.9.0"

"@angular/cli@1.6.6":
version "1.6.6"
Expand Down Expand Up @@ -97,55 +97,55 @@
node-sass "^4.7.2"

"@angular/common@file:../../dist/packages-dist/common":
version "6.0.0-beta.1-b36cc7db7"
version "6.0.0-beta.7-2027ec8895"
dependencies:
tslib "^1.7.1"
tslib "^1.9.0"

"@angular/compiler-cli@file:../../dist/packages-dist/compiler-cli":
version "6.0.0-beta.1-b36cc7db7"
version "6.0.0-beta.7-2027ec8895"
dependencies:
chokidar "^1.4.2"
minimist "^1.2.0"
reflect-metadata "^0.1.2"
tsickle "^0.26.0"
tsickle "^0.27.2"

"@angular/compiler@file:../../dist/packages-dist/compiler":
version "6.0.0-beta.1-b36cc7db7"
version "6.0.0-beta.7-2027ec8895"
dependencies:
tslib "^1.7.1"
tslib "^1.9.0"

"@angular/core@file:../../dist/packages-dist/core":
version "6.0.0-beta.1-b36cc7db7"
version "6.0.0-beta.7-2027ec8895"
dependencies:
tslib "^1.7.1"
tslib "^1.9.0"

"@angular/forms@file:../../dist/packages-dist/forms":
version "6.0.0-beta.1-b36cc7db7"
version "6.0.0-beta.7-2027ec8895"
dependencies:
tslib "^1.7.1"
tslib "^1.9.0"

"@angular/http@file:../../dist/packages-dist/http":
version "6.0.0-beta.1-b36cc7db7"
version "6.0.0-beta.7-2027ec8895"
dependencies:
tslib "^1.7.1"
tslib "^1.9.0"

"@angular/language-service@file:../../dist/packages-dist/language-service":
version "6.0.0-beta.1-b36cc7db7"
version "6.0.0-beta.7-2027ec8895"

"@angular/platform-browser-dynamic@file:../../dist/packages-dist/platform-browser-dynamic":
version "6.0.0-beta.1-b36cc7db7"
version "6.0.0-beta.7-2027ec8895"
dependencies:
tslib "^1.7.1"
tslib "^1.9.0"

"@angular/platform-browser@file:../../dist/packages-dist/platform-browser":
version "6.0.0-beta.1-b36cc7db7"
version "6.0.0-beta.7-2027ec8895"
dependencies:
tslib "^1.7.1"
tslib "^1.9.0"

"@angular/router@file:../../dist/packages-dist/router":
version "6.0.0-beta.1-b36cc7db7"
version "6.0.0-beta.7-2027ec8895"
dependencies:
tslib "^1.7.1"
tslib "^1.9.0"

"@ngtools/json-schema@1.1.0", "@ngtools/json-schema@^1.1.0":
version "1.1.0"
Expand Down Expand Up @@ -6366,7 +6366,7 @@ source-map-resolve@^0.5.0:
source-map-url "^0.4.0"
urix "^0.1.0"

source-map-support@^0.4.1, source-map-support@^0.4.2, source-map-support@~0.4.0:
source-map-support@^0.4.1, source-map-support@~0.4.0:
version "0.4.18"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f"
dependencies:
Expand Down Expand Up @@ -6854,16 +6854,16 @@ tsconfig@^7.0.0:
strip-bom "^3.0.0"
strip-json-comments "^2.0.0"

tsickle@^0.26.0:
version "0.26.0"
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.26.0.tgz#40b30a2dd6abcb33b182e37596674bd1cfe4039c"
tsickle@^0.27.2:
version "0.27.2"
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.27.2.tgz#f33d46d046f73dd5c155a37922e422816e878736"
dependencies:
minimist "^1.2.0"
mkdirp "^0.5.1"
source-map "^0.5.6"
source-map-support "^0.4.2"
source-map "^0.6.0"
source-map-support "^0.5.0"

tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1:
tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8"

Expand Down Expand Up @@ -6929,9 +6929,8 @@ typedarray@^0.0.6, typedarray@~0.0.5:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"

typescript@2.4.2:
version "2.4.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.2.tgz#f8395f85d459276067c988aa41837a8f82870844"
"typescript@file:../../node_modules/typescript":
version "2.7.2"

typescript@~2.6.2:
version "2.6.2"
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
"prebuildifier": "bazel build --noshow_progress @com_github_bazelbuild_buildtools//buildifier",
"buildifier": "find . -type f \\( -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs $(bazel info bazel-bin)/external/com_github_bazelbuild_buildtools/buildifier/buildifier",
"preinstall": "node tools/yarn/check-yarn.js",
"postinstall": "yarn update-webdriver",
"postinstall": "yarn update-webdriver; node ./tools/postinstall-patches.js",
"update-webdriver": "webdriver-manager update --gecko false $CHROMEDRIVER_VERSION_ARG",
"check-env": "gulp check-env"
},
"dependencies": {
"core-js": "^2.4.1",
"reflect-metadata": "^0.1.3",
"rxjs": "5.5.5",
"rxjs": "5.5.6",
"tslib": "^1.7.1",
"zone.js": "^0.8.12"
},
Expand Down Expand Up @@ -96,16 +96,16 @@
"rollup-plugin-sourcemaps": "0.4.2",
"selenium-webdriver": "3.5.0",
"semver": "5.4.1",
"shelljs": "^0.7.8",
"shelljs": "^0.8.1",
"source-map": "0.5.7",
"source-map-support": "0.4.18",
"systemjs": "0.18.10",
"tsickle": "0.26.0",
"tslint": "5.7.0",
"tslint-eslint-rules": "4.1.1",
"tsutils": "2.20.0",
"typescript": "2.6.x",
"uglify-js": "2.8.29",
"typescript": "2.7.x",
"uglify-es": "^3.3.9",
"universal-analytics": "0.4.15",
"vlq": "0.2.2",
"vrsource-tslint-rules": "5.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/bazel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"peerDependencies": {
"@angular/compiler-cli": "0.0.0-PLACEHOLDER",
"typescript": ">=2.4.2 <2.7"
"typescript": ">=2.7.2 <2.8"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I wonder if we need to do something with @bazel/typescript too - it's tied to be the same version as google3. But if the integration/bazel test passes, that should be sufficient...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah. the whole setup is a bit finicky during this transitional period. but if we get all the tests to pass unmodified and g3 is green then we should have enough coverage to land this. I'm fine with this since the situation is temporary.

},
"repository": {
"type": "git",
Expand Down
5 changes: 4 additions & 1 deletion packages/compiler-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@
"chokidar": "^1.4.2"
},
"peerDependencies": {
"typescript": ">=2.4.2 <2.7",
"typescript": ">=2.7.2 <2.8",
"@angular/compiler": "0.0.0-PLACEHOLDER"
},
"engines" : {
"node" : ">=8.0"
},
"repository": {
"type": "git",
"url": "https://github.com/angular/angular.git"
Expand Down
4 changes: 3 additions & 1 deletion packages/compiler-cli/src/diagnostics/typescript_symbols.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ export function getClassMembers(
if (declaration) {
const type = checker.getTypeAtLocation(declaration);
const node = program.getSourceFile(staticSymbol.filePath);
return new TypeWrapper(type, {node, program, checker}).members();
if (node) {
return new TypeWrapper(type, {node, program, checker}).members();
}
}
}

Expand Down
9 changes: 6 additions & 3 deletions packages/compiler-cli/src/transformers/lower_expressions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,12 @@ export function getExpressionLoweringTransformFactory(
// Return the factory
return (context: ts.TransformationContext) => (sourceFile: ts.SourceFile): ts.SourceFile => {
// We need to use the original SourceFile for reading metadata, and not the transformed one.
const requests = requestsMap.getRequests(program.getSourceFile(sourceFile.fileName));
if (requests && requests.size) {
return transformSourceFile(sourceFile, requests, context);
const originalFile = program.getSourceFile(sourceFile.fileName);
if (originalFile) {
const requests = requestsMap.getRequests(originalFile);
if (requests && requests.size) {
return transformSourceFile(sourceFile, requests, context);
}
}
return sourceFile;
};
Expand Down
9 changes: 6 additions & 3 deletions packages/compiler-cli/src/transformers/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ class AngularCompilerProgram implements Program {
private host: CompilerHost, oldProgram?: Program) {
this.rootNames = [...rootNames];

if (ts.version < '2.4.2' || (ts.version >= '2.7.0' && !options.disableTypeScriptVersionCheck)) {
if ((ts.version < '2.7.2' || ts.version >= '2.8.0') && !options.disableTypeScriptVersionCheck) {
throw new Error(
`The Angular Compiler requires TypeScript >=2.4.2 and <2.7 but ${ts.version} was found instead.`);
`The Angular Compiler requires TypeScript >=2.7.2 and <2.8.0 but ${ts.version} was found instead.`);
}

this.oldTsProgram = oldProgram ? oldProgram.getTsProgram() : undefined;
Expand Down Expand Up @@ -304,7 +304,10 @@ class AngularCompilerProgram implements Program {
genFile = genFileByFileName.get(sourceFile.fileName);
if (!sourceFile.isDeclarationFile && !GENERATED_FILES.test(sourceFile.fileName)) {
// Note: sourceFile is the transformed sourcefile, not the original one!
emittedSourceFiles.push(this.tsProgram.getSourceFile(sourceFile.fileName));
const originalFile = this.tsProgram.getSourceFile(sourceFile.fileName);
if (originalFile) {
emittedSourceFiles.push(originalFile);
}
}
}
this.writeFile(outFileName, outData, writeByteOrderMark, onError, genFile, sourceFiles);
Expand Down
22 changes: 12 additions & 10 deletions packages/compiler-cli/test/diagnostics/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,16 +240,18 @@ export function getDiagnosticTemplateInfo(
const members = getClassMembers(context.program, context.checker, type);
if (members) {
const sourceFile = context.program.getSourceFile(type.filePath);
const query = getSymbolQuery(
context.program, context.checker, sourceFile,
() =>
getPipesTable(sourceFile, context.program, context.checker, compiledTemplate.pipes));
return {
fileName: templateFile,
offset: 0, query, members,
htmlAst: compiledTemplate.htmlAst,
templateAst: compiledTemplate.templateAst
};
if (sourceFile) {
const query = getSymbolQuery(
context.program, context.checker, sourceFile,
() => getPipesTable(
sourceFile, context.program, context.checker, compiledTemplate.pipes));
return {
fileName: templateFile,
offset: 0, query, members,
htmlAst: compiledTemplate.htmlAst,
templateAst: compiledTemplate.templateAst
};
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ describe('symbol query', () => {
const service = ts.createLanguageService(host, registry);
program = service.getProgram();
checker = program.getTypeChecker();
sourceFile = program.getSourceFile('/quickstart/app/app.component.ts');
sourceFile = program.getSourceFile('/quickstart/app/app.component.ts') !;
const options: CompilerOptions = Object.create(host.getCompilationSettings());
options.genDir = '/dist';
options.basePath = '/quickstart';
Expand Down
Loading