Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-cli-typescript

Package Overview
Dependencies
Maintainers
4
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-typescript - npm Package Compare versions

Comparing version 2.0.0-beta.1 to 2.0.0-beta.2

73

CHANGELOG.md

@@ -9,2 +9,70 @@ # Changelog

## [2.0.0-beta.2] - 2018-10-26
### Fixed
- 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!
### Added
* 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
### Changed
* 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:
```ts
export { FooType } from 'foo';
```
```ts
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:
```ts
import * as Foo from 'foo';
export type FooType = Foo.FooType;
```
- `this` types in ES5 getters and setters are do not work ([babel/babel#8069](https://github.com/babel/babel/issues/8069))
- destructuring of parameters in function signatures currently do not work ([babel/babel#8099](https://github.com/babel/babel/issues/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](https://github.com/babel/babel/issues/8881))
* `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
* 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.
* 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
### Fixed
* Type errors now show properly in the browser when running tests
## [1.5.0] - 2018-10-25
### Fixed
* 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

@@ -325,3 +393,6 @@

[ember-cli-typify]: https://github.com/winding-lines/ember-cli-typify
[unreleased]: https://github.com/typed-ember/ember-cli-typescript/compare/v1.4.4...HEAD
[unreleased]: https://github.com/typed-ember/ember-cli-typescript/compare/v1.5.0...HEAD
[2.0.0-beta.2]: https://github.com/typed-ember/ember-cli-typescript/compare/v2.0.0-beta.1...v2.0.0-beta.2
[2.0.0-beta.1]: https://github.com/typed-ember/ember-cli-typescript/compare/HEAD...v2.0.0-beta.1
[1.5.0]: https://github.com/typed-ember/ember-cli-typescript/compare/v1.4.4...v1.5.0
[1.4.4]: https://github.com/typed-ember/ember-cli-typescript/compare/v1.4.3...v1.4.4

@@ -328,0 +399,0 @@ [1.4.3]: https://github.com/typed-ember/ember-cli-typescript/compare/v1.4.2...v1.4.3

4

js/addon.js

@@ -101,3 +101,5 @@ "use strict";

if (!ember_cli_babel_plugin_helpers_1.hasPlugin(target, name)) {
ember_cli_babel_plugin_helpers_1.addPlugin(target, [require.resolve(name), config], constraints);
let resolvedPath = require.resolve(name);
let pluginEntry = config ? [resolvedPath, config] : resolvedPath;
ember_cli_babel_plugin_helpers_1.addPlugin(target, pluginEntry, constraints);
}

@@ -104,0 +106,0 @@ },

{
"name": "ember-cli-typescript",
"version": "2.0.0-beta.1",
"version": "2.0.0-beta.2",
"description": "Allow ember apps to use typescript files.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -1,2 +0,2 @@

# ember-cli-typescript 2.0
# ember-cli-typescript

@@ -3,0 +3,0 @@ Use TypeScript in your Ember 2.x and 3.x apps!

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc