angular-docs-cn/packages/localize
Pete Bacon Darwin 2c4a98a285 fix(localize): do not expose NodeJS typings in $localize runtime code (#38700)
A recent change to `@angular/localize` brought in the `AbsoluteFsPath` type
from the `@angular/compiler-cli`. But this brought along with it a reference
to NodeJS typings - specifically the `FileSystem` interface refers to the
`Buffer` type from NodeJS.

This affects compilation of `@angular/localize` code that will be run in
the browser - for example projects that reference `loadTranslations()`.
The compilation breaks if the NodeJS typings are not included in the build.
Clearly it is not desirable to have these typings included when the project
is not targeting NodeJS.

This commit replaces references to the NodeJS `Buffer` type with `Uint8Array`,
which is available across all platforms and is actually the super-class of
`Buffer`.

Fixes #38692

PR Close #38700
2020-09-08 11:40:58 -07:00
..
init build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
schematics fix(localize): install `@angular/localize` in `devDependencies` by default (#38680) 2020-09-03 09:41:38 -07:00
src fix(localize): do not expose NodeJS typings in $localize runtime code (#38700) 2020-09-08 11:40:58 -07:00
test build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
BUILD.bazel build: provide full paths to `ts_api_guardian_test_npm_package` and `ts_api_guardian_test` (#36034) 2020-03-12 09:49:00 -07:00
index.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
localize.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
package.json fix(localize): install `@angular/localize` in `devDependencies` by default (#38680) 2020-09-03 09:41:38 -07:00
private.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00