Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !1179

Fix Babel issues in tests by applying the right transforms

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge fix-babel into master Dec 06, 2016
  • Overview 14
  • Commits 1
  • Pipelines 0
  • Changes 2

Created by: gaearon

This is a followup to #1177 with a less aggressive fix. For context, read threads #1156 (closed) and #1160 (closed).

Why this works:

  • Babel has a bug where object/spread depends on parameters transform: https://github.com/babel/babel/issues/4851. So we have to enable parameters.
  • Including regenerator transform in test environment was incorrect. Its async: false option only made sense for development and production configuration where we use babel-preset-latest, and so async functions are already being handled. But for test environment we use babel-preset-env instead of babel-preset-latest, and so including regenerator second time is redundant (and somehow breaks things—@hzoo could you clarify why this happened?)

I am remove destructuring and arrow-functions because they were added as stopgap measure in #1177 but turned out unnecessary per https://github.com/facebookincubator/create-react-app/issues/1156#issuecomment-265160544.

Fixes #1156 (closed) and #1160 (closed).

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix-babel