-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Templates ignored after saving tsconfig.json #1923
Comments
Ah, thank you for the reproduction! I'm seeing this behavior as well and I suspect this has been the root cause of issues for quite some time. |
Happy to help! Great work on the extension 👏 |
…ct` reloads When the `ts.Project` creates the language service plugin (in this case, the Angular Language Service), it sets the project's language service to the new language service returned by the plugin create: https://sourcegraph.com/github.com/microsoft/TypeScript@b12af0fa2bbd4b015e59adcfb49988cea7f919a1/-/blob/src/server/project.ts?L2035-2044 The project may be reloaded in response to various events, such as a change to the tsconfig file, which then recreates the plugin. When this happens, the language service that gets passed to the plugin `create` function will not be the typescript language service, but rather the previous instance of the new language service returned by the last call to `create`. This commit ensures that subsequent calls to `create` for the `NgLanguageService` plugin for a project after the first call are able to retrieve and hold on to the _TypeScript_ language service. fixes angular/vscode-ng-language-service#1923
…ct` reloads When the `ts.Project` creates the language service plugin (in this case, the Angular Language Service), it sets the project's language service to the new language service returned by the plugin create: https://sourcegraph.com/github.com/microsoft/TypeScript@b12af0fa2bbd4b015e59adcfb49988cea7f919a1/-/blob/src/server/project.ts?L2035-2044 The project may be reloaded in response to various events, such as a change to the tsconfig file, which then recreates the plugin. When this happens, the language service that gets passed to the plugin `create` function will not be the typescript language service, but rather the previous instance of the new language service returned by the last call to `create`. This commit ensures that subsequent calls to `create` for the `NgLanguageService` plugin for a project after the first call are able to retrieve and hold on to the _TypeScript_ language service. fixes angular/vscode-ng-language-service#1923
…ct` reloads (#51912) When the `ts.Project` creates the language service plugin (in this case, the Angular Language Service), it sets the project's language service to the new language service returned by the plugin create: https://sourcegraph.com/github.com/microsoft/TypeScript@b12af0fa2bbd4b015e59adcfb49988cea7f919a1/-/blob/src/server/project.ts?L2035-2044 The project may be reloaded in response to various events, such as a change to the tsconfig file, which then recreates the plugin. When this happens, the language service that gets passed to the plugin `create` function will not be the typescript language service, but rather the previous instance of the new language service returned by the last call to `create`. This commit ensures that subsequent calls to `create` for the `NgLanguageService` plugin for a project after the first call are able to retrieve and hold on to the _TypeScript_ language service. fixes angular/vscode-ng-language-service#1923 PR Close #51912
* docs: remove the links to docs.angular.lat (#51117) docs.angular.lat hasn't been updated in a while and is stuck at v10. Let's remove it. Fixes #47644 PR Close #51117 * build: update io_bazel_rules_sass digest to e2e30df (#51126) See associated pull request for more information. PR Close #51126 * build: update cross-repo angular dependencies (#51127) See associated pull request for more information. PR Close #51127 * build: update cross-repo angular dependencies (#51132) See associated pull request for more information. PR Close #51132 * docs: updated the benchpress readme doc (#51110) PR Close #51110 * fix(http): check whether `Zone` is defined (#51119) Accessing the `Zone` variable without checking if it's defined or not leads to an error "Zone is not defined" if zone.js is not imported (nooped). This commit adds an additional check before getting the current zone where the `doRequest` is being called. PR Close #51119 * docs: Add links to the injection context guide (#51129) PR Close #51129 * docs: fix typos in first app tutorial (#51115) PR Close #51115 * build: lock file maintenance (#51134) See associated pull request for more information. PR Close #51134 * refactor(compiler): handle braces in block parameters (#51143) Fixes that using braces in the block parameters would result in incorrect tokens being produced. Currently we don't have any blocks that allow object literal parameters, but it may come up in the future. PR Close #51143 * docs: remove trailing periods after `@see` (#51144) This fixes a rendering issue where the periods would be bellow the text block. PR Close #51144 * docs: updated the word in tutorial template (#51150) PR Close #51150 * docs: remove orphan migration docs (#51147) These docs are orphoned, no longer referenced anywhere in the docs, we can safery remove them. PR Close #51147 * feat(common): add component input binding support for NgComponentOutlet (#51148) This commit add component input binding support for NgComponentOutlet. PR Close #51148 * refactor(core): Better use of Object.keys() (#51153) Code cleaning arround the `Object.keys()` in the core tests. PR Close #51153 * docs: updated the tour of heroes doc file (#51151) PR Close #51151 * ci: correct changed github action paths (#51168) Change to the new paths to the github actions after dev-infra refactor PR Close #51168 * docs: release notes for the v16.1.7 release * release: cut the v16.2.0-next.4 release * docs: fixed grammar error in vulnerability reporting (#47326) Split a run-on sentence into 2 sentences and improved link accessibility. PR Close #47326 * docs: improve readability, use future tense to indicate future events (#49578) Summary of changes: * change 'notice that' -> note that * break large sentence to smaller ones to improve readability * use future tense & modal verbs to indicate future events PR Close #49578 * docs(docs-infra): Adding required and Transform Args into the usage and documentation of input (#51173) I# No commands remaining. PR Close #51173 * fix(devtools): ensure that inspected component label is always in the viewport (#50656) Currently the label showing the component name is always positioned from the bottom/right edge of the element which may be outside of the viewport. These changes add some logic to fall back to a different position so that the label is always visible. I've also cleaned the `highlighter.ts` file up a bit. Fixes #48479. PR Close #50656 * refactor(compiler): Support `$any` in template pipeline (#50899) `$any(...)` casts should be dropped, except when they are an explicit call on `this.$any(...)`. Fix a bug in which we were transforming `ThisReceiver` into an implicit receiver. PR Close #50899 * refactor(compiler): Fix `$event` in listeners for template pipeline (#50899) Previously, `$event` was interpreted as a lexical read on the enclosing context. Now, a new pass converts such reads into simple output AST reads of `$event`, so they are not processed by the context resolution or naming phases. Additionally, the same pass sets a field on the enclosing listener op, so that the reify phase does not have to search for reads of `$event`. PR Close #50899 * refactor(compiler): Introduce source maps in the template pipeline. (#50899) Begin producing source maps for the template pipeline, for a couple fundamental kinds of instructions, including elements, templates, properties, text, and interpolations. PR Close #50899 * refactor(compiler): Compatibility mode for the template pipeline. (#50899) Add a compatibility setting to the component compilation. Accordingly, remove all the custom compatibility flags passed to each phase, and use the main setting instead. PR Close #50899 * refactor(compiler): Prepare the template pipeline to support host bindings. (#50899) Refactor `compilation.ts` by introducing two new concepts: 1. A compilation unit, which has create and update ops. Compilations of individual views are compilation units, as are individual host bindings. 2. Aa compilation job, which has several compilation units. For example, a whole component is a compilation job, because it can have many view compilation units. A host binding compilation is a job in addition to a unit, because each host binding unit is always a singleton. Then, we begin modifying phases to accept general compilation jobs instead of component compilations specifically, which will allow us to run them on host bindings. In particular, we update the following phases: `phaseReify`, and `phaseChaining`. PR Close #50899 * refactor(compiler): Template pipeline: accept host bindings in additional phases (#50899) Modify most of the remaining necessary phases to accept generic `CompilationJobs`. This includes `phasePureLiteralStructures`, `phaseNullishCoalescing`, `phaseExpandSafeReads`, `phaseVariableOptimization`, `phaseNaming`, and `phasePureFunctionExtraction`. PR Close #50899 * refactor(compiler): Refactor processing of bindings and interpolations. (#50899) Today, bindings on templates are ingested in highly distinct ways, depending on the parsed binding kind, as well as special cases for `style` and `class`. This makes it very difficult to also ingest them for host bindings without duplicating all this subtle logic. To solve this, we introduce two major related refactors: 1. Move all processing of attributes into phases. This dramatically reduces the amount of code in `ingest.ts`, which is now only responsible for ingesting an abstract `BindingOp`. The later phases replace each `BindingOp` with more specific ops for each binding kind. For example, `binding_specialization.ts` transforms each abstract `BindingOp` into a concrete `PropertyOp`, `AttributeOp`, etc. Likewise, `style_binding_specialization.ts` performs special-case transformations for style and class bindings. This approach has the additional advantage of separating the creation of attribute and property bindings from other special cases. 2. Eliminate all interpolation ops. Instead, allow the expression inside of an op to be of a new `Interpolation` type. The reify code will then emit the appropriate instruction variant (interpolated or unary). 3. Separate some concerns that were previously mixed in, such as empty bindings and listeners on templates. These refactors cause major downstream code changes across the system, especially to attribute extraction and variable counting. PR Close #50899 * refactor(compiler): Allow host bindings to be ingested into the template pipeline. (#50899) Alter the compiler code to ingest and process host bindings, using the newly updated compilation passes. This is currently switched off in the outer compiler layer, but lays the foundation for actually generating the host binding functions using template pipeline. PR Close #50899 * refactor(compiler): Allow host binding functions to specialize bindings (#50899) Interestingly, host bindings are parsed quite differently from template functions. For example, bindings such as `[style.foo]: 3px` would be parsed into a value, unit, and type when bound to a template, but will not be parsed as such when used in a host binding. In this commit, we remedy this shortcoming by adding support for bindings in host binding functions to the template pipeline. In particular, we create a phase to process these bindings, and transform them into the correct output binding kind. Additionally, we fix some other minor bugs and omissions. Finally, we enable compilation of host bindings with the template pipeline, which requires us to turn off a number of failing tests. PR Close #50899 * refactor(compiler): Enable additional tests for the template pipeline (#50899) A number of tests were previously disabled, but are now passing with the latest changes. PR Close #50899 * refactor(compiler): Delete some redundant types in template pipeline. (#50899) Previously we refactored the compilation to use the concepts of "jobs" and "units." However, old type aliases were provided to avoid changing all call-sites in bulk. Here, those aliases are deleted, and call sited updated: 1. `ComponentCompilation` becomes `ComponentCompilationJob`. 2. `ViewCompilation` becomes `ViewCompilationUnit`. PR Close #50899 * refactor(compiler): support `ngNonBindable` in the template pipeline (#51188) When a container-like element has the `ngNonBindable` special attribute, bindings are disabled for it and its descendants. This requires emitting the `disableBindings` and `enableBindings` instructions when nested content exists. PR Close #51188 * refactor(compiler): Allow chaining of listeners in template pipeline (#51188) Calls to the listener instruction can be chained. PR Close #51188 * refactor(compiler): Support `svg` and `math` namespace instructions in template pipeline (#51188) Templates may contain special `svg` and `math` elements, as well as logical descendants of those elements (e.g. `svg` may contain `g`). These will be parsed with a special colon-prefixed *namespace identifier*, such as `:svg:svg`, or `:svg:g`, or `:math:infinity`. The template pipeline now considers these namespace prefixes, and stores them specially on the Element and Template data structures, ultimately generating the appropriate runtime instructions to change namespaces when needed. PR Close #51188 * refactor(compiler): Generate temporaries in host bindings for template pipeline (#51188) Add the ability to name and resolve generated temporary variables in host bindings, using the existing phase. PR Close #51188 * refactor(compiler): Ingest host attribute bindings in template pipeline (#51188) Host property bindings beginning with `attr.` should have `Attribute` binding kind, and result in an `attribute` instruction. This should really be handled in the parser in the future. PR Close #51188 * feat(core): support Provider type in Injector.create (#49587) This commit updates the Injector.create function to accept the `Provider` type in addition to the `StaticProvider` type. This should make it easier to work with the Injector.create function and have less type casts if you have a list of `Provider`s available. PR Close #49587 * fix(compiler): return full spans for Comment nodes (#50855) Change sourceSpan for Comment nodes to cover the whole comment instead of just the opening token. The primary motivation for this is the interaction between ESLint and `@angular-eslint`. ESLint can detect unused `eslint-disable` directives in comments and automatically remove them when running with `--fix`. This is based on ranges computed from AST spans, and as a result does not work inside Angular templates - right now all comments claim to be 4 characters long so only the opening `<!--` is removed. PR Close #50855 * refactor(compiler): make element instruction chainable (#50975) Makes the `ɵɵelement` instruction chainable in the template pipeline PR Close #50975 * refactor(compiler): add support for animation properties (#50975) Adds support for binding animation properties, e.g. PR Close #50975 * refactor(compiler): make listener instruction chainable (#50975) Makes the `ɵɵlistener` instruction chainable in the template pipeline PR Close #50975 * refactor(compiler): add support for animation listeners (#50975) Adds support for binding animation listeners, e.g. PR Close #50975 * refactor(compiler): add utility to enable deferred blocks for testing (#51183) Adds the `ɵsetEnabledBlockTypes` utility that can be used when writing JIT tests using `defer` blocks. Intended usage: ```ts import {ɵsetEnabledBlockTypes as setEnabledBlockTypes} from '@angular/compiler/src/jit_compiler_facade'; describe('deferred tests', () => { beforeEach(() => setEnabledBlockTypes(['defer'])); afterEach(() => setEnabledBlockTypes([])); it('should work', () => { // test goes here }); }); ``` PR Close #51183 * docs: Change "ng run build:ssr" to "npm run build:ssr" in universal.md (#51192) PR Close #51192 * ci: remove migrated circleci jobs (#51194) Remove test_angular_devtools and test_win jobs which were migrated to GHA PR Close #51194 * refactor(compiler): add support for sanitizing properties and attributes (#51156) Sets sanitizer functions when attempting to set sensitive properties and attributes PR Close #51156 * feat(devtools): create profiler for DI and injector events (#48639) Currently, understanding dependency injection in Angular requires a lot of context and has been sited in our surveys as one of the largest points of confusion that our users have with the framework. This commit is the beginning of our approach to make debugging dependency injection in Angular easier. This commit introduces injector profiler callbacks in parts of the framework to emit injector events. It also introduces a default handler for these events. This default handler parses the stream of events to construct some data structures that will support new injector debug APIs. We have implemented a similar pattern in the past to minimize overhead. There is also the possiblity of making the internal `setInjectorProfiler` function a public debug API in the future, so that users can implement their own handlers to debug DI events. Lastly DI in Angular maps nicely to a stream of events. For production applications there is no runtime overhead. For applications in dev mode there is some additional overhead from the default profiler handling injector events and holding debug data in memory. For production applications, dead code elimination should strip all of the code used by this PR. PR Close #48639 * refactor(core): convert walkProviderTree and `processInjectorTypesWithProviders` to callback style interfaces (#48639) walkProviderTree and processInjectorTypesWithProviders both perform some generic traversal logic of the import graph of an input NgModule or Standalone component. Currently, these functions pass around a `providersOut` array that is used to collect providers at each step of the traversal. This PR converts those functions to accept visitor callbacks instead of the `providersOut` array. This is done to make the traversal logic of these functions reusable, while leaving it up to the visitor to determine the logic that fires for each visited node. This refactor would allow us to reuse `walkProviderTree` for injector debugging APIs that could support some cool features in DevTools, like tracing the injector resolution path of an injected property on a component instance all the way up to the specific imported module/standalone component. PR Close #48639 * feat(core): create injector debugging APIs (#48639) This commit introduces 3 new APIs. getDependenciesFromInstantiation: - Given an injector and a token that was instantiated by that injector, discover all of the things were injected in the instance of that token - This API is meant to enable recursive inspection of dependencies. Dependencies returned by this API include which injector they were providedIn, which enables the continous use of getDependenciesFromInstantiation to determine the dependencies of dependencies getInjectorProviders: - Given an injector, discover all of the providers that were configured in that injector. - This API returns information on the configured providers of an injector, including the import path that leads to the container that the provider originated from (NgModule or standalone directive). This enables fine grained inspection to determine where a specific provider comes from. getInjectorParent: - Given an injector, discover the parent of that injector. - This function is meant to be used recursively to discover the entire resolution path from a starting injector to the NullInjector. These APIs were designed to be used together. For example, getInjectorParent can be used to discover the structure of an injector hierarchy. Once that's done, getInjectorProviders can be used to determine the providers of each injector in that hierarchy. Another example: getDependenciesFromInstantiation can be used to discover the dependencies of a specific injector constructed instance. From there, we can use getInjectorParent to discover the injector resolution path and map each dependency to a path from the starting injector to the injector that it was provided in. PR Close #48639 * test(core): unit tests for the injector profiler and injector debugging APIs (#48639) Creates unit tests for the following APIs - setInjectorProfiler - getInjectorProviders - getInjectorResolutionPath - getDependenciesFromInjectable Modifies existing tests in - packages/examples/core/di/ts/injector_spec.ts - packages/core/test/render3/jit/declare_injectable_spec.ts - packages/core/test/render3/jit/declare_factory_spec.ts because they setup framework injector context manually. Exports setInjectorProfilerContext in packages/core/src/core_private_export.ts in order for use in the the modified tests above. PR Close #48639 * build: update io_bazel_rules_sass digest to ded821e (#51139) See associated pull request for more information. PR Close #51139 * refactor(compiler): add DeferredSymbolTracker class to keep track of symbol usages (#51162) This commit adds a new class called `DeferredSymbolTracker` to keep track of all usages of a particular symbol within a source file and allow to detect whether a symbol can be defer loaded (i.e. if there are any references to a symbol). PR Close #51162 * refactor(compiler): update TemplateBinder and DirectiveBinder to work with defer blocks (#51162) This commit updates the logic of the TemplateBinder and DirectiveBinder classes to recognize defer blocks. The logic is updated to prevent Directive and Pipe matching inside the defer block. Instead, the scope for those blocks would be calculated separately. PR Close #51162 * refactor(compiler): extracting helper function and types to the top level (#51162) This is a minor refactoring of the ComponentHandler class logic to extract helper function and types to the top level for simplicity and reuse across other functions of the class. PR Close #51162 * refactor(compiler): compute the list of dependencies for defer blocks (#51162) This commit brings the logic to calculate teh set of dependencies for each defer block. For each dependency we also identify whether it can be defer-loaded or not. PR Close #51162 * refactor(compiler): handle defer blocks in TemplateDefinitionBuilder (#51162) Updates the TemplateDefinitionBuilder class to generate the `defer` instruction for `{#defer}` blocks. Also generates dependency function that would be invoked at runtime (with dynamic imports inside). PR Close #51162 * docs: add new edition of Angular Projects book (#51184) PR Close #51184 * docs: fix typos in component overview guide (#51197) PR Close #51197 * docs: update the html tags (#51198) PR Close #51198 * docs: add the title tag (#51199) PR Close #51199 * docs: add lang attributes to the files (#51200) PR Close #51200 * docs: fix typos (#51201) PR Close #51201 * docs: updated the doc files (#51204) PR Close #51204 * docs: remove duplicate words. (#51215) Using the `\b(\w+)\s+\1\b` we can find duplicate word. Let's remove them. PR Close #51215 * refactor(core): removing reflect-metadata from symbol tests. (#51217) We were not reyling on it anymore. PR Close #51217 * refactor(core): createInjector is a private function (#51221) `createInjector` is not public. PR Close #51221 * refactor(core): Remove dead unit test code (#51223) This code is duplicated but unused. PR Close #51223 * refactor(core): remove useless hack (#51224) This hack is remnant of the Ivy migration. PR Close #51224 * docs: add the title tag (#51233) PR Close #51233 * docs: add lang attribute to html files (#51235) PR Close #51235 * docs: fix warning about an unknown decorator (#51237) dgeni was complaning about an unknown decorator (`@Input`) PR Close #51237 * feat(core): add afterRender and afterNextRender (#50607) Add and expose the after*Render functions as developer preview PR Close #50607 * test(compiler): allow alternate expected file for template pipeline (#51100) In some cases it is not feasible to have the template pipeline produce the exact same compiled output as the TemplateDefinitionBuilder. This commit adds support to the testing infrastructure to have different expected output files for each. This option should be used sparingly, as we want the output to be as close as possible. PR Close #51100 * refactor(compiler): reuse temp vars when possible (#51100) Updates the template pipeline's temporary variables phase to reuse temporary variables within an expression. The algorithm implemented here reuses variables more aggressively than TemplateDefinitionBuilder. This change in behavior is acceptable, as it is unlikely to cause any failures, and implementing the exact behavior observed in TemplateDefinitionBuilder would be difficult. PR Close #51100 * refactor(compiler): support safe function calls (#51100) Adds support for safe function calls in template pipeline compiler PR Close #51100 * docs: release notes for the v16.1.8 release * release: cut the v16.2.0-rc.0 release * refactor(compiler): drop regular imports when symbols can be defer-loaded (#51171) This commit updates the logic to drop regular imports when all symbols that it brings can be defer-loaded. The change ensures that there is no mix of regular and dynamic imports present in a source file. PR Close #51171 * docs: fix missing space after full stop (#51252) Fixes #51250 PR Close #51252 * docs: add title tag to index file (#51266) PR Close #51266 * refactor(core): introduce LView and LContainer utility functions (#51191) This refactoring adds utility functions to add / remove LView from LContainer. Those utils are preparation for the control flow and defer work. Existing code was refactored to use the new utility functions and avoid any code duplication. PR Close #51191 * refactor(core): deprecate `PACKAGE_ROOT_URL` token (#51222) Usage was removed in #43884 PR Close #51222 * refactor(core): remove unused private provider (#51222) Both `DEFAULT_PACKAGE_URL_PROVIDER` and `ERROR_COLLECTOR_TOKEN` are unused across the project PR Close #51222 * docs: add deprecation of `PACKAGE_ROOT_URL` (#51222) PR Close #51222 * refactor(core): remove unnecessary import for custom expect. (#51216) Also adding some missing assertion after `expect()` PR Close #51216 * refactor(core): throw an error when hydration marker is missing from DOM (#51170) (#51276) non-destructive hydration expects the DOM tree to have the same structure in both places. With this commit, the app will throw an error if comments are stripped out by the http server (eg by some CDNs). PR Close #51276 * fix(core): handle hydration of view containers for root components (#51247) For cases when a root component also acts as an anchor node for a ViewContainerRef (for example, when ViewContainerRef is injected in a root component), there is a need to serialize information about the component itself, as well as an LContainer that represents this ViewContainerRef. Effectively, we need to serialize 2 pieces of info: (1) hydration info for the root component itself and (2) hydration info for the ViewContainerRef instance (an LContainer). Each piece of information is included into the hydration data (in the TransferState object) separately, thus we end up with 2 ids. Since we only have 1 root element, we encode both bits of info into a single string: ids are separated by the `|` char (e.g. `10|25`, where `10` is the ngh for a component view and 25 is the `ngh` for a root view which holds LContainer). Previously, we were only including component-related information, thus all the views in the view container remained dehydrated and duplicated (client-rendered from scratch) on the client. Resolves #51157. PR Close #51247 * refactor(animations): remove unecessary interface (#50662) `Animation` is provided by `lib.dom`. PR Close #50662 * docs: Instead of CanActivateFn, CanActivateChildFn appears in CanActivateFn docs (#51283) A minor error is present within the documentation. Specifically, in the documentation for the CanActivateFn function, a reference is made to the CanActivateChildFn function. However, it appears that the CanActivateChildFn function is not utilized or referenced elsewhere in the documentation of CanActivateFn. PR Close #51283 * docs: Add after*Render to Component Lifecycle guide (#51291) PR Close #51291 * refactor: add `dgp1130` to DevTools PullApprove config (#51301) DevTools falls under Angular Tooling and I'll probably be reviewing future PRs for the extension. PR Close #51301 * release: cut the v16.2.0 release * docs: Correct statement about app.module.ts generation with --standalone flag (#51307) The documentation incorrectly stated that the app.module.ts file is generated when the --standalone flag is used. This is not the case, and the documentation should accurately reflect the behavior. Closes #51306 PR Close #51307 * docs: add legend tag to fieldset (#51259) PR Close #51259 * ci: migrate framework tests to GHA (#51101) Migrate framework presubmit test job to use Github Actions PR Close #51101 * fix(router): Apply named outlets to children empty paths not appearing in the URL (#51292) Empty path routes are effectively 'passthrough' routes that do not appear in the URL. When these exist in the route tree, we do not want to apply named outlet commands to that tree location. Instead, we skip past this location in the tree, effectively squashing/removing this passthrough route from the tree. fixes #50356 PR Close #51292 * docs(docs-infra): Hide decorator option row if empty. (#51327) In case where the decorator option has no description nor usageNotes, we can hide that row. PR Close #51327 * docs: update @self() decorator explanation (#51342) PR Close #51342 * ci: migrate aio jobs to GHA (#51071) Migrate aio presubmit and deploy jobs to use Github Actions PR Close #51071 * docs(docs-infra): Fix minor typos in dependency-injection-context.md (#51324) PR Close #51324 * docs(core): Fix minor typo in comment of injector_compatibility.ts (#51324) PR Close #51324 * docs: Add CDN Optimization section to hydration guide (#51355) This adds a section to cover the case of CDNs that have optimizations that will break both Angular and Hydration by stripping comment nodes. PR Close #51355 * docs: Add Missing SSR integrity marker error doc page (#51340) This commit adds an error doc page for error 507 : Missing SSR content integrity marker. PR Close #51340 * build: update pullapprove (#51360) update pullapprove to remove self from unavailable list PR Close #51360 * docs: Fix Promise.then wrong parameter (#51322) Removed the second wrong parameter from the `Promise.then()` method in the doc. PR Close #51322 * docs(docs-infra): fix minor typo in standalone-migration.md (#51370) PR Close #51370 * docs: add the doc type attribute (#51332) PR Close #51332 * docs: Improve host binding docs (#51326) This commit adds the mention of the support of styles/classes/attributes in host bindings. fixes # 44296 PR Close #51326 * docs: Add usage information to `HttpInterceptorFn` (#51236) Simple doc addendum PR Close #51236 * docs(common): add new date format example to documentation (#51359) PR Close #51359 * docs(common): revert format date_pipe (#51359) PR Close #51359 * docs: add new UI library resource from the Tailwind CSS ecosystem (#50976) PR Close #50976 * docs(router): Clarify how to clear secondary routes (#51376) The example for clearing secondary outlets currently only works because the named outlet appears at the root of the application's route config. If developers follow this example with an outlet that is not at the root level, they will not be able to close the outlet. This commit updates the example to provide a more robust way of clearing the outlet from the activated outlet component as well as providing a warning about how the commands are applied. Lastly, there is a small bit of guidance provided for developers who might want to explore the ability to close an outlet from any location in the app, without needing to be aware of the activated route. An example of this can be found here: https://stackblitz.com/edit/close-outlet-from-anywhere resolves #51373 resolves #13523 PR Close #51376 * refactor(core): Ensure hydration cleanup runs in the Angular zone (#51321) Hydration cleanup needs to run in the Angular zone so that change detection will run. PR Close #51321 * release: cut the v16.2.1 release * docs(docs-infra): fix `docs-watch` script (#51316) With this commit we can use `yarn docs-watch` again Fixes #51308 PR Close #51316 * docs: fix see also links. (#51379) These were all the @see with no links. PR Close #51379 * fix(common): Allow safeUrl for ngSrc in NgOptimizedImage (#51351) Allow safeUrl and add transformer to immediately convert ngSrc to string PR Close #51351 * docs: add instruction how to run aio locally (#51402) This test is part of CI and is needed in addition to tests in packages. PR Close #51402 * docs: fix links in `UpgradeAdapter` (#51395) PR Close #51395 * refactor(platform-browser-dynamic): remove reexport of `MetadataOverrider` (#51412) this commit removes an unnecessary re-export PR Close #51412 * fix(compiler-cli): enforce a minimum version to be used when a library uses input transform (#51413) Angular 16.1 introduced the input transform feature, requiring the partial compilation output to be extended with a reference to the input transform function. This has resulted in a subtle breaking change, where older versions of the Angular linker can no longer consume libraries that have started to use this feature. We do try to support using a 16.1 library from an Angular 16.0 application, but if a library actually adopts a new feature then this is no longer possible. In such cases, it is desirable to report a message telling the user that their version of the Angular compiler is too old, as determined by the `"minVersion"` property that is present in each partial declaration. This version would still indicate that the declaration required at least Angular 14.0 to be compiled, but this is not accurate once input transforms are being used. Consequently, this error would not be reported, causing a less informative error once the input transform was being observed. Fixes #51411 PR Close #51413 * docs(docs-infra): fix margin on contribute page heading (#51393) fix margin on h2 tag of contribute page being overwritten closes #51391 PR Close #51393 * ci: remove myself from pullapprove unavailability list (#51437) Removes myself from the pullapprove unavailability list. PR Close #51437 * fix(core): guard the jasmine hooks (#51394) This commit fixes a regression introduced in #50063 Fixes #51382 PR Close #51394 * docs(service-worker): Miss a comma in sample (#3) (#51336) PR Close #51336 * docs(animations): update animation docs to be standalone first (#51390) Update the animation example files to be standalone and use boostrap application, update the documentation to prioritize standalone PR Close #51390 * fix(router): Ensure `canceledNavigationResolution: 'computed'` works on first page (#51441) Setting the page ID is currently broken for the first page because the helper method's second parameter is optional, which allowed the initally `undefined` page ID to be used again when the router performs its initial navigation. fixes #50983 PR Close #51441 * docs: add link to developer survey 2023 (#51444) PR Close #51444 * docs: review Angular elements guide (#50043) PR Close #50043 * docs: add lang attribute in html files (#51269) PR Close #51269 * docs: remove update reference (#51449) Remove reference that `--routing` was added in 8.1 PR Close #51449 * docs: update `versions.md` for 16.2 (#51448) PR Close #51448 * refactor(router): Have router subscribe to transition events to update state (#48427) Rather than the navigation transitions managing Router state, this commit updates the Router to manage its own state based on ongoing transition events. In the future, this can be abstracted even further to have a totally separate class that manages the Router state. This would allow the potential for swapping state manager implementations rather than having to implement all types of state management in a single place. One finding during tests was that unexpected errors thrown by the state management code moved to the Router here will no longer be caught by the transition pipe's `catchError`. This only includes calls to the following public Api methods: * `go`, `replaceState`, `historyGo`, `isCurrentPathEqualTo` on `Location` * `UrlSerializer.serialize` * `UrlHandlingStrategy.merge`. None of these methods should throw if the router is expected to function. These might throw when tests include incomplete mocks, which is not supported, or in cases where the actual browser methods like `replaceState` would throw. This will already result in unexpected/unsupported behavior. The failure case here is now arguably better - the navigation itself still completes but the state update (either updating Router internal state or updating the browser URL) fails separately and is unhandled. PR Close #48427 * docs: add MSYS2 to DEVELOPER.md (#51459) PR Close #51459 * ci: correctly check aio job results (#51464) Correctly check the aio job result to determine if we should deploy. PR Close #51464 * release: cut the v16.2.2 release * docs(docs-infra): Update text mdn to MDN (#51470) PR Close #51470 * build: include bazel build file in aio playground code (#51485) Include the bazel build file in the aio playground code so it contains the same bazel targets as the regular examples. PR Close #51485 * ci: properly provide environment variables for aio deployment (#51484) Provide environment variables PR Close #51484 * build: provide CI_BUILD_URL env variable (#51488) Provide the link to the job workflow on github actions PR Close #51488 * build: add AIO_PAYLOAD_TOKEN env variable (#51489) add environement variable for deployment PR Close #51489 * docs(docs-infra): set meta description per page (#51487) aio currently uses the same `<meta name="Description">` content for every page. It seems like this might be causing a problem with search engine indexing such that different pages are being marked as duplicates of each other. It's unfortunately impossible to know whether this will actually fix the issue without it going live. PR Close #51487 * ci: fix escaping for determing current stable version (#51496) Fix the escaping for the sed command determining the stable version PR Close #51496 * docs: remove MessageService information from HeroService section (#51501) PR Close #51501 * docs(docs-infra): remove inactive resource from community page (#51418) PR Close #51418 * fix(core): handle hydration of view containers that use component hosts as anchors (#51456) This commit fixes an issue where serialization of a view container fails in case it uses a component host as an anchor. This fix is similar to the fix from #51247, but for cases when we insert a component (that acts as a host for a view container) deeper in a hierarchy. Resolves #51318. PR Close #51456 * docs: add browsers switch to CI test example (#50451) PR Close #50451 * fix(core): run afterRender callbacks outside of the Angular zone (#51551) afterRender should run outside of the Angular zone so that it does not trigger further CD cycles PR Close #51551 * build: use pin for devcontainer base image (#51556) Use pinned verison of container image for devcontainer. PR Close #51556 * fix(language-service): correct incomplete escaping (#51557) Correct incomplete escaping and replace all instances of $ PR Close #51557 * fix(core): correct incomplete escaping (#51557) Correct incomplete escaping and replace all instances of comment delimiters PR Close #51557 * fix(compiler-cli): correct incomplete escaping (#51557) Correct incomplete escaping and replace all instances of ` PR Close #51557 * build: update security related package version for aio (#51562) Update packages for security exposure PR Close #51562 * fix(docs-infra): escape the `.` character in regex (#51555) Escape the `.` character in a hostnaem regex PR Close #51555 * fix(core): remove unnecessary escaping in regex expressions (#51554) Correct various Useless regular-expression character escape issues. PR Close #51554 * fix(animations): remove unnecessary escaping in regex expressions (#51554) Correct various Useless regular-expression character escape issues. PR Close #51554 * fix(compiler-cli): remove unnecessary escaping in regex expressions (#51554) Correct various Useless regular-expression character escape issues. PR Close #51554 * fix(devtools): remove unnecessary escaping in regex expressions (#51554) Correct various Useless regular-expression character escape issues. PR Close #51554 * docs: fix typos in search results component (#51433) PR Close #51433 * docs: fix casing of a11y labels in main page (#51431) PR Close #51431 * docs: fix casing of image alt in page not found (#51432) PR Close #51432 * docs: fix casing of GitHub in navigation (#51427) PR Close #51427 * docs(core): clarify InjectionToken usage (#51386) - Emphasized the importance of using the same InjectionToken instance for both provider and injection call. - Added examples to illustrate correct usages to prevent NullInjectorError. PR Close #51386 * release: cut the v16.2.3 release * ci: migrate monitoring jobs to GHA (#51350) Migrate monitoring jobs to Github Actions from CircleCI PR Close #51350 * docs: remove unreachable/incorrect contributor links (#51350) PR Close #51350 * ci: migrate zonejs tests to gha (#51352) Migreate zonejs tests from CircleCI to Github Actions PR Close #51352 * build: increase idle timeout for saucelabs daemon (#51533) Saucelabs seemingly has increased the maximum idle timeout. So we leverage that to improve stability of our tests. Useful when e.g. the heartbeat webdriver commands are for some reasons delayed. PR Close #51533 * build: improve debug logging of saucelabs daemon (#51533) We should print more specific details about a browser being used for tests. This will help us debug timeout/flakiness easier. PR Close #51533 * build: enable video recording for saucelabs bazel tests (#51533) We temporarily enable video recording for Saucelabs bazel tests. We are seeing some flakiness here, and before we can replace the legacy job, we should understand why the browsers sometimes disconnect. PR Close #51533 * ci: fix permissions issue in zonejs ci test (#51600) Correct permissions issue in zonejs folders PR Close #51600 * build: update actions/checkout digest to f43a0e5 (#51576) See associated pull request for more information. PR Close #51576 * build: update dependency google-closure-compiler to v20230802 (#51265) See associated pull request for more information. PR Close #51265 * refactor(docs-infra): correct incomplete string replacement (#51585) Find all usages of `\n` and replace them instead of just the first. PR Close #51585 * fix(docs-infra): fix incomplete escaping (#51604) Correct incomplete escaping PR Close #51604 * refactor(devtools): migrate material legacy components to mdc (#51590) Removes all legacy angular material imports and moves devtools over to mdc. PR Close #51590 * build: update dependency archiver to v6 (#51605) See associated pull request for more information. PR Close #51605 * docs(docs-infra): for accessibility and responsive, iframe should be in video container, contain some space horizontally, and title (#51475) PR Close #51475 * refactor(core): Use intersections on branded types. (#49702) An Intersection on a branded type allows us to remove some unecessary type assertions. PR Close #49702 * build: update dependency gulp-conventional-changelog to v4 (#51607) See associated pull request for more information. PR Close #51607 * refactor(core): remove duplicated access to TView (#51610) Tiny refactoring to remove repeated field access to LView. PR Close #51610 * refactor(core): switch signals to a refcounting algorithm (#51226) This commit switches the signals library from a bidirectional symmetric dependency graph using weak references, to a bidirectional _asymmetric_ graph which uses strong references. This is made possible with a reference counting algorithm which only tracks producer -> consumer references for effect-like "live" consumers, preventing memory leaks. The new algorithm should be simpler and faster than the previous implementation as weak references are fairly slow to create and traverse. A tradeoff is that non-live consumers must now poll their producers when read, as they cannot rely on dirty notifications. As part of this refactoring, the `ReactiveNode` class is replaced with an interface instead, and methods are moved to standalone functions. This is paired with instantiating individual signals/computeds via `Object.create` against a prototype node which contains static or initial values. This technique, in conjunction with the rest, greatly improves the performance of node creation. PR Close #51226 * docs(docs-infra): mixin generated same multiple css (#51528) PR Close #51528 * build: migrate to node 18 (#51609) Migrate to use node version 18 PR Close #51609 * docs: add viewContainerRef example (#51573) PR Close #51573 * docs: fix missing information in createComponent (#51493) PR Close #51493 * docs: update the sentence to express its meaning (#51622) PR Close #51622 * docs: add Connie Leung to GDE contributors list (#51476) PR Close #51476 * docs: remove mention of the string based lazy loading (#51651) String based lazy loading has been deprecated in v8 and remove in v13. We can safely remove it from the docs. PR Close #51651 * build: update @angular/ng-dev (#51659) Update version of @angular/ng-dev PR Close #51659 * ci: remove publish_package_as_artifacts job from circleci (#51660) Remove the job as it is no longer used. PR Close #51660 * ci: remove test job from circleci in favor of GHA (#51660) Remove the `test` job from circleci PR Close #51660 * refactor(core): implement __ignore_ng_zone__ flag (#51339) This flag allows message event listeners to prevent callbacks from executing within the NgZone if they contain a special `__ignore_ng_zone__` flag. This functionality is built with Angular DevTools in mind, where it prevents an infinite change detection loop in inspecting applications that have message event listeners: CD -> Inspected app emits componentTreeDirty event to DevTools -> DevTools emits event to get new component Tree from Inspected app -> Inspected app message event listener fires -> CD PR Close #51339 * fix(devtools): use the __ignore_ng_zone__ flag in devtools message bus' to prevent CD loop (#51339) Updates ChromeMessageBus, SamePageMessageBus and IframeMessageBus to use this new flag in their emit methods. PR Close #51339 * ci: disable all of the angular-robot settings (#51663) Disable angular robot as it is no longer used for primary workflows and is looking to be turned down. PR Close #51663 * docs: Added missing explanation of implements OnInit (#51634) PR Close #51634 * Revert "ci: disable all of the angular-robot settings (#51663)" (#51666) This reverts commit df54b1ce1a3fe493ef20deb89768df04e87cdd6e. PR Close #51666 * docs: update Angular CLI help [16.2.x] (#51667) Updated Angular CLI help contents. PR Close #51667 * docs: Add info about hydration caching. (#51648) The docs was missing an important information about caching. Only GET/HEAD requests are cached until `isStable` PR Close #51648 * release: cut the v16.2.4 release * build: migrate `project_id` option to use `bes_instance_name` (#51696) This commit update the RBE configuration to use `bes_instance_name` instead of `project_id`, which got renamed [in Bazel 5.1][1]. Doing so avoids several warnings in the CI output. [1]: https://github.com/bazelbuild/bazel/commit/2b48c6b9a447756fcb3295b8a75899b96efa7fd4 PR Close #51696 * build: attempt to deflake windows tests (#51701) Adds some logic to try and deflake the tests on Windows. PR Close #51701 * refactor(core): make AfterRenderEventManager tree-shakable (#51711) In preparation for adding support for phases to after*Render, which will increase the implementation size, this commit splits out the optional logic so that it can be tree-shaken and dynamically loaded. PR Close #51711 * refactor(core): delegate afterRender errors to an ErrorHandler (#51711) Improves the error handling story for after*Render by delegating errors to an ErrorHandler, so that one failure does not break every callback. PR Close #51711 * fix(docs-infra): Ensure experimental tag shows up on docs (#51712) The experimental tag is part of the stability tags along with "deprecated". This commit updates some code to pick up experimental as well. PR Close #51712 * docs(docs-infra): replace twitter logo by new one (#51716) PR Close #51716 * docs: Fix misspelling in note of `git commit --all` (#51735) In note of `git commit --all` command optional `-a` changed to `--all` PR Close #51735 * release: cut the v16.2.5 release * refactor(docs-infra): increase timeout for flaky tests (#51747) This commit updates the `jasmine.DEFAULT_TIMEOUT_INTERVAL` value for some AIO tests from 10 -> 20 seconds to give more time to complete processing. This commit also refactors tests to use async/await pattern. PR Close #51747 * ci: migrate legacy saucelabs job to Github Actions (#51695) Migrate the legacy saucelabs job PR Close #51695 * fix(core): ensure a consumer drops all its stale producers (#51722) (#51772) When a producer is no longer used, the consumer has to update its internal data structure that keeps track of all producers. There used to be an issue where only half of the stale producers would actually be removed from this data structure, as the intended upper bound of the number of producers to remove would decrease with each removed producer, therefore not reaching all producers that should be removed from the data structure. This commit fixes the issue by truncating the arrays directly, without going through individual `pop` operations. An assertion that would catch the inconsistent state in the internal data structures of the signal graph has been introduced. PR Close #51722 PR Close #51772 * refactor(core): let reactive node prototypes conform to their type (#51722) (#51772) This commit adds explicit type annotations to the reactive node prototype objects, such that the prototypes are type-checked against the interface they are supposed to (partially) implement. This also allows IDEs to better track usages of reactive node properties, improving code navigation. PR Close #51722 PR Close #51772 * docs: fix broken image links in tutorial (#51744) This is to fix broken image links in the first-app tutorial documentation with functional links that match the working examples. PR Close #51744 * ci: use head_ref for concurrency group (#51784) Use the head_ref value for the conncurency group on ci-priviledged rather than the ref, so that the main ref is not used and cancelling across pull requests and the main branch PR Close #51784 * build: update io_bazel_rules_sass digest to 63d77ff (#51243) See associated pull request for more information. PR Close #51243 * build: update actions/cache digest to 704facf (#51787) See associated pull request for more information. PR Close #51787 * refactor: ensure top-level symbols are marked as side-effect free (#51776) Terser does not treat `Symbol` as side-effect free- so if we end up with a symbol export being loaded, it will result in the symbol being retained. We noticed this in the signals prototyping where symbols exported from `computed` ended up appearing in symbol bundling tests. PR Close #51776 * test(compiler): attempt to deflake windows tests (#51804) Another try at deflaking the tests on Windows. I'm trying a couple of fixes here: 1. I noticed that it's usually the indexer tests that fail during flaky runs. These tests also happen to be the only ones that don't pass in the `files` argument of `NgtscTestEnvironment.setup`. When `files` isn't passed in, we don't hit the file path that sets up the `MockFileSystem`. With these changes I make it so that we always initialize the mock file system. 2. The missing file system error usually comes from the `absoluteFrom` call that initializes the optional `workingDir` argument. My theory is that because it's a default value for an argument, it gets called too early before everything is initialized. These changes move the `absoluteFrom` call further down until it's needed. PR Close #51804 * refactor(core): ensure reactive node constants are considered pure (#51809) (#51813) Currently when ESBuild bundles an application importing from `@angular/core`, the signals library will be discovered during export analysis. ESBuild will come across the constants for the reactive signal graph- and end up considering some of these as side-effects given the pattern of using a spread assignment for extending from e.g. `REACTIVE_NODE` (a similar issue may occur if we e.g. extend from the computed reactive node). See more details on the issue: https://github.com/evanw/esbuild/issues/3392 Even though, ESBuild preserves these constants now, and all of its dependencies— Terser will consider these as side-effect free and eliminate these constants. This may require multiple passes though, and might not be sufficient, depending on the chain of reactive node extensions. E.g. in the signals branch we noticed some constants unnecessarily being preserved. PR Close #51809 PR Close #51813 * build: update scorecard action dependencies (#51817) See associated pull request for more information. PR Close #51817 * docs: remove ref to no longer existing `test.ts` (#51462) The file was removed in Angular 15.0.0 https://github.com/angular/angular-cli/releases/tag/15.0.0 https://github.com/angular/angular-cli/commit/56a1e8f9f52658488afb9d36007e96c96d08a03b Thanks to @atscott and @JeanMeche for the wording suggestion PR Close #51462 * refactor(router): Refactor loadChildren callback execution and privately export for SSR (#51818) This commit refactors the loadChildren callback execution of the router config loader into a function that can be used with SSR for the purposes of route extraction. PR Close #51818 * release: cut the v16.2.6 release * fix(bazel): allow setting `_enabledBlockTypes` angular compiler option (#51862) We control most flags via Starlark and therefore limit configuration options via `tsconfig` to a minimum. We do not intend to support the enabled block types option via Starlark, so this commit allows for the option to be picked up. (This is useful for benchmarking the new control flow blocks). PR Close #51862 * docs: normalize Angular version ranges in pre-v9 version compatibility table (#51842) PR Close #51842 * docs: correct pre-v9 TypeScript version ranges in version compatibiliy table (#51842) For versions 5.x through 8.x, this is based on the `package.json` file of `@angular/compiler-cli`. For versions 2.x through 4.x, this is based on Angular's changelog. PR Close #51842 * docs: merge versions with identical version ranges in pre-v9 compatibility version table (#51842) PR Close #51842 * ci: use pull request head sha instead of the sha provided in the github context (#51908) Use the pull request head sha so that we don't test the code already committed. PR Close #51908 * build: improve results logging in perf script (#51902) Add git references when printing perf comparison results. PR Close #51902 * fix(service-worker): throw a critical error when `handleFetch` fails (#51885) On Safari, the cache might fail on methods like `match` with an `Internal error`. Critical errors allows to fallback to `safeFetch()` in the `Driver`. fixes: #50378 PR Close #51885 * docs: minor update to modify the Bazel extension url (#51925) PR Close #51925 * docs: updated the server configuration for apache2 (#51921) PR Close #51921 * refactor(core): avoid an empty array allocation during hydration (#51917) This commit updates hydration runtime code to avoid creating an empty array when we can avoid it. Instead, we just check whether the field is `null` directly (without using nullish coalescing). PR Close #51917 * build: update scorecard action dependencies (#51899) See associated pull request for more information. PR Close #51899 * fix(core): allow toSignal calls in reactive context (#51831) (#51892) This PR moves the Observable subscription of toSignal outside of the reactive context. As the result the toSignal calls are allowed in the computed, effect and all other reactive consumers. This is based on the reasoning that we already allow signals creation in a reactive context. Plus a similar change was done to the async pipe in the https://github.com/angular/angular/pull/50522 Fixes #51027 PR Close #51892 * release: cut the v16.2.7 release * ci: move permissions for google-internal-tests into job definition (#51847) Move permissions into the job definition for security improvement. PR Close #51847 * build: lock file maintenance (#51838) Update the lock file. PR Close #51838 * ci: add slack messages for failed aio deployments (#51956) Send message to to slack when aio fails to deploy PR Close #51956 * build: update dependency css-selector-parser to v3 (#51984) See associated pull request for more information. PR Close #51984 * refactor(core): Update view flags so only one number needs adjustment (#51839) When adding a new view flag, you currently need to adjust the last number of the last 3 flags. All of these share the same number so the shifting ones can just use the base-10 IndexWithinInitPhaseShift. PR Close #51839 * fix(service-worker): throw a critical error when handleFetch fails (#51960) #51885 patched a call site that threw an error but there were 2 others call that needed to be wrapped in the same way by a try/catch. `initializeFully` is part of the calls in `responseWith(handleFetch)`. Same #51885, throwing `SwCriticalError`allows the driver to fallback to `safeFetch` and ensure `responseWith` doesn't fail. Fixes #50378 PR Close #51960 * fix(language-service): Retain correct language service when `ts.Project` reloads (#51912) When the `ts.Project` creates the language service plugin (in this case, the Angular Language Service), it sets the project's language service to the new language service returned by the plugin create: https://sourcegraph.com/github.com/microsoft/TypeScript@b12af0fa2bbd4b015e59adcfb49988cea7f919a1/-/blob/src/server/project.ts?L2035-2044 The project may be reloaded in response to various events, such as a change to the tsconfig file, which then recreates the plugin. When this happens, the language service that gets passed to the plugin `create` function will not be the typescript language service, but rather the previous instance of the new language service returned by the last call to `create`. This commit ensures that subsequent calls to `create` for the `NgLanguageService` plugin for a project after the first call are able to retrieve and hold on to the _TypeScript_ language service. fixes https://github.com/angular/vscode-ng-language-service/issues/1923 PR Close #51912 * docs: update events (#51966) Generated `events.json` with the latest events retrieved from the Firebase DB. Closes #51955 PR Close #51966 * release: cut the v16.2.8 release --------- Co-authored-by: Matthieu Riegler <kyro38@gmail.com> Co-authored-by: Angular Robot <angular-robot@google.com> Co-authored-by: alkavats1 <alka.vats@nashtechglobal.com> Co-authored-by: arturovt <arthurandrosovich@gmail.com> Co-authored-by: Kevin Boss <kevin.boss@outlook.com> Co-authored-by: Kristiyan Kostadinov <crisbeto@abv.bg> Co-authored-by: hyperlife1119 <hyperlife1119@qq.com> Co-authored-by: Joey Perrott <josephperrott@gmail.com> Co-authored-by: Andrew Kushnir <akushnir@google.com> Co-authored-by: abergquist <abergquist@sbcglobal.net> Co-authored-by: Sid <122173059+hugo-sid@users.noreply.github.com> Co-authored-by: sunilbaba <sunilbaba.villuri@gmail.com> Co-authored-by: Dylan Hunn <dylhunn@gmail.com> Co-authored-by: P4 <969645+P4@users.noreply.github.com> Co-authored-by: Miles Malerba <mmalerba@google.com> Co-authored-by: Jáchym Bambuch <37249084+JachymBambuch@users.noreply.github.com> Co-authored-by: AleksanderBodurri <alexbodurri1117@gmail.com> Co-authored-by: Aristeidis Bampakos <abampakos@plexscape.com> Co-authored-by: Aristeidis Bampakos <bampakoa@gmail.com> Co-authored-by: aanchal <aanchal.agarwal@knoldus.com> Co-authored-by: Gerald Monaco <gbmonaco@google.com> Co-authored-by: Alex Rickabaugh <alx+alxhub@alxandria.net> Co-authored-by: Pawel Kozlowski <pkozlowski.opensource@gmail.com> Co-authored-by: Paweł Rawicki <pawel.rawicki@gmail.com> Co-authored-by: Douglas Parker <dgp1130@users.noreply.github.com> Co-authored-by: Swami <anilsanapathi9@gmail.com> Co-authored-by: Andrew Scott <atscott@google.com> Co-authored-by: Sinan997 <sinanozturk997@gmail.com> Co-authored-by: Jeff Schiller <codedread@gmail.com> Co-authored-by: Jessica Janiuk <jessicajaniuk@google.com> Co-authored-by: Quentin Dunand <quentindunand@gmail.com> Co-authored-by: codestart <codestart@users.noreply.github.com> Co-authored-by: Luis Castro <luish.castroc@gmail.com> Co-authored-by: Zoltán Szőgyényi <zoltan.szogyenyi@gmail.com> Co-authored-by: Alex Castle <atcastle@gmail.com> Co-authored-by: Payam Valadkhan <payamv@google.com> Co-authored-by: JoostK <joost.koehoorn@gmail.com> Co-authored-by: Naaajii <vcmpbhai@gmail.com> Co-authored-by: Paul Gschwendtner <paulgschwendtner@gmail.com> Co-authored-by: Yann-Thomas LE MOIGNE <yann.tho.le.moigne@gmail.com> Co-authored-by: Mark Thompson <2554588+MarkTechson@users.noreply.github.com> Co-authored-by: mgechev <mgechev@gmail.com> Co-authored-by: Alan Agius <alanagius@google.com> Co-authored-by: Jeevan Mahesha <csejeevanm@gmail.com> Co-authored-by: Shuaib hasan akib <akibh805@gmail.com> Co-authored-by: Jeremy Elbourn <jelbourn@google.com> Co-authored-by: Mikka <michael.fritsch@holisticon.de> Co-authored-by: Thomas Turrell-Croft <thomasturrell@users.noreply.github.com> Co-authored-by: hiepxanh <hiepxanh@gmail.com> Co-authored-by: eddiebee <edbeeotudor@gmail.com> Co-authored-by: Connie Leung <cleung334@gmail.com> Co-authored-by: SrinathSree <srinathsree122@gmail.com> Co-authored-by: Chinmay Chandak <100862990+std447@users.noreply.github.com> Co-authored-by: Rafael Leal <rflemerson@gmail.com> Co-authored-by: David LJ <mail@davidlj95.com> Co-authored-by: Lars Gyrup Brink Nielsen <larsbrinknielsen@gmail.com> Co-authored-by: Jithil P Ponnan <jithil@outlook.com>
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
…ct` reloads (angular#51912) When the `ts.Project` creates the language service plugin (in this case, the Angular Language Service), it sets the project's language service to the new language service returned by the plugin create: https://sourcegraph.com/github.com/microsoft/TypeScript@b12af0fa2bbd4b015e59adcfb49988cea7f919a1/-/blob/src/server/project.ts?L2035-2044 The project may be reloaded in response to various events, such as a change to the tsconfig file, which then recreates the plugin. When this happens, the language service that gets passed to the plugin `create` function will not be the typescript language service, but rather the previous instance of the new language service returned by the last call to `create`. This commit ensures that subsequent calls to `create` for the `NgLanguageService` plugin for a project after the first call are able to retrieve and hold on to the _TypeScript_ language service. fixes angular/vscode-ng-language-service#1923 PR Close angular#51912
🐞 bug report
Is this a regression?
Can't recall when I didn't have to randomly restart ALS, sadly been having this problem for a year at least - only now figured out how to reproduce it.
Description
After saving/modifying tsconfig.json - ALS recognizes a change and intellisense stops working in angular html templates.
Bug Type
What does this bug affect
Reproduction
Steps to reproduce the behavior:
Expected behavior
Intellisense in template files should still work after a change in tsconfig.json. I believe VS Code's built in ts server touches tsconfig in the background which causes the templates intellisense to stop working randomly (it took a lot of time to find out why this happend).
Logs
nglangsvc.log
Screenshots
🌍 Your Environment
Angular Version:
Extension Version:
VSCode Version:
Operating System:
Extension options:
The text was updated successfully, but these errors were encountered: