Skip to content

chore(deps): update dependency babel-preset-stage-2 to v6.24.1#2770

Merged
The-Code-Monkey merged 1 commit into
mainfrom
renovate/babel-monorepo
May 1, 2026
Merged

chore(deps): update dependency babel-preset-stage-2 to v6.24.1#2770
The-Code-Monkey merged 1 commit into
mainfrom
renovate/babel-monorepo

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented May 1, 2026

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
babel-preset-stage-2 (source) 6.11.06.24.1 age adoption passing confidence

Release Notes

babel/babel (babel-preset-stage-2)

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.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.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;
}
  • #​4631 fix(shouldIgnore): filename normalization should be platform sensitive. (@​rozele)
    • babel-helper-remap-async-to-generator, babel-plugin-transform-async-generator-functions
  • #​4719 Fixed incorrect compilation of async iterator methods. (@​Jamesernator)
// in
class C {
  async *g() { await 1; }
}
// out
class C {
  g() { // was incorrectly outputting the method with a generator still `*g(){`
    return _asyncGenerator.wrap(function* () {
      yield _asyncGenerator.await(1);
    })();
  }
}
  • babel-plugin-check-es2015-constants, babel-plugin-transform-es2015-destructuring, babel-plugin-transform-es2015-modules-commonjs, babel-plugin-transform-es2015-parameters
// was wrapping variables in an IIFE incorrectly
for ( let i = 0, { length } = list; i < length; i++ ) {
    console.log( i + ': ' + list[i] )
}
  • babel-plugin-transform-es2015-parameters
// was producing invalid code
class Ref {
  static nextId = 0
  constructor(id = ++Ref.nextId, n = id) {
    this.id = n
  }
}

assert.equal(1, new Ref().id)
assert.equal(2, new Ref().id)
function first(...values) {
    let index = 0;
    return values[index++]; // ++ was happening twice
}

console.log(first(1, 2));
  • babel-plugin-transform-es2015-block-scoping
let x = 10;
if (1)
{
    ca: let x = 20;
}
  • babel-helper-explode-assignable-expression, babel-plugin-transform-exponentiation-operator
a[`${b++}`] **= 1;
  • #​4642 Exclude super from being assign to ref variable. (@​danez)
    • babel-plugin-transform-es2015-shorthand-properties, babel-plugin-transform-flow-comments, babel-plugin-transform-flow-strip-types
foo = {
  bar() {
    return super.baz **= 12;
  }
}
  • #​4670 Retain return types on ObjectMethods in transform-es2015-shorthand-properties. (@​danharper)
// @&#8203;flow
var obj = {
  method(a: string): number {
    return 5 + 5;
  }
};
  • babel-helper-define-map, babel-plugin-transform-es2015-classes, babel-plugin-transform-flow-comments, babel-plugin-transform-flow-strip-types
// @&#8203;flow
class C {
  m(x: number): string {
    return 'a';
  }
}
💅 Polish
  • babel-plugin-check-es2015-constants, babel-plugin-transform-es2015-destructuring, babel-plugin-transform-es2015-modules-commonjs, babel-plugin-transform-es2015-parameters
// in
const [a, b] = [1, 2];
// out
var a = 1,
    b = 2;
// was outputting an extra `index++ + 0`
function first(...values) {
  var index = 0;
  return values[index++];
}
  • babel-core
    • #​4685 Better error messaging when preset options are given without a corresponding preset. (@​kaicataldo)

We've had a few reports of users not wrapping a preset in [] when passing in options so we added an extra error message for this.

ReferenceError: [BABEL] /test.js: Unknown option: base.loose2. Check out http://babeljs.io/docs/usage/options/ for more information about options.

A common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:

Invalid:
  `{ presets: [{option: value}] }`
Valid:
  `{ presets: ["pluginName", {option: value}] }`

For more detailed information on preset configuration, please see http://babeljs.io/docs/plugins/#pluginpresets-options.
var a: Promise<boolean>[];
// instead of
var a: Promise<bool>[];
Documentation

So that our MIT License shows up.

🏠 Internal

