Question: do you want to make the pr?

Asked By
hzoo
Asked At
2017-09-14 20:08:07

Found 15 possible answers.

User Answered At Possible Answer
clemmy 2017-09-15 00:01:50 Is the following syntax invalid do expression syntax?
const x = do {
} }; 5; do {
loganfsmyth 2017-09-15 00:07:09 you'd need parens around the inner do expression
also works fine
};
  }
    5;
  {
like
const x = do { but you don't really need the inner do in that example
}
  });
    5;
  (do {
const x = do {
clemmy 2017-09-15 00:45:11 gotcha, thanks! :slightly_smiling_face: I suppose, I would similarly need to use parentheses in order to use the do-expression as a standalone statement? i.e. (do { 5; })
loganfsmyth 2017-09-15 00:53:43 yupp, in statement position the parser will treat do as the start of a do-while, so you need parens.
lukescott 2017-09-15 18:08:53 is there a way to enable flow in the REPL?
hzoo 2017-09-15 18:10:07 there's an issue, since we removed it from react but yeah if you didn't know already you can reference PRs in the repl url now https://github.com/babel/website/pull/1360 you mean for v7 right? it is turned on by default in react preset in v6
lukescott 2017-09-15 18:12:59 Weird, I can’t get it to work on 6, even on the classic one: https://babeljs.io/repl-old/#?babili=false&evaluate=false&lineWrap=false&presets=es2015&targets=&browsers=&builtIns=false&debug=false&build=&circleciRepo=&code_lz=GYewTgBAFAxiB2BnALhAnhExoCMBcEAgmGAIZoA8p8aAfAJT0QDeAvkA&isEnvPresetTabExpanded=true&isPresetsTabExpanded=true&isSettingsTabExpanded=true&prettier=false&showSidebar=true&version=7.0.0-beta.0 https://babeljs.io/repl-old/#?babili=false&evaluate=false&lineWrap=false&presets=es2015&targets=&browsers=&builtIns=false&debug=false&build=&circleciRepo=&code_lz=GYewTgBAFAxiB2BnALhAnhExoCMBcEAgmGAIZoA8p8aAfAJT0QDeAvkA&isEnvPresetTabExpanded=true&isPresetsTabExpanded=true&isSettingsTabExpanded=true&prettier=false&showSidebar=true&version=7.0.0-beta.0 Can finally remove ts-loader from my webpack build. I’ll be updating to 7 today. Especially excited for the TypeScript support :smile:
hzoo 2017-09-15 18:15:46 ^ I was saying you need the react preset and we didn't land the type checking in your example
lukescott 2017-09-15 18:21:30 oh, got it :slightly_smiling_face: Is there a way to get yarn to consider pre-releases on upgrade-interactive?
ajaynarainmathur 2017-09-16 02:13:35 Hi, I am beginning to contribute to babel. I took up the issue https://github.com/babel/babel/issues/6210 , not I have made the change in babel-preset-es2015 , but now I need to make change in env preset too , but I don't see babel-preset-env in packages. Please correct me if I am wrong. :slightly_smiling_face: sorry, my bad I got it. It is a different repo where I should make change Where should I look for preset-env, or there are docs that I didn't read ? :slightly_smiling_face:
loganfsmyth 2017-09-16 02:18:18 yup!
ajaynarainmathur 2017-09-16 02:22:16 Thanks My commit - https://github.com/ajaymathur/babel-preset-env/commit/348a7890b7e91113e462701f0836c5916e178bde
What am I missing?
and when I run build script it shows following in plugins.js . 
"transform-es2015-instanceof": {},
  },
    ]
      "instanceof on Symbol"
    features: [
If I have got it correct, I added dependency then added plugin-features.js
"transform-es2015-instanceof": { Hi I am trying to implement https://github.com/babel/babel/issues/6210 , in babel-preset-env. :slightly_smiling_face: I have created PR https://github.com/babel/babel/pull/6257 for reference. Please guide me. or should I just make a PR and take a feed back there? Now the issue is when I see the _instanceof added, it is different from what is defined in helper this one calls it self in else, may result in infinite loop. at Context. (packages/babel-helper-transform-fixture-test-runner/lib/index.js:59:15)
      at runTask (packages/babel-helper-transform-fixture-test-runner/lib/index.js:30:13)
      at run (packages/babel-helper-transform-fixture-test-runner/lib/index.js:310:47)
      
       function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
       
       function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
       
      +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
      -function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
       
       function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
      -
      -function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return _instanceof(left, right); } }
       
       function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
       
       var _args = _interopRequireDefault(require("utils/url/args"));
      + expected - actual
      /Users/ajaymathur/workspace/open-source/babel/packages/babel-plugin-transform-es2015-parameters/test/fixtures/regression/6057-expanded/actual.js !== /Users/ajaymathur/workspace/open-source/babel/packages/babel-plugin-transform-es2015-parameters/test/fixtures/regression/6057-expanded/expected.js
after I added instanceof plugin to es2015 preset, test cases in other transform fail that are":
1) babel-plugin-transform-es2015-parameters/regression 6057 expanded:
jimmybob-leon 2017-09-17 15:41:33 Hi was wondering if I could get some help with some code ?
nicolo-ribaudo 2017-09-17 16:05:05 I can try to help you
jimmybob-leon 2017-09-17 16:14:34 I think I found a solution thanks!

Related Questions