Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency babel-core to v6.26.3 #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Sep 5, 2020

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
babel-core (source) 6.8.0 -> 6.26.3 age adoption passing confidence

Release Notes

babel/babel

v6.26.3

Compare Source

Summary
  • Fixed a small regression from the backport of #​7761 from #​7812 if the output file contains no JS content

v6.26.2

Compare Source

Summary
  • Landed #​7812 which backported several fixes to make sourcemaps behave better
    • #​7312 - Include better mappings for arrow-transformed 'this' and 'arguments'
    • #​7378 - Include better mappings for import bindings transformed to member expressions
    • #​7761 - Re-implement inputSourceMap merging logic to more accurately reflect mappings

v6.26.0

Compare Source

6.26.0 (2017-08-16)

Backports for some folks (also others when we accidentally merged PRs from both 6.x/master)
Lesson learned: just use master and backport on another branch.
7.x beta is next: https://github.com/babel/babel/milestone/9, not planning on further 6.x releases (we say this every time)

👓 Spec Compliancy
  • babel-core, babel-generator, babel-plugin-transform-flow-comments, babel-plugin-transform-flow-strip-types, babel-traverse, babel-types
🚀 New Feature
  • babel-cli
🐛 Bug Fix
📝 Documentation
  • babel-plugin-transform-class-properties
  • babel-plugin-transform-runtime
  • babel-plugin-transform-regenerator
  • Other
  • babel-generator, babel-plugin-transform-es2015-arrow-functions, babel-plugin-transform-es2015-modules-commonjs, babel-plugin-transform-es2015-spread, babel-plugin-transform-runtime, babel-register
🏠 Internal
Committers: 19

v6.25.0

Compare Source

6.25.0 (2017-06-08)

Just backporting a few things.

🚀 New Feature
  • babel-plugin-transform-react-display-name
  • babel-generator, babel-plugin-transform-flow-strip-types, babel-types
🐛 Bug Fix
💅 Polish
Committers: 5

v6.24.1

Compare Source

v6.24.1 (2017-04-07)

🐛 Bug Fix
  • babel-plugin-transform-regenerator

Fixes an issue when using async arrow functions with rest parameters (crazy!)

function test(fn) {
  return async (...args) => {
    return fn(...args);
  };
} 
  • babel-plugin-transform-es2015-function-name, babel-types
var obj = { await: function () {} }; // input
var obj = { await: function _await() {} };  // output
📝 Documentation
🏠 Internal
Committers: 5

v6.24.0

Compare Source

6.24.0 (2017-03-13)

A quick release for 2 features:

  • Thanks to @​rwjblue, there is now a noInterop option for our es2015-modules transform to remove the interopRequireDefault and interopRequireWildcard helpers.

Input

import foo from "foo";
foo;

Regular Output

var _foo = require("foo");
var _foo2 = _interopRequireDefault(_foo);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
_foo2.default;

Output with option noInterop

"use strict";
var _foo = require("foo");
(0, _foo.default)();

This also helps ember-cli migrate to Babel 6.

  • @​izaakschroeder has added dirname to the preset constructor which presets can use to resolve things relative to files.

Example usage of fileContext.dirname in a preset

module.exports = function preset (context, options, fileContext) {
  if (/resolve-addons-relative-to-file$/.test(fileContext.dirname)) {
    return {
      plugins: ['plugin-here'],
    };
  }
  return {};
};

This will help out with reusing a browserslist file for babel-preset-env and for plugins like https://github.com/tleunen/babel-plugin-module-resolver.

🚀 New Feature
  • babel-plugin-transform-es2015-modules-amd, babel-plugin-transform-es2015-modules-commonjs
  • babel-core
🐛 Bug Fix
📝 Documentation
🏠 Internal
Committers: 14

v6.23.1

Compare Source

v6.23.0

Compare Source

6.23.0 (2017-02-13)
🚀 New Feature
  • babel-plugin-transform-react-constant-elements
    • #​4812 feature: Support pure expressions in transform-react-constant-elements. (@​STRML)
  • babel-preset-flow, babel-preset-react
  • babel-traverse
  • babel-plugin-transform-es2015-block-scoping