It's a one-time use tool (helpful after the initial release when upgrading from v5 to v6) that doesn't need to be a part of babel-cli. We'll publish it as a standalone package it someone asks for it.

  • Other
  • babel-traverse, babel-types
  • babel-cli, babel-core, babel-helper-fixtures, babel-register
  • babel-helper-transform-fixture-test-runner
  • babel-cli, babel-code-frame, babel-core, babel-generator, babel-helper-transform-fixture-test-runner, babel-preset-es2015, babel-template, babel-traverse
  • babel-cli, babel-code-frame, babel-core, babel-generator, babel-plugin-transform-es2015-modules-commonjs, babel-preset-es2015, babel-template, babel-traverse
  • babel-cli, babel-core
  • babel-cli, babel-core, babel-plugin-transform-es2015-modules-systemjs, babel-preset-es2015
  • babel-register
  • babel-cli
  • babel-core
  • babel-generator
  • babel-traverse
Commiters: 17

v6.17.0

Compare Source

v6.17.0 (2016-10-01)

If you have questions please join our slack: https://slack.babeljs.io

👓 Spec Compliancy
  • babel-preset-stage-2, babel-preset-stage-3

tc39/proposals@96f8d79

Specification repo: https://github.com/tc39/proposal-async-iteration

Asynchronous Iteration was already added in 6.16.0 under stage-2 but it was moved to stage-3 at the latest TC-39 meeting.

// async generator syntax
async function* agf() {}
// for-await statement
async function f() {
  for await (let x of y) {
    g(x);
  }
}

To use it as a standalone plugin:

{
  "plugins": ["transform-async-generator-functions"]
}

With the stage-3 preset (or below):

{
  "presets": ["stage-3"]
}

Similarly, object-rest-spread is now also at stage-3.

https://twitter.com/sebmarkbage/status/781564713750573056
tc39/proposals@142ac3c

// Rest properties
let { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 };
console.log(x); // 1
console.log(y); // 2
console.log(z); // { a: 3, b: 4 }

// Spread properties
let n = { x, y, ...z };
console.log(n); // { x: 1, y: 2, a: 3, b: 4 }

To use it as a standalone plugin:

{
  "plugins": ["transform-object-rest-spread"]
}

With the stage-3 preset (or below):

{
  "presets": ["stage-3"]
}
🚀 New Feature

References:

Adds a retainFunctionParens to babel-generator. This option will retain the parentheses around an IIFE.

// parens are stripped without the option
__d('x', (function () {}));
🐛 Bug Fix

First PR!

v6.16.0

Compare Source

v6.16.0 (2016-09-28)

If you are seeing something like:
No compatible version found: babel-types@^6.16.0
run npm view babel-types dist-tags to be sure

Babel 6.16: Happy 2nd Birthday 🎂 !

Blog post here: http://babeljs.io/blog/2016/09/28/6.16.0

👓 Spec Compliancy
  • babel-core, babel-generator, babel-helper-remap-async-to-generator, babel-helpers, babel-plugin-transform-async-generator-functions, babel-types, babel-preset-stage-2, ...

This change implements the async iteration proposal, currently at stage 2 (and pushing to stage 3 at the current TC-39 meeting). It includes the following features:

  • Transforms async generator functions (async function* g() { }) to wrapped generator functions, similar to the current async-to-generator transform.
async function* agf() {
  this;
  await 1;
  yield 2;
  return 3;
}
  • Transforms for-await statements into for loops containing yield expressions.
async function f() {
  for await (let x of y) {
    g(x);
  }
}

Example Usage

async function* genAnswers() {
  var stream = [ Promise.resolve(4), Promise.resolve(9), Promise.resolve(12) ];
  var total = 0;
  for await (let val of stream) {
    total += await val;
    yield total;
  }
}

function forEach(ai, fn) {
  return ai.next().then(function (r) {
    if (!r.done) {
      fn(r);
      return forEach(ai, fn);
    }
  });
}

