helloadhavan/github_issues huggingface dataset:
Repository: electron/electron
Pull request: fix: broken OOP `window.print()` on macOS/Linux

#### Description of Change

Refs CL:6032774 via https://github.com/electron/electron/pull/44748

Fixes broken printing on macOS/Linux with the following error messages:

```
[69931:0116/114046.603990:ERROR:utility_thread_impl.cc(227)] Cannot run unknown service: printing.mojom.UnsandboxedPrintBackendHost
[69913:0116/114048.175058:ERROR:device_event_log_impl.cc(199)] [11:40:48.174] Printer: printer_query_oop.cc:140 Error after getting settings due to client registration failure; service or renderer likely has terminated
```

Fix this by registering the relevant services in `ElectronContentUtilityClient`.

Tested with https://gist.github.com/0f0e776b138452d6815ef4efc16aa0d1

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: Fixed broken OOP `window.print()` on macOS/Linux.


Changed files:
filename: shell/utility/electron_content_utility_client.cc
patch: @@ -31,6 +31,11 @@
 #include "components/services/print_compositor/public/mojom/print_compositor.mojom.h"  // nogncheck
 #endif  // BUILDFLAG(ENABLE_PRINTING)
 
+#if BUILDFLAG(ENABLE_OOP_PRINTING)
+#include "chrome/services/printing/print_backend_service_impl.h"
+#include "chrome/services/printing/public/mojom/print_backend_service.mojom.h"
+#endif  // BUILDFLAG(ENABLE_OOP_PRINTING)
+
 #if BUILDFLAG(ENABLE_PRINTING) && BUILDFLAG(IS_WIN)
 #include "chrome/services/printing/pdf_to_emf_converter_factory.h"
 #endif
@@ -72,6 +77,21 @@ auto RunPrintCompositor(
 }
 #endif
 
+#if BUILDFLAG(ENABLE_OOP_PRINTING)
+auto RunPrintingSandboxedPrintBackendHost(
+    mojo::PendingReceiver<printing::mojom::SandboxedPrintBackendHost>
+        receiver) {
+  return std::make_unique<printing::SandboxedPrintBackendHostImpl>(
+      std::move(receiver));
+}
+auto RunPrintingUnsandboxedPrintBackendHost(
+    mojo::PendingReceiver<printing::mojom::UnsandboxedPrintBackendHost>
+        receiver) {
+  return std::make_unique<printing::UnsandboxedPrintBackendHostImpl>(
+      std::move(receiver));
+}
+#endif  // BUILDFLAG(ENABLE_OOP_PRINTING)
+
 auto RunProxyResolver(
     mojo::PendingReceiver<proxy_resolver::mojom::ProxyResolverFactory>
         receiver) {
@@ -122,6 +142,11 @@ void ElectronContentUtilityClient::RegisterMainThreadServices(
   services.Add(RunPrintCompositor);
 #endif
 
+#if BUILDFLAG(ENABLE_OOP_PRINTING)
+  services.Add(RunPrintingSandboxedPrintBackendHost);
+  services.Add(RunPrintingUnsandboxedPrintBackendHost);
+#endif
+
 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) || \
     (BUILDFLAG(ENABLE_PRINTING) && BUILDFLAG(IS_WIN))
   services.Add(RunPrintingService);
Repository: denoland/deno
Pull request: fix(lint): give access to SourceCode in 'deno test'

Closes https://github.com/denoland/deno/issues/28273

Changed files:
filename: cli/js/40_lint.js
patch: @@ -17,6 +17,7 @@ const {
 } = core.ops;
 
 let doReport = op_lint_report;
+let doGetSource = op_lint_get_source;
 
 // Keep these in sync with Rust
 const AST_IDX_INVALID = 0;
@@ -264,7 +265,7 @@ export class SourceCode {
    */
   #getSource() {
     if (this.#source === null) {
-      this.#source = op_lint_get_source();
+      this.#source = doGetSource();
     }
     return /** @type {string} */ (this.#source);
   }
@@ -1365,6 +1366,9 @@ function runLintPlugin(plugin, fileName, sourceText) {
       fix,
     });
   };
+  doGetSource = () => {
+    return sourceText;
+  };
   try {
     const serializedAst = op_lint_create_serialized_ast(fileName, sourceText);
 
@@ -1373,6 +1377,7 @@ function runLintPlugin(plugin, fileName, sourceText) {
     resetState();
   }
   doReport = op_lint_report;
+  doGetSource = op_lint_get_source;
   return diagnostics;
 }
 

