angular/packages
Paul Gschwendtner dbe656d1e0 fix(bazel): ngc-wrapped should not rely on linker for external workspaces (#43690)
Currently when `ngc-wrapped` runs in external/consumer workspaces, like
in the Angular Components project, the `ngc-wrapped` binary relies on
the linker due to the patched module resolution in `rules_nodejs` no
longer being default. The reliance on the linker of `rules_nodejs` is
problematic for workers as the required `node_modules` are not
re-linked for every build. This was previously not an issue before the
APF v13 changes because the `compiler-cli` module was loaded only once
through an import statement.

As of APF v13, the compiler-cli module is loaded dynamically for every
build. This dynamic import can then break as the worker does not
initially load the compiler-cli module when becoming online. Instead,
the module is loaded on the first build where the node modules might not
be linked properly anymore (due to e.g. other targets running at the same time).

We fix thi issue by doing the following things:

1. Enabling the patched module resolution for consumer/external
   workspaces. This would match how we use ngc-wrapped inside FW as
   well.

2. Caching the compiler CLI module. Instead of re-fetching the module
   through dynamic imports for every build (in a worker), we should use
   the cached version. This is semantically the same as with APF v12
   where a single import statement at file top-level was used.
   Technically, NodeJS should cache the module, but it doesn't hurt
   directly caching it as the module resolution will be patched by
   `rules_nodejs` and could perform unnecessary tasks.

PR Close #43690
2021-10-05 17:25:14 -07:00
..
animations refactor: remove entry_point attribute from ng_package targets (#43431) 2021-10-01 18:28:42 +00:00
bazel fix(bazel): ngc-wrapped should not rely on linker for external workspaces (#43690) 2021-10-05 17:25:14 -07:00
benchpress feat(core): support TypeScript 4.4 (#43281) 2021-09-23 14:49:19 -07:00
common refactor: make all imports compatible with ESM/CJS output. (#43431) 2021-10-01 18:28:45 +00:00
compiler refactor(compiler-cli): no longer use deep imports into @angular/compiler (#43431) 2021-10-01 18:28:46 +00:00
compiler-cli fix(compiler-cli): handle nullable expressions correctly in the nullish coalescing extended template diagnostic (#43572) 2021-10-04 17:32:57 -07:00
core test(core): fix failing unit test (#43714) 2021-10-05 09:47:34 -07:00
docs docs: remove/update broken links in resources appearing on aio (#42232) 2021-05-26 14:21:12 -07:00
elements refactor: remove entry_point attribute from ng_package targets (#43431) 2021-10-01 18:28:42 +00:00
examples feat(forms): allow minLength/maxLength validator to be bound to null (#42565) 2021-07-21 22:35:59 +00:00
forms refactor: remove entry_point attribute from ng_package targets (#43431) 2021-10-01 18:28:42 +00:00
language-service refactor(language-service): Remove option and bundle generation for View Engine (#43723) 2021-10-05 17:24:08 -07:00
localize build: set target for all command line tools to nodejs v12 (#43431) 2021-10-01 18:28:47 +00:00
misc/angular-in-memory-web-api refactor: remove entry_point attribute from ng_package targets (#43431) 2021-10-01 18:28:42 +00:00
platform-browser refactor: remove entry_point attribute from ng_package targets (#43431) 2021-10-01 18:28:42 +00:00
platform-browser-dynamic refactor: remove entry_point attribute from ng_package targets (#43431) 2021-10-01 18:28:42 +00:00
platform-server build: update side-effect fields to reflect new APF v13 output (#43431) 2021-10-01 18:28:44 +00:00
private/testing docs: convert the last my-app components to app-root (#42256) 2021-05-25 22:13:36 +00:00
router fix(router): unset attachRef when router-outlet is destroyed to avoid mounting a destroyed component (#43697) 2021-10-05 09:48:39 -07:00
service-worker fix(service-worker): make ngsw.json generation deterministic and correct (#43679) 2021-10-05 13:34:29 -07:00
upgrade refactor: remove entry_point attribute from ng_package targets (#43431) 2021-10-01 18:28:42 +00:00
zone.js build: update dependency google-closure-compiler to v20210907 (#43398) 2021-10-04 16:33:13 -07:00
BUILD.bazel build: Auto-gen tsec tsconfig files (#43440) 2021-09-17 17:17:34 +00:00
circular-deps-test.conf.js fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic (#38846) 2020-09-30 09:13:59 -04:00
empty.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
goog.d.ts refactor(core): replace references to goog.LOCALE with goog.getLocale() (#43089) 2021-08-10 10:35:26 -07:00
license-banner.txt docs: update year (#40925) 2021-02-22 12:37:40 -08:00
README.md docs: add doc reference to npm package readme (#33911) 2019-11-20 14:46:23 -08:00
system.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
tsconfig-build.json build: enable esModuleInterop in TypeScript compilations (#43431) 2021-10-01 18:28:45 +00:00
tsconfig-legacy-saucelabs.json build: update tsconfigs to use ES2020 as target and module (#43431) 2021-10-01 18:28:42 +00:00
tsconfig-test.json refactor: fix typescript strict flag failures in all tests (#30993) 2019-07-18 14:21:26 -07:00
tsconfig-tsec-base.json build: update tsconfigs to use ES2020 as target and module (#43431) 2021-10-01 18:28:42 +00:00
tsconfig.json build: enable esModuleInterop in TypeScript compilations (#43431) 2021-10-01 18:28:45 +00:00
tsec-exemption.json build: Enable tsec checks for critical packages. (#43108) 2021-09-13 14:45:57 -07:00
types.d.ts build: replace @types/trusted-types dep with minimal type defs (#39211) 2020-10-15 09:08:00 -07:00

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

Usage information and reference details can be found in Angular documentation.

License: MIT