https://github.com/angular/angular

sort by:
Revision Author Date Message Commit Date
074266b release: cut the v10.0.0-next.2 release 15 April 2020, 23:09:35 UTC
c4dc642 docs: release notes for the v9.1.2 release 15 April 2020, 23:04:09 UTC
e041ac6 fix(ngcc): display output from the unlocker process on Windows (#36569) On Windows, the output of a detached process (such as the unlocker process used by `LockFileWithChildProcess`) is not shown in the parent process' stdout. This commit addresses this by piping the spawned process' stdin/stdout and manually writing to the parent process' stdout. PR Close #36569 15 April 2020, 16:25:27 UTC
66effde fix(ngcc): do not spawn unlocker processes on cluster workers (#36569) The current ngcc lock-file strategy spawns a new process in order to capture a potential `SIGINT` and remove the lock-file. For more information see #35861. Previously, this unlocker process was spawned as soon as the `LockFile` was instantiated in order to have it available as soon as possible (given that spawning a process is an asynchronous operation). Since the `LockFile` was instantiated and passed to the `Executor`, this meant that an unlocker process was spawned for each cluster worker, when running ngcc in parallel mode. These processes were not needed, since the `LockFile` was not used in cluster workers, but we still had to pay the overhead of each process' own memory and V8 instance. (NOTE: This overhead was small compared to the memory consumed by ngcc's normal operations, but still unnecessary.) This commit avoids the extra processes by only spawning an unlocker process when running on the cluster master process and not on worker processes. PR Close #36569 15 April 2020, 16:25:27 UTC
663b768 fix(ngcc): force ngcc to exit on error (#36622) For some reason (possibly related to async/await promises) the ngcc process is not exiting when spawned from the CLI when there has been an error (such as when it timesout waiting for a lockfile to become free). Calling `process.exit()` directly fixes this. Fixes #36616 PR Close #36622 15 April 2020, 16:24:54 UTC
0147de9 build: fix circular deps failure (#36629) With the large scale refactoring of the repo to the new version of clang-format, some import orders were changed. Specifically the imports found in this range. The file previously read: import {TestBed} from './test_bed'; import {ComponentFixtureAutoDetect, ComponentFixtureNoNgZone, TestBedStatic, TestComponentRenderer, TestModuleMetadata} from './test_bed_common'; import {R3TestBedCompiler} from './r3_test_bed_compiler'; and now reads: import {R3TestBedCompiler} from './r3_test_bed_compiler'; import {TestBed} from './test_bed'; import {ComponentFixtureAutoDetect, ComponentFixtureNoNgZone, TestBedStatic, TestComponentRenderer, TestModuleMetadata} from './test_bed_common'; This change in order cause the circular dependency to be entered earlier and changed the golden file for our circular deps discovery. PR Close #36629 14 April 2020, 20:56:55 UTC
b010849 build: update to latest version of yarn (#36464) PR Close #36464 14 April 2020, 19:47:30 UTC
698b028 build: reformat repo to new clang@1.4.0 (#36613) PR Close #36613 14 April 2020, 19:08:36 UTC
5e80e7e refactor(language-service): clean up and exports and consolidate types (#36533) PR Close #36533 14 April 2020, 17:17:43 UTC
d50cb30 test: disable failing saucelabs tests (#36620) PR Close #36620 14 April 2020, 17:13:33 UTC
29122c5 style: lint (#36580) PR Close #36580 14 April 2020, 17:12:59 UTC
58e1753 build: update to rules_nodejs 1.6.0 (#36580) Lots of bug fixes and stability fixes. Last 1.x release for rules_nodejs. PR Close #36580 14 April 2020, 17:12:59 UTC
f88e635 docs: edit to setup-local (#36168) PR Close #36168 14 April 2020, 00:33:35 UTC
0cc53fb fix(upgrade): update $locationShim to handle Location changes before initialization (#36498) Updates the $locationShim to receive the most recent Location change made, even if it happened before initialize() is called. This is important when AngularJS bootstrapping is deferred and there is a delay between when $locationShim is constructed and when it is initialized. With this change, the $locationShim will correctly reflect any redirects that occurred between construction and initialization. Closes #36492 PR Close #36498 14 April 2020, 00:33:00 UTC
713bce1 docs: move ng-conf 2020 to the already presented section (#36413) PR Close #36413 13 April 2020, 15:20:03 UTC
d972821 fix(docs-infra): contribute page not visible correctly on mobile devices (#36573) on mobile devices screen size < 600px the contribute page is not visible in correct form changed styles to make it visible correctly PR Close #36573 13 April 2020, 15:19:01 UTC
2d16b47 fix(docs-infra): fix About page button text being truncated on small screens (#36576) On small screens (e.g. on mobile), the text on some of the buttons in the About page was truncated. Changed the text size, margin and padding so that the the whole text is visible on such screens (320px to 480px). PR Close #36576 13 April 2020, 15:18:11 UTC
9181b73 docs: fix typo in Tests guide (#36592) PR Close #36592 13 April 2020, 15:17:27 UTC
5737e65 docs(zone.js): fix typos in NgZone guide code example (#36597) Fixes #36594 PR Close #36597 13 April 2020, 15:16:59 UTC
ca67748 fix(core): undecorated-classes-with-decorated-fields migration should avoid error if base class has no value declaration (#36543) The undecorated-classes-with-decorated-fields migration relies on the type checker to resolve base classes of individual classes. It could happen that resolved base classes have no value declaration. e.g. if they are declared through an interface in the default types. Currently the migration will throw in such situations because it assumes that `ts.Symbol#valueDeclaration` is always present. This is not the case, but we don't get good type-checking here due to a bug in the TypeScript types. See: https://github.com/microsoft/TypeScript/issues/24706. Fixes #36522. PR Close #36543 10 April 2020, 20:53:15 UTC
6ab43d7 fix(ngcc): correctly detect external files from nested `node_modules/` (#36559) Previously, when we needed to detect whether a file is external to a package, we only checked whether the relative path to the file from the package's root started with `..`. This would detect external imports when the packages were siblings (e.g. peer dependencies or hoisted to the top of `node_modules/` by the package manager), but would fail to detect imports from packages located in nested `node_modules/` as external. For example, importing `node_modules/foo/node_modules/bar` from a file in `node_modules/foo/` would be considered internal to the `foo` package. This could result in processing/analyzing more files than necessary. More importantly it could lead to errors due to trying to analyze non-Angular packages that were direct dependencies of Angular packages. This commit fixes it by also verifying that the relative path to a file does not start with `node_modules/`. Jira issue: [FW-2068](https://angular-team.atlassian.net/browse/FW-2068) Fixes #36526 PR Close #36559 10 April 2020, 16:10:26 UTC
fee3161 build: update `REQUIRED_BASE_SHA` in merge script to clang 1.4.0 upgrade commit (#36547) Updating `REQUIRED_BASE_SHA` for master and patch branches to make sure PRs that we merge are rebased after clang 1.4.0 upgrade. PR Close #36547 09 April 2020, 23:00:31 UTC
2e4244d fix(docs-infra): fix `elements` example when used with ES5 (#36536) Previously, the `elements` docs example only worked in browsers that natively supported Custom Elements and ES2015 modules. Furthermore, it didn't work on StackBlitz, because StackBlitz ignores the specified `target` in `tsconfig.json` and uses the UMD bundles (i.e. ES5 code) even on browsers that do support ES2015. (NOTE: In the past, this was not a problem, because we explicitly did not provide a StackBlitz example. This has changed in #36067.) This commit ensures the example works on all browsers and also on StackBlitz by providing the necessary Custom Elements polyfills. Fixes #36532 PR Close #36536 09 April 2020, 20:35:27 UTC
3bedfda perf(ngcc): only load if it is needed (#36486) PR Close #36486 09 April 2020, 18:33:28 UTC
ec0ce60 perf(ngcc): reduce the size of the entry-point manifest file (#36486) The base path for package and entry-points is known so there is no need to store these in the file. Also this commit avoids storing empty arrays unnecessarily. PR Close #36486 09 April 2020, 18:33:28 UTC
a185efb perf(ngcc): read dependencies from entry-point manifest (#36486) Previously, even if an entry-point did not need to be processed, ngcc would always parse the files of the entry-point to compute its dependencies. This can take a lot of time for large node_modules. Now these dependencies are cached in the entry-point manifest, and read from there rather than computing them every time. See https://github.com/angular/angular/issues/36414\#issuecomment-608401834 FW-2047 PR Close #36486 09 April 2020, 18:33:28 UTC
4aa4e6f fix(compiler): handle type references to namespaced symbols correctly (#36106) When the compiler needs to convert a type reference to a value expression, it may encounter a type that refers to a namespaced symbol. Such namespaces need to be handled specially as there's various forms available. Consider a namespace named "ns": 1. One can refer to a namespace by itself: `ns`. A namespace is only allowed to be used in a type position if it has been merged with a class, but even if this is the case it may not be possible to convert that type into a value expression depending on the import form. More on this later (case a below) 2. One can refer to a type within the namespace: `ns.Foo`. An import needs to be generated to `ns`, from which the `Foo` property can then be read. 3. One can refer to a type in a nested namespace within `ns`: `ns.Foo.Bar` and possibly even deeper nested. The value representation is similar to case 2, but includes additional property accesses. The exact strategy of how to deal with these cases depends on the type of import used. There's two flavors available: a. A namespaced import like `import * as ns from 'ns';` that creates a local namespace that is irrelevant to the import that needs to be generated (as said import would be used instead of the original import). If the local namespace "ns" itself is referred to in a type position, it is invalid to convert it into a value expression. Some JavaScript libraries publish a value as default export using `export = MyClass;` syntax, however it is illegal to refer to that value using "ns". Consequently, such usage in a type position *must* be accompanied by an `@Inject` decorator to provide an explicit token. b. An explicit namespace declaration within a module, that can be imported using a named import like `import {ns} from 'ns';` where the "ns" module declares a namespace using `declare namespace ns {}`. In this case, it's the namespace itself that needs to be imported, after which any qualified references into the namespace are converted into property accesses. Before this change, support for namespaces in the type-to-value conversion was limited and only worked correctly for a single qualified name using a namespace import (case 2a). All other cases were either producing incorrect code or would crash the compiler (case 1a). Crashing the compiler is not desirable as it does not indicate where the issue is. Moreover, the result of a type-to-value conversion is irrelevant when an explicit injection token is provided using `@Inject`, so referring to a namespace in a type position (case 1) could still be valid. This commit introduces logic to the type-to-value conversion to be able to properly deal with all type references to namespaced symbols. Fixes #36006 Resolves FW-1995 PR Close #36106 09 April 2020, 18:32:21 UTC
078b0be fix(common): `locales/global/*.js` are not ES5 compliant (#36342) Although this code has been part of Angular 9.x I only noticed this error when upgrading to Angular 9.1.x because historically the source locale data was not injected when localizing, but as of angular/angular-cli#16394 (9.1.0) it is now included. This tipped me off that my other bundles were not being built properly, and this change allows me to build a valid ES5 bundle (I have also added a verification step to my build pipeline to alert me if this error appears again in any of my bundles). I found the `locales/global/*.js` file paths being referenced by the `I18nOptions` in @angular-devkit/build-angular/src/utils/i18n-options.ts, and following that it looks like it is actually loaded and used in @angular-devkit/build-angular/src/utils/process-bundle.ts. I saw the function `terserMangle` does appear that it is likely aware of the build being ES5, but I'm not sure why this is not producing a valid ES5 bundle. This change updates `tools/gulp-tasks/cldr/extract.js` to produce ES5 compliant `locales/global/*.js` and that fixes my issue. However, I am not sure if @angular-devkit/build-angular should be modified to produce a valid ES5 bundle instead or if the files could be TypeScript rather than JavaScript files. A test that a valid ES5 bundle is produced would be helpful, and I hope this is reproducible and not some issue with my config. PR Close #36342 09 April 2020, 18:30:32 UTC
13ae2d7 style: format forms validators to fix lint error (#36546) PR Close #36546 09 April 2020, 18:18:22 UTC
99b93e5 docs(forms): clarify the description of `minLength` and `maxLength` (#36297) Previously, it was not clear that the `minLength` and `maxLength` validators can only be used with objects that contain a `length` property. This commit clarifies this. PR Close #36297 09 April 2020, 17:31:03 UTC
80e6c07 fix(router): pass correct component to canDeactivate checks when using two or more sibling router-outlets (#36302) fixes #34614 There's an edge case where if I use two (or more) sibling <router-outlet>s in two (or more) child routes where their parent route doesn't have a component then preactivation will trigger all canDeactivate checks with the same component because it will use wrong OutletContext. PR Close #36302 09 April 2020, 17:09:43 UTC
34aa557 fix(dev-infra): fix commit message validation in git worktrees (#36507) Previously, the `pre-commit-validate` command (used in the `commit-msg` git hook) assumed that the commit message was stored in `.git/COMMIT_EDITMSG` file. This is usually true, but not when using [git worktrees](https://git-scm.com/docs/git-worktree), where `.git` is a file containing the path to the actual git directory. This commit fixes it by taking advantage of the fact that git passes the actual path of the file holding the commit message to the `commit-msg` hook and husky exposes the arguments passed by git as `$HUSKY_GIT_PARAMS`. NOTE: We cannot use the environment variable directly in the `commit-msg` hook command, because environment variables need to be referenced differently on Windows (`%VAR_NAME%`) vs macOS/Linux (`$VAR_NAME`). Instead, we pass the name of the environment variable and the validation script reads the variable's value off of `process.env`. PR Close #36507 09 April 2020, 16:46:18 UTC
e526f74 refactor(compiler): create a new root `BindingScope` for each template (#36362) Previously we had a singleton `ROOT_SCOPE` object, from which all `BindingScope`s derived. But this caused ngcc to produce non-deterministic output when running multiple workers in parallel, since each process had its own `ROOT_SCOPE`. In reality there is no need for `BindingScope` reference names to be unique across an entire application (or in the case of ngcc across all the libraries). Instead we just need uniqueness within a template. This commit changes the compiler to create a new root `BindingScope` each time it compiles a component's template. Resolves #35180 PR Close #36362 09 April 2020, 16:44:56 UTC
9e78f55 style: typescript lint fix (#36531) PR Close #36531 09 April 2020, 00:59:21 UTC
f1731d8 Revert "refactor(bazel): use runfiles helper in ts-api-guardian (#36471)" (#36531) This reverts commit 92c4f3d5085b0fa1c30cd5c9d658d20871419320. PR Close #36531 09 April 2020, 00:59:21 UTC
92c4f3d refactor(bazel): use runfiles helper in ts-api-guardian (#36471) Pre-fractor for future rules_nodejs release when require.resolve patches are removed. PR Close #36471 08 April 2020, 22:57:52 UTC
e92fce1 fix(language-service): remove circular dependency instance (#36463) PR Close #36463 08 April 2020, 22:29:09 UTC
83a9159 style(compiler): reformat of codebase with new clang-format version (#36520) This commit reformats the packages/compiler tree using the new version of clang-format. PR Close #36520 08 April 2020, 21:51:08 UTC
0a69a28 style(compiler-cli): reformat of codebase with new clang-format version (#36520) This commit reformats the packages/compiler-cli tree using the new version of clang-format. PR Close #36520 08 April 2020, 21:51:08 UTC
717df13 fix(ngcc): do not warn if `paths` mapping does not exist (#36525) In cc4b813e759f16fb0f4dfa92a0e6464ed768a629 the `getBasePaths()` function was changed to log a warning if a `basePath()` computed from the `paths` mappings did not exist. It turns out this is a common and accepted scenario, so we should not log warnings in this case. Fixes #36518 PR Close #36525 08 April 2020, 21:29:57 UTC
b40b557 release: cut the v10.0.0-next.1 release 08 April 2020, 19:28:12 UTC
03f2f1a build(bazel): fix runfiles resolve in karma-saucelabs.js after $location => $rootpath cleanup (#36511) This wasn't caught by CI on the PR as this binary is only run once daily via a monitor job. PR Close #36511 08 April 2020, 19:13:27 UTC
a8978eb build: ts-circular-deps tool should normalize golden (#36505) Currently the golden output of the circular-deps tool is purely based on the order of source files passed to the tool, and on the amount of imports inside source files. This is actually resulting in deterministic output as running the tool multiple times without any changes to source files, results in the same output. Though it seems like the tool is too strict and we can avoid unnecessary golden changes if: 1. A source file that is part of a cycle is imported earlier (in terms of how the analyzer visits them). This could result in the cycle path starting with a different source file. 2. Source files which are not part of a cycle are imported earlier (in terms of how the analyzer visits them). This could result in moved items in the golden if re-approved (even though the cycles remain the same) To fix this, we normalize the cycle path array that serves as serializable data structure for the text-based goldens. Since the paths represents a cycle, the path can be shifted in a deterministic way so that cycles don't change unnecessarily in the golden, and to simplify comparison of cycles. Additionally, we sort the cycles in a deterministic way so that the golden doesn't change unnecessarily (as explained above). PR Close #36505 08 April 2020, 19:12:58 UTC
7d7b59e docs: update the Support policy and schedule (#35390) PR Close #35359 PR Close #35390 08 April 2020, 19:12:32 UTC
4cf89d4 docs: replace `browserslist` with `.browserslistrc` (#36504) In version 10, this file has been changed. See: https://github.com/angular/angular-cli/pull/17367 PR Close #36504 08 April 2020, 19:12:03 UTC
d47b318 build: remove `fullTemplateTypeCheck` from aio tsconfig (#36502) `fullTemplateTypeCheck` is no longer required since we now use `strictTemplates` which is a superset of the former option. Follow-up on: https://github.com/angular/angular/commit/04f61c0c3ee9b3616b1719b4ae9c3eb097698218#r38354112 PR Close #36502 08 April 2020, 19:11:28 UTC
e485236 test(language-service): Inline test cases in parsing-cases.ts (#36495) This commit removes individual components from parsing-cases.ts and colocate them with the actual tests. This makes the tests more readable. PR Close #36495 08 April 2020, 19:11:04 UTC
41667de fix(zone.js): add issue numbers of `@types/jasmine` to the test cases (#34625) Some cases will still need to use `spy as any` cast, because `@types/jasmine` have some issues, 1. The issue jasmine doesn't handle optional method properties, https://github.com/DefinitelyTyped/DefinitelyTyped/issues/43486 2. The issue jasmine doesn't handle overload method correctly, https://github.com/DefinitelyTyped/DefinitelyTyped/issues/42455 PR Close #34625 08 April 2020, 19:10:34 UTC
ef4736d build: update jasmine to 3.5 (#34625) 1. update jasmine to 3.5 2. update @types/jasmine to 3.5 3. update @types/jasminewd2 to 2.0.8 Also fix several cases, the new jasmine 3 will help to create test cases correctly, such as in the `jasmine 2.x` version, the following case will pass ``` expect(1 == 2); ``` But in jsamine 3, the case will need to be ``` expect(1 == 2).toBeTrue(); ``` PR Close #34625 08 April 2020, 19:10:34 UTC
db4a448 release: cut the v10.0.0-next.0 release 08 April 2020, 18:08:01 UTC
7549c65 build: update matching regex for bazel stamping (#36523) Previously, the bazel stamping regex only matched on versions 0-9 for major and minor numbers, this update allows for matching on any number for major, minor or patch. PR Close #36523 08 April 2020, 18:04:08 UTC
1beccc1 docs: release notes for the v9.1.1 release 07 April 2020, 23:37:55 UTC
0075017 docs: update reactive forms page (#35969) PR Close #35969 07 April 2020, 22:24:17 UTC
4374931 fix(zone.js): zone.js patch jest should handle done correctly (#36022) `zone.js` supports jest `test.each()` methods, but it introduces a bug, which is the `done()` function will not be handled correctly. ``` it('should work with done', done => { // done will be undefined. }); ``` The reason is the logic of monkey patching `test` method is different from `jasmine` patch // jasmine patch ``` return testBody.length === 0 ? () => testProxyZone.run(testBody, null) : done => testProxyZone.run(testBody, null, [done]); ``` // jest patch ``` return function(...args) { return testProxyZone.run(testBody, null, args); }; ``` the purpose of this change is to handle the following cases. ``` test.each([1, 2])('test.each', (arg1, arg2) => { expect(arg1).toBe(1); expect(arg2).toBe(2); }); ``` so in jest, it is a little complex, because the `testBody`'s parameter may be bigger than 1, so the logic in `jasmine` ``` return testBody.length === 0 ? () => testProxyZone.run(testBody, null) : done => testProxyZone.run(testBody, null, [done]); ``` will not work for `test.each` in jest. So in this PR, I created a dynamic `Function` to return the correct length of paramters (which is required by jest core), to handle 1. normal `test` with or without `done`. 2. each with parameters with or without done. PR Close #36022 07 April 2020, 22:22:16 UTC
64022f5 fix(compiler): resolve enum values in binary operations (#36461) During static evaluation of expressions, the partial evaluator may come across a binary + operator for which it needs to evaluate its operands. Any of these operands may be a reference to an enum member, in which case the enum member's value needs to be used as literal value, not the enum member reference itself. This commit fixes the behavior by resolving an `EnumValue` when used as a literal value. Fixes #35584 Resolves FW-1951 PR Close #36461 07 April 2020, 22:21:51 UTC
f9f6e2e style(compiler): reformat partial evaluator source tree (#36461) PR Close #36461 07 April 2020, 22:21:51 UTC
aecf9de fix(ngcc): correctly identify relative Windows-style import paths (#36372) Previously, `isRelativePath()` assumed paths are *nix-style. This caused Windows-style paths (such as `C:\foo\some-package\some-file.js`) to not be recognized as "relative" imports. This commit fixes this by using the OS-agnostic `isRooted()` helper and also accounting for both styles of path delimiters: `/` and `\` PR Close #36372 07 April 2020, 22:21:27 UTC
81195a2 fix(language-service): use the `HtmlAst` to get the span of HTML tag (#36371) The HTML tag may include `-` (e.g. `app-root`), so use the `HtmlAst` to get the span. PR Close #36371 07 April 2020, 22:10:33 UTC
96a3de6 style(docs-infra): removed extra , from _resources.scss file (#35935) there was a typo in _resourcess.scss file there was an extra comma added some spaces too that were needed for proper styling of the code PR Close #35935 07 April 2020, 22:08:57 UTC
0002713 fix(docs-infra): fix resources page tabs text which is not visible on small screens (#35935) on small mobile screens the top tab bar contains text which was not visible on small screens changed text size, margin and padding so that the text could be contained in these screens (320px to 480px) PR Close #35935 07 April 2020, 22:08:57 UTC
4a18428 docs(forms): Remove unnecessary repeating periods (#36474) PR Close #36474 07 April 2020, 18:35:43 UTC
7f28845 test(language-service): remove ng-for-cases.ts (#36470) This commit removes ng-for-cases.ts and moves all test cases to inline expressions in TEST_TEMPLATE. PR Close #36470 07 April 2020, 18:34:38 UTC
1dd0b6c test(language-service): remove ng-if-cases.ts (#36470) This commit removes ng-if-cases.ts and moves all test cases to inline expressions in TEST_TEMPLATE. PR Close #36470 07 April 2020, 18:34:38 UTC
e0415db fix(router): state data missing in routerLink (#36462) fixes #33173 - router state data is missing on routerLink when used with non-anchor elements. PR Close #36462 07 April 2020, 18:31:25 UTC
95fc3d4 fix(core): ngOnDestroy on multi providers called with incorrect context (#35840) Currently destroy hooks are stored in memory as `[1, hook, 5, hook]` where the numbers represent the index at which to find the context and `hook` is the function to be invoked. This breaks down for `multi` providers, because the value at the index will be an array of providers, resulting in the hook being invoked with an array of all the multi provider values, rather than the provider that was destroyed. In ViewEngine `ngOnDestroy` wasn't being called for `multi` providers at all. These changes fix the issue by changing the structure of the destroy hooks to `[1, hook, 5, [0, hook, 3, hook]]` where the indexes inside the inner array point to the provider inside of the multi provider array. Note that this is slightly different from the original design which called for the structure to be `[1, hook, 5, [hook, hook]`, because in the process of implementing it, I realized that we wouldn't get passing the correct context if only some of the `multi` providers have `ngOnDestroy` and others don't. I've run the newly-added `view_destroy_hooks` benchmark against these changes and compared it to master. The difference seems to be insignificant (between 1% and 2% slower). Fixes #35231. PR Close #35840 07 April 2020, 17:31:41 UTC
e145fa1 test(language-service): delete expression-cases.ts (#36468) This commit deletes `expression-cases.ts` and moves the test cases to inline expressions in TEST_TEMPLATE. PR Close #36468 07 April 2020, 17:20:27 UTC
5fa7b8b fix(ngcc): detect non-emitted, non-imported TypeScript helpers (#36418) When TypeScript downlevels ES2015+ code to ES5, it uses some helper functions to emulate some ES2015+ features, such as spread syntax. The TypeScript compiler can be configured to emit these helpers into the transpiled code (which is controlled by the `noEmitHelpers` option - false by default). It can also be configured to import these helpers from the `tslib` module (which is controlled by the `importHelpers` option - false by default). While most of the time the helpers will be either emitted or imported, it is possible that one configures their app to neither emit nor import them. In that case, the helpers could, for example, be made available on the global object. This is what `@nativescript/angular` v9.0.0-next-2019-11-12-155500-01 does. See, for example, [common.js][1]. Ngcc must be able to detect and statically evaluate these helpers. Previously, it was only able to detect emitted or imported helpers. This commit adds support for detecting these helpers if they are neither emitted nor imported. It does this by checking identifiers for which no declaration (either concrete or inline) can be found against a list of known TypeScript helper function names. [1]: https://unpkg.com/browse/@nativescript/angular@9.0.0-next-2019-11-12-155500-01/common.js PR Close #36418 07 April 2020, 17:19:22 UTC
2c7d366 refactor(language-service): provide service for attribute binding type (#36301) This commit refactors the process for determining the type of an Angular attribute to be use a function that takes an attribute name and returns the Angular attribute kind and name, rather than requiring the user to query match the attribute name with the regex and query the matching array. This refactor prepares for a future change that will improve the experience of completing attributes in `()`, `[]`, or `[()]` contexts. PR Close #36301 07 April 2020, 17:18:32 UTC
2dd6f25 ci: manually set available resources for bazel on windows CI (#36458) PR Close #36458 07 April 2020, 17:12:29 UTC
d2623f1 style(zone.js): fix lint errors after clang update (#36487) Recent ZoneJS-related commit (https://github.com/angular/angular/commit/416c786774dccc20d824737207be4e55cb53c9cc) update the `promise.ts` file, but it looks like original PR was not rebased after clang update. As a result, the `lint` CircleCI job started to fail in master after merging that PR (https://github.com/angular/angular/pull/36311). This commit updates the format of the `promise.ts` script according to the new clang rules. PR Close #36487 07 April 2020, 17:10:34 UTC
7d0af17 style(forms): reformat of the `forms` package after clang update (#36466) PR Close #36466 07 April 2020, 16:47:09 UTC
416c786 fix(zone.js): should not try to patch fetch if it is not writable (#36311) Close #36142 In Firefox extensions, the `window.fetch` is not configurable, that means ``` const desc = Object.getOwnPropertyDescriptor(window, 'fetch'); desc.writable === false; ``` So in this case, we should not try to patch `fetch`, otherwise, it will throw error ('fetch is ReadOnly`) PR Close #36311 06 April 2020, 22:34:33 UTC
93302b7 build: update to latest version of husky (#36459) PR Close #36459 06 April 2020, 22:33:26 UTC
eb8c6c7 test(language-service): Move pipe tests to TEST_TEMPLATE (#36407) This commit simplifies the completion tests for pipes by moving them to TEST_TEMPLATE. PR Close #36407 06 April 2020, 22:32:33 UTC
8660806 build(docs-infra): renamed `e2e` property of `example-config.json` to `tests` (#36143) Each docs example has an `example-config.json` configuration file. Among other things, this file can be used to specify what commands to run in order to test the example. (If not specified, the `run-example-e2e.js` script will run a default `yarn e2e` command.) Previously, the property specifying the test commands was called `e2e`. This is because in the past only e2e tests were run for docs examples. Since recently, some examples may specify commands for other types of tests (such as unit tests). Therefore, calling the property that holds the list of test commands `e2e` no longer makes sense and can be misleading to people looking at the configuration files. This commit renamed the property to the more generic `tests`. In the future, the `run-example-e2e.js` script (and corresponding npm script) should be renamed and refactored to also avoid giving the impression that only e2e tests are run. Discussed in: https://github.com/angular/angular/pull/36143#discussion_r395148379 PR Close #36143 06 April 2020, 22:31:07 UTC
4c5e085 build(docs-infra): update docs examples `package.json` templates wrt `core-js` (#36143) The `core-js` dependency is no longer included in `package.json` for `cli`-type examples, but only for the `systemjs` ones. This commit updates the `package.json` templates to reflect that (and also updates the `npm-packages` guide accordingly). PR Close #36143 06 April 2020, 22:31:07 UTC
d707124 test(docs-infra): fix unit tests and run them for specific docs examples on CI (#36143) Previously, only e2e tests were run for docs examples on CI. As a result, unit tests (which are included in the zipped archives we provide for users to download and play with the examples locally) were often outdated and broken. This commit configures specific docs examples that have meaningful unit tests to run them on CI (via the `run-example-e2e.js` script). Where necessary, the unit tests are fixed to ensure they pass and reflect the changes in the corresponding component/service. This commit also removes some auto-generated unit tests that are not meaningful (e.g. make trivial assertions, such that a component instance is truthy) and are often broken anyway (e.g. because the corresponding component has been changed in ways that make the tests fail). PR Close #36143 06 April 2020, 22:31:07 UTC
aece366 build(docs-infra): switch docs examples to Ivy (#36143) The docs examples are switched to Ivy. On CI, the tests are run with both Ivy and ViewEngine. Partially addresses: [FW-1609](https://angular-team.atlassian.net/browse/FW-1609) PR Close #36143 06 April 2020, 22:31:07 UTC
09c8416 docs: fix broken guide link (tutorial/index --> tutorial) (#36453) Replace broken link (`tutorial/index`) with `tutorial`. PR Close #36453 06 April 2020, 20:56:00 UTC
d43c306 fix(core): avoid migration error when non-existent symbol is imported (#36367) In rare cases a project with configured `rootDirs` that has imports to non-existent identifiers could fail in the migration. This happens because based on the application code, the migration could end up trying to resolve the `ts.Symbol` of such non-existent identifiers. This isn't a problem usually, but due to a upstream bug in the TypeScript compiler, a runtime error is thrown. This is because TypeScript is unable to compute a relative path from the originating source file to the imported source file which _should_ provide the non-existent identifier. An issue for this has been reported upstream: https://github.com/microsoft/TypeScript/issues/37731. The issue only surfaces since our migrations don't provide an absolute base path that is used for resolving the root directories. To fix this, we ensure that we never use relative paths when parsing tsconfig files. More details can be found in the TS issue. Fixes #36346. PR Close #36367 06 April 2020, 20:21:54 UTC
ee70a18 fix(ngcc): don't crash on cyclic source-map references (#36452) The source-map flattening was throwing an error when there is a cyclic dependency between source files and source-maps. The error was either a custom one describing the cycle, or a "Maximum call stack size exceeded" one. Now this is handled more leniently, resulting in a partially loaded source file (or source-map) and a warning logged. Fixes #35727 Fixes #35757 Fixes https://github.com/angular/angular-cli/issues/17106 Fixes https://github.com/angular/angular-cli/issues/17115 PR Close #36452 06 April 2020, 20:19:53 UTC
76a8cd5 fix(ngcc): add process title (#36448) Add process.title, so it's clearly in the task manager when ngcc is running See: https://github.com/angular/angular/issues/36414#issuecomment-609644282 PR Close #36448 06 April 2020, 20:19:17 UTC
4c7f89f ci: exclude ngcc directory from fw-compiler pull-approve rule (#35933) ngcc has its own pull-approve group PR Close #35933 06 April 2020, 20:16:37 UTC
f9fb833 fix(ngcc): support ignoring deep-imports via package config (#36423) Recently we added support for ignoring specified deep-import warnings by providing sets of regular expressions within the `ngcc.config.js` file. But this was only working for the project level configuration. This commit fixes ngcc so that it will also read these regular expressions from package level configuration too. Fixes #35750 PR Close #36423 06 April 2020, 18:32:09 UTC
6b3aa60 fix(ngcc): support simple `browser` property in entry-points (#36396) The `browser` package.json property is now supported to the same level as `main` - i.e. it is sniffed for UMD, ESM5 and CommonJS. The `browser` property can also contain an object with file overrides but this is not supported by ngcc. Fixes #36062 PR Close #36396 06 April 2020, 18:31:10 UTC
2463548 fix(ngcc): sniff `main` property for ESM5 format (#36396) Previously, `main` was only checked for `umd` or `commonjs` formats. Now if there are `import` or `export` statements in the source file it will be deemed to be in `esm5` format. Fixes #35788 PR Close #36396 06 April 2020, 18:31:10 UTC
1140bbc refactor(language-service): reformat using clang-format (#36426) clang-format was recently updated and any PRs that touch files in the language service will have to reformat all the files. Instead of changing the formatting in those PRs, this PR formats all files in language-service package once and for all. PR Close #36426 06 April 2020, 16:29:42 UTC
1b4df64 docs: add missing command in `WebWorker` guide (#36397) The command was accidentally removed in #36383 PR Close #36397 06 April 2020, 16:29:17 UTC
f40d517 fix(dev-infra): use commit message validation from @angular/dev-infra-private (#36172) Prior to this change we manage a local version of commit message validation in addition to the commit message validation tool contained in the ng-dev tooling. By adding the ability to validate a range of commit messages together, the remaining piece of commit message validation that is in the local version is replicated. We use both commands provided by the `ng-dev commit-message` tooling: - pre-commit-validate: Set to automatically run on an git hook to validate commits as they are created locally. - validate-range: Run by CI for every PR, testing that all of the commits added by the PR are valid when considered together. Ensuring that all fixups are matched to another commit in the change. PR Close #36172 06 April 2020, 16:28:52 UTC
e893c5a fix(compiler-cli): pass real source spans where they are empty (#31805) Some consumers of functions that take `ParseSourceSpan`s currently pass empty and incorrect source spans. This fixes those cases. PR Close #31805 06 April 2020, 16:28:27 UTC
8be8466 style(ngcc): reformat of ngcc after clang update (#36447) PR Close #36447 06 April 2020, 16:26:57 UTC
c8bef12 docs: adding Doguhan Uluca as GDE resource (#34789) PR Close #34789 03 April 2020, 21:03:57 UTC
568e9df fix(router): allow UrlMatcher to return null (#36402) The matcher is allowed to return null per https://angular.io/api/router/UrlMatcher#usage-notes And run `yarn gulp format` to pick up recent clang format changes. Closes #29824 BREAKING CHANGE: UrlMatcher's type now reflects that it could always return null. If you implemented your own Router or Recognizer class, please update it to handle matcher returning null. PR Close #36402 03 April 2020, 18:16:23 UTC
a555fdb build: update pullapprove config to better handle global approvals (#36384) Beginning with this change, global approvals will now require the approver to include `Reviewed-for: global-approvers`, and a docs global approval requires `Reviewed-for: global-docs-approvers`. Historically, providing a review by any member of the global reviewer groups would automatically be considered a global review. This change enforces that global approval should be an intentional, explicit action. The global-approvers and global-docs-approvers group will not be requested as reviews by pullapprove. PR Close #36384 03 April 2020, 18:11:30 UTC
36535e9 fix(dev-infra): correct pullapprove global approval regex (#36384) PR Close #36384 03 April 2020, 18:11:30 UTC
6402a9a build: rebuild yarn lock from scratch (#36377) Rebuild the yarn lock file from scratch to collapse instances where one package is able to satisfy multiple dependencies. Currently we have some situations where we have multiple versions when one would work. Example: ``` "@babel/code-frame@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/cod integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij dependencies: "@babel/highlight" "^7.0.0" "@babel/code-frame@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/cod integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQ dependencies: "@babel/highlight" "^7.0.0" "@babel/code-frame@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/cod integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0j dependencies: "@babel/highlight" "^7.8.3" ``` becomes ``` "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5", "@babel/code-frame@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/cod integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0j dependencies: "@babel/highlight" "^7.8.3" ``` PR Close #36377 03 April 2020, 18:09:17 UTC
ca25c95 fix(ngcc): correctly detect imported TypeScript helpers (#36284) The `NgccReflectionHost`s have logic for detecting certain known declarations (such as `Object.assign()` and TypeScript helpers), which allows the `PartialEvaluator` to evaluate expressions it would not be able to statically evaluate otherwise. In #36089, `DelegatingReflectionHost` was introduced, which delegates to a TypeScript `ReflectionHost` when reflecting on TypeScript files, which for ngcc's case means `.d.ts` files of dependencies. As a result, ngcc lost the ability to detect TypeScript helpers imported from `tslib`, because `DelegatingReflectionHost` was not able to apply the known declaration detection logic while reflecting on `tslib`'s `.d.ts` files. This commit fixes this by ensuring `DelegatingReflectionHost` calls the `NgccReflectionHost`'s `detectKnownDeclaration()` method as necessary, even when using the TypeScript `ReflectionHost`. NOTE: The previous commit exposed a bug in ngcc that was hidden due to the tests' being inconsistent with how the `ReflectionHost`s are used in the actual program. The changes in this commit are verified by ensuring the failing tests are now passing (hence no new tests are added). PR Close #36284 03 April 2020, 18:08:46 UTC
93f07ae test(ngcc): use `DelegatingReflectionHost` for testing `NgccReflectionHost`s (#36284) In #36089, `DelegatingReflectionHost` was introduced. Under the hood, it delegates another `NgccReflectionHost` in order to reflect over the program's source files, while using a different TypeScript `ReflectionHost` to reflect over `.d.ts` files (which is how external dependencies are represented in the program). Previously, the `NgccReflectionHost`s were used directly in tests. This does not exercise them in the way they are exercised in the actual program, because (when used directly) they will also reflect on `.d.ts` files too (instead of delegating to the TypeScript `ReflectionHost`). This could hide bugs that would happen on the actual program. This commit fixes this by using the `DelegatingReflectionHost` in the various `NgccReflectionHost` tests. NOTE: This change will cause some of the existing tests to start failing. These failures demonstrate pre-existing bugs in ngcc, that were hidden due to the tests' being inconsistent with how the `ReflectionHost`s are used in the actual program. They will be fixed in the next commit. PR Close #36284 03 April 2020, 18:08:46 UTC
0af6e9f refactor(ngcc): move logic for identifying known declarations to method (#36284) The `NgccReflectionHost`s have logic for detecting certain known declarations (such as `Object.assign()` and TypeScript helpers), which allows the `PartialEvaluator` to evaluate expressions it would not be able to statically evaluate otherwise. This commit moves the logic for identifying these known declarations to dedicated methods. This is in preparation of allowing ngcc's `DelegatingReflectionHost` (introduced in #36089) to also apply the known declaration detection logic when reflecting on TypeScript sources. PR Close #36284 03 April 2020, 18:08:46 UTC
008e12e fix(benchpress): fix typings in lview_debug.ts (#36236) * Installing & using benchpress was throwing typescript errors because typings were not defined for the getters in lview_debug.ts PR Close #36236 03 April 2020, 18:06:07 UTC
back to top