filename: tests/specs/lint/lint_plugin_runtime_api/__test__.jsonc
patch: @@ -8,6 +8,10 @@
     {
       "args": "test main.ts",
       "output": "test.out"
+    },
+    {
+      "args": "test main_test.ts",
+      "output": "main_test.out"
     }
   ]
 }

filename: tests/specs/lint/lint_plugin_runtime_api/main_test.out
patch: @@ -0,0 +1,6 @@
+Check [WILDCARD]main_test.ts
+running 1 test from ./main_test.ts
+SourceCode.text ... ok ([WILDCARD])
+
+ok | 1 passed | 0 failed ([WILDCARD])
+

filename: tests/specs/lint/lint_plugin_runtime_api/main_test.ts
patch: @@ -0,0 +1,22 @@
+Deno.test("SourceCode.text", () => {
+  const plugin: Deno.lint.Plugin = {
+    name: "sample",
+    rules: {
+      "test": {
+        create: (ctx) => {
+          ctx.sourceCode.text;
+          return {};
+        },
+      },
+    },
+  };
+  Deno.lint.runPlugin(
+    plugin,
+    "./test.js",
+    `function add(a, b) {
+  return a + b;
+}
+
+add(1, 2);`,
+  );
+});
Repository: nodejs/node
Pull request: doc: list DOMException as a potential error raised by Node.js

List `DOMException` as a potential error type raised by Node.js in `errors.md`, along with
standard JS error types.

This should also clarify that a change to DOMException message does not need semver-major.

Refs: https://github.com/nodejs/node/pull/57735

Changed files:
filename: doc/api/errors.md
patch: @@ -4,23 +4,28 @@
 
 <!--type=misc-->
 
-Applications running in Node.js will generally experience four categories of
-errors:
+Applications running in Node.js will generally experience the following
+categories of errors:
 
 * Standard JavaScript errors such as {EvalError}, {SyntaxError}, {RangeError},
   {ReferenceError}, {TypeError}, and {URIError}.
+* Standard `DOMException`s.
 * System errors triggered by underlying operating system constraints such
   as attempting to open a file that does not exist or attempting to send data
   over a closed socket.
-* User-specified errors triggered by application code.
 * `AssertionError`s are a special class of error that can be triggered when
   Node.js detects an exceptional logic violation that should never occur. These
   are raised typically by the `node:assert` module.
+* User-specified errors triggered by application code.
 
 All JavaScript and system errors raised by Node.js inherit from, or are
 instances of, the standard JavaScript {Error} class and are guaranteed
 to provide _at least_ the properties available on that class.
 
+The [`error.message`][] property of errors raised by Node.js may be changed in
+any versions. Use [`error.code`][] to identify an error instead. For a
+`DOMException`, use [`domException.name`][] to identify its type.
+
 ## Error propagation and interception
 
 <!--type=misc-->
@@ -4303,7 +4308,10 @@ An error occurred trying to allocate memory. This should never happen.
 [`dgram.createSocket()`]: dgram.md#dgramcreatesocketoptions-callback
 [`dgram.disconnect()`]: dgram.md#socketdisconnect
 [`dgram.remoteAddress()`]: dgram.md#socketremoteaddress
+[`domException.name`]: https://developer.mozilla.org/en-US/docs/Web/API/DOMException/name
 [`errno`(3) man page]: https://man7.org/linux/man-pages/man3/errno.3.html
+[`error.code`]: #errorcode
+[`error.message`]: #errormessage
 [`fs.Dir`]: fs.md#class-fsdir
 [`fs.cp()`]: fs.md#fscpsrc-dest-options-callback
 [`fs.readFileSync`]: fs.md#fsreadfilesyncpath-options
Repository: ggml-org/llama.cpp
Pull request: ci : add more python requirements to copilot-setup-steps

For linting and testing.

Changed files:
filename: .github/workflows/copilot-setup-steps.yml
patch: @@ -49,4 +49,5 @@ jobs:
         run: |
           python3 -m venv .venv
           .venv/bin/activate
-          pip install -r requirements/requirements-all.txt
+          pip install -r requirements/requirements-all.txt -r tools/server/tests/requirements.txt
+          pip install flake8 pyright
Repository: facebook/react
Pull request: fix[devtools/standalone]: update webpack configurations