var output = 0;
return forEach(genAnswers(), function(val) { output += val.value })
.then(function () {
  assert.equal(output, 42);
});
  • babel-core, babel-generator, babel-plugin-transform-class-properties, babel-template, babel-traverse, babel-types

Parser support was added in babylon@6.11.0 with babel/babylon#121

// Example
class Foo {
  [x]
  ['y']
}

class Bar {
  [p]
  [m] () {}
}

Parser support was added in babylon@6.10.0 with babel/babylon#104

// Example
var a : {| x: number, y: string |} = { x: 0, y: 'foo' };
🚀 New Feature
  • babel-core, babel-generator

Babel will now also take the options: parserOpts and generatorOpts (as objects).

parserOpts will pass all properties down to the default babylon parser. You can also pass a parser option to substitute for a different parser.

This will allow passing down any of babylon's options:

{
  "parserOpts": {
    "allowImportExportEverywhere": true,
    "allowReturnOutsideFunction": true,
    "sourceType": "module",
    "plugins": ["flow"]
  }
}

Another use case (the main reason for doing this), is to be able to use recast with Babel.

{
  "parserOpts": {
    "parser": "recast"
  },
  "generatorOpts": {
    "generator": "recast"
  }
}
  • babel-core
{
  presets: ["@&#8203;org/babel-preset-name"], // actual package
  presets: ["@&#8203;org/name"] // shorthand name
}
  • babel-plugin-transform-object-rest-spread

useBuiltIns - Do not use Babel's helper's and just transform to use the built-in method (Disabled by default).

{
  "plugins": [
    ["transform-object-rest-spread", { "useBuiltIns": true }]
  ]
}

// source
z = { x, ...y };
// compiled
z = Object.assign({ x }, y);
  • babel-code-frame
    • #​4561 babel-code-frame: add options for linesBefore, linesAfter. (@​hzoo)

babel-code-frame is a standalone package that we use in Babel when reporting errors.

Now there is an option to specify the number of lines above and below the error

  1 | class Foo {
> 2 |   constructor()
    |                ^
  3 | }
  • babel-core, babel-preset-es2015, babel-preset-es2016, babel-preset-es2017, babel-preset-latest, babel-preset-react, babel-preset-stage-0, babel-preset-stage-1, babel-preset-stage-2, babel-preset-stage-3

We previously made presets with commonjs exports

module.exports = {
  plugins: [
    require("babel-plugin-syntax-trailing-function-commas")
  ]
};

Now you can use export default as well

import transformExponentiationOperator from "babel-plugin-transform-exponentiation-operator";
export default {
  plugins: [
    transformExponentiationOperator
  ]
};
🐛 Bug Fix
  • babel-helpers, babel-plugin-transform-es2015-typeof-symbol
// `typeof Symbol.prototype` should be 'object'
typeof Symbol.prototype === 'object'

Fix an issue with defaults not being overidden. This was causing options like comments: false not to work correctly.

// wasn't exporting correctly before
export default ({ onClick }) => {
  return <div onClick={() => onClick()}></div>;
}
export default class {};
// wasn't correctly transforming to
exports["default"] = class {}
// with the es3-tranforms
  • babel-plugin-transform-flow-strip-types, babel-types
// <X> wasn't stripped out
const find = <X> (f: (x:X) => X, xs: Array<X>): ?X => (
  xs.reduce(((b, x) => b ? b : f(x) ? x : null), null)
)

We noticed that we can not make this optimizations if there are function calls or member expressions on the right hand side of the assignment since the function call or the member expression (which might be a getter with side-effect) could potentially change the variables we are assigning to.

[x, y] = [a(), obj.x];
// was tranforming to
x = a();
y = obj.x;
// now transforms to 
var _ref = [a(), obj.x];
x = _ref[0];
y = _ref[1];
  • babel-types
💅 Polish

Before

screen shot 2016-09-27 at 11 12 47 am

After

