1 | # Changelog
|
2 |
|
3 | ## v1.6.1 (2017-10-17)
|
4 |
|
5 | ### :bug: Bug Fix
|
6 |
|
7 | - Update compat table to fix two small issues ([#445](https://github.com/babel/babel-preset-env/pull/445)) (@danez)
|
8 |
|
9 | ES2015 destructuring is not fully supported in Edge 15 and the polyfill required again. `es6.math.imul` is supported on Android as of version 4.4
|
10 |
|
11 | - Add polyfills for ES6 static Object methods ([#441](https://github.com/babel/babel-preset-env/pull/441)) (@danez)
|
12 |
|
13 | Functions such as `Object.keys`, `Object.freeze`, ... do already exist in ES5, but their behaviour changed in ES2015. `babel-preset-env` with `builtIns: true` now adds the core-js polyfills for this methods if the browser only supports the ES5 variant of the method (like IE11 for example)
|
14 |
|
15 | - Normalize module format of plugins/built-ins data ([#376](https://github.com/babel/babel-preset-env/pull/376)) (@rtsao)
|
16 |
|
17 | ## v1.6.0 (2017-07-04)
|
18 |
|
19 | ### :rocket: New Feature
|
20 |
|
21 | - Bump compat-table for node8 support ([#363](https://github.com/babel/babel-preset-env/pull/363)) (@existentialism)
|
22 |
|
23 | We updated our mappings to support native trailing function commas and string paddings in Node.js 8+.
|
24 |
|
25 | ### :bug: Bug Fix
|
26 |
|
27 | - Handle `chromeandroid` browserslist value ([#367](https://github.com/babel/babel-preset-env/pull/367)) (@yavorsky)
|
28 |
|
29 | We added support for using browserslist's `chromeandroid` in `targets`.
|
30 |
|
31 | ### :memo: Documentation
|
32 |
|
33 | - Tweak uglify option docs ([#368](https://github.com/babel/babel-preset-env/pull/368)) (@existentialism)
|
34 |
|
35 | Thanks to @graingert and @pfiaux for pointing out some needed updates to the `uglify-js`-related docs.
|
36 |
|
37 | ## v1.5.2 (2017-06-07)
|
38 |
|
39 | ### :bug: Bug Fix
|
40 |
|
41 | - Ensure explicit targets always override browsers key targets ([#346](https://github.com/babel/babel-preset-env/pull/346)) (@existentialism)
|
42 |
|
43 | `browser` targets should be overridden by explicit targets, and we inadvertently broke this when we landed string version support.
|
44 |
|
45 | ## v1.5.1 (2017-05-22)
|
46 |
|
47 | ### :bug: Bug Fix
|
48 |
|
49 | - Compile with loose mode ([#322](https://github.com/babel/babel-preset-env/pull/332)) (@existentialism)
|
50 |
|
51 | ## v1.5.0 (2017-05-19)
|
52 |
|
53 | ### :rocket: New Feature
|
54 |
|
55 | - Support target versions as strings ([#321](https://github.com/babel/babel-preset-env/pull/321)) (@existentialism)
|
56 |
|
57 | We were originally waiting on 2.x for a breaking change, but since node v7.10
|
58 | and other targets are causing some pain, we decided to land a backwards
|
59 | compatible version.
|
60 |
|
61 | ### :house: Internal
|
62 |
|
63 | - Backport: use preset-env and remove flow-strip-types ([#324](https://github.com/babel/babel-preset-env/pull/324)) (@yavorsky)
|
64 | - Bump electron-to-chromium ([#329](https://github.com/babel/babel-preset-env/pull/329)) (@existentialism)
|
65 | - Tweak version mappings to match compat-table updates ([#323](https://github.com/babel/babel-preset-env/pull/323)) (@existentialism)
|
66 | - Bump browserslist ([#319](https://github.com/babel/babel-preset-env/pull/319)) (@existentialism)
|
67 | - Bump compat-table ([#307](https://github.com/babel/babel-preset-env/pull/307)) (@existentialism)
|
68 | - Add debug-fixtures and test/tmp to .eslintignore ([#305](https://github.com/babel/babel-preset-env/pull/305)) (@yavorsky)
|
69 |
|
70 | ## v1.4.0 (2017-04-14)
|
71 |
|
72 | ### :rocket: New Feature
|
73 |
|
74 | - Support `spec` option ([#98](https://github.com/babel/babel-preset-env/pull/98)) (@Kovensky)
|
75 |
|
76 | Added an option to enable more spec compliant, but potentially slower, transformations for any plugins in this preset that support them.
|
77 |
|
78 | - Bump compat-table for Edge 15 support ([#273](https://github.com/babel/babel-preset-env/pull/273)) (@existentialism)
|
79 |
|
80 | We updated our mappings so that you can get native support for async/await and other goodies when targeting Edge 15!
|
81 |
|
82 | ### :bug: Bug Fix
|
83 |
|
84 | - Add Android browser to name map ([#270](https://github.com/babel/babel-preset-env/pull/270)) (@existentialism)
|
85 |
|
86 | Fixed a bug that was ignoring Android targets in browserslist queries (for example: "Android >= 4").
|
87 |
|
88 | ### :memo: Documentation
|
89 |
|
90 | - Clarify note about loading polyfills only once ([#282](https://github.com/babel/babel-preset-env/pull/282)) (@darahak)
|
91 | - Add a reminder about include/exclude options ([#275](https://github.com/babel/babel-preset-env/pull/275)) (@existentialism)
|
92 |
|
93 | ### :house: Internal
|
94 |
|
95 | - Chore: reduce package size. ([#281](https://github.com/babel/babel-preset-env/pull/281)) (@evilebottnawi)
|
96 | - Remove deprecated comment ([#271](https://github.com/babel/babel-preset-env/pull/271)) (@yavorsky)
|
97 |
|
98 | ## v1.3.3 (2017-04-07)
|
99 |
|
100 | ### :bug: Bug Fix
|
101 |
|
102 | - Support electron version in a string format ([#252](https://github.com/babel/babel-preset-env/pull/252)) (@yavorsky)
|
103 |
|
104 | Adding electron as a target was an inadvertent breaking change as it no longer
|
105 | allowed string versions. We added an exception for now, even though it is
|
106 | inconsistent with other versions. Just as a note, the upcoming version 2.x will
|
107 | allow _both_ number and string versions.
|
108 |
|
109 | - Ensure const-check plugin order ([#257](https://github.com/babel/babel-preset-env/pull/257)) (@existentialism)
|
110 |
|
111 | We now force the `const-es2015-check` plugin to run first (so that it can
|
112 | correctly report issues before they get transpiled away).
|
113 |
|
114 | ### :rocket: New Feature
|
115 |
|
116 | - Allow use `babel-plugin-` prefix for include and exclude ([#242](https://github.com/babel/babel-preset-env/pull/242)) (@yavorsky)
|
117 |
|
118 | The `include` and `exclude` options now allow both prefixed (`babel-plugin-transform-es2015-spread`)
|
119 | and prefix-less (`transform-es2015-spread`) plugin names.
|
120 |
|
121 | ### :memo: Documentation
|
122 |
|
123 | - Note babel plugin prefix handling in include/exclude ([#245](https://github.com/babel/babel-preset-env/pull/245)) (@existentialism)
|
124 | - Fix README: debug option shows info in stdout. ([#236](https://github.com/babel/babel-preset-env/pull/236)) (@Gerhut)
|
125 |
|
126 | ### :house: Internal
|
127 |
|
128 | - Add simple smoke-test ([#240](https://github.com/babel/babel-preset-env/pull/240)) (@existentialism)
|
129 | - Add prepublish script (@existentialism)
|
130 |
|
131 | ## v1.3.2 (2017-03-30)
|
132 |
|
133 | - Fixed an issue with a broken publish
|
134 |
|
135 | ## v1.3.1 (2017-03-30)
|
136 |
|
137 | - Fixed a regression with missing files due to `.npmignore`.
|
138 |
|
139 | ## v1.3.0 (2017-03-30)
|
140 |
|
141 | ### :bug: Bug Fix
|
142 |
|
143 | - Add check for ArrayBuffer[Symbol.species] ([#233](https://github.com/babel/babel-preset-env/pull/233)) (@existentialism)
|
144 |
|
145 | We now properly check for `Symbol.species` support in ArrayBuffer and include the
|
146 | polyfill if necessary. This should, as a side effect, fix ArrayBuffer-related
|
147 | errors on IE9.
|
148 |
|
149 | ### :nail_care: Polish
|
150 |
|
151 | - Fill data with electron as a target. ([#229](https://github.com/babel/babel-preset-env/pull/229)) (@yavorsky)
|
152 |
|
153 | We've simplified things by adding `electron` as a target instead of doing a bunch of
|
154 | things at runtime. Electron targets should now also be displayed in the debug output.
|
155 |
|
156 | - separate default builtins for platforms ([#226](https://github.com/babel/babel-preset-env/pull/226)) (@restrry)
|
157 |
|
158 | If you are targeting the `node` environment exclusively, the always-included web polyfills
|
159 | (like `dom.iterable`, and a few others) will now no longer be included.
|
160 |
|
161 | ### :memo: Documentation
|
162 |
|
163 | * remove deprecated projects ([#223](https://github.com/babel/babel-preset-env/pull/223)) [skip ci] (@stevemao)
|
164 |
|
165 | ### :house: Internal
|
166 |
|
167 | * npmignore: Add related to build data and codecov. ([#216](https://github.com/babel/babel-preset-env/pull/216)) (@yavorsky)
|
168 |
|
169 | ## v1.2.2 (2017-03-14)
|
170 |
|
171 | ### :bug: Bug Fix
|
172 |
|
173 | - Refactor browser data parsing to handle families ([#208](https://github.com/babel/babel-preset-env/pull/208)) (@existentialism)
|
174 |
|
175 | When parsing plugin data, we weren't properly handling browser families. This caused
|
176 | `transform-es2015-block-scoping` and other plugins to be incorrectly added for Edge >= 12.
|
177 | (s/o to @mgol for the the report and review!)
|
178 |
|
179 | - Add typed array methods to built-ins features. ([#198](https://github.com/babel/babel-preset-env/pull/198)) (@yavorsky)
|
180 |
|
181 | Fixes an issue where some TypedArray features were not being polyfilled properly. (s/o to @alippai for the report!)
|
182 |
|
183 | ### :memo: Documentation
|
184 |
|
185 | - Fixed minor typo in readme ([#199](https://github.com/babel/babel-preset-env/pull/199)) (@bl4ckdu5t)
|
186 | - Add built-ins, better links, compat-table url, etc ([#195](https://github.com/babel/babel-preset-env/pull/195)) (@yavorsky)
|
187 | - Change CONTRIBUTING.md to use absolute paths ([#194](https://github.com/babel/babel-preset-env/pull/194)) (@aaronang)
|
188 |
|
189 | ### :house: Internal
|
190 |
|
191 | - Bump plugins ([#201](https://github.com/babel/babel-preset-env/pull/201)) (@yavorsky)
|
192 | - Enable code coverage ([#200](https://github.com/babel/babel-preset-env/pull/200)) (@alxpy)
|
193 | - Increase mocha timeout to 10s ([#202](https://github.com/babel/babel-preset-env/pull/202)) (@yavorsky)
|
194 |
|
195 | ## v1.2.1 (2017-03-06)
|
196 |
|
197 | ### :bug: Bug Fix
|
198 |
|
199 | - Add transform-duplicate-keys mapping ([#192](https://github.com/babel/babel-preset-env/pull/192)) (@existentialism)
|
200 |
|
201 | Our plugin data was missing a mapping for the `transform-duplicate-keys` plugin which caused it to never be included. (s/o to @Timer for the report!)
|
202 |
|
203 | ### :memo: Documentation
|
204 |
|
205 | - Clarify reasons for the uglify option in README.md ([#188](https://github.com/babel/babel-preset-env/pull/188)) (@mikegreiling)
|
206 |
|
207 | ## v1.2.0 (2017-03-03)
|
208 |
|
209 | ### :rocket: New Feature
|
210 |
|
211 | - Add uglify as a target ([#178](https://github.com/babel/babel-preset-env/pull/178)) (@yavorsky)
|
212 |
|
213 | Support for `uglify` as a target is now available! This will enable all plugins and, as a result, fully compiles your code to ES5. Note, that useBuiltIns will work as before, and only the polyfills that your other target(s) need will be included.
|
214 |
|
215 | ```json
|
216 | {
|
217 | "presets": [
|
218 | ["env", {
|
219 | "targets": {
|
220 | "chrome": 55,
|
221 | "uglify": true
|
222 | },
|
223 | "useBuiltIns": true,
|
224 | "modules": false
|
225 | }]
|
226 | ]
|
227 | }
|
228 | ```
|
229 |
|
230 | ### :bug: Bug Fix
|
231 |
|
232 | - Respect older versions in invert equals map ([#180](https://github.com/babel/babel-preset-env/pull/180)) (@danez)
|
233 |
|
234 | Fixes a number of bugs that caused some incorrect and/or missing environment data when parsing `compat-table`.
|
235 |
|
236 | ## v1.1.11 (2017-03-01)
|
237 |
|
238 | This release primarily upgrades `compat-table`, which adds support for async on Node 7.6!
|
239 |
|
240 | ### :bug: Bug Fix
|
241 |
|
242 | - Fix hasBeenWarned condition. ([#175](https://github.com/babel/babel-preset-env/pull/175)) (@yavorsky)
|
243 |
|
244 | ### :memo: Documentation
|
245 |
|
246 | - Add yarn example. ([#174](https://github.com/babel/babel-preset-env/pull/174)) (@yavorsky)
|
247 |
|
248 | ### :house: Internal
|
249 |
|
250 | - Bump compat-table ([#177](https://github.com/babel/babel-preset-env/pull/177)) (@existentialism)
|
251 | - Add electron version exception test ([#176](https://github.com/babel/babel-preset-env/pull/176)) (@existentialism)
|
252 |
|
253 | ## v1.1.10 (2017-02-24)
|
254 |
|
255 | ### :bug: Bug Fix
|
256 |
|
257 | - Drop use of lodash/intersection from checkDuplicateIncludeExcludes ([#173](https://github.com/babel/babel-preset-env/pull/173)) (@existentialism)
|
258 |
|
259 | ## v1.1.9 (2017-02-24)
|
260 |
|
261 | ### :bug: Bug Fix
|
262 |
|
263 | - Add tests for debug output ([#156](https://github.com/babel/babel-preset-env/pull/156)) (@existentialism)
|
264 |
|
265 | Since we've (mostly @yavorsky) have fixed a number of bugs recently with the `debug` option output, we added the ability to assert stdout matches what we expect. Read the updated [CONTRIBUTING.md](https://github.com/babel/experimental/babel-preset-env/blob/master/CONTRIBUTING.md#testing-the-debug-option) for more info.
|
266 |
|
267 | - Fixes #143. Log correct targets. ([#155](https://github.com/babel/babel-preset-env/pull/155)) (@yavorsky)
|
268 |
|
269 | This fixes a bug in the `debug` output where incorrect target(s) were being displayed for why a particular plugin/preset was being included.
|
270 |
|
271 | Given targets:
|
272 |
|
273 | ```txt
|
274 | {
|
275 | "firefox": 52,
|
276 | "node": 7.4
|
277 | }
|
278 | ```
|
279 |
|
280 | Before:
|
281 |
|
282 | ```txt
|
283 | Using plugins:
|
284 | transform-es2015-destructuring {"node":6.5}
|
285 | transform-es2015-for-of {"node":6.5}
|
286 | transform-es2015-function-name {"node":6.5}
|
287 | transform-es2015-literals {"node":4}
|
288 | transform-exponentiation-operator {"firefox":52}
|
289 | syntax-trailing-function-commas {"firefox":52}
|
290 | ```
|
291 |
|
292 | After:
|
293 |
|
294 | ```txt
|
295 | Using plugins:
|
296 | transform-es2015-destructuring {"firefox":52}
|
297 | transform-es2015-for-of {"firefox":52}
|
298 | transform-es2015-function-name {"firefox":52}
|
299 | transform-es2015-literals {"firefox":52}
|
300 | transform-exponentiation-operator {"node":7.4}
|
301 | syntax-trailing-function-commas {"node":7.4}
|
302 | ```
|
303 |
|
304 | ### :memo: Documentation
|
305 |
|
306 | - Fix compat-table link in contributing.md (@existentialism)
|
307 | - Update README examples to fix website ([#151](https://github.com/babel/babel-preset-env/pull/)) (@existentialism)
|
308 | - Fix few typos ([#146](https://github.com/babel/babel-preset-env/pull/146)) (@existentialism)
|
309 | - Add configuration example to clarify `debug: true` ([#138](https://github.com/babel/babel-preset-env/pull/138)) (@yavorsky)
|
310 | - Fix CHANGELOG’s v1.1.8 updates typo. ([#136](https://github.com/babel/babel-preset-env/pull/136)) (@yavorsky)
|
311 | - README: Update `debug: true` example. ([#138](https://github.com/babel/babel-preset-env/pull/138)) (@yavorsky)
|
312 |
|
313 | ### :house: Internal
|
314 |
|
315 | - update compat ([#169](https://github.com/babel/babel-preset-env/pull/169)) (@hzoo)
|
316 | - Use external Electron to Chromium library ([#144](https://github.com/babel/babel-preset-env/pull/144)) (@Kilian)
|
317 | - Update yarn lockfile ([#152](https://github.com/babel/babel-preset-env/pull/152)) (@existentialism)
|
318 | - Extract option normalization into independant file ([#125](https://github.com/babel/babel-preset-env/pull/125)) (@baer)
|
319 | - Update yarnfile ([#145](https://github.com/babel/babel-preset-env/pull/145)) (@baer)
|
320 | - devDeps: eslint-config-babel v5.0.0 ([#139](https://github.com/babel/babel-preset-env/pull/139)) (@kaicataldo)
|
321 | - Update compat-table, build data ([#135](https://github.com/babel/babel-preset-env/pull/135)) (@hzoo)
|
322 |
|
323 | ## v1.1.8 (2017-01-10)
|
324 |
|
325 | ### :bug: Bug Fix
|
326 |
|
327 | - Debug: Transformations before logs. ([#128](https://github.com/babel/babel-preset-env/pull/128)) (@yavorsky)
|
328 |
|
329 | Makes sure that all transformations on `targets` (such as `exclude`/`include`) are run before logging out with the `debug` option. Fixes ([#127](https://github.com/babel/babel-preset-env/issues/127)).
|
330 |
|
331 | ### :house: Internal
|
332 |
|
333 | - Remove unnecessary extension. ([#131](https://github.com/babel/babel-preset-env/pull/131)) (@roman-yakobnyuk)
|
334 | - Include yarn.lock and update CI. ([#124](https://github.com/babel/babel-preset-env/pull/124)) (@existentialism)
|
335 |
|
336 | ## v1.1.7 (2017-01-09)
|
337 |
|
338 | Had a publishing issue in the previous release.
|
339 |
|
340 | ## v1.1.6 (2017-01-06)
|
341 |
|
342 | ### :bug: Bug Fix
|
343 |
|
344 | - Explicitly resolve lowest browser version. ([#121](https://github.com/babel/babel-preset-env/pull/121)) (@brokenmass)
|
345 |
|
346 | ```js
|
347 | {
|
348 | "targets": {
|
349 | "browsers": ["ios >= 6"] // was resolving to {ios: 10} rather than {ios: 6}
|
350 | }
|
351 | }
|
352 | ```
|
353 |
|
354 | ## v1.1.5 (2017-01-04)
|
355 |
|
356 | ### :bug: Bug Fix
|
357 |
|
358 | - Show error if target version is not a number. ([#107](https://github.com/babel/babel-preset-env/pull/107)) (@existentialism)
|
359 |
|
360 | ```js
|
361 | {
|
362 | "presets": [
|
363 | ["env", {
|
364 | "targets": {
|
365 | "chrome": "52", // will error since it's not a number,
|
366 | "chrome": 52 // correct!
|
367 | }
|
368 | }]
|
369 | ]
|
370 | }
|
371 | ```
|
372 |
|
373 | - Fix targets for the `debug` option. ([#109](https://github.com/babel/babel-preset-env/pull/109)) (@yavorsky)
|
374 |
|
375 | Now it prints the transformed targets/environments rather than the browsers query.
|
376 |
|
377 | ```txt
|
378 | Using targets:
|
379 | {
|
380 | "chrome": 53,
|
381 | "ie": 10,
|
382 | "node": 6
|
383 | }
|
384 |
|
385 | Modules transform: false
|
386 |
|
387 | Using plugins:
|
388 | transform-es2015-arrow-functions {"chrome":47,"node":6}
|
389 | transform-es2015-block-scoped-functions {"chrome":41,"ie":11,"node":4}
|
390 |
|
391 | Using polyfills:
|
392 | es6.typed.uint8-clamped-array {"chrome":5,"node":0.12}
|
393 | es6.map {"chrome":51,"node":6.5}
|
394 | ```
|
395 |
|
396 | ## v1.1.4 (2016-12-16)
|
397 |
|
398 | v1.1.2-v1.1.4
|
399 |
|
400 | ### :bug: Bug Fix
|
401 |
|
402 | The new `exclude`/`include` options weren't working correctly for built-ins. ([#102](https://github.com/babel/babel-preset-env/pull/102)).
|
403 |
|
404 | Also fixes an issue with debug option.
|
405 |
|
406 | ## v1.1.1 (2016-12-13)
|
407 |
|
408 | ### :bug: Bug Fix
|
409 |
|
410 | Regression with the previous release due to using `Object.values` (ES2017). This wasn't caught because we are using babel-register to run tests and includes polyfills so it didn't fail on CI even though we have Node 0.10 as an env. Looking into fixing this to prevent future issues.
|
411 |
|
412 | ## v1.1.0 (2016-12-13)
|
413 |
|
414 | ### :rocket: New Feature
|
415 |
|
416 | - Add `exclude` option, rename `whitelist` to `include` ([#89](https://github.com/babel/babel-preset-env/pull/89)) (@hzoo)
|
417 |
|
418 | Example:
|
419 |
|
420 | ```js
|
421 | {
|
422 | "presets": [
|
423 | ["env", {
|
424 | "targets": {
|
425 | "browsers": ["last 2 versions", "safari >= 7"]
|
426 | },
|
427 | "include": ["transform-es2015-arrow-functions"],
|
428 | "exclude": [
|
429 | "transform-regenerator",
|
430 | "transform-async-to-generator",
|
431 | "map"
|
432 | ],
|
433 | "useBuiltIns": true
|
434 | }]
|
435 | ]
|
436 | }
|
437 | ```
|
438 |
|
439 | `"exclude": ["transform-regenerator"]` doesn't transform generators and removes `regeneratorRuntime` from being imported.
|
440 |
|
441 | `"exclude": ["transform-async-to-generator"]` doesn't use the built-in async-to-gen transform so you can use something like [fast-async](https://github.com/MatAtBread/fast-async).
|
442 |
|
443 | `"exclude": ["map"]` doesn't include the `Map` polyfill if you know you aren't using it in your code (w/ `useBuiltIns`). (We will figure out a way to automatically do this [#84](https://github.com/babel/babel-preset-env/issues/84)).
|
444 |
|
445 | If you pass a wrong plugin it will error: valid options for `include/exclude` are in [/data/plugin-features.js](https://github.com/babel/experimental/babel-preset-env/blob/master/data/plugin-features.js) and [/data/built-in-features.js](https://github.com/babel/experimental/babel-preset-env/blob/master/data/built-in-features.js) (without the `es6.`)
|
446 |
|
447 | ### :house: Internal
|
448 |
|
449 | - Optimize result filtration. ([#77](https://github.com/babel/babel-preset-env/pull/77)) (@yavorsky)
|
450 | - Update eslint config to align with other babel projects ([#79](https://github.com/babel/babel-preset-env/pull/79)) (@baer)
|
451 | - Update pathnames to avoid uppercase ([#80](https://github.com/babel/babel-preset-env/pull/80)) (@baer)
|
452 | - Refactor build data for clarity/consistency ([#81](https://github.com/babel/babel-preset-env/pull/81)) (@baer)
|
453 | - Update linting rules to cover all js ([#82](https://github.com/babel/babel-preset-env/pull/82)) (@baer)
|
454 | - Cleanup lib before rebuilding ([#87](https://github.com/babel/babel-preset-env/pull/87)) (@baer)
|
455 | - Move linting dependency to be dev only ([#88](https://github.com/babel/babel-preset-env/pull/88)) (@baer)
|
456 |
|
457 | ### :memo: Documentation
|
458 |
|
459 | - Fix typo ([#78](https://github.com/babel/babel-preset-env/pull/78)) (@rohmanhm)
|
460 | - Fix PR link in changelog. ([#75](https://github.com/babel/babel-preset-env/pull/75)) (@nhajidin)
|
461 |
|
462 | ## v1.0.2 (2016-12-10)
|
463 |
|
464 | ### :bug: Bug Fix
|
465 |
|
466 | * Fix issue with Object.getOwnPropertySymbols ([#71](https://github.com/babel/babel-preset-env/pull/71)) ([@existentialism](https://github.com/existentialism))
|
467 |
|
468 | Was requiring the wrong module kinda of like in v1.0.1:
|
469 |
|
470 | https://github.com/zloirock/core-js#ecmascript-6-symbol
|
471 |
|
472 | ```diff
|
473 | -import "core-js/modules/es6.object.get-own-property-symbols";
|
474 | ```
|
475 |
|
476 | The test is just a part of `Symbol`.
|
477 |
|
478 | ## v1.0.1 (2016-12-10)
|
479 |
|
480 | ### :bug: Bug Fix
|
481 |
|
482 | * Fix regenerator import ([#68](https://github.com/babel/babel-preset-env/pull/68)) ([@hzoo](https://github.com/hzoo))
|
483 |
|
484 | We were outputting an invalid path for `regenerator`!
|
485 |
|
486 | ```diff
|
487 | +import "regenerator-runtime/runtime";
|
488 | -import "core-js/modules/regenerator-runtime/runtime"-
|
489 | ```
|
490 |
|
491 | ## v1.0.0 (2016-12-09)
|
492 |
|
493 | ### :rocket: New Feature
|
494 |
|
495 | * Add `useBuiltIns` option ([#56](https://github.com/babel/babel-preset-env/pull/56)) ([@hzoo](https://github.com/hzoo)), ([@yavorsky](https://github.com/yavorsky)), ([@existentialism](https://github.com/existentialism))
|
496 |
|
497 | A way to apply `babel-preset-env` for polyfills (via `"babel-polyfill"``).
|
498 |
|
499 | > This option will apply a new Babel plugin that replaces `require("babel-polyfill")` with the individual requires for `babel-polyfill` based on the target environments.
|
500 |
|
501 | Install
|
502 |
|
503 | ```
|
504 | npm install babel-polyfill --save
|
505 | ```
|
506 |
|
507 | In
|
508 |
|
509 | ```js
|
510 | import "babel-polyfill"; // create an entry js file that contains this
|
511 | // or
|
512 | import "core-js";
|
513 | ```
|
514 |
|
515 | Out (different based on environment)
|
516 |
|
517 | ```js
|
518 | // chrome 55
|
519 | import "core-js/modules/es7.string.pad-start"; // haha left_pad
|
520 | import "core-js/modules/es7.string.pad-end";
|
521 | import "core-js/modules/web.timers";
|
522 | import "core-js/modules/web.immediate";
|
523 | import "core-js/modules/web.dom.iterable";
|
524 | ```
|
525 |
|
526 | `.babelrc` Usage
|
527 |
|
528 | ```js
|
529 | {
|
530 | "presets": [
|
531 | ["env", {
|
532 | "targets": {
|
533 | "electron": 1.4
|
534 | },
|
535 | "modules": false, // webpack 2
|
536 | "useBuiltIns": true // new option
|
537 | }]
|
538 | ]
|
539 | }
|
540 | ```
|
541 |
|
542 | > Also looking to make an easier integration point via Webpack with this method. Please reach out if you have ideas!
|
543 |
|
544 | ---
|
545 |
|
546 | * Support [Electron](http://electron.atom.io/) ([#55](https://github.com/babel/babel-preset-env/pull/55)) ([@paulcbetts](https://github.com/paulcbetts))
|
547 |
|
548 | Electron is also an environment, so [Paul went ahead](https://twitter.com/paulcbetts/status/804507070103851008) and added support for this!
|
549 |
|
550 | `.babelrc` Usage
|
551 |
|
552 | ```js
|
553 | {
|
554 | "presets": [ ["env", {"targets": { "electron": 1.4 }}]]
|
555 | }
|
556 | ```
|
557 |
|
558 | > Currently we are manually updating the data in [/data/electron-to-chromium.js](https://github.com/babel/experimental/babel-preset-env/blob/master/data/electron-to-chromium.js), but [@kevinsawicki](https://github.com/kevinsawicki) says we could generate the data from [atom-shell/dist/index.json](https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/index.json) as well! (Someone should make a PR :smile:)
|
559 |
|
560 |
|
561 |
|
562 | ## v0.0.9 (2016-11-24)
|
563 |
|
564 | ### :rocket: New Feature
|
565 |
|
566 | * Support Opera ([#48](https://github.com/babel/babel-preset-env/pull/48)) (Henry Zhu)
|
567 |
|
568 | Was as simple as modifying the chrome version and subtracting 13! (so chrome 54 = opera 41)
|
569 |
|
570 | ```js
|
571 | {
|
572 | "presets": [
|
573 | ["env", {
|
574 | "targets": {
|
575 | "opera": 41
|
576 | }
|
577 | }]
|
578 | ]
|
579 | }
|
580 | ```
|
581 |
|
582 | ## v0.0.8 (2016-11-16)
|
583 |
|
584 | ### :nail_care: Polish
|
585 |
|
586 | * Only print the debug info once ([#46](https://github.com/babel/babel-preset-env/pull/46) (Henry Zhu)
|
587 |
|
588 | When using the `debug` option it was printing the data for each file processed rather than once.
|
589 |
|
590 | ```js
|
591 | {
|
592 | "presets": [
|
593 | ["env", {
|
594 | "debug": true
|
595 | }]
|
596 | ]
|
597 | }
|
598 | ```
|
599 |
|
600 | ## v0.0.7 (2016-11-02)
|
601 |
|
602 | ### :rocket: New Feature
|
603 |
|
604 | * hardcode a current node version option ([#35](https://github.com/babel/babel-preset-env/pull/35)) (Henry Zhu)
|
605 |
|
606 | ```js
|
607 | {
|
608 | "presets": [
|
609 | ["env", {
|
610 | "targets": {
|
611 | "node": "current" // parseFloat(process.versions.node)
|
612 | }
|
613 | }]
|
614 | ]
|
615 | }
|
616 | ```
|
617 |
|
618 | * add 'whitelist' option ([#31](https://github.com/babel/babel-preset-env/pull/31)) (Henry Zhu)
|
619 |
|
620 | ```js
|
621 | {
|
622 | "presets": [
|
623 | ["env", {
|
624 | "targets": {
|
625 | "chrome": 52
|
626 | },
|
627 | "whitelist": ["transform-es2015-arrow-functions"]
|
628 | }]
|
629 | ]
|
630 | }
|
631 | ```
|
632 |
|
633 | * Add more aliases (Henry Zhu)
|
634 | * Update plugin data: firefox 52 supports async/await! ([#29](https://github.com/babel/babel-preset-env/pull/29)) (Henry Zhu)
|
635 |
|
636 | ### :bug: Bug Fixes
|
637 |
|
638 | * Use compat-table equals option ([#36](https://github.com/babel/babel-preset-env/pull/36)) (Henry Zhu)
|
639 |
|
640 | Compute and use `compat-table` equivalents
|
641 |
|
642 | ```js
|
643 | {
|
644 | "safari6": "phantom",
|
645 | "chrome44": "iojs",
|
646 | "chrome50": "node64",
|
647 | "chrome51": "node65",
|
648 | "chrome54": "node7",
|
649 | "chrome30": "android44",
|
650 | "chrome37": "android50",
|
651 | "chrome39": "android51",
|
652 | "safari7": "ios7",
|
653 | "safari71_8": "ios8",
|
654 | "safari9": "ios9",
|
655 | "safari10": "ios10",
|
656 | "chrome50": "node6"
|
657 | }
|
658 | ```
|
659 |
|
660 | * Change default behavior to act the same as babel-preset-latest ([#33](https://github.com/babel/babel-preset-env/pull/33)) (Henry Zhu)
|
661 |
|
662 | ```js
|
663 | { "presets": ["env"] } // should act the same as babel-preset-latest
|
664 | ```
|
665 |
|
666 | ## Internal
|
667 |
|
668 | * Add fixture helper for tests ([#28](https://github.com/babel/babel-preset-env/pull/28)) (Henry Zhu)
|