SIGN IN SIGN UP
facebook / react UNCLAIMED

The library for web and native user interfaces.

244237 0 31 JavaScript
2015-06-11 14:19:52 -07:00
{
"name": "react-dom",
"version": "19.3.0",
2015-06-11 14:19:52 -07:00
"description": "React package for working with the DOM.",
"main": "index.js",
"repository": {
2019-02-06 08:04:00 +00:00
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/react-dom"
},
2015-06-11 14:19:52 -07:00
"keywords": [
"react"
],
"license": "MIT",
2015-06-11 14:19:52 -07:00
"bugs": {
"url": "https://github.com/facebook/react/issues"
},
"homepage": "https://react.dev/",
"dependencies": {
"scheduler": "^0.28.0"
},
2015-11-02 10:19:04 -08:00
"peerDependencies": {
"react": "^19.3.0"
},
"files": [
"LICENSE",
"README.md",
Move createRoot/hydrateRoot to react-dom/client (#23385) * Move createRoot/hydrateRoot to /client We want these APIs ideally to be imported separately from things you might use in arbitrary components (like flushSync). Those other methods are "isomorphic" to how the ReactDOM tree is rendered. Similar to hooks. E.g. importing flushSync into a component that only uses it on the client should ideally not also pull in the entry client implementation on the server. This also creates a nicer parity with /server where the roots are in a separate entry point. Unfortunately, I can't quite do this yet because we have some legacy APIs that we plan on removing (like findDOMNode) and we also haven't implemented flushSync using a flag like startTransition does yet. Another problem is that we currently encourage these APIs to be aliased by /profiling (or unstable_testing). In the future you don't have to alias them because you can just change your roots to just import those APIs and they'll still work with the isomorphic forms. Although we might also just use export conditions for them. For that all to work, I went with a different strategy for now where the real API is in / but it comes with a warning if you use it. If you instead import /client it disables the warning in a wrapper. That means that if you alias / then import /client that will inturn import the alias and it'll just work. In a future breaking changes (likely when we switch to ESM) we can just remove createRoot/hydrateRoot from / and move away from the aliasing strategy. * Update tests to import from react-dom/client * Fix fixtures * Update warnings * Add test for the warning * Update devtools * Change order of react-dom, react-dom/client alias I think the order matters here. The first one takes precedence. * Require react-dom through client so it can be aliased Co-authored-by: Andrew Clark <git@andrewclark.io>
2022-03-01 00:13:28 -05:00
"client.js",
"client.react-server.js",
"index.js",
"profiling.js",
"profiling.react-server.js",
"react-dom.react-server.js",
"server.browser.js",
"server.bun.js",
"server.edge.js",
"server.js",
Drop Haste (#11303) * Use relative paths in packages/react * Use relative paths in packages/react-art * Use relative paths in packages/react-cs * Use relative paths in other packages * Fix as many issues as I can This uncovered an interesting problem where ./b from package/src/a would resolve to a different instantiation of package/src/b in Jest. Either this is a showstopper or we can solve it by completely fobbidding remaining /src/. * Fix all tests It seems we can't use relative requires in tests anymore. Otherwise Jest becomes confused between real file and symlink. https://github.com/facebook/jest/issues/3830 This seems bad... Except that we already *don't* want people to create tests that import individual source files. All existing cases of us doing so are actually TODOs waiting to be fixed. So perhaps this requirement isn't too bad because it makes bad code looks bad. Of course, if we go with this, we'll have to lint against relative requires in tests. It also makes moving things more painful. * Prettier * Remove @providesModule * Fix remaining Haste imports I missed earlier * Fix up paths to reflect new flat structure * Fix Flow * Fix CJS and UMD builds * Fix FB bundles * Fix RN bundles * Prettier * Fix lint * Fix warning printing and error codes * Fix buggy return * Fix lint and Flow * Use Yarn on CI * Unbreak Jest * Fix lint * Fix aliased originals getting included in DEV Shouldn't affect correctness (they were ignored) but fixes DEV size regression. * Record sizes * Fix weird version in package.json * Tweak bundle labels * Get rid of output option by introducing react-dom/server.node * Reconciler should depend on prop-types * Update sizes last time
2017-10-25 02:55:00 +03:00
"server.node.js",
"server.react-server.js",
"static.browser.js",
"static.edge.js",
"static.js",
"static.node.js",
"static.react-server.js",
"test-utils.js",
"unstable_testing.js",
"unstable_testing.react-server.js",
"unstable_server-external-runtime.js",
"cjs/"
],
"exports": {
".": {
"react-server": "./react-dom.react-server.js",
"default": "./index.js"
},
"./client": {
"react-server": "./client.react-server.js",
"default": "./client.js"
},
"./server": {
"react-server": "./server.react-server.js",
"workerd": "./server.edge.js",
"bun": "./server.bun.js",
"deno": "./server.node.js",
"worker": "./server.browser.js",
"node": "./server.node.js",
"edge-light": "./server.edge.js",
"browser": "./server.browser.js",
"default": "./server.node.js"
},
"./server.browser": {
"react-server": "./server.react-server.js",
"default": "./server.browser.js"
},
"./server.bun": {
"react-server": "./server.react-server.js",
"default": "./server.bun.js"
},
"./server.edge": {
"react-server": "./server.react-server.js",
"default": "./server.edge.js"
},
"./server.node": {
"react-server": "./server.react-server.js",
"default": "./server.node.js"
},
"./static": {
"react-server": "./static.react-server.js",
"workerd": "./static.edge.js",
"deno": "./static.browser.js",
"worker": "./static.browser.js",
"node": "./static.node.js",
"edge-light": "./static.edge.js",
"browser": "./static.browser.js",
"default": "./static.node.js"
},
"./static.browser": {
"react-server": "./static.react-server.js",
"default": "./static.browser.js"
},
"./static.edge": {
"react-server": "./static.react-server.js",
"default": "./static.edge.js"
},
"./static.node": {
"react-server": "./static.react-server.js",
"default": "./static.node.js"
},
"./profiling": {
"react-server": "./profiling.react-server.js",
"default": "./profiling.js"
},
"./test-utils": "./test-utils.js",
"./unstable_testing": {
"react-server": "./unstable_testing.react-server.js",
"default": "./unstable_testing.js"
},
[ServerRenderer] Move fizz external runtime implementation to react-dom-bindings (#25617) <!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory. Before submitting a pull request, please make sure the following is done: 1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`. 2. Run `yarn` in the repository root. 3. If you've fixed a bug or added code that should be tested, add tests! 4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development. 5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`. 6. If you need a debugger, run `yarn debug-test --watch TestName`, open `chrome://inspect`, and press "Inspect". 7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`). 8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files. 9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`). 10. If you haven't already, complete the CLA. Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html --> Following [comment](https://github.com/facebook/react/pull/25437#discussion_r1010944983) in #25437 , the external runtime implementation should be moved from `react-dom` to `react-dom-bindings`. I did have a question here: I set the entrypoint to `react-dom/unstable_server-external-runtime.js`, since a.) I was following #25436 as an example and b.) `react-dom-bindings` was missing a `README.md` and `npm/`. This also involved adding the external runtime to `package.json`. However, the external runtime isn't really a `react-dom` entrypoint. Is this change alright, or should I change the bundling code instead? ## How did you test this change? <!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface. How exactly did you verify that your PR solves the issue you wanted to solve? If you leave this empty, your PR will very likely be closed. -->
2022-11-03 11:15:29 -04:00
"./unstable_server-external-runtime": "./unstable_server-external-runtime.js",
Remove deprecated wildcard folder mapping (#23256) * Remove deprecated folder mapping Node v16 deprecated the use of trailing "/" to define subpath folder mappings in the "exports" field of package.json. The recommendation is to explicitly list all our exports. We already do that for all our public modules. I believe the only reason we have a wildcard pattern is because our package.json files are also used at build time (by Rollup) to resolve internal source modules that don't appear in the final npm artifact. Changing trailing "/" to "/*" fixes the warnings. See https://nodejs.org/api/packages.html#subpath-patterns for more info. Since the wildcard pattern only exists so our build script has access to internal at build time, I've scoped the wildcard to "/src/*". Because our public modules are located outside the "src" directory, this means deep imports of our modules will no longer work: only packages that are listed in the "exports" field. The only two affected packages are react-dom and react. We need to be sure that all our public modules are still reachable. I audited the exports by comparing the entries to the "files" field in package.json, which represents a complete list of the files that are included in the final release artifact. At some point, we should add an e2e packaging test to prevent regressions; for now, we should have decent coverage because in CI we run our Jest test suite against the release artifacts. * Remove umd from exports Our expectation is that if you're using the UMD builds, you're not loading them through a normal module system like require or import. Instead you're probably copying the files directly or loading them from a CDN like unpkg.
2022-02-09 11:37:17 -08:00
"./src/*": "./src/*",
"./package.json": "./package.json"
},
"browser": {
"./server.js": "./server.browser.js",
"./static.js": "./static.browser.js"
}
}