jiebi/CodeConvo huggingface dataset:
Change:
} async function createBundle(bundle, bundleType) { <del> if (shouldSkipBundle(bundle, bundleType)) { return; } </del> const filename = getFilename(bundle, bundleType); const logKey = chalk.white.bold(filename) + chalk.dim(` (${bundleType.toLowerCase()})`);

Discussion:
Please make "requireable" npm release, already fixed and only new version on npm is needed. I've developed a source transform for JSX for browserify — which doesn't work properly because of
1 pushed to npm:
Change:
inputArgs === undefined || inputArgs === null || inputArgs.length === 0 || <ins> typeof inputArgs[0] !== 'string' || </ins> // Matches any of %c but not %%c <del> (typeof inputArgs[0] === 'string' && inputArgs[0].match(/([^%]|^)(%c)/g)) || </del> <ins> inputArgs[0].match(/([^%]|^)(%c)/g) || </ins> style === undefined ) { return inputArgs;

Discussion:
For checking whenever my project will work correctly, when I run a command , errors which are shown below occurred. ! When I pass a first argument which is an object to , , , I can repro the errors. for example, Before a few days, the errors had never occured. When I disable DevTools, the errors calm down. I think, the errors may be caused by the codes which are shown below. Every time No response No response No response No response No response No response
The same error happens in my case. Basically I cant use becasue it shows the same error. I think it is a bug. Extension was updated just yesterday.
Experiencing the same issue while having the React Developer Tools extension enabled. Disabling the extension prevents the error from occurring.
Sounds like this is only on the latest extension release (4.24.5). What's your browser and its version? Edit: NVM I can reproduce now. Looking into this.
This is a bug. We’ll be releasing a fix asap.
Hey! I have a similar issue. I can use console log for printing string, but putting any functionality or variables causes the error
Hey! Thanks for reporting this bug and sorry for the inconvenience! If you are experiencing this issue, there are 3 temporary solutions: on "Hide logs during second render in Strict Mode" in the DevTools settings (click the gear button in the Components tab) <img width="439" alt="image" src="https://user-"for now a string argument to your For now, I've unpublished the extension on the Chrome Web Store to prevent people from installing the buggy version. We've submitted a new version with the bugfix to the Chrome Web Store, and the extension will come back online once the review process is done. Firefox and Microsoft Edge has not been affected, and an extension without this bug is still available for and .
Thank you so much!
updated my comment above with more and better workarounds!
A new version with the bug fix is on Chrome Web Store now:
Change:
var childrenToRender = object.children.filter(function(child) { return !(child.type === Syntax.Literal && typeof child.value === 'string' <del> && child.value.match(/^[ t]*[rn][ trn]*$/)); </del> <ins> && child.value.match(/^[ t]*[rn][ trn]*$/) || child.type === Syntax.XJSExpressionContainer && child.expression.type === Syntax.XJSEmptyExpression); </ins> }); if (childrenToRender.length > 0) { utils.append(', ', state);

Discussion:
Is transformed to: Note the trailing - this results in a syntax error. The problem seems to be with comma insertion in and related functions (e.g, ). See IRC discussion below for my findings. Relevant parts of an IRC discussion:
The root of the issue is that is a special-case in JSX, but it apparently does not take into account . Should be an easy fix. We should also look into adding I feel, just to be able to easily comment out code. EDIT: I was wrong, the special-case is handled correctly, I'll have a PR up shortly.
Change:
> lightweight description of what the DOM should look like. We call this process **reconciliation**. Check out <del> [this jsFiddle](https://jsfiddle.net/fv6RD/3/) to see an example of </del> <ins> [this jsFiddle](http://jsfiddle.net/fv6RD/3/) to see an example of </ins> reconciliation in action. Because this re-render is so fast (around 1ms for TodoMVC), the developer

Discussion:
The Post gave an example of reconciliation by this . but It's not working, If I understand correctly, it should be something like . Should I create a PR by change the url to fix it?
The problem is that it is a https link for a fiddle that only supports http. There are actually more links with the same bug. Updating the fiddles would be one way to fix it, but that is a lot of work. And since the fiddles are part of old blog posts, it would be kind of like rewriting history. In my opinion the best way to fix it is reverting the links back to http. See for my proposed solution.
I see, thank u
I feel like the more 'correct'/'ideal' solution is to have the fiddle authors update their fiddles. That said, I don't feel too strongly, and will let make the decision on this.
Change:
}) .replace(/:/g, '-'); downloadFile( <ins> downloadRef.current, </ins> `profiling-data.${dateString}.${timeString}.json`, JSON.stringify(profilingDataExport, null, 2), );

