All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
2.0.0-rc.2 - 2019-01-07
For details on the changes since 1.x, see the 2.0.0-beta.1
release notes.
- Set
--isolatedModules
back tofalse
in both precompilation and generated blueprints
- We now warn you nicely if you try to use this in an addon via
devDependencies
instead ofdependencies
- Used the same tests commands across providers, so we get the same results
For apps:
ember install ember-cli-typescript@next
For addons:
ember install -S ember-cli-typescript@next
Thanks to everyone who opened/discovered an issue we fixed or PR we merged in this release!
- @alexlafroscia
- @dfreeman
- @happycollision
2.0.0-rc.1 - 2018-12-13
For details on the changes since 1.x, see the 2.0.0-beta.1
release notes.
- Builds no longer hang if a changed TypeScript file did not trigger a TS rebuild (which can happen e.g. if it is not yet imported elsewhere).
- Type-checking information now properly gets injected into the build pipeline for test builds as well as development and production builds.
- Declaration maps now have test coverage to make sure they don't break.
- The build system now uses the
tsconfig.json
file'spaths
key to copy type definitions during precompile, rather than assuming Ember project structure.
- The addon now checks to confirm you're using Ember CLI 3.5+, since the new approach to builds has serious performance problems with a local
tmp
directory.
- Bumped many dependency versions.
- Set up Azure Pipelines configuration.
- Updated internals to use TypeScript themselves.
ember install ember-cli-typescript@next
Thanks to everyone who opened/discovered an issue we fixed or PR we merged in this release!
- @mike-north
- @dfreeman
- @jamescdavis
2.0.0-beta.3 - 2018-11-02
For details on the changes since 1.x, see the 2.0.0-beta.1
release notes.
- Ensure consistency with
tsc
re: class property initialization order (#365)
ember install ember-cli-typescript@beta
Thanks to everyone who opened/discovered an issue we fixed or PR we merged in this release!
- @runspired
- @dfreeman
2.0.0-beta.2 - 2018-10-26
- Ensure that ember-cli-typescript doesn't interfere with parallelizing the Babel transpilation process (#351)
2.0.0-beta.1 - 2018-10-25
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. ⚡️
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.)
THIS IS A BETA! Please test this out in your apps! Please do not use this for your production apps!
- Much nicer reporting of type errors both in the console and in your browser
- Type errors now use the "pretty" type error format stabilized in TypeScript 2.9
-
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:
-
const enum
types are unsupported. You should switch to constants or regular enums. -
trailing commas after rest function parameters (
function foo(...bar[],) {}
) are disallowed by the ECMAScript spec, so Babel also disallows them. -
re-exports of types have to be disambiguated to be types, rather than values. Neither of these will work:
export { FooType } from 'foo';
import { FooType } from 'foo'; export { FooType };
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:
import * as Foo from 'foo'; export type FooType = Foo.FooType;
-
this
types in ES5 getters and setters are do not work (babel/babel#8069) -
destructuring of parameters in function signatures currently do not work (babel/babel#8099)
Other bugs you should be aware of:
- if an enum has a member with the same name as an imported type (babel/babel#8881)
-
-
ember-cli-typescript
must be independencies
instead ofdevDependencies
for addons, since we now hook into the normal Broccoli + Babel build pipeline instead of doing an end-run around it -
Addons can no longer use
.ts
in app, because an addon'sapp
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. -
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 won’t be a problem with Module Unification apps
- Type errors now show properly in the browser when running tests
1.5.0 - 2018-10-25
- We now provide better user feedback when installing ember-cli-typescript from a git version (i.e. for testing prereleases)
- Updated to ember-cli-typescript-blueprints so types in generated files correctly match the latest Ember Data types
- Updated to latest Ember CLI blueprint (as of 3.5.0)
1.4.4 - 2018-10-01
- We no longer claim the absolute highest priority when ember-cli is selecting blueprints (see #323)
1.4.3 - 2018-09-24
- We now correctly clean up the system temp directory we create during builds (see #318)
- We reference the Discord channel instead of Slack.
- [Internal] We enabled writing code for this addon itself in TypeScript.
1.4.2 - 2018-09-06
- Ensure TS blueprints always take precedence over JS ones (#253)
1.4.1 - 2018-09-05
- Avoid warnings in Ember CLI 3.4+ about missing package directories for our in-repo testing addons (#252)
- All blueprints for Ember and Ember Data entities now come from a standalone ember-cli-typescript-blueprints package.
1.4.0 - 2018-08-07
- Ignore
node_modules
hoisted above project root (e.g. yarn workspaces)
- Auto-install of
@types/ember__test-helpers
- Initial support for Module Unification (see #199 for what is/isn't supported in this release)
- Support for building addons'
test-support
andaddon-test-support
directories
1.3.4 - 2018-09-24
- We now correctly clean up the system temp directory we create during builds. (Backported from 1.4.3; see #318.)
1.3.3 - 2018-07-19
- Watcher has been "de-simplified" to make it more consistent with how tsc's own watcher works and prevent rebuild issues.
ember-cli-typescript
will now run afterember-decorators
, ensuring that theember-cli-typescript
blueprints overrideember-decorators
'.
- Improved documentation regarding service injection.
- Getting Help section to readme.
- Github issue templates.
1.3.2 - 2018-06-05
- TypeScript 2.9 no longer causes infinite error loops and/or fails to trigger rebuilds.
1.3.1 - 2018-05-14
- No longer requires TypeScript before it has been installed.
- Properly ignore the root across platforms.
1.3.0 - 2018-05-01
- Simplified the file watching implementation, fixing some odd behavior when trees of files were deleted or moved all at once.
- Synchronization between tsc and the broccoli build process has been improved, reducing spurious rebuilds.
- TypeScript no longer churns on every change in the
tmp
directory. - Make sure ember-cli-typescript is a dev dependency when generating in-repo-addons, so their TypeScript gets built correctly.
- Eliminated some lint errors in the build.
- Updated the generated
tsconfig.json
to use the maximum strictness we can with Ember's typings. - Clarified instructions for sourcemaps.
- The addon now supports failing the build when there are type errors, using
"noEmitOnError": true
intsconfig.json
.
- We now correctly clean up the system temp directory we create during builds. (Backported from 1.4.3; see #318.)
1.2.1 - 2018-03-14
- Blueprint now correctly adds ember-cli-typescript as a dependency, allowing TS to be merged into the regular app tree.
1.2.0 - 2018-03-05
- Blueprint (and tests) to generate in-repo addons configured for TypeScript
- Add
// @ts-ignore
component template import. -addon
blueprints for all the things to generate .ts files inapp/
in an addon.
- Improve instructions for setting up Linked Addons and In-repo Addons.
- Addon components need to manually set their layout property to the imported compiled template.
- The declaration file for the
<app-name>/config/environment
module now resolves correctly from app code. If you have a version of this file previously generated attypes/<app-name>/config/environment.d.ts
, you'll likely want to move it toapp/config/environment.d.ts
.
1.1.7 - 2018-09-24
- We now correctly clean up the system temp directory we create during builds. (Backported from 1.4.3; see #318.)
1.1.6 - 2018-02-23
- The blueprints provided by
ember-cli-typescript
now deterministically override the base ones fromember-data
andember-source
. - Correct type declarations are installed out of the box based on what test framework is present.
- A catch-all model registry is generated on installation to avoid the "error TS2344" problem.
1.1.5 - 2018-02-20
- Fixed a regression in 1.1.4 which caused in-repo-addons written in TypeScript not to work correctly.
- Fixed the
tsconfig.json
blueprint to properly include thetypes
directory.
1.1.4 - 2018-02-20
- The default
tsconfig.json
now includes inline source maps to support integrating with Babel sourcemaps, and the README has instructions for configuring Ember CLI's Babel integration.
- TypeScript files in addon
app
trees now get compiled properly. - App files now correctly take precedence over any files of the same name earlier in the tree. (If you had a component with the same name as an addon-supplied component, for example, the addon version could override yours.)
1.1.3 - 2018-02-16
- Fix default blueprint for
types/<my app>/index.d.ts
: add missing import and an export statement so ambient declarations work. - Add types to initializer and instance initializer blueprints.
- Special-case handling for Mirage so that it works at all, and update generators so it works "out of the box".
- Stop assuming the ember-cli-qunit version consumers have installed will be sufficiently high for our tests to pass.
1.1.2 - 2018-02-13
- Actually resolve the problem of throwing when running generators if
ember-cli-version-checker
version too low: put it independencies
.
1.1.1 - 2018-02-12
- No longer throw when running generators if
ember-cli-version-checker
version too low by putting it inpeerDependencies
. - Clarified some parts of the README that misled people on handling certain errors.
1.1.0 - 2018-02-12
- Generators:
ember generate <blueprint>
now creates TypeScript files for you - Support for addons: we now precompile addon TypeScript so
ember-cli-typescript
andtypescript
itself can remain indevDependencies
instead ofdependencies
, and addons can easily distribute compiled JavaScript with TypeScript type definition (.d.ts
) files. - Incremental compilation:
ember serve
orember test --serve
now use TypeScript'stsc --watch
mode to only rebuild what changed, so your builds should be much faster
tsconfig.json
is no longer so annoyingly temperamental; you can largely do what you want with itember serve
no longer triggers a full rebuild of all TypeScript files every time any file in your project changes.
1.0.6 - 2017-12-17
- Update to broccoli-typescript-compiler 2.1.1, for proper support for TS 2.6. This should make your build properly respect things like // @ts-ignore special comments.
1.0.5 - 2017-11-23
- Updated the
tsconfig.json
blueprint to set thenoImplicitThis
option totrue
, improving experience around use of updated type definitions
1.0.4 - 2017-11-13
- Updated broccoli-compiler-typescript
- Updated package.json to always install latest version of type definitions
- Fixed the default generated
environment.d.ts
- Made everything ✨ Prettier ✨
1.0.3 - 2017-08-22
- TS info messages now go to
stdout
and TS error messages now properly go tostderr
- Fixed a dead link in the README
1.0.2 - 2017-08-16
- Updates the generated
tsconfig.json
to set"modules": "ES6"
in the compiler options, so that codemods which operate on modules, like babel-plugin-ember-modules-api-polyfill, will actually work. (Yes, this is 1.0.1, but done correctly.)
1.0.1 - 2017-08-16
- Updates the generated
tsconfig.json
to set"modules": "ES6"
in the compiler options, so that codemods which operate on modules, like babel-plugin-ember-modules-api-polyfill, will actually work.
1.0.0 - 2017-08-08
- Include more type definitions in the default blueprint
- Documentation of using
paths
(thanks @toranb!) - Supports in-repo addons, including in-repo Ember Engines
- Update to [email protected]
- Update Ember CLI and TypeScript (thanks @mfeckie!)
- Match the
broccoli-typescript-compiler
optionthrowOnError
with thetsconfig.json
noEmitOnError
option.
- Use
this.ui.write
instead ofconsole.log
. - Only process the tsconfig file once, instead of for every Broccoli tree (i.e. addons, the app, and the tests).
- No longer pass the
allowJs
option to TypeScript, since Broccoli manages the tree so.ts
and.js
files for us.
- Run prettier on the codebase
0.4.0 - 2017-05-03
- Updated the base type definitions in
app/config/environment.d.ts
to include the defaults generated when creating an Ember app (thanks, @luketheobscure!) - Updated the README with clearer installation instructions and notes on using the add-on to develop other add-ons
ember serve
andember test
andember build
all work properly now, across platforms- builds are much faster on all platforms.
0.3.2 - 2017-04-22
- Now properly installs on Windows.
0.3.1 - 2017-04-22
tsconfig.json
blueprint now includes paths to resolve default Ember app structure imports
- Resolved install bugs on macOS and Linux
- All references to
local-types
in the codebase and blueprints, sincelocal-types
is not used by the addon and not a normal TypeScript file location
0.3.0 - 2017-03-13
tsconfig.json
blueprint now works for both the addon and editors
0.2.0 - 2016-12-17
- Everything; the 0.2.0 release began by copying the implementation from ember-cli-typify.
- Basic, semi-working functionality.