## Summary
Overlooked when was working on https://github.com/facebook/react/pull/26887.

- Added `webpack` packages as dev dependencies to `react-devtools-core`, because it calls webpack to build
- Added `process` package as dev dependency, because it is injected with `ProvidePlugin` (otherwise fails with Safari usage)
- Updated rule for sourcemaps
- Listed required externals for `standalone` build

Tested on RN application & Safari

Changed files:
filename: packages/react-devtools-core/package.json
patch: @@ -29,6 +29,10 @@
     "ws": "^7"
   },
   "devDependencies": {
-    "cross-env": "^3.1.4"
+    "cross-env": "^3.1.4",
+    "process": "0.11.10",
+    "webpack": "^5.82.1",
+    "webpack-cli": "^5.1.1",
+    "workerize-loader": "^2.0.2"
   }
 }

filename: packages/react-devtools-core/webpack.backend.js
patch: @@ -39,7 +39,7 @@ process.env.BABEL_CONFIG_ADDITIONAL_TARGETS = JSON.stringify({
 
 module.exports = {
   mode: __DEV__ ? 'development' : 'production',
-  devtool: __DEV__ ? 'cheap-module-eval-source-map' : 'source-map',
+  devtool: __DEV__ ? 'eval-cheap-module-source-map' : 'source-map',
   entry: {
     backend: './src/backend.js',
   },

filename: packages/react-devtools-core/webpack.standalone.js
patch: @@ -47,7 +47,7 @@ const babelOptions = {
 
 module.exports = {
   mode: __DEV__ ? 'development' : 'production',
-  devtool: __DEV__ ? 'cheap-module-eval-source-map' : 'source-map',
+  devtool: __DEV__ ? 'eval-cheap-module-source-map' : 'source-map',
   target: 'electron-main',
   entry: {
     standalone: './src/standalone.js',
@@ -56,8 +56,13 @@ module.exports = {
     path: __dirname + '/dist',
     filename: '[name].js',
     chunkFilename: '[name].chunk.js',
-    library: '[name]',
-    libraryTarget: 'commonjs2',
+    library: {
+      type: 'commonjs2',
+    },
+  },
+  externals: {
+    bufferutil: 'commonjs bufferutil',
+    'utf-8-validate': 'commonjs utf-8-validate',
   },
   resolve: {
     alias: {
Repository: ggml-org/llama.cpp
Pull request: llava: avoid chaging the original BakLLaVA model

This is a follup of Commit fc0c8d286a533363a9a663510b62af85ffad58b3 ("llava : update surgery script to not remove tensors") but this time the change is to the BakLLaVA specific part of the surgery script.

I've been able to test this using SkunkworksAI/BakLLaVA-1 and it works as expected using the instructions in README.md.

Changed files:
filename: examples/llava/llava-surgery.py
patch: @@ -25,17 +25,13 @@
     clip = {name.replace("vision_tower.vision_tower.", ""): checkpoint[name].float() for name in clip_tensors}
     torch.save(clip, f"{args.model}/llava.clip")
 
-    # remove these tensors
-    for name in clip_tensors:
-        del checkpoint[name]
 
     # added tokens should be removed to be able to convert Mistral models
     if os.path.exists(f"{args.model}/added_tokens.json"):
         with open(f"{args.model}/added_tokens.json", "w") as f:
             f.write("{}\n")
 
 
-    torch.save(checkpoint, path)
 
 print("Done!")
 print(f"Now you can convert {args.model} to a regular LLaMA GGUF file.")
Repository: denoland/deno
Pull request: fix(lint): don't recurse infinitely for large ASTs

We previously failed to lint `./cli/tsc/00_typescript.js` with plugins, because every "next" node would cause a new stack frame to be added.

Changed files:
filename: cli/js/40_lint.js
patch: @@ -1150,54 +1150,52 @@ export function runPluginsForFile(fileName, serializedAst) {
  * @param {CancellationToken} cancellationToken
  */
 function traverse(ctx, visitors, idx, cancellationToken) {
-  if (idx === AST_IDX_INVALID) return;
-  if (cancellationToken.isCancellationRequested()) return;
-
-  const { buf } = ctx;
-  const nodeType = readType(ctx.buf, idx);
-
-  /** @type {VisitorFn[] | null} */
-  let exits = null;
-
-  // Only visit if it's an actual node
-  if (nodeType !== AST_GROUP_TYPE) {
-    // Loop over visitors and check if any selector matches
-    for (let i = 0; i < visitors.length; i++) {
-      const v = visitors[i];
-      if (v.matcher(ctx.matcher, idx)) {
-        if (v.info.exit !== NOOP) {
-          if (exits === null) {
-            exits = [v.info.exit];
-          } else {
-            exits.push(v.info.exit);
+  while (idx !== AST_IDX_INVALID) {
+    if (cancellationToken.isCancellationRequested()) return;
+
+    const { buf } = ctx;
+    const nodeType = readType(ctx.buf, idx);
+
+    /** @type {VisitorFn[] | null} */
+    let exits = null;
+
+    // Only visit if it's an actual node
+    if (nodeType !== AST_GROUP_TYPE) {
+      // Loop over visitors and check if any selector matches
+      for (let i = 0; i < visitors.length; i++) {
+        const v = visitors[i];
+        if (v.matcher(ctx.matcher, idx)) {
+          if (v.info.exit !== NOOP) {
+            if (exits === null) {
+              exits = [v.info.exit];
+            } else {
+              exits.push(v.info.exit);
+            }
           }
-        }
 
-        if (v.info.enter !== NOOP) {
-          const node = /** @type {*} */ (getNode(ctx, idx));
-          v.info.enter(node);
+          if (v.info.enter !== NOOP) {
+            const node = /** @type {*} */ (getNode(ctx, idx));
+            v.info.enter(node);
+          }
         }
       }
     }
-  }
 
-  try {
-    const childIdx = readChild(buf, idx);
-    if (childIdx > AST_IDX_INVALID) {
-      traverse(ctx, visitors, childIdx, cancellationToken);
-    }
-  } finally {
-    if (exits !== null) {
-      for (let i = 0; i < exits.length; i++) {
-        const node = /** @type {*} */ (getNode(ctx, idx));
-        exits[i](node);
+    try {
+      const childIdx = readChild(buf, idx);
+      if (childIdx > AST_IDX_INVALID) {
+        traverse(ctx, visitors, childIdx, cancellationToken);
+      }
+    } finally {
+      if (exits !== null) {
+        for (let i = 0; i < exits.length; i++) {
+          const node = /** @type {*} */ (getNode(ctx, idx));
+          exits[i](node);
+        }
       }
     }
-  }
 
-  const nextIdx = readNext(buf, idx);
-  if (nextIdx > AST_IDX_INVALID) {
-    traverse(ctx, visitors, nextIdx, cancellationToken);
+    idx = readNext(buf, idx);
   }
 }
Repository: vercel/next.js
Pull request: Fix preview builds for forks

I relied on a bug in https://github.com/vercel/next.js/pull/79648 where `github.workflow_sha` pointed to the head commit of the PR branch. But that's not what the workflow actually runs on. It uses the merge commit.

This used to work in https://github.com/vercel/next.js/actions/runs/15271404964/job/42947987352?pr=79648#step:8:1 but now GitHub correctly sets the workflow_sha to the merge commit.

We can use `github.event.after` which explicitly asks for the head commit of the branch. If that breaks, it'd be a GitHub bug.

## Test plan

- [x] [Linked preview builds](https://github.com/vercel/next.js/actions/runs/15844086051/job/44662390359?pr=80833#step:8:39) works for fork PRS: https://vercel-packages.vercel.app/next/commits/f366813b36120663b4ad6effc4723919089201ae/next
- [x] [Linked preview builds](https://github.com/vercel/next.js/actions/runs/15844090609/job/44662469410#step:8:39) works for upstream PRs: https://vercel-packages.vercel.app/next/commits/f366813b36120663b4ad6effc4723919089201ae/next

Changed files:
filename: .github/workflows/build_and_deploy.yml
patch: @@ -37,6 +37,7 @@ jobs:
       - uses: actions/checkout@v4
         with:
           fetch-depth: 1
+      - run: echo "${{ github.event.after }}"
       - name: Setup node
         uses: actions/setup-node@v4
         with:
@@ -535,7 +536,9 @@ jobs:
           path: crates/wasm
 
       - name: Create tarballs
-        run: node scripts/create-preview-tarballs.js "${{ github.sha }}" "${{ github.workflow_sha }}" "${{ runner.temp }}/preview-tarballs"
+        # github.event.after is available on push and pull_request#synchronize events.
+        # For workflow_dispatch events, github.sha is the head commit.
+        run: node scripts/create-preview-tarballs.js "${{ github.sha }}" "${{ github.event.after || github.sha }}" "${{ runner.temp }}/preview-tarballs"
 
       - name: Upload tarballs
         uses: actions/upload-artifact@v4

filename: scripts/create-preview-tarballs.js
patch: @@ -7,7 +7,7 @@ const path = require('node:path')
 async function main() {
   const [
     githubSha,
-    githubWorkflowSha,
+    githubHeadSha,
     tarballDirectory = path.join(os.tmpdir(), 'vercel-nextjs-preview-tarballs'),
   ] = process.argv.slice(2)
   const repoRoot = path.resolve(__dirname, '..')
@@ -103,13 +103,13 @@ async function main() {
   for (const packageInfo of packages) {
     packagesByVersion.set(
       packageInfo.name,
-      `https://vercel-packages.vercel.app/next/commits/${githubWorkflowSha}/${packageInfo.name}`
+      `https://vercel-packages.vercel.app/next/commits/${githubHeadSha}/${packageInfo.name}`
     )
   }
   for (const nextSwcPackageName of nextSwcPackageNames) {
     packagesByVersion.set(
       nextSwcPackageName,
-      `https://vercel-packages.vercel.app/next/commits/${githubWorkflowSha}/${nextSwcPackageName}`
+      `https://vercel-packages.vercel.app/next/commits/${githubHeadSha}/${nextSwcPackageName}`
     )
   }
Repository: ggml-org/llama.cpp
Pull request: readme: add link to LLaVA 1.6 models


Changed files:
filename: README.md
patch: @@ -107,7 +107,7 @@ Typically finetunes of the base models below are supported as well.
 
 **Multimodal models:**
 
-- [x] [LLaVA 1.5 models](https://huggingface.co/collections/liuhaotian/llava-15-653aac15d994e992e2677a7e)
+- [x] [LLaVA 1.5 models](https://huggingface.co/collections/liuhaotian/llava-15-653aac15d994e992e2677a7e), [LLaVA 1.6 models](https://huggingface.co/collections/liuhaotian/llava-16-65b9e40155f60fd046a5ccf2)
 - [x] [BakLLaVA](https://huggingface.co/models?search=SkunkworksAI/Bakllava)
 - [x] [Obsidian](https://huggingface.co/NousResearch/Obsidian-3B-V0.5)
 - [x] [ShareGPT4V](https://huggingface.co/models?search=Lin-Chen/ShareGPT4V)
Repository: electron/electron
Pull request: test: quit Finder

#### Description of Change

Attempt to fix this issue causing flakes during visual testing.

![image](https://github.com/user-attachments/assets/603685e3-595e-43c1-9d7e-b6885fa30e17)

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes
- [x] tests are [changed or added](https://github.com/electron/electron/blob/main/docs/development/testing.md)

#### Release Notes

Notes: none


Changed files:
filename: spec/api-browser-window-spec.ts
patch: @@ -1272,6 +1272,7 @@ describe('BrowserWindow module', () => {
         // We first need to resign app focus for this test to work
         const isInactive = once(app, 'did-resign-active');
         childProcess.execSync('osascript -e \'tell application "Finder" to activate\'');
+        defer(() => childProcess.execSync('osascript -e \'tell application "Finder" to quit\''));
         await isInactive;
 
         // Create new window
Repository: facebook/react
Pull request: [Float] Nonce preload support

Some browsers, with some CSP configuration, will not preload a script if the prelaod link tag does not provide a valid nonce attribute. This change adds the ability to specify a nonce for `ReactDOM.preload(..., { as: "script" })`

Changed files:
filename: packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js
patch: @@ -2233,6 +2233,7 @@ function preloadPropsFromPreloadOptions(
     crossOrigin: as === 'font' ? '' : options.crossOrigin,
     integrity: options.integrity,
     type: options.type,
+    nonce: options.nonce,
     fetchPriority: options.fetchPriority,
   };
 }

filename: packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js
patch: @@ -5532,6 +5532,7 @@ function preloadPropsFromPreloadOptions(
     crossOrigin: as === 'font' ? '' : options.crossOrigin,
     integrity: options.integrity,
     type: options.type,
+    nonce: options.nonce,
     fetchPriority: options.fetchPriority,
   };
 }

filename: packages/react-dom/src/__tests__/ReactDOMFloat-test.js
patch: @@ -3981,6 +3981,45 @@ body {
         </html>,
       );
     });
+
+    it('supports nonce', async () => {
+      function App({url}) {
+        ReactDOM.preload(url, {as: 'script', nonce: 'abc'});
+        return 'hello';
+      }
+
+      await act(() => {
+        renderToPipeableStream(<App url="server" />).pipe(writable);
+      });
+
+      expect(getMeaningfulChildren(document)).toEqual(
+        <html>
+          <head />
+          <body>
+            <div id="container">
+              <link rel="preload" as="script" href="server" nonce="abc" />
+              hello
+            </div>
+          </body>
+        </html>,
+      );
+
+      ReactDOMClient.hydrateRoot(container, <App url="client" />);
+      await waitForAll([]);
+      expect(getMeaningfulChildren(document)).toEqual(
+        <html>
+          <head>
+            <link rel="preload" as="script" href="client" nonce="abc" />
+          </head>
+          <body>
+            <div id="container">
+              <link rel="preload" as="script" href="server" nonce="abc" />
+              hello
+            </div>
+          </body>
+        </html>,
+      );
+    });
   });
 
   describe('ReactDOM.preinit(href, { as: ... })', () => {

filename: packages/react-dom/src/shared/ReactDOMTypes.js
patch: @@ -14,6 +14,7 @@ export type PreloadOptions = {
   crossOrigin?: string,
   integrity?: string,
   type?: string,
+  nonce?: string,
   fetchPriority?: 'high' | 'low' | 'auto',
 };
 export type PreinitOptions = {
Repository: facebook/react
Pull request: [Float][Fizz] add crossOrigin support for preloading bootstrap scripts and bootstrap modules

The recently merged support for crossorigin in bootstrap scripts did not implement the functionality for preloading. This adds it

see #26844 

Changed files:
filename: packages/react-dom-bindings/src/server/ReactFizzConfigDOM.js
patch: @@ -281,7 +281,7 @@ export function createResponseState(
           ? 'use-credentials'
           : '';
 
-      preloadBootstrapScript(resources, src, nonce, integrity);
+      preloadBootstrapScript(resources, src, nonce, integrity, crossOrigin);
 
       bootstrapChunks.push(
         startScriptSrc,
@@ -322,7 +322,7 @@ export function createResponseState(
           ? 'use-credentials'
           : '';
 
-      preloadBootstrapModule(resources, src, nonce, integrity);
+      preloadBootstrapModule(resources, src, nonce, integrity, crossOrigin);
 
       bootstrapChunks.push(
         startModuleSrc,
@@ -5425,6 +5425,7 @@ function preloadBootstrapScript(
   src: string,
   nonce: ?string,
   integrity: ?string,
+  crossOrigin: ?string,
 ): void {
   const key = getResourceKey('script', src);
   if (__DEV__) {
@@ -5444,6 +5445,7 @@ function preloadBootstrapScript(
     as: 'script',
     nonce,
     integrity,
+    crossOrigin,
   };
   const resource: PreloadResource = {
     type: 'preload',
@@ -5465,6 +5467,7 @@ function preloadBootstrapModule(
   src: string,
   nonce: ?string,
   integrity: ?string,
+  crossOrigin: ?string,
 ): void {
   const key = getResourceKey('script', src);
   if (__DEV__) {
@@ -5483,6 +5486,7 @@ function preloadBootstrapModule(
     href: src,
     nonce,
     integrity,
+    crossOrigin,
   };
   const resource: PreloadResource = {
     type: 'preload',

filename: packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js
patch: @@ -3865,7 +3865,19 @@ describe('ReactDOMFizzServer', () => {
 
     expect(getVisibleChildren(document)).toEqual(
       <html>
-        <head />
+        <head>
+          <link rel="preload" href="foo" as="script" />
+          <link rel="preload" href="bar" as="script" />
+          <link rel="preload" href="baz" as="script" crossorigin="" />
+          <link rel="preload" href="qux" as="script" crossorigin="" />
+          <link rel="modulepreload" href="quux" />
+          <link rel="modulepreload" href="corge" />
+          <link
+            rel="modulepreload"
+            href="grault"
+            crossorigin="use-credentials"
+          />
+        </head>
         <body>
           <div>hello world</div>
         </body>