screen shot 2016-09-27 at 3 50 02 pm - `babel-core` - [#​4517](https://redirect.github.com/babel/babel/pull/4517) If loading a preset fails, show its name/path (#​4506). ([@​motiz88](https://redirect.github.com/motiz88)) - `babel-helper-replace-supers` - [#​4520](https://redirect.github.com/babel/babel/pull/4520) Remove unused `thisReference` argument to `getSuperProperty`. ([@​eventualbuddha](https://redirect.github.com/eventualbuddha)) - `babel-generator` - [#​4478](https://redirect.github.com/babel/babel/pull/4478) babel-generator: Ensure ASCII-safe output for string literals. ([@​mathiasbynens](https://redirect.github.com/mathiasbynens)) - `babel-core`, `babel-plugin-transform-es2015-arrow-functions`, `babel-plugin-transform-es2015-destructuring`, `babel-plugin-transform-es2015-modules-commonjs`, `babel-plugin-transform-es2015-parameters` - [#​4515](https://redirect.github.com/babel/babel/pull/4515) Flip default parameter template. ([@​jridgewell](https://redirect.github.com/jridgewell)) - `babel-core`, `babel-helpers` - [#​3653](https://redirect.github.com/babel/babel/pull/3653) Removed unnecessary 'return' statements. ([@​ksjun](https://redirect.github.com/ksjun))
🏠 Internal

Cleanup tests, remove various unused dependencies, do not run CI with only readme changes.

  • babel-plugin-transform-es2015-modules-amd, babel-plugin-transform-es2015-modules-commonjs, babel-plugin-transform-es2015-modules-umd
  • babel-generator, babel-plugin-transform-es2015-modules-amd, babel-plugin-transform-es2015-modules-commonjs, babel-plugin-transform-es2015-modules-systemjs, babel-plugin-transform-es2015-modules-umd, babel-plugin-transform-flow-strip-types
  • babel-plugin-transform-es2015-function-name
  • babel-plugin-transform-es2015-parameters, babel-traverse
    • #​4519 Replace phabricator tickets with github ones in code comments. (@​danez)
  • babel-polyfill
  • babel-preset-es2015
  • babel-plugin-transform-regenerator
  • babel-code-frame
  • babel-helper-transform-fixture-test-runner
  • Other
Commiters: 20

First PRs!

v6.13.0

Compare Source

v6.13.0 (2016-08-04)

If you are getting an error like "Invalid options type for " then check that you have an updated version of babel-core/cli/etc. If you are using greenkeeper, it will fail because it will only update the preset and not the other packages.

Since the last release we've created https://github.com/babel/notes to track discussions on our slack and features/changes that could be added - definetely check it out if you're interested in Babel's development!

Please join #discussion on slack if you have questions and #development for dev

Some small but very important additions in this release:

Preset options (babel/notes)

Initially, presets were supposed to be one-off sets of plugins that didn't have any configuration. If you wanted to do something different you would make your own presets. There are > 600 presets on npm now. We want to give users more flexibility in certain cases: like when you want to pass the same option to multiple presets or to remove a default plugin.

loose and modules options for babel-preset-es2015 (#​3331, #​3627)

This has been rather annoying. Having to install babel-preset-es2015-loose-native-modules seems rather crazy when it could be an option.

With #​3627, you can pass 2 options in:

  • loose - Enable "loose" transformations for any plugins in this preset that allow them (Disabled by default).
  • modules - Enable transformation of ES6 module syntax to another module type (Enabled by default to "commonjs").
    Can be false to not transform modules, or one of ["amd", "umd", "systemjs", "commonjs"]
// for loose and native modules
{
  presets: [
    ["es2015", { "loose": true, "modules": false }]
  ]
}
Updates to babel-preset-stage-2
Coming Up
  • babel-preset-es2017, babel-preset-latest (still deciding the name), supporting codemods, and more!
New Feature
  • babel-core, babel-preset-es2015
  • babel-preset-stage-1, babel-preset-stage-2

Note

PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, 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 was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the dependencies label May 1, 2026
@The-Code-Monkey The-Code-Monkey merged commit a49e8f2 into main May 1, 2026
3 checks passed
@renovate renovate Bot deleted the renovate/babel-monorepo branch May 1, 2026 21:04
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

🎉 This PR is included in version @techstack/react-textfit-v2.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant