angular-cn/packages
Terence D. Honles 078b0be4dc 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
2020-04-09 11:30:32 -07:00
..
animations 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
bazel build: rebuild yarn lock from scratch (#36377) 2020-04-03 11:09:17 -07:00
benchpress fix(benchpress): update dependencies (#36205) 2020-04-01 13:19:33 -07:00
common fix(common): `locales/global/*.js` are not ES5 compliant (#36342) 2020-04-09 11:30:32 -07:00
compiler refactor(compiler): create a new root `BindingScope` for each template (#36362) 2020-04-09 09:44:56 -07:00
compiler-cli style(compiler-cli): reformat of codebase with new clang-format version (#36520) 2020-04-08 14:51:08 -07:00
core fix(zone.js): add issue numbers of `@types/jasmine` to the test cases (#34625) 2020-04-08 12:10:34 -07:00
docs refactor(core): remove deprecated Renderer (#33019) 2019-10-08 09:23:00 -07:00
elements fix(zone.js): add issue numbers of `@types/jasmine` to the test cases (#34625) 2020-04-08 12:10:34 -07:00
examples fix(zone.js): add issue numbers of `@types/jasmine` to the test cases (#34625) 2020-04-08 12:10:34 -07:00
forms style: format forms validators to fix lint error (#36546) 2020-04-09 11:18:22 -07:00
http 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
language-service fix(language-service): remove circular dependency instance (#36463) 2020-04-08 15:29:09 -07:00
localize 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
platform-browser fix(zone.js): add issue numbers of `@types/jasmine` to the test cases (#34625) 2020-04-08 12:10:34 -07:00
platform-browser-dynamic 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
platform-server fix(platform-server): update `xhr2` dependency (#36366) 2020-04-01 13:31:38 -07:00
platform-webworker 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
platform-webworker-dynamic 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
private/testing fix(core): adhere to bootstrap options for JIT compiled components (#35534) 2020-03-19 08:57:39 -07:00
router fix(router): pass correct component to canDeactivate checks when using two or more sibling router-outlets (#36302) 2020-04-09 10:09:43 -07:00
service-worker fix(zone.js): add issue numbers of `@types/jasmine` to the test cases (#34625) 2020-04-08 12:10:34 -07:00
upgrade fix(zone.js): add issue numbers of `@types/jasmine` to the test cases (#34625) 2020-04-08 12:10:34 -07:00
zone.js fix(zone.js): add issue numbers of `@types/jasmine` to the test cases (#34625) 2020-04-08 12:10:34 -07:00
BUILD.bazel build: reference zone.js from source directly instead of npm. (#33046) 2019-11-06 00:48:34 +00:00
README.md docs: add doc reference to npm package readme (#33911) 2019-11-20 14:46:23 -08:00
circular-deps-test.conf.js build: allow custom module resolution for ts-circular-deps tests (#36226) 2020-03-27 11:14:49 -07:00
empty.ts refactor: move angular source to /packages rather than modules/@angular 2017-03-08 16:29:27 -08:00
goog.d.ts fix(ivy): use goog.LOCALE for Closure Compiler to define default LOCALE_ID (#31519) 2019-07-16 13:02:10 -04:00
license-banner.txt build: bump year (#34651) 2020-01-13 07:21:43 -08:00
system.d.ts build: no longer run tslint from within gulp task (#35800) 2020-03-03 09:20:49 -08:00
tsconfig-build-no-strict.json refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
tsconfig-build.json refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
tsconfig-test.json refactor: fix typescript strict flag failures in all tests (#30993) 2019-07-18 14:21:26 -07:00
tsconfig.json build: enable IDE type checking of $localize code (#35711) 2020-02-28 07:09:50 -08:00
types.d.ts build: reference zone.js from source directly instead of npm. (#33046) 2019-11-06 00:48:34 +00:00

README.md

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