helloadhavan/github_issues huggingface dataset:
Repository: denoland/deno
Pull request: fix: update deno_error to 0.7.1

Fixes https://github.com/denoland/deno/issues/31430

Changed files:
filename: Cargo.lock
patch: @@ -2021,9 +2021,9 @@ dependencies = [
 
 [[package]]
 name = "deno_error"
-version = "0.7.0"
+version = "0.7.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dde60bd153886964234c5012d3d9caf788287f28d81fb24a884436904101ef10"
+checksum = "bfafd2219b29886a71aecbb3449e462deed1b2c474dc5b12f855f0e58c478931"
 dependencies = [
  "deno_error_macro",
  "libc",
@@ -2035,9 +2035,9 @@ dependencies = [
 
 [[package]]
 name = "deno_error_macro"
-version = "0.7.0"
+version = "0.7.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "409f265785bd946d3006756955aaf40b0e4deb25752eae6a990afe54a31cfd83"
+checksum = "1c28ede88783f14cd8aae46ca89f230c226b40e4a81ab06fa52ed72af84beb2f"
 dependencies = [
  "proc-macro2",
  "quote",

filename: Cargo.toml
patch: @@ -65,7 +65,7 @@ deno_core = { version = "0.371.0" }
 
 deno_cache_dir = "=0.26.3"
 deno_doc = "=0.187.0"
-deno_error = "=0.7.0"
+deno_error = "=0.7.1"
 deno_graph = { version = "=0.104.0", default-features = false }
 deno_lint = "=0.82.0"
 deno_lockfile = "=0.32.2"
Repository: ggml-org/llama.cpp
Pull request: fix: resolve undefined variable 'svr' compilation error

Fix variable name typo and scope issues.

When defining `CPPHTTPLIB_OPENSSL_SUPPORT`, the `srv` variable was not in scope. Moved `auto & srv = pimpl->srv;` to an earlier position.


Changed files:
filename: tools/server/server-http.cpp
patch: @@ -46,25 +46,26 @@ bool server_http_context::init(const common_params & params) {
     port = params.port;
     hostname = params.hostname;
 
+    auto & srv = pimpl->srv;
+
 #ifdef CPPHTTPLIB_OPENSSL_SUPPORT
     if (params.ssl_file_key != "" && params.ssl_file_cert != "") {
         LOG_INF("Running with SSL: key = %s, cert = %s\n", params.ssl_file_key.c_str(), params.ssl_file_cert.c_str());
-        svr.reset(
+        srv.reset(
             new httplib::SSLServer(params.ssl_file_cert.c_str(), params.ssl_file_key.c_str())
         );
     } else {
         LOG_INF("Running without SSL\n");
-        svr.reset(new httplib::Server());
+        srv.reset(new httplib::Server());
     }
 #else
     if (params.ssl_file_key != "" && params.ssl_file_cert != "") {
         LOG_ERR("Server is built without SSL support\n");
         return false;
     }
-    pimpl->srv.reset(new httplib::Server());
+    srv.reset(new httplib::Server());
 #endif
 
-    auto & srv = pimpl->srv;
     srv->set_default_headers({{"Server", "llama.cpp"}});
     srv->set_logger(log_server_request);
     srv->set_exception_handler([](const httplib::Request &, httplib::Response & res, const std::exception_ptr & ep) {
Repository: huggingface/transformers
Pull request: Fix invalid PipelineParallel member

# What does this PR do?

Fixes a syntactic error.

Changed files:
filename: src/transformers/modeling_utils.py
patch: @@ -1596,8 +1596,8 @@ def _find_mismatched_keys(
 
 
 class PipelineParallel(Enum):
-    inputs: 0
-    outputs: 1
+    inputs = 0
+    outputs = 1
 
 
 class ModuleUtilsMixin:
Repository: ollama/ollama
Pull request: Add embeddings to API

The API is missing the embeddings point, so this adds it. 

Changed files:
filename: api/client.go
patch: @@ -309,6 +309,13 @@ func (c *Client) Heartbeat(ctx context.Context) error {
 	}
 	return nil
 }
+func (c *Client) Embeddings(ctx context.Context, req *EmbeddingRequest) (*EmbeddingResponse, error) {
+	var resp EmbeddingResponse
+	if err := c.do(ctx, http.MethodPost, "/api/embeddings", req, &resp); err != nil {
+		return nil, err
+	}
+	return &resp, nil
+}
 
 func (c *Client) CreateBlob(ctx context.Context, digest string, r io.Reader) error {
 	if err := c.do(ctx, http.MethodHead, fmt.Sprintf("/api/blobs/%s", digest), nil, nil); err != nil {
Repository: ollama/ollama
Pull request: Load dynamic cpu lib on windows

On linux, we link the CPU library in to the Go app and fall back to it when no GPU match is found. On windows we do not link in the CPU library so that we can better control our dependencies for the CLI.  This fixes the logic so we correctly fallback to the dynamic CPU library on windows.

Changed files:
filename: llm/ext_server_windows.go
patch: @@ -1,15 +1,12 @@
 package llm
 
 import (
-	"fmt"
-
 	"github.com/jmorganca/ollama/api"
 )
 
 func newDefaultExtServer(model string, adapters, projectors []string, numLayers int64, opts api.Options) (extServer, error) {
 	// On windows we always load the llama.cpp libraries dynamically to avoid startup DLL dependencies
 	// This ensures we can update the PATH at runtime to get everything loaded
 
-	// Should not happen
-	return nil, fmt.Errorf("no default impl on windows - all dynamic")
+	return newDynamicShimExtServer(AvailableShims["cpu"], model, adapters, projectors, numLayers, opts)
 }

filename: llm/llama.cpp/gen_windows.ps1
patch: @@ -49,6 +49,9 @@ function install {
     md "${script:buildDir}/lib" -ea 0 > $null
     cp "${script:buildDir}/bin/${script:config}/ext_server_shared.dll" "${script:buildDir}/lib"
     cp "${script:buildDir}/bin/${script:config}/llama.dll" "${script:buildDir}/lib"
+
+    # Display the dll dependencies in the build log
+    dumpbin /dependents "${script:buildDir}/bin/${script:config}/ext_server_shared.dll" | select-string ".dll"
 }
 
 function cleanup {

filename: llm/llm.go
patch: @@ -87,7 +87,8 @@ func newLlmServer(library, model string, adapters, projectors []string, numLayer
 		if err == nil {
 			return srv, nil
 		}
-		log.Printf("Failed to load dynamic library - falling back to CPU mode %s", err)
+		log.Printf("Failed to load dynamic library %s - falling back to CPU mode %s", library, err)
+		// TODO - update some state to indicate we were unable to load the GPU library for future "info" ux
 	}
 
 	return newDefaultExtServer(model, adapters, projectors, numLayers, opts)

filename: llm/shim_ext_server_windows.go
patch: @@ -4,21 +4,28 @@ import (
 	"embed"
 	"log"
 	"os"
+	"path/filepath"
 	"strings"
 )
 
 //go:embed llama.cpp/gguf/build/windows/*/lib/*.dll
 var libEmbed embed.FS
 
 func updatePath(dir string) {
+	tmpDir := filepath.Dir(dir)
 	pathComponents := strings.Split(os.Getenv("PATH"), ";")
+	i := 0
 	for _, comp := range pathComponents {
-		// Case incensitive
-		if strings.ToLower(comp) == strings.ToLower(dir) {
+		if strings.EqualFold(comp, dir) {
 			return
 		}
+		// Remove any other prior paths to our temp dir
+		if !strings.HasPrefix(strings.ToLower(comp), strings.ToLower(tmpDir)) {
+			pathComponents[i] = comp
+			i++
+		}
 	}
-	newPath := strings.Join(append(pathComponents, dir), ";")
+	newPath := strings.Join(append([]string{dir}, pathComponents...), ";")
 	log.Printf("Updating PATH to %s", newPath)
 	os.Setenv("PATH", newPath)
 }
Repository: ggml-org/llama.cpp
Pull request: vulkan: support noncontig i32 copy


Changed files:
filename: ggml/src/ggml-vulkan/ggml-vulkan.cpp
patch: @@ -13644,10 +13644,11 @@ static bool ggml_backend_vk_device_supports_op(ggml_backend_dev_t dev, const ggm
                 }
 
                 // We can handle copying from a type to the same type if it's
-                // contiguous (memcpy). We use f16 or f32 shaders to do the copy,
+                // either not quantized or is quantized and contiguous.
+                // We use f16 or f32 shaders to do the copy,
                 // so the type/block size must be a multiple of 4.
                 if (src0_type == src1_type &&
-                    ggml_is_contiguous(op->src[0]) && ggml_is_contiguous(op) &&
+                    (!ggml_is_quantized(src0_type) || (ggml_is_contiguous(op->src[0]) && ggml_is_contiguous(op))) &&
                     (ggml_type_size(src0_type) % 2) == 0) {
                     return true;
                 }
Repository: nodejs/node
Pull request: test: deflake test-buffer-large-size-buffer-alloc-unsafe

Use the error message as another condition to skip the test when the buffer allocation fails.

Refs: https://github.com/nodejs/node/pull/58738

<!--
Before submitting a pull request, please read:

- the CONTRIBUTING guide at https://github.com/nodejs/node/blob/HEAD/CONTRIBUTING.md
- the commit message formatting guidelines at
  https://github.com/nodejs/node/blob/HEAD/doc/contributing/pull-requests.md#commit-message-guidelines

For code changes:
1. Include tests for any bug fixes or new features.
2. Update documentation if relevant.
3. Ensure that `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes.

If you believe this PR should be highlighted in the Node.js CHANGELOG
please add the `notable-change` label.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.
-->


Changed files:
filename: test/pummel/test-buffer-large-size-buffer-alloc-unsafe.js
patch: @@ -7,12 +7,22 @@ common.skipIf32Bits();
 const assert = require('node:assert');
 const size = 2 ** 31;
 
+let largeBuffer;
+
+// Test Buffer.allocUnsafe with size larger than integer range
 try {
-  // Test Buffer.allocUnsafe with size larger than integer range
-  assert.throws(() => Buffer.allocUnsafe(size).toString('utf8'), { code: 'ERR_STRING_TOO_LONG' });
+  largeBuffer = Buffer.allocUnsafe(size);
 } catch (e) {
-  if (e.code !== 'ERR_MEMORY_ALLOCATION_FAILED') {
-    throw e;
+  if (
+    e.code === 'ERR_MEMORY_ALLOCATION_FAILED' ||
+    /Array buffer allocation failed/.test(e.message)
+  ) {
+    common.skip('insufficient space for Buffer.allocUnsafe');
   }
-  common.skip('insufficient space for Buffer.allocUnsafe');
+
+  throw e;
 }
+
+assert.throws(() => largeBuffer.toString('utf8'), {
+  code: 'ERR_STRING_TOO_LONG',
+});
Repository: denoland/deno
Pull request: fix(ext/web): console.dir respects indent level

It looks more natural if you respect the indentation of `console.group`.
`console.dir` on Node.js also respects group indentation, so this improves Node.js compat.

Test code:

```ts
console.dir("1");
console.group();
console.dir("2");
console.group();
console.dir("3");
console.groupEnd();
console.dir("4");
console.groupEnd();
console.dir("5");
```

current output:
```sh
1
2
3
4
5
```

this pr output:
```sh
1
  2
    3
  4
5
```

Changed files:
filename: ext/web/01_console.js
patch: @@ -3172,6 +3172,7 @@ class Console {
     this.#printFunc(
       inspectArgs([obj], {
         ...getConsoleInspectOptions(noColorStdout()),
+        indentLevel: this.indentLevel,
         ...options,
       }) + "\n",
       1,

filename: tests/unit/console_test.ts
patch: @@ -1523,6 +1523,32 @@ Deno.test(function consoleGroup() {
   });
 });
 
+// console.group with console.dir test
+Deno.test(function consoleGroupDir() {
+  mockConsole((console, out) => {
+    console.dir("1");
+    console.group();
+    console.dir("2");
+    console.group();
+    console.dir("3");
+    console.groupEnd();
+    console.dir("4");
+    console.groupEnd();
+    console.dir("5");
+
+    // console.dir should respect group indentation
+    assertEquals(
+      out.toString(),
+      `1
+  2
+    3
+  4
+5
+`,
+    );
+  });
+});
+
 // console.group with console.warn test
 Deno.test(function consoleGroupWarn() {
   mockConsole((console, _out, _err, both) => {
Repository: ollama/ollama
Pull request: fix: pull either original model or from model on create

I created a bug here when accounting for the "pull parent model" case when pull gguf models on deprecated ggml models. In the case of a Modelfile like this:
```
FROM orca-mini
SYSTEM "you are mario"
```
where orca-mini is a `ggml` library model there is no `ParentModel` and the model itself should be pulled.

This handles both:
```
FROM orca-mini
SYSTEM "you are mario"
```
and a child:
```
FROM mario
PARAMETER temperature 0
```
correctly and will pull the root model for both cases.

Changed files:
filename: server/images.go
patch: @@ -485,9 +485,15 @@ func CreateModel(ctx context.Context, name, modelFileDir string, commands []pars
 					if err != nil {
 						return err
 					}
-					if err := PullModel(ctx, parent.OriginalModel, &RegistryOptions{}, fn); err != nil {
-						log.Printf("error pulling model: %v", err)
+
+					originalModel := parent.OriginalModel
+					if originalModel == "" {
+						originalModel = parent.ShortName
+					}
+					if err := PullModel(ctx, originalModel, &RegistryOptions{}, fn); err != nil {
+						log.Printf("error pulling parent model: %v", err)
 					}
+
 					// Reset the file pointer to the beginning of the file
 					_, err = fromConfigFile.Seek(0, 0)
 					if err != nil {
Repository: ollama/ollama
Pull request: Improve maintainability of Radeon card list

This moves the list of AMD GPUs to an easier to maintain list which should make it easier to update over time.

Changed files:
filename: llm/llama.cpp/gen_linux.sh
patch: @@ -16,6 +16,28 @@
 set -ex
 set -o pipefail
 
+# See https://llvm.org/docs/AMDGPUUsage.html#processors for reference
+amdGPUs() {
+    GPU_LIST=(
+        "gfx803"
+        "gfx900"
+        "gfx906:xnack-"
+        "gfx908:xnack-"
+        "gfx90a:xnack+"
+        "gfx90a:xnack-"
+        "gfx1010"
+        "gfx1012"
+        "gfx1030"
+        "gfx1100"
+        "gfx1101"
+        "gfx1102"
+    )
+    (
+        IFS=$';'
+        echo "'${GPU_LIST[*]}'"
+    )
+}
+
 echo "Starting linux generate script"
 if [ -z "${CUDACXX}" -a -x /usr/local/cuda/bin/nvcc ]; then
     export CUDACXX=/usr/local/cuda/bin/nvcc
@@ -75,7 +97,7 @@ fi
 if [ -d "${ROCM_PATH}" ]; then
     echo "ROCm libraries detected - building dynamic ROCm library"
     init_vars
-    CMAKE_DEFS="${COMMON_CMAKE_DEFS} ${CMAKE_DEFS} -DLLAMA_HIPBLAS=on -DCMAKE_C_COMPILER=$ROCM_PATH/llvm/bin/clang -DCMAKE_CXX_COMPILER=$ROCM_PATH/llvm/bin/clang++ -DAMDGPU_TARGETS='gfx803;gfx900;gfx906:xnack-;gfx908:xnack-;gfx90a:xnack+;gfx90a:xnack-;gfx1010;gfx1012;gfx1030;gfx1100;gfx1101;gfx1102' -DGPU_TARGETS='gfx803;gfx900;gfx906:xnack-;gfx908:xnack-;gfx90a:xnack+;gfx90a:xnack-;gfx1010;gfx1012;gfx1030;gfx1100;gfx1101;gfx1102'"
+    CMAKE_DEFS="${COMMON_CMAKE_DEFS} ${CMAKE_DEFS} -DLLAMA_HIPBLAS=on -DCMAKE_C_COMPILER=$ROCM_PATH/llvm/bin/clang -DCMAKE_CXX_COMPILER=$ROCM_PATH/llvm/bin/clang++ -DAMDGPU_TARGETS=$(amdGPUs) -DGPU_TARGETS=$(amdGPUs)"
     BUILD_DIR="gguf/build/linux/rocm"
     build
     install
Repository: denoland/deno
Pull request: fix(check): move unknown builtin node: module errors to tsc diagnostics


Changed files:
filename: cli/graph_util.rs
patch: @@ -297,10 +297,10 @@ pub fn resolution_error_for_tsc_diagnostic(
       | NodeJsErrorCode::ERR_UNSUPPORTED_ESM_URL_SCHEME
       | NodeJsErrorCode::ERR_INVALID_FILE_URL_PATH
       | NodeJsErrorCode::ERR_PACKAGE_IMPORT_NOT_DEFINED
-      | NodeJsErrorCode::ERR_UNKNOWN_BUILTIN_MODULE
       | NodeJsErrorCode::ERR_PACKAGE_PATH_NOT_EXPORTED
       | NodeJsErrorCode::ERR_TYPES_NOT_FOUND => false,
-      NodeJsErrorCode::ERR_MODULE_NOT_FOUND => true,
+      NodeJsErrorCode::ERR_MODULE_NOT_FOUND
+      | NodeJsErrorCode::ERR_UNKNOWN_BUILTIN_MODULE => true,
     }
   }
 

filename: tests/specs/check/unknown_builtin_node_module/__test__.jsonc
patch: @@ -0,0 +1,5 @@
+{
+  "args": "check main.ts",
+  "exitCode": 1,
+  "output": "check.out"
+}

filename: tests/specs/check/unknown_builtin_node_module/check.out
patch: @@ -0,0 +1,6 @@
+Download [WILDCARD]
+Check main.ts
+TS2307 [ERROR]: Cannot find module 'node:unknown'.
+    at file:///[WILDLINE]/main.ts:3:24
+
+error: Type checking failed.

filename: tests/specs/check/unknown_builtin_node_module/main.ts
patch: @@ -0,0 +1,5 @@
+import * as test1 from "node:path";
+import * as test2 from "node:trace_events";
+import * as test3 from "node:unknown";
+
+console.log(test1, test2, test3);
Repository: vercel/next.js
Pull request: examples(with-supabase): fix import statement in tutorial

Fixed import statements in tutorial code to point to files in the correct folders.

Changed files:
filename: examples/with-supabase/components/tutorial/fetch-data-steps.tsx
patch: @@ -18,7 +18,7 @@ create policy "Allow public read access" on notes
 for select
 using (true);`.trim();
 
-const server = `import { createClient } from '@/utils/supabase/server'
+const server = `import { createClient } from '@/lib/supabase/server'
 
 export default async function Page() {
   const supabase = await createClient()
@@ -30,7 +30,7 @@ export default async function Page() {
 
 const client = `'use client'
 
-import { createClient } from '@/utils/supabase/client'
+import { createClient } from '@/lib/supabase/client'
 import { useEffect, useState } from 'react'
 
 export default function Page() {
Repository: ollama/ollama
Pull request: Fail fast on WSL1 while allowing on WSL2

This prevents users from accidentally installing on WSL1 with instructions guiding how to upgrade their WSL instance to version 2.  Once running WSL2 if you have an NVIDIA card, you can follow their instructions to set up GPU passthrough and run models on the GPU.  This is not possible on WSL1.


Example output.

WSL1
```
daniel@DESKTOP-PUNI632:/mnt/c/Users/Daniel$ ./install.sh
ERROR WSL1 is not currently supported - please upgrade to WSL2 with 'wsl --set-version <distro> 2'
daniel@DESKTOP-PUNI632:/mnt/c/Users/Daniel$ uname -r
4.4.0-19041-Microsoft
```

WSL2
```
root@DESKTOP-PUNI632:/mnt/c/Users/Daniel# ./install.sh
>>> Downloading ollama...
################################################################################################################# 100.0% 
...
root@DESKTOP-PUNI632:/mnt/c/Users/Daniel# uname -r
5.15.133.1-microsoft-standard-WSL2
```


Changed files:
filename: scripts/install.sh
patch: @@ -33,6 +33,14 @@ case "$ARCH" in
     *) error "Unsupported architecture: $ARCH" ;;
 esac
 
+KERN=$(uname -r)
+case "$KERN" in
+    *icrosoft*WSL2 | *icrosoft*wsl2) ;;
+    *icrosoft) error "Microsoft WSL1 is not currently supported. Please upgrade to WSL2 with 'wsl --set-version <distro> 2'" ;;
+    *) ;;
+esac
+
+
 SUDO=
 if [ "$(id -u)" -ne 0 ]; then
     # Running as root, no need for sudo
Repository: ollama/ollama
Pull request: Fix CPU only builds

Go embed doesn't like when there's no matching files, so put a dummy placeholder in to allow building without any GPU support If no "server" library is found, it's safely ignored at runtime.

Changed files:
filename: llm/llama.cpp/gen_linux.sh
patch: @@ -35,6 +35,9 @@ BUILD_DIR="gguf/build/linux/cpu"
 build
 install
 
+# Placeholder to keep go embed happy until we start building dynamic CPU lib variants
+touch ${BUILD_DIR}/lib/dummy.so
+
 if [ -d /usr/local/cuda/lib64/ ]; then
     echo "CUDA libraries detected - building dynamic CUDA library"
     init_vars

filename: llm/shim_ext_server.go
patch: @@ -147,9 +147,9 @@ func extractDynamicLibs(workDir, glob string) ([]string, error) {
 	if err != nil || len(files) == 0 {
 		return nil, payloadMissing
 	}
-	libs := make([]string, len(files))
+	libs := []string{}
 
-	for i, file := range files {
+	for _, file := range files {
 		pathComps := strings.Split(file, "/")
 		if len(pathComps) != 7 {
 			log.Printf("unexpected payload components: %v", pathComps)
@@ -169,7 +169,7 @@ func extractDynamicLibs(workDir, glob string) ([]string, error) {
 
 		destFile := filepath.Join(targetDir, filepath.Base(file))
 		if strings.Contains(destFile, "server") {
-			libs[i] = destFile
+			libs = append(libs, destFile)
 		}
 
 		_, err = os.Stat(destFile)
Repository: facebook/react
Pull request: compiler: Handle TSNonNullAssertion expressions

## Summary

We ran React compiler against part of our codebase and collected compiler errors. One of the more common non-actionable errors is caused by usage of the `!` TypeScript non-null assertion operation:

```
(BuildHIR::lowerExpression) Handle TSNonNullExpression expressions
```

It seems like React Compiler _should_ be able to support this by just ignoring the syntax and using the underlying expression. I'm sure a lot of our non-null assertion usage should not exist and I understand if React Compiler does not want to support this syntax. It wasn't obvious to me if this omission was intentional or if there are future plans to use `TSNonNullExpression` as part of the compiler's analysis. If there are no future plans it seems like just ignoring it should be fine. 

## How did you test this change?

```sh
❯ yarn snap --filter
yarn run v1.17.3
$ yarn workspace babel-plugin-react-compiler run snap --filter
$ node ../snap/dist/main.js --filter
 PASS  non-null-assertion
1 Tests, 1 Passed, 0 Failed
```

Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/HIR/BuildHIR.ts
patch: @@ -2407,6 +2407,10 @@ function lowerExpression(
         loc: expr.node.loc ?? GeneratedSource,
       };
     }
+    case "TSNonNullExpression": {
+      let expr = exprPath as NodePath<t.TSNonNullExpression>;
+      return lowerExpression(builder, expr.get("expression"));
+    }
     default: {
       builder.errors.push({
         reason: `(BuildHIR::lowerExpression) Handle ${exprPath.type} expressions`,

filename: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/non-null-assertion.expect.md
patch: @@ -0,0 +1,49 @@
+
+## Input
+
+```javascript
+interface ComponentProps {
+  name?: string;
+}
+
+function Component(props: ComponentProps) {
+  return props.name!.toUpperCase();
+}
+
+export const FIXTURE_ENTRYPOINT = {
+  fn: Component,
+  params: [{ name: "Alice" }],
+};
+
+```
+
+## Code
+
+```javascript
+import { c as _c } from "react/compiler-runtime";
+interface ComponentProps {
+  name?: string;
+}
+
+function Component(props) {
+  const $ = _c(2);
+  let t0;
+  if ($[0] !== props.name) {
+    t0 = props.name.toUpperCase();
+    $[0] = props.name;
+    $[1] = t0;
+  } else {
+    t0 = $[1];
+  }
+  return t0;
+}
+
+export const FIXTURE_ENTRYPOINT = {
+  fn: Component,
+  params: [{ name: "Alice" }],
+};
+
+```
+      
+### Eval output
+(kind: ok) "ALICE"
\ No newline at end of file

filename: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/non-null-assertion.ts
patch: @@ -0,0 +1,12 @@
+interface ComponentProps {
+  name?: string;
+}
+
+function Component(props: ComponentProps) {
+  return props.name!.toUpperCase();
+}
+
+export const FIXTURE_ENTRYPOINT = {
+  fn: Component,
+  params: [{ name: "Alice" }],
+};