Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: angular/angular-cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v9.1.6
Choose a base ref
...
head repository: angular/angular-cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v9.1.7
Choose a head ref
  • 7 commits
  • 11 files changed
  • 3 contributors

Commits on May 15, 2020

  1. fix(@angular-devkit/build-angular): address vulnerability in webpack-…

    …dev-server
    
    webpack-dev-server <3.11.0 and protractor <7 contains a low severity vulnerability due to one of its dependencies (yargs-parser)
    
    See: https://npmjs.com/advisories/1500
    
    Fixes #17642
    alan-agius4 authored and filipesilva committed May 15, 2020
    Copy the full SHA
    408770d View commit details
  2. fix(@schematics/angular): address vulnerability in protractor

    webpack-dev-server <3.11.0 and protractor <7 contains a low severity vulnerability due to one of its dependencies (yargs-parser)
    
    See: https://npmjs.com/advisories/1500
    
    Fixes #17642
    alan-agius4 authored and filipesilva committed May 15, 2020
    Copy the full SHA
    77e4059 View commit details
  3. refactor: deprecate protractor elementExplorer

    Protractor `elementExplorer` debugger and element explorer cannot be used for Node.js 8+ since it relied on `_debugger` module.
    
    In protractor version 5, this resulted in the below error:
    ```
    ** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
    : Compiled successfully.
    [10:25:35] I/direct - Using ChromeDriver directly...
    [10:25:37] I/protractor -
    [10:25:37] I/protractor - ------- Element Explorer -------
    [10:25:37] I/protractor - Starting WebDriver debugger in a child process. Element Explorer is still beta, please report issues at github.com/angular/protractor
    [10:25:37] I/protractor -
    [10:25:37] I/protractor - Type <tab> to see a list of locator strategies.
    [10:25:37] I/protractor - Use the `list` helper function to find elements by strategy:
    [10:25:37] I/protractor -   e.g., list(by.binding('')) gets all bindings.
    [10:25:37] I/protractor -
    ***********************************************************
    * WARNING: _debugger module not available on Node.js 8    *
    * and higher.                                             *
    *                                                         *
    * Use 'debugger' keyword instead:                       *
    * https://goo.gl/MvWqFh                                   *
    ***********************************************************
    /Users/alanagius/cli-repos/demo-several/node_modules/protractor/built/debugger/debuggerCommons.js:14
      throw e;
      ^
    
    Error: Cannot find module '_debugger'
    Require stack:
    - /Users/alanagius/cli-repos/demo-several/node_modules/protractor/built/debugger/debuggerCommons.js
    - /Users/alanagius/cli-repos/demo-several/node_modules/protractor/built/debugger/clients/explorer.js
        at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
        at Function.Module._load (internal/modules/cjs/loader.js:862:27)
        at Module.require (internal/modules/cjs/loader.js:1042:19)
        at require (internal/modules/cjs/helpers.js:77:18)
        at Object.<anonymous> (/Users/alanagius/cli-repos/demo-several/node_modules/protractor/built/debugger/debuggerCommons.js:3:18)
        at Module._compile (internal/modules/cjs/loader.js:1156:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
        at Module.load (internal/modules/cjs/loader.js:1000:32)
        at Function.Module._load (internal/modules/cjs/loader.js:899:14)
        at Module.require (internal/modules/cjs/loader.js:1042:19) {
      code: 'MODULE_NOT_FOUND',
      requireStack: [
        '/Users/alanagius/cli-repos/demo-several/node_modules/protractor/built/debugger/debuggerCommons.js',
        '/Users/alanagius/cli-repos/demo-several/node_modules/protractor/built/debugger/clients/explorer.js'
      ]
    }
    ```
    
    but in protractor version 7, this logic was removed
    alan-agius4 authored and filipesilva committed May 15, 2020
    Copy the full SHA
    595d7c9 View commit details

Commits on May 18, 2020

  1. fix(@angular-devkit/build-angular): downlevel and optimize locale data

    Locale data is now transformed to be compatible with the ECMAScript level of the application bundles.  The locale data is also optimized to remove comments and unnecessary whitespace.
    
    Fixes: #17497 and Fixes: #17735
    clydin authored and filipesilva committed May 18, 2020
    Copy the full SHA
    b626308 View commit details