Discussion:
Hi, long time user, first time issuer. I think I found a bug with the Profiler component. When I click on the button at the top nothing happens and there appears to be no new files in my Downloads folder. I think it might be silently failing and that's why I am not getting any response. Has anyone else ran into this issue? Another thing I would like to mention is that I haven't looked through all of the documentation material about the new Profiler. I only read , so if this issue is addressed elsewhere I apologize and also request the source to that solution. Thank you for your time! Versions: *
It seems that this is happening because of the call in the util function. I'll investigate this further.
I fixed the issue. I'll open a PR later today :)
Change:
var selection = window.getSelection(); var length = node[getTextContentAccessor()].length; var start = Math.min(offsets.start, length); <del> var end = typeof offsets.end === 'undefined' ? </del> <ins> var end = offsets.end === undefined ? </ins> start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.

Discussion:
Introduction I found a bug on resolving default props when component props have property with HTMLAllCollection. React ignores value and uses default value (it should take that collection). isIE9OrLower (look at the end of topic) is simple function to test Internet Explorer in version 9 or lower. Simple use case: Chrome/Firefox/modern IE (yeah, i know....) returns HTMLAllColection (as ), but old IE returns true. HTMLAllCollection is weird collection: Source of bug and fix release: 0.14.7 file: line: 9149 code (bug): if (typeof props[propName] === 'undefined') { code (fix): if (props[propName] === undefined) { Btw, === undefined is faster than typeof === 'undefined' on Chrome and IE. Reproduction Open in Firefox / Chrome / IE10 or higher. Fiddle: Raw: Workaround Change to
Haha, browsers suck. Want to submit a PR? It looks like we do that thing unnecessarily in a few places in the React codebase. Note that we do need to use typeof if the binding might not exist, so we need to look at each case individually to make sure the change is valid there.
I went through the react repo configuration (build, tests execution). Fix didn't break anything, but so far I didn't find solution to make good test (phantomjs doesn't have property). (HTMLAllCollection) is probably the only exception to the typeof and is not a html standard. Any suggestions to the unit test for this fix/improvement?
As long as you tested it manually and it worked in IE, I think we can accept this change without a unit test.
Fixed in
lol what even
I can't reproduce being in IE 8 or IE 9 on Windows 7, either in standards or quirks mode. What am I missing?
IE < 10 is fine. Problem occurs when using modern browser like Chrome, Firefox, IE = 10 or Edge. They returns . component prop as in Chrome. will compare your prop with default prop (which is ). on Chrome is so React treats it as missing value. Default prop () will be selected. the end, prop will be always set to on modern browser in this case.
Oh! Sorry I totally misread. Yes I can repro this.
Change:
<ins> /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @providesModule Rectangle.art * @typechecks * * Example usage: * <Rectangle *   width={50} *   height={50} *   stroke="green" *   fill="blue" * /> * * Additional optional properties: *   (Number) radius *   (Number) radiusTopLeft *   (Number) radiusTopRight *   (Number) radiusBottomLeft *   (Number) radiusBottomRight * */ 'use strict'; var assign = require('object-assign'); var PropTypes = require('prop-types'); var React = require('react'); var ReactART = require('react-art'); var createReactClass = require('create-react-class'); var Shape = ReactART.Shape; var Path = ReactART.Path; /** * Rectangle is a React component for drawing rectangles. Like other ReactART * components, it must be used in a <Surface>. */ var Rectangle = createReactClass({ displayName: 'Rectangle', propTypes: { width: PropTypes.number.isRequired, height: PropTypes.number.isRequired, radius: PropTypes.number, radiusTopLeft: PropTypes.number, radiusTopRight: PropTypes.number, radiusBottomRight: PropTypes.number, radiusBottomLeft: PropTypes.number, }, render: function render() { var width = this.props.width; var height = this.props.height; var radius = this.props.radius ? this.props.radius : 0; // if unspecified, radius(Top|Bottom)(Left|Right) defaults to the radius // property var tl = this.props.radiusTopLeft ? this.props.radiusTopLeft : radius; var tr = this.props.radiusTopRight ? this.props.radiusTopRight : radius; var br = this.props.radiusBottomRight ? this.props.radiusBottomRight : radius; var bl = this.props.radiusBottomLeft ? this.props.radiusBottomLeft : radius; var path = Path(); // for negative width/height, offset the rectangle in the negative x/y // direction. for negative radius, just default to 0. if (width < 0) { path.move(width, 0); width = -width; } if (height < 0) { path.move(0, height); height = -height; } if (tl < 0) { tl = 0; } if (tr < 0) { tr = 0; } if (br < 0) { br = 0; } if (bl < 0) { bl = 0; } // disable border radius if it doesn't fit within the specified // width/height if (tl + tr > width) { tl = 0; tr = 0; } if (bl + br > width) { bl = 0; br = 0; } if (tl + bl > height) { tl = 0; bl = 0; } if (tr + br > height) { tr = 0; br = 0; } path.move(0, tl); if (tl > 0) { path.arc(tl, -tl); } path.line(width - (tr + tl), 0); if (tr > 0) { path.arc(tr, tr); } path.line(0, height - (tr + br)); if (br > 0) { path.arc(-br, br); } path.line(-width + (br + bl), 0); if (bl > 0) { path.arc(-bl, -bl); } path.line(0, -height + (bl + tl)); return React.createElement(Shape, assign({}, this.props, {d: path})); }, }); module.exports = Rectangle; </ins>

Discussion:
It seems like those were intended to be public APIs () but they’re not published on npm because folder is not in the whitelist.
Change:
<ins> ## 4.5.0 * Fix false positive error with large number of branches. ([@scyron6](https://github.com/scyron6) in [#24287](https://github.com/facebook/react/pull/24287)) </ins> ## 4.4.0 * No changes, this was an automated release together with React 18.

Discussion:
<!-- Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest version of the relevant React packages to make sure your issue has not already been fixed. --This may be the same kind of , but I can't figure out the changes from CHANGELOG (I'm not sure if this is a bug). If there are no changes, it would be helpful to note that in the CHANGELOG. React version: N/A <!-- Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Issues without reproduction steps or code examples may be immediately closed as not actionable. --Link to code example: N/A <!-- Please provide a CodeSandbox (), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: --Changes since v4.5.0 of eslint-plugin-react-hooks are not listed in CHANGELOG. Changes since v4.5.0 of eslint-plugin-react-hooks are listed in CHANGELOG.
Change:
return ( <div> <button onClick={this.handleAdd}>Add Item</button> <del> <ReactCSSTransitionGroup transitionName="example"> </del> <ins> <ReactCSSTransitionGroup transitionName="example" transitionEnterTimeout={500} transitionLeaveTimeout={300}> </ins> {items} </ReactCSSTransitionGroup> </div>

Discussion:
When a is used without timeout props, it : for each missing timeout prop. However, that URL simply points to . The code listed there does use timeout props, but nothing on the page explains what those props do or why they're necessary. In fact, the word "timeout" only appears in the names of those props in code examples. Could we get some explanation in the docs, please?
Hmm, I think it does: <img width="516" alt="screen shot 2016-07-20 at 15 23 18" src=""Some line breaks would help there. There is an entry explaining why they were in 0.14 release notes: <img width="717" alt="screen shot 2016-07-20 at 15 24 12" src=""(I’m not saying it’s easy to find—it’s out fault for not updating the docs to reflect that.) Would you like to massage the doc page and send a PR?
Ah, got it. Yeah, knowing how it works now, I can do that. Thanks!
Can transitionAppearTimeout replace transitionLeaveTimeout?? If i am using animation for initial mount because i am still getting error with .... In facebook docs they replaced LeaveTimetout with AppearTimeout... but it looks like there still must be LeaveTimeout..
Change:
/** <del> * Copyright (c) Facebook, Inc. and its affiliates. </del> <ins> * Copyright (c) Meta Platforms, Inc. and its affiliates. </ins> * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree.

Discussion:
react/packages/react says Copyright (c) Facebook Platforms, Inc. and affiliates, but should be Copyright (c) Meta Platforms, Inc. and affiliates as it is more consistent
Hello! This is my first time contributing to open source. Is anyone already working on this issue?
Hi, I would like to contribute in this. if anyone already working on this issues?
Hello, I would like to contribute to this assign it to me.
<bHi,</bI would like to contribute in this. if anyone already working on this issues?
This issue is already fixed. by
Change:
opacity: true, order: true, orphans: true, <ins> tabSize: true, </ins> widows: true, zIndex: true, zoom: true,

Discussion:
The  CSS property should not be getting a suffix automatically because a unit-less value can represent the number of spaces that make up the width in a tab. The JS name for this property is . See in the React docs.
A solution for now is to use the which is pretty much equivalent.
Sounds like a good idea. Are you interested in creating a PR to add it?
Yes, the only thing I don't know is whether there needs to be anything special done to also include and handle object already in place
We autogenerate the vender-prefixed styles there (which you might have seen below where you changed code) so that's all you need to do! Thanks again.
Change:
ReactDebugTool.onTestEvent(); expect(console.error.calls.length).toBe(1); }); <ins> it('returns isProfiling state', () => { expect(ReactDebugTool.isProfiling()).toBe(false); ReactDebugTool.beginProfiling(); expect(ReactDebugTool.isProfiling()).toBe(true); ReactDebugTool.endProfiling(); expect(ReactDebugTool.isProfiling()).toBe(false); }); </ins> });

Discussion:
I've tested the new Perf tools on one of the screens in one app I'm working on and it works great :) One thing I wanted also on the old one Perf tools was to be able to check whether the Perf tools are started or stopped, so basically exposing 's variable. My use for that is that I have a keyboard shortcut (in development) bound to start/stop the Perf tools and currently I'm forced to maintain such a variable myself to know whether to start or stop (which gets out of sync if I start/stop the perf tools without the keyboard shortcut). If you don't think it's worthwhile to expose feel free to close this issue.
is not a public API by itself, at least not yet. I’m open to adding to though, as it’s the public API. Would you like to send a PR?
Yeah I'll send a PR :) Should this method on check 's , which is not currently exposed, or should keep track of that state separately?
Yeah, we can add to and to with the real state being in .
the PR should be against which branch? ?
Yep!
I've opened the PR
Change:
if (options && options.sourceMap) { result.sourceMap = output.sourceMap.toJSON(); } <ins> if (options && options.sourceFilename) { result.sourceMap.sources = [options.sourceFilename]; } </ins> return result; } };

Discussion:
Hey guys, I know there are a lot of issues here so I'll try to make this quick and clear. The issue is that when you generate a sourcemap using the node module by calling , it will always output in the property of the sourcemap that is generated, there is no way to specify the actual source file. I thought that perhaps the option would allow you to change this, but unfortunately it does not -- no matter what you set to, the property always returns as an array with in it only. A small snippet of code to quickly verify this:
Thanks guys for the quick fix! :beers:
Change:
var newFn = function() { warning( warned, <del> `${namespace}.${oldName} will be deprecated in a future version. ` + `Use ${namespace}.${newName} instead.` </del> <ins> '%s.%s will be deprecated in a future version. ' + 'Use %s.%s instead.', namespace, oldName, namespace, newName </ins> ); warned = true; return fn.apply(ctx, arguments);

Discussion:
Ditto on invariant. But I think those are ok already.
I'd take this if I had a bit more detail. I looked at a few thought the codebase and couldn't understand.
Thanks
Change:
} /** <del> * (For old IE.) Handles a propertychange event, sending a `change` event if </del> <ins> * (For IE <=11) Handles a propertychange event, sending a `change` event if </ins> * the value of the active element has changed. */ function handlePropertyChange(nativeEvent) {

Discussion:
Check: Tested in IE10. Likely related to .
We're having issues with this too and had to put in a workaround to deal with it. is this on your roadmap?
Having the same issue with on using IE 11.0.
I have the same issue as when adding a placeholder a textarea, with no value, the onChange event is fired.
I hava the same issue. A input with a placeholder and no value, the onChange event is fired.

See for example code. When setting and removing focus from an empty field with some text, the event is triggered for IE 11 (I have not tested older versions). It does not trigger for other browsers. My current work-around is to test the that was last passed to the input with what is returned by , and only act if they are different, but it would be nice if React would not send the change-event in the first place.
Sounds like a browser quark that we should normalize against, right? Is there anything other than value that we would need to check?
Yeah, this seems odd. Probably on the challenging side for a first bug, but it would be good to figure out why this is happening and how we can prevent it, while still making it possible to type the placeholder text in directly as says.
, not really related but I imagine both could be solved by a similar fix.
Also goes for IE10.
Change:
const config = { default: { patterns: ['src/**/*.js', 'www/**/*.js'], <del> ignore: ['**/third_party/**', '**/node_modules/**'], </del> <ins> ignore: [ '**/third_party/**', '**/node_modules/**', '**/jsfiddle-integration*.js', ], </ins> }, scripts: { patterns: ['scripts/**/*.js', 'fixtures/**/*.js'],

Discussion:
no longer works, and this causes all old fiddles like to break. We should fix it.
I've also noticed fiddles[1][2] linking to being broken. I assume they were/are linking to the same place, but it's something to keep in mind. [1] [2] (All the examples seem to be broken)
It will take a few minutes to deploy the site but hopefully this should be fixed now.
Unfortunately Recharts examples are broken because they don't specify the React version. So they accidentally "updated" to React 16 that has different file names. We could potentially fix this on our side by providing a fallback. But then, one of the most commonly used builds () doesn't even exist anymore. So this has to be fixed on their side anyway.
Change:
); }); <ins> it('should generate comment markup for component returns null', function() { var NullComponent = React.createClass({ render: function() { return null; }, }); var response = ReactServerRendering.renderToString(<NullComponent />); expect(response).toBe('<!-- react-empty: 1 -->'); }); </ins> it('should not register event listeners', function() { var EventPluginHub = require('EventPluginHub'); var cb = jest.genMockFn();

Discussion:
Run this: Get this: Not sure if this is a bug but I thought and friends are gone in , no? Also when testing with an old project using - which has a much complex scenario, returned following causing a blank page: Just wondering is the behavior for server rendering changing in ? Thanks.
is gone for client-side rendering, but still exists for server-side rendering. This is expected behavior. However, is NOT desired output. Can you provide an example component/render that generates this output?
This happens when a root composite component returns .
I spent all day trying to trace the root cause of the issue and ended up confirmed it's a false alarm, it was caused by lib which returns a null root component while rendering on the server. I'm currently working on different approaches to implement universal apps on both server and client, will report back if I hit any other issues with v15.
But, to be clear, this is a valid bug in React.
Update: just confirmed that is working fine with other apps in regard to server rendering once removed . One thing to note though I saw a lot of comments for text like this, just wondering is it necessary?
Right, but the use case that mentioned clearly demonstrates the bug. It's necessary for tracking separating the text elements in order to apply updates/diffs.
Understood, thanks for the explanation.
Change:
}); var shallowRenderer = ReactTestUtils.createRenderer(); <del> shallowRenderer.render(<SomeComponent />, {}); </del> <ins> shallowRenderer.render(<SomeComponent />); </ins> shallowRenderer.unmount(); expect(componentWillUnmount).toBeCalled();

Discussion:
I am trying to render a component using the preliminary shadow renderer support in TestUtils. A simple reproducible test case of my issue is this When I run this in my Jest test, I get: It looks like this error is thrown whenever the component being rendered has . I thought perhaps the context was required (although I haven't had any problems omitting it in my actual app), but even when using I get the same exception.
I think this is a known issue with shallow rendering. cc
thanks for the report. Context isn't meant to be supported with shallow rendering (i.e., we haven't tested it), but it looks like you may be able to work around this problem by passing an object as the second argument to : it looks like an additional argument was to the shallow rendering API in . What was the thinking here? Can we default this to an empty object?
Thanks, the workaround works great. And I see you posted a fix as well so looking forward to that.