GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Move remaining things to named exports (#18165) · react/react@549e418

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages
    • eslint-plugin-react-hooks
      • index.js
    • react-art
      • Circle.js
      • Rectangle.js
      • Wedge.js
      • index.js
      • src/__tests__
        • ReactART-test.js
    • react-debug-tools
      • index.js
    • react-flight-dom-webpack
      • index.js
      • server.browser.js
      • server.js
      • server.node.js
      • src
        • ReactFlightDOMClient.js
        • ReactFlightDOMServerBrowser.js
        • ReactFlightDOMServerNode.js
    • react-flight
      • index.js
    • react-interactions/events
      • context-menu.js
      • focus.js
      • hover.js
      • input.js
      • keyboard.js
      • press-legacy.js
      • press.js
      • tap.js
    • react-noop-renderer
      • flight-client.js
      • flight-server.js
      • index.js
      • persistent.js
      • server.js
      • src
        • ReactNoop.js
        • ReactNoopFlightClient.js
        • ReactNoopFlightServer.js
        • ReactNoopPersistent.js
        • ReactNoopServer.js
    • react-reconciler
      • index.js
      • persistent.js
    • react-refresh
      • babel.js
      • runtime.js
    • react-server
      • flight.js
      • index.js
  • scripts/rollup
    • wrappers.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/eslint-plugin-react-hooks/index.js‎

Copy file name to clipboardExpand all lines: packages/eslint-plugin-react-hooks/index.js
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
'use strict';
9-
10-
module.exports = require('./src/index');
8+
export * from './src/index';
Collapse file

‎packages/react-art/Circle.js‎

Copy file name to clipboardExpand all lines: packages/react-art/Circle.js
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77
* @flow
88
*/
99

10-
'use strict';
11-
12-
const Circle = require('./npm/Circle');
13-
14-
module.exports = Circle;
10+
export {default} from './npm/Circle';
Collapse file

‎packages/react-art/Rectangle.js‎

Copy file name to clipboardExpand all lines: packages/react-art/Rectangle.js
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77
* @flow
88
*/
99

10-
'use strict';
11-
12-
const Rectangle = require('./npm/Rectangle');
13-
14-
module.exports = Rectangle;
10+
export {default} from './npm/Rectangle';
Collapse file

‎packages/react-art/Wedge.js‎

Copy file name to clipboardExpand all lines: packages/react-art/Wedge.js
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77
* @flow
88
*/
99

10-
'use strict';
11-
12-
const Wedge = require('./npm/Wedge');
13-
14-
module.exports = Wedge;
10+
export {default} from './npm/Wedge';
Collapse file

‎packages/react-art/index.js‎

Copy file name to clipboardExpand all lines: packages/react-art/index.js
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,4 @@
77
* @flow
88
*/
99

10-
'use strict';
11-
12-
const ReactART = require('./src/ReactART');
13-
14-
module.exports = ReactART;
10+
export * from './src/ReactART';
Collapse file

‎packages/react-art/src/__tests__/ReactART-test.js‎

Copy file name to clipboardExpand all lines: packages/react-art/src/__tests__/ReactART-test.js
+13-10Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,26 @@
1111

1212
'use strict';
1313

14-
const React = require('react');
14+
import * as React from 'react';
15+
16+
import * as ReactART from 'react-art';
17+
import ARTSVGMode from 'art/modes/svg';
18+
import ARTCurrentMode from 'art/modes/current';
19+
// Since these are default exports, we need to import them using ESM.
20+
// Since they must be on top, we need to import this before ReactDOM.
21+
import Circle from 'react-art/Circle';
22+
import Rectangle from 'react-art/Rectangle';
23+
import Wedge from 'react-art/Wedge';
24+
25+
// Isolate DOM renderer.
26+
jest.resetModules();
1527
const ReactDOM = require('react-dom');
1628
const ReactTestUtils = require('react-dom/test-utils');
1729

1830
// Isolate test renderer.
1931
jest.resetModules();
2032
const ReactTestRenderer = require('react-test-renderer');
2133

22-
// Isolate ART renderer.
23-
jest.resetModules();
24-
const ReactART = require('react-art');
25-
const ARTSVGMode = require('art/modes/svg');
26-
const ARTCurrentMode = require('art/modes/current');
27-
const Circle = require('react-art/Circle');
28-
const Rectangle = require('react-art/Rectangle');
29-
const Wedge = require('react-art/Wedge');
30-
3134
// Isolate the noop renderer
3235
jest.resetModules();
3336
const ReactNoop = require('react-noop-renderer');
Collapse file

‎packages/react-debug-tools/index.js‎

Copy file name to clipboardExpand all lines: packages/react-debug-tools/index.js
+1-6Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,4 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
'use strict';
9-
10-
const ReactDebugTools = require('./src/ReactDebugTools');
11-
12-
// This is hacky but makes it work with both Rollup and Jest.
13-
module.exports = ReactDebugTools.default || ReactDebugTools;
8+
export * from './src/ReactDebugTools';
Collapse file

‎packages/react-flight-dom-webpack/index.js‎

Copy file name to clipboardExpand all lines: packages/react-flight-dom-webpack/index.js
+1-7Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,4 @@
77
* @flow
88
*/
99

10-
'use strict';
11-
12-
const ReactFlightDOMClient = require('./src/ReactFlightDOMClient');
13-
14-
// TODO: decide on the top-level export form.
15-
// This is hacky but makes it work with both Rollup and Jest
16-
module.exports = ReactFlightDOMClient.default || ReactFlightDOMClient;
10+
export * from './src/ReactFlightDOMClient';
Collapse file

‎packages/react-flight-dom-webpack/server.browser.js‎

Copy file name to clipboardExpand all lines: packages/react-flight-dom-webpack/server.browser.js
+1-8Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,4 @@
77
* @flow
88
*/
99

10-
'use strict';
11-
12-
const ReactFlightDOMServerBrowser = require('./src/ReactFlightDOMServerBrowser');
13-
14-
// TODO: decide on the top-level export form.
15-
// This is hacky but makes it work with both Rollup and Jest
16-
module.exports =
17-
ReactFlightDOMServerBrowser.default || ReactFlightDOMServerBrowser;
10+
export * from './src/ReactFlightDOMServerBrowser';
Collapse file

‎packages/react-flight-dom-webpack/server.js‎

Copy file name to clipboardExpand all lines: packages/react-flight-dom-webpack/server.js
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,4 @@
77
* @flow
88
*/
99

10-
'use strict';
11-
12-
module.exports = require('./server.node');
10+
export * from './server.node';

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.