Commit Graph

98 Commits

Author SHA1 Message Date
Alex Eagle a1492a73ce build: Remove angular_src nested workspace (#21096)
PR Close #21096
2018-01-19 10:17:37 -08:00
Igor Minar 6a5818454f build: make umd.min.js source map paths relative (#21147)
I'm not quite sure how to test this since we don't have any infrastructure for these kinds of tests.
I did verify the fix manually though.

Fixes #15740

PR Close #21147
2017-12-21 20:11:20 -08:00
Olivier Combe cbe7e39bbe build(common): don't generate .d.ts & .metadata.json files for i18n locales
Fixes #20880
2017-12-14 08:29:36 -08:00
Igor Minar 3997d97806 revert: feat(elements): implement `@angular/elements` #19469 (#20152)
This PR was merged without API docs and general rollout plan.

We can't release this as is in 5.1 without a plan for documentation, cli integration, etc.
2017-11-03 15:54:54 -07:00
George Kalpakas ebfa204af0 feat(elements): set up the `elements` package 2017-11-02 16:09:09 -07:00
Alex Rickabaugh d442b6855f feat(service-worker): introduce the @angular/service-worker package (#19274)
This service worker is a conceptual derivative of the existing @angular/service-worker maintained at github.com/angular/mobile-toolkit, but has been rewritten to support use across a much wider variety of applications.

Entrypoints include:

@angular/service-worker: a library for use within Angular client apps to communicate with the service worker.
@angular/service-worker/gen: a library for generating ngsw.json files from glob-based SW config files.
@angular/service-worker/ngsw-worker.js: the bundled service worker script itself.
@angular/service-worker/ngsw-cli.js: a CLI tool for generating ngsw.json files from glob-based SW config files.
2017-09-28 16:18:12 -07:00
Olivier Combe 6e1896b333 build(common): don't generate tsickle re-export file for locales package (#19135)
PR Close #19135
2017-09-21 16:02:40 -07:00
Chuck Jazdzewski f96142cd7c build: remove references to `tsc-wrapped` (#19298)
With this commit `ngc` is used instead of `tsc-wrapped` for
collecting metadata and tsickle rewriting and `tsc-wrapped`
is removed from the repository.

`@angular/tsc-wrapped@5` is now deprecated and is no longer
used, updated, or maintained as part as of Angular 5.x.x.

`@angular/tsc-wrapped@4` is still maintained and required by
Angular 4.x.x and will be maintained as long as 4.x.x is in
LTS.

PR Close #19298
2017-09-21 13:55:52 -07:00
Jason Aden 15e8d50313 build: roll up to named .js files rather than 'index.js' (#19190)
PR Close #19190
2017-09-19 16:59:18 -07:00
Jason Aden fd701b07f0 build: publish tree of files rather than FESMs (#18541)
* Remove now unnecessary portions of build.
* Add a compilePackageES5 method to build ES5 from sources
* Rework all package.json and rollup config files to new format
* Remove "extends" from tsconfig-build.json files and fixup compilation roots

PR Close #18541
2017-08-31 15:34:50 -07:00
Olivier Combe 48789360b1 feat(common): generate `closure-locale.ts` to tree shake locale data (#18907)
Closure will only keep the data for the locale defined in `goog.LOCALE`

PR Close #18907
2017-08-29 11:26:10 -05:00
Victor Berchet 535c7bb60c refactor: generate i18n files in common/locales (#18907)
PR Close #18907
2017-08-29 11:26:10 -05:00
Alex Eagle f2f5286020 build: upgrade to latest bazel rules (#18733)
PR Close #18733
2017-08-23 11:34:52 -05:00
Alex Eagle 47220997e1 build: add bazel integration test (#18733)
It includes sass compilation, and building the bazel package
distribution.

PR Close #18733
2017-08-23 11:34:52 -05:00
Olivier Combe 079d884b6c feat(common): drop use of the Intl API to improve browser support (#18284)
BREAKING CHANGE: Because of multiple bugs and browser inconsistencies, we have dropped the intl api in favor of data exported from the Unicode Common Locale Data Repository (CLDR).
Unfortunately we had to change the i18n pipes (date, number, currency, percent) and there are some breaking changes.

1. I18n pipes
* Breaking change:
  - By default Angular now only contains locale data for the language `en-US`, if you set the value of `LOCALE_ID` to another locale, you will have to import new locale data for this language because we don't use the intl API anymore.

* Features:
  - you don't need to use the intl polyfill for Angular anymore.
  - all i18n pipes now have an additional last parameter `locale` which allows you to use a specific locale instead of the one defined in the token `LOCALE_ID` (whose value is `en-US` by default).
  - the new locale data extracted from CLDR are now available to developers as well and can be used through an API (which should be especially useful for library authors).
  - you can still use the old pipes for now, but their names have been changed and they are no longer included in the `CommonModule`. To use them, you will have to import the `DeprecatedI18NPipesModule` after the `CommonModule` (the order is important):

  ```ts
  import { NgModule } from '@angular/core';
  import { CommonModule, DeprecatedI18NPipesModule } from '@angular/common';

  @NgModule({
    imports: [
      CommonModule,
      // import deprecated module after
      DeprecatedI18NPipesModule
    ]
  })
  export class AppModule { }
  ```

  Dont forget that you will still need to import the intl API polyfill if you want to use those deprecated pipes.

2. Date pipe
* Breaking changes:
  - the predefined formats (`short`, `shortTime`, `shortDate`, `medium`, ...) now use the patterns given by CLDR (like it was in AngularJS) instead of the ones from the intl API. You might notice some changes, e.g. `shortDate` will be `8/15/17` instead of `8/15/2017` for `en-US`.
  - the narrow version of eras is now `GGGGG` instead of `G`, the format `G` is now similar to `GG` and `GGG`.
  - the narrow version of months is now `MMMMM` instead of `L`, the format `L` is now the short standalone version of months.
  - the narrow version of the week day is now `EEEEE` instead of `E`, the format `E` is now similar to `EE` and `EEE`.
  - the timezone `z` will now fallback to `O` and output `GMT+1` instead of the complete zone name (e.g. `Pacific Standard Time`), this is because the quantity of data required to have all the zone names in all of the existing locales is too big.
  - the timezone `Z` will now output the ISO8601 basic format, e.g. `+0100`, you should now use `ZZZZ` to get `GMT+01:00`.

  | Field type | Format        | Example value         | v4 | v5            |
  |------------|---------------|-----------------------|----|---------------|
  | Eras       | Narrow        | A for AD              | G  | GGGGG         |
  | Months     | Narrow        | S for September       | L  | MMMMM         |
  | Week day   | Narrow        | M for Monday          | E  | EEEEE         |
  | Timezone   | Long location | Pacific Standard Time | z  | Not available |
  | Timezone   | Long GMT      | GMT+01:00             | Z  | ZZZZ          |

* Features
  - new predefined formats `long`, `full`, `longTime`, `fullTime`.
  - the format `yyy` is now supported, e.g. the year `52` will be `052` and the year `2017` will be `2017`.
  - standalone months are now supported with the formats `L` to `LLLLL`.
  - week of the year is now supported with the formats `w` and `ww`, e.g. weeks `5` and `05`.
  - week of the month is now supported with the format `W`, e.g. week `3`.
  - fractional seconds are now supported with the format `S` to `SSS`.
  - day periods for AM/PM now supports additional formats `aa`, `aaa`, `aaaa` and `aaaaa`. The formats `a` to `aaa` are similar, while `aaaa` is the wide version if available (e.g. `ante meridiem` for `am`), or equivalent to `a` otherwise, and `aaaaa` is the narrow version (e.g. `a` for `am`).
  - extra day periods are now supported with the formats `b` to `bbbbb` (and `B` to `BBBBB` for the standalone equivalents), e.g. `morning`, `noon`, `afternoon`, ....
  - the short non-localized timezones are now available with the format `O` to `OOOO`. The formats `O` to `OOO` will output `GMT+1` while the format `OOOO` will be `GMT+01:00`.
  - the ISO8601 basic time zones are now available with the formats `Z` to `ZZZZZ`. The formats `Z` to `ZZZ` will output `+0100`, while the format `ZZZZ` will be `GMT+01:00` and `ZZZZZ` will be `+01:00`.

* Bug fixes
  - the date pipe will now work exactly the same across all browsers, which will fix a lot of bugs for safari and IE.
  - eras can now be used on their own without the date, e.g. the format `GG` will be `AD` instead of `8 15, 2017 AD`.

3. Currency pipe
* Breaking change:
  - the default value for `symbolDisplay` is now `symbol` instead of `code`. This means that by default you will see `$4.99` for `en-US` instead of `USD4.99` previously.

* Deprecation:
  - the second parameter of the currency pipe (`symbolDisplay`) is no longer a boolean, it now takes the values `code`, `symbol` or `symbol-narrow`. A boolean value is still valid for now, but it is deprecated and it will print a warning message in the console.

* Features:
  - you can now choose between `code`, `symbol` or `symbol-narrow` which gives you access to more options for some currencies (e.g. the canadian dollar with the code `CAD` has the symbol `CA$` and the symbol-narrow `$`).

4. Percent pipe
* Breaking change
  - if you don't specify the number of digits to round to, the local format will be used (and it usually rounds numbers to 0 digits, instead of not rounding previously), e.g. `{{ 3.141592 | percent }}` will output `314%` for the locale `en-US` instead of `314.1592%` previously.

Fixes #10809, #9524, #7008, #9324, #7590, #6724, #3429, #17576, #17478, #17319, #17200, #16838, #16624, #16625, #16591, #14131, #12632, #11376, #11187

PR Close #18284
2017-08-22 15:43:58 -05:00
Chuck Jazdzewski abee785821 refactor(tsc-wrapped): update tsc-wrapped to pass strictNullCheck (#18160)
PR Close #18160
2017-07-21 12:26:20 -05:00
Chuck Jazdzewski 619e625ee2 refactor(tsc-wrapped): move tsc-wrapped to the packages directory (#18160) 2017-07-21 12:26:16 -05:00
Tobias Bosch 7ffb75f476 refactor(compiler): change `bundle` to `flatModuleIndex` in the code (#17028) 2017-05-26 09:13:28 -07:00
Chuck Jazdzewski 80e506563c Revert "refactor(compiler): change `bundle` to `flatModuleIndex` in the code (#17028)"
This reverts commit 5aa53d70aa.
2017-05-26 08:54:50 -07:00
Tobias Bosch 5aa53d70aa refactor(compiler): change `bundle` to `flatModuleIndex` in the code (#17028) 2017-05-25 19:02:35 -06:00
Tobias Bosch 573b8611bc fix(compiler): compile `.ngfactory.ts` files even if nobody references them. (#16899)
This is especially important for library authors, as they will
not reference the .ngfactory.ts files.

Fixes #16741
2017-05-25 11:00:26 -06:00
Jason Aden fa809ec8cf build: import tslib rather than output TS helpers (#16901) 2017-05-23 14:01:39 -06:00
Suguru Inatomi afd703d08c build: remove router-specific versioning process (#16810) 2017-05-22 11:06:46 -06:00
Georgios Kalpakas 06264645fd build: use subshells when changing directories
This prevents being left in the wrong directory in case of error.
2017-05-12 12:19:51 -07:00
Alex Eagle da668848c9 fix(core): distribute externs for testability API (#16179)
Workaround for #11119

PR Close #16179
2017-04-19 22:46:11 -05:00
Kara Erickson 5efc86069f fix(forms): make composition event buffering configurable (#15256)
This commit fixes a regression where `ngModel` no longer syncs
letter by letter on Android devices, and instead syncs at the
end of every word. This broke when we introduced buffering of
IME events so IMEs like Pinyin keyboards or Katakana keyboards
wouldn't display composition strings. Unfortunately, iOS devices
and Android devices have opposite event behavior. Whereas iOS
devices fire composition events for IME keyboards only, Android
fires composition events for Latin-language keyboards. For
this reason, languages like English don't work as expected on
Android if we always buffer. So to support both platforms,
composition string buffering will only be turned on by default
for non-Android devices.

However, we have also added a `COMPOSITION_BUFFER_MODE` token
to make this configurable by the application. In some cases, apps
might might still want to receive intermediate values. For example,
some inputs begin searching based on Latin letters before a
character selection is made.

As a provider, this is fairly flexible. If you want to turn
composition buffering off, simply provide the token at the top
level:

```ts
providers: [
   {provide: COMPOSITION_BUFFER_MODE, useValue: false}
]
```

Or, if you want to change the mode  based on locale or platform,
you can use a factory:

```ts
import {shouldUseBuffering} from 'my/lib';

....
providers: [
   {provide: COMPOSITION_BUFFER_MODE, useFactory: shouldUseBuffering}
]
```

Closes #15079.

PR Close #15256
2017-03-21 16:47:18 -05:00
Chuck Jazdzewski c2ffb6bfcd build: remove use of alias metadata (#15331) 2017-03-21 12:20:06 -05:00
Jason Aden 410aa33005 build: fix paths to typings files so tsickle resolves imports correctly
Fixes #15080
2017-03-16 17:34:29 -07:00
Jason Aden 992aa17361 build: add source maps into NPM distribution (#15159)
Previous to 2.x there were some source maps distrubted, but they didn't go
all the way back to the TypeScript sources and they weren't available for
all JavaScript distrubted to NPM.

With this change source maps will be available for FESM distributions as
well as UMD and will go all the way back to TypeScript sources.

Fixes #15184
2017-03-16 12:55:15 -07:00
Jason Aden da8ea350b2 refactor: More generic build.sh file 2017-03-08 16:29:28 -08:00
Igor Minar b8f0c3dc7b ci: redo how env variables are set and shared in ci to prevent collisions 2017-03-05 08:03:38 -08:00
Igor Minar a24e652f2b ci: clean up CI logging, folding, add build time logging, and improve error handling (#14425) 2017-03-02 00:22:24 -08:00
Jason Aden 3168ef75da build: fix secondary entry point es5 output and core Rx references (#14820)
Secondary entry points (testing, static, etc) are rolled up into a
single ESM/ES2015 file, then downleveled to ESM/ES2015. This downleveling
was not working and was producing ESM/ES2015. Also, the @angular/core
package's .babelrc file was missing reference to Rx Observable which
broke the UMD bundle.

Fixes #14730
2017-03-01 15:59:09 -08:00
Jason Aden 932a02f1c5 build(language-service): fix tsconfig needed for language-service rollup (#14717) 2017-02-24 15:16:23 -08:00
Jason Aden 2da3844673 build(language-service): support deep import bundling of language services (#14689) 2017-02-23 22:53:17 -08:00
Jason Aden c53621be8e build: resolve review comments on flat modules PR and fix more bugs (#14660) 2017-02-23 16:39:44 -08:00
Matias Niemelä 830393d234 refactor(animations): support browser animation rendering (#14578) 2017-02-22 15:14:49 -08:00
Jason Aden de795ea233 perf: distrubute smaller bundled code and include es2015 bundle
TypeScript compiler will now build to ES2015 code and modules. Babili is used to minify ES2015
code, providing an initial optimization that we couldn't previously get just from Uglify. Uses
Babel to convert ES2015 to UMD/ES5 code, and Uglify to minimize the output.
2017-02-21 20:48:55 -08:00
Alex Rickabaugh 9559d3e949 feat(platform-server): support @angular/http from @angular/platform-server
This change installs HttpModule with ServerModule, and overrides bindings to
service Http requests made from the server with the 'xhr2' NPM package.

Outgoing requests are wrapped in a Zone macro-task, so they will be tracked
within the Angular zone and cause the isStable API to show 'false' until they
return. This is essential for Universal support of server-side HTTP.
2017-02-15 09:14:59 -08:00
Matias Niemelä 96073e51c3 refactor(animations): introduce @angular/animation module (#14351)
PR Close: #14351
2017-02-10 14:10:03 -06:00
Alex Eagle 5c431cee02 build: remove post-processing of .d.ts files (#13294)
Note that the duplication in tsconfig.json files will be fixed in a followup CL now that we have tsconfig inheritance

BREAKING CHANGE: Angular 4 will support only TypeScript 2.1, so we no longer provide backwards compatibility to TS 1.8.
2017-02-08 11:32:34 -06:00
Alex Eagle c48dd76f5c build: move typings_test to new integration test fixture (#14149)
PR Close #14149
2017-01-31 15:46:59 -06:00
Alex Eagle be6c95ad03 feat(build): optionally build an ES2015 distro (#13471)
PR Close #13471
2017-01-17 18:26:36 -06:00
Chuck Jazdzewski 3ff6554cbc fix(language-service): update to use `CompilerHost` from compiler-cli (#13189) 2016-12-02 14:34:16 -08:00
Chuck Jazdzewski 86ffa884b7 fix(build): update versions of umd bundles (#13038)
Fixes #13037
2016-11-22 13:39:41 -08:00
Chuck Jazdzewski 519a324454 feat(language-service): add services to support editors (#12987) 2016-11-22 09:10:23 -08:00
Chuck Jazdzewski aac37bedc0 chore(build): update package.json versions during build (#12957) 2016-11-18 09:24:57 -08:00
Victor Savkin 927aa69726 fix(router): add a banner file for the router (#12919) 2016-11-16 09:17:19 -08:00
Igor Minar d6ba092a27 build(build.sh): echo before building examples 2016-11-15 20:59:37 -08:00
Joao Dias 44a142fc02 chore(playground): use base64-js from npm
closes #12471
2016-11-10 12:08:04 -08:00