Commits on May 20, 2020

  1. ci: schedule daily CI for branch 9.1.x

    clydin authored and filipesilva committed May 20, 2020
    Copy the full SHA
    ed40356 View commit details
  2. fix(@schematics/angular): add tslib as a direct dependency for new li…

    …braries
    
    Tslib version is bound to the TypeScript version used to comopile the library. Thus, we shouldn't list`tslib` as a  `peerDependencies`. This is because, a user can install libraries which have been compiled with older versions of TypeScript and thus require multiple `tslib` versions to be installed.
    
    Reference: TOOL-1374
    alan-agius4 authored and filipesilva committed May 20, 2020
    Copy the full SHA
    34bb57b View commit details

Commits on May 21, 2020

  1. release: v9.1.7

    mgechev committed May 21, 2020
    Copy the full SHA
    ebd5cbc View commit details
28 changes: 27 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -336,7 +336,7 @@ jobs:

workflows:
version: 2
default_workflow:
commits:
jobs:
# Linux jobs
- setup
@@ -449,3 +449,29 @@ workflows:
only: /^v\d+/
branches:
ignore: /.*/
nightly:
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- 9.1.x
jobs:
- setup
- build:
requires:
- setup
- test:
requires:
- build
- test-large:
requires:
- build
- test-browsers:
requires:
- build
- e2e-cli:
name: e2e-cli-nightly
requires:
- build
4 changes: 2 additions & 2 deletions packages/angular_devkit/build_angular/package.json
Original file line number Diff line number Diff line change
@@ -63,7 +63,7 @@
"terser-webpack-plugin": "2.3.5",
"webpack": "4.42.0",
"webpack-dev-middleware": "3.7.2",
"webpack-dev-server": "3.10.3",
"webpack-dev-server": "3.11.0",
"webpack-merge": "4.2.2",
"webpack-sources": "1.4.3",
"webpack-subresource-integrity": "1.4.0",
@@ -96,7 +96,7 @@
"karma-jasmine": "~3.1.0",
"karma-jasmine-html-reporter": "^1.4.0",
"popper.js": "^1.14.1",
"protractor": "~5.4.0",
"protractor": "~7.0.0",
"tslib": "~1.11.0",
"zone.js": "^0.10.0"
},
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@ interface JasmineNodeOpts {

function runProtractor(root: string, options: ProtractorBuilderOptions): Promise<BuilderOutput> {
const additionalProtractorConfig: Partial<ProtractorBuilderOptions> & Partial<JasmineNodeOpts> = {
elementExplorer: options.elementExplorer,
baseUrl: options.baseUrl,
specs: options.specs && options.specs.length ? options.specs : undefined,
suite: options.suite,
Original file line number Diff line number Diff line change
@@ -38,7 +38,8 @@
"elementExplorer": {
"type": "boolean",
"description": "Start Protractor's Element Explorer for debugging.",
"default": false
"default": false,
"x-deprecated": "This option has no effect. See: https://github.com/angular/protractor/blob/master/docs/debugging.md#enabled-control-flow for alternative methods."
},
"webdriverUpdate": {
"type": "boolean",
39 changes: 28 additions & 11 deletions packages/angular_devkit/build_angular/src/utils/process-bundle.ts
Original file line number Diff line number Diff line change
@@ -634,7 +634,7 @@ export async function inlineLocales(options: InlineOptions) {
// If locale data is provided, load it and prepend to file
const localeDataPath = i18n.locales[locale]?.dataPath;
if (localeDataPath) {
localeDataContent = await loadLocaleData(localeDataPath, true);
localeDataContent = await loadLocaleData(localeDataPath, true, options.es5);
}
}

@@ -748,7 +748,7 @@ async function inlineLocalesDirect(ast: ParseResult, options: InlineOptions) {
let localeDataSource: Source | null = null;
const localeDataPath = i18n.locales[locale] && i18n.locales[locale].dataPath;
if (localeDataPath) {
const localeDataContent = await loadLocaleData(localeDataPath, true);
const localeDataContent = await loadLocaleData(localeDataPath, true, options.es5);
localeDataSource = new OriginalSource(localeDataContent, path.basename(localeDataPath));
}

@@ -854,19 +854,36 @@ function findLocalizePositions(
return positions;
}

async function loadLocaleData(path: string, optimize: boolean): Promise<string> {
async function loadLocaleData(path: string, optimize: boolean, es5: boolean): Promise<string> {
// The path is validated during option processing before the build starts
const content = fs.readFileSync(path, 'utf8');

// NOTE: This can be removed once the locale data files are preprocessed in the framework
if (optimize) {
const result = await terserMangle(content, {
compress: true,
ecma: 5,
});
// Downlevel and optimize the data
const transformResult = await transformAsync(content, {
filename: path,
// The types do not include the false option even though it is valid
// tslint:disable-next-line: no-any
inputSourceMap: false as any,
babelrc: false,
configFile: false,
presets: [
[
require.resolve('@babel/preset-env'),
{
bugfixes: true,
// IE 9 is the oldest supported browser
targets: es5 ? { ie: '9' } : { esmodules: true },
},
],
],
minified: allowMinify && optimize,
compact: !shouldBeautify && optimize,
comments: !optimize,
});

return result.code;
if (!transformResult || !transformResult.code) {
throw new Error(`Unknown error occurred processing bundle for "${path}".`);
}

return content;
return transformResult.code;
}
Original file line number Diff line number Diff line change
@@ -3,7 +3,9 @@
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^<%= angularLatestVersion %>",
"@angular/core": "^<%= angularLatestVersion %>",
"@angular/core": "^<%= angularLatestVersion %>"
},
"dependencies": {
"tslib": "^<%= tsLibLatestVersion %>"
}
}
8 changes: 4 additions & 4 deletions packages/schematics/angular/utility/latest-versions.ts
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@

export const latestVersions = {
// These versions should be kept up to date with latest Angular peer dependencies.
Angular: '~9.1.7',
Angular: '~9.1.9',
RxJs: '~6.5.4',
ZoneJs: '~0.10.2',
TypeScript: '~3.8.3',
@@ -18,9 +18,9 @@ export const latestVersions = {
// For our e2e tests, these versions must match the latest tag present on the branch.
// During RC periods they will not match the latest RC until there's a new git tag, and
// should not be updated.
DevkitBuildAngular: '~0.901.6',
DevkitBuildNgPackagr: '~0.901.6',
DevkitBuildWebpack: '~0.901.6',
DevkitBuildAngular: '~0.901.7',
DevkitBuildNgPackagr: '~0.901.7',
DevkitBuildWebpack: '~0.901.7',

ngPackagr: '^9.0.0',
};
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@
"karma-coverage-istanbul-reporter": "~2.1.0",
"karma-jasmine": "~3.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"protractor": "~5.4.3",<% } %>
"protractor": "~7.0.0",<% } %>
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "<%= latestVersions.TypeScript %>"
7 changes: 0 additions & 7 deletions tests/legacy-cli/e2e/tests/basic/e2e.ts
Original file line number Diff line number Diff line change
@@ -57,13 +57,6 @@ export default function () {
},
`, `allScriptsTimeout: 11000,`
))
// Should start up Element Explorer
.then(() => execAndWaitForOutputToMatch('ng', ['e2e', 'test-project', '--element-explorer'],
/Element Explorer/))
.then(() => killAllProcesses(), (err: any) => {
killAllProcesses();
throw err;
})
// Should run side-by-side with `ng serve`
.then(() => execAndWaitForOutputToMatch('ng', ['serve'],
/: Compiled successfully./))
12 changes: 12 additions & 0 deletions tests/legacy-cli/e2e/tests/i18n/ivy-localize-dl-xliff2.ts
Original file line number Diff line number Diff line change
@@ -41,6 +41,18 @@ export async function executeTest() {
await expectFileToMatch(`${outputPath}/vendor-es5.js`, '.ng.common.locales');
await expectFileToMatch(`${outputPath}/vendor-es2015.js`, '.ng.common.locales');

// Verify the locale data is browser compatible
await expectToFail(() => expectFileToMatch(`${outputPath}/vendor-es5.js`, /\bconst\b/));
await expectFileToMatch(`${outputPath}/vendor-es2015.js`, /\bconst\b/);

// Verify locale data comments are removed in production
await expectToFail(() =>
expectFileToMatch(`${outputPath}/vendor-es5.js`, '// See angular/tools/gulp-tasks/cldr/extract.js'),
);
await expectToFail(() =>
expectFileToMatch(`${outputPath}/vendor-es2015.js`, '// See angular/tools/gulp-tasks/cldr/extract.js'),
);

// Execute Application E2E tests with dev server
await ng('e2e', `--configuration=${lang}`, '--port=0');

Loading