1 | # Changelog
|
2 | All notable changes to this project will be documented in this file.
|
3 |
|
4 | The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
5 | and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | ## [1.6.2] - 2019-06-19
|
11 | * Names in `excludeIdentifiers` will now also be removed from `import`
|
12 | statements.
|
13 |
|
14 | ## [1.6.1] - 2019-01-18
|
15 | * Fix missing `source-map-support` dependency.
|
16 |
|
17 | ## [1.6.0] - 2018-12-05
|
18 | * Added `--googModules` flag, for generating declarations compatible
|
19 | with `goog.module`-style modules.
|
20 | * Added `--hideWarnings` flag, for hiding warning-level severity diagnostics.
|
21 | * Generate declarations with tslint disables for relevant rules, like variable
|
22 | names, and no-any.
|
23 |
|
24 | ## [1.5.1] - 2018-08-25
|
25 | * Legacy Polymer function element interfaces are now exported from ES modules.
|
26 |
|
27 | ## [1.5.0] - 2018-08-15
|
28 | * Legacy Polymer function components will no longer have a `_template`
|
29 | property.
|
30 | * Functions defined within exported Polymer function calls or exported objects
|
31 | are no longer themselves emitted as top-level functions.
|
32 | * `FooBehaviorImpl` style behavior objects (that have been merged into a main
|
33 | `FooBehavior` array) will no longer have a broken `import` or `export`
|
34 | statements emitted for them.
|
35 | * Update the URL for this repo put in generated file headers, since it has moved
|
36 | into the Polymer tools monorepo.
|
37 | * Added `--verify` command-line flag which will run the generated typings
|
38 | through the TypeScript compiler (3.0) and fail with the log if it fails.
|
39 | * The `--deleteExisting` flag will no longer delete `.d.ts` files that are
|
40 | referenced as keys in the `autoImport` config option.
|
41 | * Do not `import` or `export` features with `private` visibility.
|
42 | * Display warnings generated during the analysis phase.
|
43 | * `autoImport` now supports bare-module specifiers. Local files must now
|
44 | begin with `.`.
|
45 | * `excludeIdentifiers` option now applies to properties and methods.
|
46 | * The pattern `import * as foo from 'foo'; export {foo as bar};` is now
|
47 | supported.
|
48 | * Exit with a non-zero code when an analysis error is encountered.
|
49 |
|
50 | ## [1.4.0] - 2018-07-25
|
51 | - Support for ES module imports and exports.
|
52 | - Warnings are now printed with file names, line numbers, and code snippets.
|
53 | - Add `autoImport` config option to automatically add ES module imports when
|
54 | particular identifiers are referenced.
|
55 | - Automatically detect if a project uses NPM or Bower and configure module
|
56 | resolution settings accordingly.
|
57 | - Automatically import/export synthetic mixin constructor interfaces.
|
58 | - Superclasses and mixins are now emitted for classes.
|
59 | - Element super classes are now emitted.
|
60 | - Legacy Polymer elements now extend `LegacyElementMixin` and `HTMLElement`
|
61 | instead of `PolymerElement`.
|
62 | - Mixin instance interfaces now extend the instance interfaces for the mixins
|
63 | that they automatically apply.
|
64 |
|
65 | ## [1.3.0] - 2018-06-29
|
66 | - Generate typings for class constructors.
|
67 | - Add `@ts-ignore` comment if method contains `@suppress {checkTypes}` in jsdoc.
|
68 |
|
69 | ## [1.2.2] - 2018-03-19
|
70 | - Fix bad file path handling which broke Windows support.
|
71 |
|
72 | ## [1.2.1] - 2018-03-09
|
73 | - Fix bug where if a package name was a prefix of one of its dependencies (e.g.
|
74 | `iron-icons` depends on `iron-iconset-svg`), then `<reference>` statements to
|
75 | include that dependency's typings would not be emitted (via
|
76 | https://github.com/Polymer/polymer-analyzer/pull/902).
|
77 |
|
78 | ## [1.2.0] - 2018-02-15
|
79 | - Functions which definitely never return a value will now be automatically
|
80 | inferred as returning `void`.
|
81 | - Getters on Polymer elements defined with the legacy Polymer function are now
|
82 | scanned correctly (previously type annotations were missing, and the readonly
|
83 | bit was inverted.
|
84 |
|
85 | ## [1.1.3] - 2018-02-12
|
86 | - Mixin functions now include all of the additional mixins they automatically
|
87 | apply. Previously, only the immediately applied mixins were accounted for, but
|
88 | not ones that were applied transitively.
|
89 |
|
90 | ## [1.1.2] - 2018-02-08
|
91 | - Elements that are constructable (usually a call to the Polymer function whose
|
92 | result is assigned to some variable) can now have behaviors.
|
93 | - The `--deleteExisting` command line flag will no longer delete `.d.ts` files
|
94 | that are referenced as values in the `addReferences` config option, since such
|
95 | files are typically hand-written.
|
96 |
|
97 | ## [1.1.1] - 2018-02-05
|
98 | - Fix missing `glob` dependency.
|
99 |
|
100 | ## [1.1.0] - 2018-02-05
|
101 | - Added `excludeIdentifiers` config option. Use this to skip emitting any
|
102 | declarations for some feature by its class name, etc.
|
103 | - Renamed `exclude` config option to `excludeFiles` to disambiguate it from
|
104 | `excludeIdentifiers`. `exclude` still works as before for backwards
|
105 | compatibility, but will be removed in the next major version.
|
106 | - Polymer behavior interfaces now extend any additional behaviors that they
|
107 | apply. This is done with an array of behavior objects as documented at
|
108 | https://www.polymer-project.org/1.0/docs/devguide/behaviors#extending.
|
109 | - Added `--deleteExisting` command line flag (default false) which recursively
|
110 | deletes all `.d.ts` files in the output directory before writing new typings,
|
111 | excluding `node_modules/` and `bower_components/`.
|
112 |
|
113 | ## [1.0.1] - 2018-02-01
|
114 | - Always parameterize `Promise`. In Closure `Promise` is valid, but in
|
115 | TypeScript this is invalid and must be `Promise<any>` instead.
|
116 | - Escape `*\` comment end sequences when formatting comments. These turn up in
|
117 | practice when an HTML comment embeds a JavaScript style block comment, like
|
118 | here:
|
119 | https://github.com/PolymerElements/paper-icon-button/blob/master/paper-icon-button.html#L51
|
120 | - Hybrid Polymer elements without a LHS assignment now have `Element` appended
|
121 | to their generated interface name, to match the behavior of the Closure
|
122 | Polymer Pass
|
123 | (https://github.com/google/closure-compiler/wiki/Polymer-Pass#element-type-names-for-1xhybrid-call-syntax).
|
124 | For example, `interface IronRequest` is now `interface IronRequestElement`.
|
125 | - Typings are now emitted for all HTML files, even if they contain no script
|
126 | tags. Added `index.html` to the default `exclude` set (alongside the existing
|
127 | `test/**` and `demo/**` globs).
|
128 |
|
129 | ## [1.0.0] - 2018-01-25
|
130 | - [BREAKING] The `--outDir` flag is now required when using the command line
|
131 | tool. Previously it would print all concatenated typings to `stdout`, which
|
132 | doesn't make much sense given that we emit multiple files.
|
133 | - Rewrite triple-slash references to Polymer into the `types/` directory so that
|
134 | they resolve correctly. Polymer is a special case where we put the typings in
|
135 | a `types/` subdirectory in order not to clutter the repo.
|
136 | - Emit a `const FooBehavior: object` for behaviors. This lets TypeScript know
|
137 | that e.g. `Polymer.AppLocalizeBehavior` is a valid symbol that could be
|
138 | passed, for example, to the `Polymer.mixinBehaviors` function.
|
139 |
|
140 | ## [0.3.6] - 2018-01-09
|
141 | - Support parameterized types other than `Array` and `Object`, such as `Foo<T>`.
|
142 |
|
143 | ## [0.3.5] - 2018-01-02
|
144 | - Properties are now emitted as `readonly` when applicable.
|
145 | - Bump Analyzer for latest scanning features (getters/setters, static methods,
|
146 | methods/properties on class prototypes).
|
147 |
|
148 | ## [0.3.4] - 2017-12-20
|
149 | - Handle optional and rest parameters in function type expressions.
|
150 |
|
151 | ## [0.3.3] - 2017-12-18
|
152 | - Pin Analyzer version for upcoming major refactor.
|
153 |
|
154 | ## [0.3.2] - 2017-12-18
|
155 | - Static methods are now supported on classes, elements, and mixins.
|
156 | - Add `renameTypes` config option, a map of renames to apply to named types that
|
157 | can be configured per-project.
|
158 | - Convert Closure `ITemplateArray` type to TypeScript `TemplateStringsArray`.
|
159 | - Support object index signatures (e.g. `Object<foo, bar>` maps to `{[key: foo]:
|
160 | bar}`).
|
161 |
|
162 | ## [0.3.1] - 2017-12-15
|
163 | - Convert Closure `Object` to TypeScript `object`.
|
164 | - Use glob patterns instead of RegExps to exclude files.
|
165 | - Bump Analyzer version to include
|
166 | https://github.com/Polymer/polymer-analyzer/pull/791 which makes Polymer
|
167 | properties possibly `null|undefined`.
|
168 |
|
169 | ## [0.3.0] - 2017-12-12
|
170 | - `void` is not nullable.
|
171 | - Support constructor functions (e.g. `function(new:HTMLElement, string)`).
|
172 | - Support record types (e.g. `@param {{foo: bar}}`).
|
173 | - Include method `@return` descriptions.
|
174 |
|
175 | ## [0.2.0] - 2017-12-08
|
176 | - Many fixes. See
|
177 | https://github.com/Polymer/gen-typescript-declarations/issues/23.
|
178 |
|
179 | ## [0.1.0] - 2017-11-09
|
180 | - Initial release on NPM.
|