Skip to content

Commit c12c411

Browse files
committed
Merge branch 'master' into v2
2 parents 88358a5 + 61d2d75 commit c12c411

File tree

2 files changed

+67
-2
lines changed

2 files changed

+67
-2
lines changed

CHANGELOG.md

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,69 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
66

77
## [Unreleased]
88

9+
## [2.0.0-beta.1] - 2018-10-25
10+
11+
This is a major release with 💥 breaking changes 💥! However, most apps will compile with minimal (or no) changes! 🎉 They'll also tend to compile *much faster* in many cases. ⚡️
12+
13+
We now use Babel 7's support for TypeScript to build apps and addons. Most of the horrible hacks we had to do before are now gone, and the error outputs you will see for type errors are much nicer as well. (As a particular note, we should work better with `ember-auto-import` now, since we're just part of the normal Broccoli/Babel pipeline Ember CLI uses.)
14+
15+
***THIS IS A BETA!*** Please test this out in your apps! Please do *not* use this for your production apps!
16+
17+
### Added
18+
19+
* Much nicer reporting of type errors both in the console and in your browser
20+
* Type errors now use the "pretty" type error format stabilized in TypeScript 2.9
21+
22+
### Changed
23+
24+
* We now build the application using Babel 7's TypeScript plugin. This has a few important limitations – some of them bugs (linked below); others are conscious decisions on the part of Babel. The changes:
25+
- `const enum` types are unsupported. You should switch to constants or regular enums.
26+
27+
- trailing commas after rest function parameters (`function foo(...bar[],) {}`) are disallowed by the ECMAScript spec, so Babel also disallows them.
28+
29+
- re-exports of types have to be disambiguated to be *types*, rather than values. Neither of these will work:
30+
31+
```ts
32+
export { FooType } from 'foo';
33+
```
34+
```ts
35+
import { FooType } from 'foo';
36+
export { FooType };
37+
```
38+
39+
In both cases, Babel attempts to emit a *value* export, not just a *type* export, and fails because there is no actual value to emit. You can do this instead as a workaround:
40+
41+
```ts
42+
import * as Foo from 'foo';
43+
export type FooType = Foo.FooType;
44+
```
45+
46+
- `this` types in ES5 getters and setters are do not work ([babel/babel#8069](https://github.com/babel/babel/issues/8069))
47+
48+
- destructuring of parameters in function signatures currently do not work ([babel/babel#8099](https://github.com/babel/babel/issues/8099))
49+
50+
Other bugs you should be aware of:
51+
52+
- if an enum has a member with the same name as an imported type ([babel/babel#8881](https://github.com/babel/babel/issues/8881))
53+
54+
* `ember-cli-typescript` must be in `dependencies` instead of `devDependencies` for addons, since we now hook into the normal Broccoli + Babel build pipeline instead of doing an end-run around it
55+
56+
* Addons can no longer use `.ts` in app, because an addon's `app` directory gets merged with and uses the *host's* (i.e. the other addon or app's) preprocessors, and we cannot guarantee the host has TS support. Note that in-repo-addons will continue to work for in-repo addons because of the app build works with the host's (i.e. the app's, not the addon's) preprocessors.
57+
58+
* Apps need to use `.js` for overrides in app, since the different file extension means apps no long consistently "win" over addon versions (a limitation of how Babel + app merging interact) – note that this wont be a problem with Module Unification apps
59+
60+
### Fixed
61+
62+
* Type errors now show properly in the browser when running tests
63+
64+
## [1.5.0] - 2018-10-25
65+
66+
### Fixed
67+
68+
* We now provide better user feedback when installing ember-cli-typescript from a git version (i.e. for testing prereleases)
69+
* Updated to ember-cli-typescript-blueprints so types in generated files correctly match the latest Ember Data types
70+
* Updated to latest Ember CLI blueprint (as of 3.5.0)
71+
972
## [1.4.4] - 2018-10-01
1073

1174
### Fixed
@@ -321,7 +384,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
321384
* Basic, semi-working functionality.
322385

323386
[ember-cli-typify]: https://github.com/winding-lines/ember-cli-typify
324-
[unreleased]: https://github.com/typed-ember/ember-cli-typescript/compare/v1.4.4...HEAD
387+
[unreleased]: https://github.com/typed-ember/ember-cli-typescript/compare/v1.5.0...HEAD
388+
[2.0.0-beta.1]: https://github.com/typed-ember/ember-cli-typescript/compare/v1.5.0...v2.0.0-beta.1
389+
[1.5.0]: https://github.com/typed-ember/ember-cli-typescript/compare/v1.4.4...v1.5.0
325390
[1.4.4]: https://github.com/typed-ember/ember-cli-typescript/compare/v1.4.3...v1.4.4
326391
[1.4.3]: https://github.com/typed-ember/ember-cli-typescript/compare/v1.4.2...v1.4.3
327392
[1.4.2]: https://github.com/typed-ember/ember-cli-typescript/compare/v1.4.1...v1.4.2

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ember-cli-typescript 2.0
1+
# ember-cli-typescript
22

33
Use TypeScript in your Ember 2.x and 3.x apps!
44

0 commit comments

Comments
 (0)