This project is mirrored from https://github.com/angular/angular.git.
Pull mirroring updated .
- Apr 16, 2020
-
-
Andrew Scott authored
This reverts commit c8f3fa9f. PR Close #36648
-
George Kalpakas authored
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
-
George Kalpakas authored
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
-
Pete Bacon Darwin authored
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
- Apr 15, 2020
-
-
Joey Perrott authored
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
-
Joey Perrott authored
PR Close #36464
-
Joey Perrott authored
PR Close #36628
-
Ayaz Hafiz authored
PR Close #36533
-
Greg Magolan authored
PR Close #36580
-
Greg Magolan authored
Lots of bug fixes and stability fixes. Last 1.x release for rules_nodejs. PR Close #36580
-
- Apr 14, 2020
-
-
Tony Bove authored
PR Close #36168
-
Alison Gale authored
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
-
- Apr 13, 2020
-
-
Sonu Kapoor authored
PR Close #36413
-
ajitsinghkaler authored
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
-
ajitsinghkaler authored
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
-
Rajat Soni authored
PR Close #36592
-
Mansour Fall authored
Fixes #36594 PR Close #36597
-
- Apr 11, 2020
-
-
Paul Gschwendtner authored
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
-
George Kalpakas authored
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
-
- Apr 10, 2020
-
-
Andrew Kushnir authored
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
-
George Kalpakas authored
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
-
Pete Bacon Darwin authored
PR Close #36486
-
Pete Bacon Darwin authored
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
-
Pete Bacon Darwin authored
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
-
JoostK authored
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
-
Terence D. Honles authored
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
-
Andrew Scott authored
PR Close #36546
-
Sonu Kapoor authored
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
-
Martin Sikora authored
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
-
George Kalpakas authored
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
-
Pete Bacon Darwin authored
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
-
- Apr 09, 2020
-
-
Greg Magolan authored
PR Close #36531
-
Greg Magolan authored
This reverts commit 92c4f3d5. PR Close #36531
-
Greg Magolan authored
Pre-fractor for future rules_nodejs release when require.resolve patches are removed. PR Close #36471
-
Joey Perrott authored
PR Close #36463
-
Alex Rickabaugh authored
This commit reformats the packages/compiler tree using the new version of clang-format. PR Close #36520
-
Alex Rickabaugh authored
This commit reformats the packages/compiler-cli tree using the new version of clang-format. PR Close #36520
-
Pete Bacon Darwin authored
In cc4b813e 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
-
Greg Magolan authored
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
-