Skip to content

Commit 4de01c0

Browse files
Merge pull request #281 from angular/master
Rounded Border TextField Elevation
2 parents bb77d89 + 4ad0fb7 commit 4de01c0

File tree

4 files changed

+18
-14
lines changed

4 files changed

+18
-14
lines changed

packages/angular/cli/commands/update-impl.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,18 @@ export class UpdateCommand extends SchematicCommand<UpdateCommandSchema> {
104104
this.logger.info(`Using package manager: '${packageManager}'`);
105105

106106
// Special handling for Angular CLI 1.x migrations
107-
if (options.migrateOnly === undefined && options.from === undefined) {
108-
if (!options.all && packages.length === 1 && packages[0].name === '@angular/cli') {
109-
const oldConfigFilePath = findUp(oldConfigFileNames, process.cwd());
110-
if (oldConfigFilePath) {
107+
if (
108+
options.migrateOnly === undefined &&
109+
options.from === undefined &&
110+
!options.all &&
111+
packages.length === 1 &&
112+
packages[0].name === '@angular/cli' &&
113+
this.workspace.configFile &&
114+
oldConfigFileNames.includes(this.workspace.configFile)
115+
) {
111116
options.migrateOnly = true;
112117
options.from = '1.0.0';
113118
}
114-
}
115-
}
116119

117120
this.logger.info('Collecting installed dependencies...');
118121

packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/typescript.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,16 @@ function _pluginOptionsOverrides(
4949

5050
function _createAotPlugin(
5151
wco: WebpackConfigOptions,
52-
options: any,
53-
useMain = true,
54-
extract = false,
52+
options: AngularCompilerPluginOptions,
53+
i18nExtract = false,
5554
) {
5655
const { root, buildOptions } = wco;
5756

5857
const i18nInFile = buildOptions.i18nFile
5958
? path.resolve(root, buildOptions.i18nFile)
6059
: undefined;
6160

62-
const i18nFileAndFormat = extract
61+
const i18nFileAndFormat = i18nExtract
6362
? {
6463
i18nOutFile: buildOptions.i18nFile,
6564
i18nOutFormat: buildOptions.i18nFormat,
@@ -79,7 +78,7 @@ function _createAotPlugin(
7978
}
8079

8180
let pluginOptions: AngularCompilerPluginOptions = {
82-
mainPath: useMain ? path.join(root, buildOptions.main) : undefined,
81+
mainPath: path.join(root, buildOptions.main),
8382
...i18nFileAndFormat,
8483
locale: buildOptions.i18nLocale,
8584
platform: buildOptions.platform === 'server' ? PLATFORM.Server : PLATFORM.Browser,
@@ -108,7 +107,7 @@ export function getNonAotConfig(wco: WebpackConfigOptions) {
108107
};
109108
}
110109

111-
export function getAotConfig(wco: WebpackConfigOptions, extract = false) {
110+
export function getAotConfig(wco: WebpackConfigOptions, i18nExtract = false) {
112111
const { tsConfigPath, buildOptions } = wco;
113112

114113
const loaders: any[] = [NgToolsLoader];
@@ -123,7 +122,7 @@ export function getAotConfig(wco: WebpackConfigOptions, extract = false) {
123122

124123
return {
125124
module: { rules: [{ test, use: loaders }] },
126-
plugins: [_createAotPlugin(wco, { tsConfigPath }, true, extract)]
125+
plugins: [_createAotPlugin(wco, { tsConfigPath }, i18nExtract)]
127126
};
128127
}
129128

packages/angular_devkit/build_angular/src/extract-i18n/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ async function execute(options: ExtractI18nBuilderOptions, context: BuilderConte
7272
scripts: false,
7373
styles: false,
7474
},
75+
buildOptimizer: false,
7576
i18nLocale: options.i18nLocale,
7677
i18nFormat: options.i18nFormat,
7778
i18nFile: outFile,

packages/ngtools/webpack/src/interfaces.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
import { logging, virtualFs } from '@angular-devkit/core';
10+
import { CompilerOptions } from '@angular/compiler-cli';
1011
import * as fs from 'fs';
1112
import * as ts from 'typescript';
1213

@@ -59,7 +60,7 @@ export interface AngularCompilerPluginOptions {
5960
contextElementDependencyConstructor?: ContextElementDependencyConstructor;
6061

6162
// Use tsconfig to include path globs.
62-
compilerOptions?: ts.CompilerOptions;
63+
compilerOptions?: CompilerOptions;
6364

6465
host?: virtualFs.Host<fs.Stats>;
6566
platformTransformers?: ts.TransformerFactory<ts.SourceFile>[];

0 commit comments

Comments
 (0)