🐛 Bug Fix
📝 Documentation
🏠 Internal
Committers: 20

v6.22.1

Compare Source

6.22.1 (2017-01-19)
🐛 Bug Fix

Temporary fix with babel-traverse via #​5019 for transform-react-constant-elements.

v6.22.0

Compare Source

6.22.0 (2017-01-19)

Thanks to 10 new contributors! (23 total)

A quick update since it's been over a month already: adds support for shorthand import syntax in Flow + some fixes!

We'll be merging in our current 7.0 PRs on a 7.0 branch soon and I'l be making some more issues (most should be beginner-friendly).

To follow our progress check out our 7.0 milestone, the wiki and upcoming announcements on twitter!

We support stripping out and generating the new shorthand import syntax in Flow (parser support was added in babylon@6.15.0.

import {
  someValue,
  type someType,
  typeof someOtherValue,
} from "blah";
🚀 New Feature
  • babel-generator, babel-types
  • babel-plugin-transform-flow-strip-types, babel-traverse
  • babel-core
🐛 Bug Fix
  • babel-plugin-transform-object-rest-spread
const { x, ...y } = foo();

Old Behavior

const { x } = foo();
const y = _objectWithoutProperties(foo(), ["x"]);

New/Expected Behavior

const _ref = foo(); // should only be called once
const { x } = _ref; 
const y = _objectWithoutProperties(_ref, ["x"]);

Accounts for default values in object rest params

function fn({a = 1, ...b} = {}) {
  return {a, b};
}
const assign = ([...arr], index, value) => {
  arr[index] = value
  return arr
}

const arr = [1, 2, 3]
assign(arr, 1, 42)
console.log(arr) // [1, 2, 3]
  • babel-plugin-transform-es2015-function-name

Input

export const x = ({ x }) => x;
export const y = function () {};

Output

export const x = ({ x }) => x;
export const y = function y() {}; 
💅 Polish
  • babel-traverse
  • babel-generator, babel-plugin-transform-exponentiation-operator
📝 Documentation
🏠 Internal
  • babel-*
  • babel-helper-transform-fixture-test-runner
  • babel-cli, babel-core, babel-generator, babel-helper-define-map, babel-register, babel-runtime, babel-types
  • babel-cli, babel-generator, babel-helper-fixtures, babel-helper-transform-fixture-test-runner, babel-preset-es2015, babel-runtime, babel-traverse
  • babel-code-frame
  • babel-plugin-transform-react-jsx
  • babel-plugin-transform-decorators
  • babel-plugin-transform-es2015-computed-properties
  • babel-cli
Committers: 23, First PRs: 10

v6.21.0

Compare Source

6.21.0 (2016-12-16)

Mostly a lot of bug fixes + exposing rawMapping in babel-generator for easy source map use.

Thanks to davidaurelio, appden, and abouthiroppy for their first PRs!

🚀 New Feature

Exposes raw mappings when source map generation is enabled. To avoid the cost of source map generation for consumers of the raw mappings only, .map is changed to a getter that generates the source map lazily on first access.

Raw mappings can be useful for post-processing source maps more efficiently by avoiding one decoding/encoding cycle of the b64 vlq mappings. This will be used in the React Native packager.

let generator = require("babel-generator");
let generated = generator(ast, { sourceMaps: true }, sources);

// generated.rawMappings
[
  {
    name: undefined,
    generated: { line: 1, column: 0 },
    source: "inline",
    original: { line: 1, column: 0 }
  },
  ...
]
🐛 Bug Fix
  • babel-generator, babel-plugin-transform-flow-comments, babel-plugin-transform-flow-strip-types

Works with generator, transform-flow-comments, flow-strip-types.

function foo(numVal: number = 2) {}
  • babel-generator, babel-plugin-transform-es2015-modules-amd, babel-plugin-transform-es2015-modules-umd
let blockStatement = t.blockStatement(
  [],
  [t.directive(t.directiveLiteral("use strict"))]
);
  • babel-generator, babel-helper-builder-react-jsx, babel-plugin-transform-react-jsx, babel-types

Will still error with Spread children are not supported.

<div>{...this.props.children}</div>;
  • babel-plugin-transform-es2015-block-scoping, babel-plugin-transform-react-constant-elements, babel-traverse

When multiple declarators are present in a declaration, we want to insert the constant element inside the declaration rather than placing it before because it may rely on a declarator inside that same declaration.

function render() {
  const bar = "bar", renderFoo = () => <foo bar={bar} baz={baz} />, baz = "baz";

  return renderFoo();
}

When block scoped variables caused the block to be wrapped in a closure, the variable bindings remained in parent function scope, which caused the JSX element to be hoisted out of the closure.

function render(flag) {
  if (flag) {
    let bar = "bar";

    [].map(() => bar);

    return <foo bar={bar} />;
  }

  return null;
}
  • babel-plugin-transform-es2015-parameters

Was erroring if the rest parameter shared the same name as a default identifier for a param, needed to be deopt'd.

const a = 1;
function rest(b = a, ...a) {
  assert.equal(b, 1);
}
rest(undefined, 2)
  • babel-plugin-transform-es2015-for-of, babel-traverse
myLabel: //woops
for (let a of b) {
  continue myLabel;
}
📝 Documentation
🏠 Internal
  • babel-helper-transform-fixture-test-runner, babel-plugin-syntax-trailing-function-commas
    • #​4999 babel-helper-transform-fixture-test-runner: pass require as a global. (@​hzoo)

Allows running require() in exec.js tests like for babel/babel-preset-env#​95

  • Other
    • #​5005 internal: don't run watch with the test env (skip building with code …. (@​hzoo)
Committers: 7

v6.20.0

Compare Source

v6.20.0 (2016-12-08)

If you missed it, please check out our latest blog post: The State of Babel. It talks about where we can possibly move forward as a project and how you can help!

Also just wanted to reiterate that Babel is a community-lead project that is run by volunteers - many of us came into the project to learn about JavaScript rather than because we knew it already. Let's work together to make it sustainable!


You've probably seen this more than a few times and had no idea what it meant...

[BABEL] Note: The code generator has deoptimised the styling of "app.js" as it exceeds the max of "100KB".

Generating code used to get really slow as file size increased. We've mostly fixed that, but we still automatically fall back to compact output on large files. We're going to bump the limit to 500KB and if there aren't issues just remove it.


Ben Newman, @​benjamn: wrote Regenerator while at Facebook. It used a bunch of other libraries such as ast-types but has now been rewritten as a standalone Babel plugin (also thanks to Sebastian's previous work in facebook/regenerator#​222). We're also moving the implementation of Regenerator back into the original repository since Ben is the creator/maintainer.

🚀 New Feature
  • babel-traverse

Returns Array<Path> rather than Array<Node>.

  • path.getBindingIdentifierPaths()
  • path.getOuterBindingIdentifierPaths()
traverse(parse(`
  var a = 1, {b} = c, [d] = e, function f() {};
`), {
  VariableDeclaration(path) {
    let nodes = path.getBindingIdentifiers(); // a, d, b
    let paths = path.getBindingIdentifierPaths();
  },
  FunctionDeclaration(path) {
    let outerNodes = path.getOuterBindingIdentifiers(); // f
    let outerPaths = path.getOuterBindingIdentifierPaths();
  }
});

Forcibly syntax highlight the code as JavaScript (for non-terminals); overrides highlightCode. For facebookincubator/create-react-app#​1101

Usage

const result = codeFrame(rawLines, lineNumber, colNumber, {
  forceColor: true
});
🐛 Bug Fix
  • babel-plugin-transform-es2015-block-scoping
    • #​4880 Add (and fix) failing test of function parameter bindings in a catch block. (@​benjamn)

In

try {
  foo();
} catch (x) {
  function harmless(x) {
    return x;
  }
}

Correct Out

try {
  foo();
} catch (x) {
  var harmless = function (x) {
    return x;
  };
}
  • babel-helper-remap-async-to-generator, babel-plugin-transform-async-generator-functions, babel-plugin-transform-async-to-generator
// both length's should be 0
const foo = (...args) => { }
console.log(foo.length)  // 0
const asyncFoo = async (...args) => { }
console.log(asyncFoo.length)  // 0

Relevant for webpack 2 support of Import. Just allows Babel to print it correctly.

import("module.js");
function a5({a3, b2: { ba1, ...ba2 }, ...c3}) {}
// should deopt if ids are referenced before the bindings
var a = b + 2; var b = 2 + 2;
  • babel-core, babel-generator, babel-helper-transform-fixture-test-runner, babel-plugin-transform-object-rest-spread
  • babel-types
💅 Polish
📝 Documentation
🏠 Internal
Committers: 17

v6.18.2

Compare Source

v6.18.2 (2016-11-01)

Weird publishing issue with v6.18.1, same release.

🐛 Bug Fix

The error message was actually invalid!

Invalid:
  { "presets": [{ "option": "value" }] }
Valid:
  {
    "presets": [
      ["presetName", { "option": "value" }] // the preset should be wrapped in `[ ]`
    ]
  }
🏠 Internal
Commiters: 4

v6.18.0

Compare Source

v6.18.0 (2016-10-24)

🚀 New Feature
  • babel-generator, babel-plugin-transform-flow-strip-types

Check out the blog post and flow docs for more info:

type T = { +p: T };
interface T { -p: T };
declare class T { +[k:K]: V };
class T { -[k:K]: V };
class C2 { +p: T = e };
  • babel-core, babel-traverse
// in
['a' + 'b']: 10 * 20, 'z': [1, 2, 3]}
// out
{ab: 200, z: [1, 2, 3]}
  • babel-plugin-syntax-dynamic-import, babel-preset-stage-2

Parser support was added in https://github.com/babel/babylon/releases/tag/v6.12.0.

Just the plugin to enable it in babel.

// install
$ npm install babel-plugin-syntax-dynamic-import --save-dev

or use the new parserOpts

// .babelrc
{
  "parserOpts": {
    "plugins": ['dynamicImport']
  }
}
  • babel-helper-builder-react-jsx, babel-plugin-transform-react-jsx

Previously we added a useBuiltIns for object-rest-spread so that it use the native/built in version if you use a polyfill or have it supported natively.

This change just uses the same option from the plugin to be applied with spread inside of jsx.

// in
var div = <Component {...props} foo="bar" />
// out
var div = React.createElement(Component, Object.assign({}, props, { foo: "bar" }));

EmptyTypeAnnotation

Added in flow here and in babylon here.

function f<T>(x: empty): T {
  return x;
}
f(); // nothing to pass...
  • babel-traverse
    • #​4758 Make getBinding ignore labels; add Scope#getLabel, Scope#hasLabel, Scope#registerLabel. (@​kangax)

Track LabeledStatement separately (not part of bindings).

🐛 Bug Fix

Will give examples of code that was fixed below

  • babel-plugin-transform-react-inline-elements, babel-traverse
// issue with imported components that were JSXMemberExpression
import { form } from "./export";

function ParentComponent() {
  return <form.TestComponent />;
}
  • babel-plugin-transform-es2015-modules-commonjs, babel-plugin-transform-react-inline-elements
import { Modal } from "react-bootstrap";
export default CustomModal = () => <Modal.Header>foobar</Modal.Header>;
  • babel-plugin-transform-es2015-for-of
if ( true ) {
  loop: for (let ch of []) {}
}
  • babel-core
    • #​4502 Make special case for class property initializers in shadow-functions. (@​motiz88)
class A {
  prop1 = () => this;
  static prop2 = () => this;
  prop3 = () => arguments;
}

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot changed the title Update babel monorepo Update dependency babel-core to v6.26.3 Mar 16, 2023
@renovate
Copy link
Author

renovate bot commented Mar 24, 2023

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant