Commit Graph

133 Commits

Author SHA1 Message Date
Jason Aden c53621be8e build: resolve review comments on flat modules PR and fix more bugs (#14660) 2017-02-23 16:39:44 -08:00
Chuck Jazdzewski c9bfc59a21 fix(tsc-wrapped): use agreed on options names (#14630) 2017-02-22 10:57:01 -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
Miško Hevery 738d93caf7 refactor: rewrite private export using the ɵ prefix 2017-02-21 20:48:55 -08:00
Victor Berchet 2ddd1c3ed2 Revert "fix(http): Make ResponseOptionsArgs an interface (#14607)"
This reverts commit fbe4b76f2d.
2017-02-20 19:48:53 -08:00
Victor Berchet fbe4b76f2d fix(http): Make ResponseOptionsArgs an interface (#14607)
closes #13708
2017-02-20 17:55:03 -08:00
Chuck Jazdzewski 724ca373e7 build: produce metadata bundles for @angular modules (#14509)
Closes #14509
2017-02-16 08:15:30 -08:00
Alex Eagle b9d293af03 build: first pass of de-duplicating tsconfig.json content (#14369)
PR Close #14369
2017-02-09 14:32:40 -08:00
Miško Hevery 4676df5833 fix(http): REVERT: remove dots from jsonp callback name (#13219)
This reverts commit 9e5617e41e.
2017-02-09 15:34:12 -06:00
cexbrayat 5f2b3173d7 fix(http): use params without RequestOptions (#14101)
`params` has been introduced in 4.0.0-beta.0

Before:

    http.get(url, new RequestOptions({params: searchParams}))

After:

    http.get(url, {params: searchParams})

Fixes #14100

PR Close #14101
2017-01-31 15:44:49 -06:00
Dzmitry Shylovich 9e5617e41e fix(http): remove dots from jsonp callback name (#13219)
PR Close #13219
2017-01-29 11:49:40 -06:00
Peter Bacon Darwin 2dd9654004 docs(http): vanilla links do not need link tags (#14097) 2017-01-26 23:46:51 -08:00
Dzmitry Shylovich 1200cf25f4 fix(http): don't create a blob out of ArrayBuffer when type is application/octet-stream (#13992)
Closes #13973
2017-01-18 16:01:02 -08:00
Miško Hevery d169c2434e feat(core): Add type information to injector.get() (#13785)
- Introduce `InjectionToken<T>` which is a parameterized and type-safe
  version of `OpaqueToken`.

DEPRECATION:
- `OpaqueToken` is now deprecated, use `InjectionToken<T>` instead.
- `Injector.get(token: any, notFoundValue?: any): any` is now deprecated
  use the same method which is now overloaded as
  `Injector.get<T>(token: Type<T>|InjectionToken<T>, notFoundValue?: T): T;`.

Migration
- Replace `OpaqueToken` with `InjectionToken<?>` and parameterize it.
- Migrate your code to only use `Type<?>` or `InjectionToken<?>` as
  injection tokens. Using other tokens will not be supported in the
  future.

BREAKING CHANGE:
- Because `injector.get()` is now parameterize it is possible that code
  which used to work no longer type checks. Example would be if one
  injects `Foo` but configures it as `{provide: Foo, useClass: MockFoo}`.
  The injection instance will be that of `MockFoo` but the type will be
  `Foo` instead of `any` as in the past. This means that it was possible
  to call a method on `MockFoo` in the past which now will fail type
  check. See this example:

```
class Foo {}
class MockFoo extends Foo {
  setupMock();
}

var PROVIDERS = [
  {provide: Foo, useClass: MockFoo}
];

...

function myTest(injector: Injector) {
  var foo = injector.get(Foo);
  // This line used to work since `foo` used to be `any` before this
  // change, it will now be `Foo`, and `Foo` does not have `setUpMock()`.
  // The fix is to downcast: `injector.get(Foo) as MockFoo`.
  foo.setUpMock();
}
```

PR Close #13785
2017-01-17 15:34:54 -06:00
José Nicodemos Maia Neto dc63cef10a docs(http): Spelling Fix #13867 2017-01-12 09:55:49 -08:00
Emanuel Hein 1e6440e81b docs(Http): fix and extend samples for testing/MockBackend (#13689)
Fix samples for MockBackend and MockBackend.connections that were outdated. Also extend central sample for MockBackend to ease getting started.
2016-12-29 09:39:00 -08:00
crisbeto 171a9bdc85 feat: update to rxjs@5.0.1 and unpin the rxjs peerDeps via ^5.0.1 (#13572)
Now that rxjs is stable and the rxjs team follows semver, we can update and unpin the dependency safely.

From now on the Angular application/library developers are in charge of controlling the rxjs version as long as it's newer than 5.0.1.

closes #13561
closes #13478
closes #13572
2016-12-19 16:24:53 -08:00
Dzmitry Shylovich 2e500cc85b fix(http): create a copy of headers when merge options (#13365)
Closes #11980
2016-12-12 11:16:34 -08:00
domusofsail 08ff2e5249 fix(http): check response body text against undefined (#13017) 2016-12-09 15:39:39 -08:00
Dzmitry Shylovich 90c223591f feat(http): simplify URLSearchParams creation (#13338)
Closes #8858
2016-12-09 15:38:29 -08:00
Miško Hevery 16efb13dd1 fix: display framework version on bootstrapped component (#13252) 2016-12-06 16:21:07 -08:00
Dzmitry Shylovich 986abbe0b2 fix(http): set the default Accept header (#12989)
Fixes #6354
2016-12-06 16:20:43 -08:00
Victor Savkin e628b66cca feat(build): record angular version in the dom (#13164) 2016-11-30 13:52:08 -08:00
Misko Hevery 2d6a003dba feat: update RxJS peer dependency to 5.0.0-rc.4
Closes #13125

RxJS from beta-12 to rc.4, has removed the `cache`
operator. (See https://github.com/ReactiveX/rxjs/blob/master/CHANGELOG.md#breaking-changes-1)
If your application relies on it, then we suggest 
that you use the one from this gist:
https://gist.github.com/robwormald/19dea0c70a6e01aadced6731aed4f9f7
2016-11-29 16:27:33 -08:00
Flounn 94b8612e4e Fix(http): invalidStateError response body
Check on null value failed with last version of mozilla.
Check on undefined type instead.
2016-11-28 14:36:32 -08:00
Alex Eagle 664a6273e1 feature(tsc-wrapped): add option for closure compiler JSDoc annotations 2016-11-18 09:37:40 -08:00
João Dias 13ba2f90b9 refactor(http): remove all facade methods from http module (#12870) 2016-11-15 09:19:14 -08:00
Dzmitry Shylovich 1d53a870dd fix(http): return request url if it cannot be retrieved from response
closes #12837
2016-11-14 12:54:43 -08:00
Dzmitry Shylovich a0c58a6b5c fix(http): correctly handle response body for 204 status code
closes #12830
fixes #12393
2016-11-14 12:36:22 -08:00
Dzmitry Shylovich d3eff6c483 refactor(xhr_backend): remove facade 2016-11-14 12:36:16 -08:00
Joao Dias 77ee27c59e refactor(): use const and let instead of var 2016-11-12 16:40:17 -08:00
Victor Berchet ec92f4b198 refactor: remove `keys()` and `values()` from MapWrapper 2016-11-04 13:27:38 -07:00
Alex Rickabaugh 121e5080aa fix(http): preserve header case when copying headers (#12697) 2016-11-04 13:26:38 -07:00
Barna Tóth b4265e0685 fix(xsrf): overwrite already set xsrf header 2016-10-26 14:55:24 -07:00
Victor Berchet 76dd026447 refactor: remove some facades (#12335) 2016-10-19 13:42:39 -07:00
Martin Probst 8409b65153 fix(http): make normalizeMethodName optimizer-compatible. (#12370)
`normalizeMethodName` reflectively accessed the RequestMethod enum. With a smart
optimizer, properties from the enum could be removed or renamed, and so user
code just passing in e.g. 'PATCH' might not work. This change fixes the code to
be more explicit and avoids the optimizer issue.
2016-10-18 11:21:54 -07:00
Dzmitry Shylovich 8603d9c269 refactor(http): use Http.request for all http shorthand methods (#12319) 2016-10-17 23:04:25 -07:00
Victor Berchet f4566f8128 fix(http): fix Headers initialization from Headers and Object (#12106) 2016-10-06 15:21:27 -07:00
Victor Berchet a67c06708d fix(http): Headers.append should append to the list 2016-10-06 15:21:03 -07:00
Victor Berchet d9d57d71dd refactor(http): move one Headers test inside the main describe 2016-10-06 15:21:03 -07:00
Alex Eagle 8c975ed156 refactor(facade): inline StringWrapper (#12051) 2016-10-06 15:10:27 -07:00
Victor Berchet cf269d9ff4 refactor: add license header to JS files & format files (#12081) 2016-10-04 20:39:20 -07:00
Chuck Jazdzewski 43d3a84df3 Revert "refactor: add license header to JS files & format files (#12035)"
This reverts commit 8310c91823.
2016-10-04 14:06:41 -07:00
Victor Berchet 8310c91823 refactor: add license header to JS files & format files (#12035) 2016-10-04 13:15:49 -07:00
Victor Berchet ed9c2b6281 fix(Header): preserve case of the first init, `set()` or `append()` (#12023)
fixes #11624
2016-10-03 15:27:56 -07:00
alexbyk bf7b82b658 fix(UrlSearchParams): change a behavior when a param value is null or undefined (#11990) 2016-09-30 09:57:26 -07:00
Alex Eagle 0286956107 refactor(facade): Inline isBlank called with object-type argument (#11992) 2016-09-30 09:26:53 -07:00
Alex Eagle 41c8c30973 chore(lint): remove unused imports (#11923)
This was done automatically by tslint, which can now fix issues it finds.
The fixer is still pending in PR https://github.com/palantir/tslint/pull/1568
Also I have a local bugfix for https://github.com/palantir/tslint/issues/1569
which causes too many imports to be deleted.
2016-09-27 17:12:25 -07:00
Victor Berchet 58605cf350 refactor(facade): remove useless facades 2016-09-27 16:13:09 -07:00
Flounn 5ab5cc77bb Fix(http): invalidStateError if response body without content (#11786)
Fix(http): invalidStateError if response body without content
If the responseType has been specified and other than 'text', responseText throw an InvalidStateError exception

See XHR doc => https://xhr.spec.whatwg.org/#the-responsetext-attribute

Unit Test to prevent invalidStateError
2016-09-24 05:44:01 +09:00