helloadhavan/github_issues huggingface dataset:
Repository: vercel/next.js
Pull request: disable sub shell generation test outside of adapter

These tests have started failing in deploy mode in environments outside of the new Vercel adapter. Shell related behavior is changing as part of the new `partialFallbacks` flag and will not be backported to the old CLI, so this gates the test to ensure it runs in the right deployment environment. 

Changed files:
filename: test/e2e/app-dir/sub-shell-generation-middleware/sub-shell-generation-middleware.test.ts
patch: @@ -3,9 +3,14 @@ import * as cheerio from 'cheerio'
 import { getCacheHeader, retry } from 'next-test-utils'
 import { computeCacheBustingSearchParam } from 'next/dist/shared/lib/router/utils/cache-busting-search-param'
 
+const isAdapterTest = Boolean(process.env.NEXT_ENABLE_ADAPTER)
+
 describe('middleware-static-rewrite', () => {
   const { next, isNextDeploy, isNextDev } = nextTestSetup({
     files: __dirname,
+    // The latest changes to support this behavior on deployed infra are available in the adapter,
+    // and are not being backported to the CLI
+    skipDeployment: !isAdapterTest,
   })
 
   if (isNextDev) {

filename: test/e2e/app-dir/sub-shell-generation/sub-shell-generation.test.ts
patch: @@ -1,9 +1,14 @@
 import { nextTestSetup } from 'e2e-utils'
 import * as cheerio from 'cheerio'
 
+const isAdapterTest = Boolean(process.env.NEXT_ENABLE_ADAPTER)
+
 describe('sub-shell-generation', () => {
   const { next, isNextDev, isNextDeploy } = nextTestSetup({
     files: __dirname,
+    // The latest changes to support this behavior on deployed infra are available in the adapter,
+    // and are not being backported to the CLI
+    skipDeployment: !isAdapterTest,
   })
 
   if (isNextDev) {
Repository: ollama/ollama
Pull request: fix: add -O3 optimization to CGO flags

CGO_CFLAGS and CGO_CXXFLAGS were being set without optimization flags, which overrides Go's default -O2 and results in unoptimized C++ code.

This caused performance degradation in release builds compared to local `go build` which uses the default optimization.

- build_darwin.sh: add -O3 to CGO_CFLAGS and CGO_CXXFLAGS exports
- Dockerfile: preserve CGO_CFLAGS/CGO_CXXFLAGS from build args instead of overwriting them
- app/README.md: update documentation to include -O3

Changed files:
filename: Dockerfile
patch: @@ -169,8 +169,10 @@ COPY . .
 RUN git clone --depth 1 --branch "$(cat MLX_VERSION)" https://github.com/ml-explore/mlx-c.git build/_deps/mlx-c-src
 ARG GOFLAGS="'-ldflags=-w -s'"
 ENV CGO_ENABLED=1
-ENV CGO_CFLAGS="-I/go/src/github.com/ollama/ollama/build/_deps/mlx-c-src"
+ARG CGO_CFLAGS
 ARG CGO_CXXFLAGS
+ENV CGO_CFLAGS="${CGO_CFLAGS} -I/go/src/github.com/ollama/ollama/build/_deps/mlx-c-src"
+ENV CGO_CXXFLAGS="${CGO_CXXFLAGS}"
 RUN --mount=type=cache,target=/root/.cache/go-build \
     go build -tags mlx -trimpath -buildmode=pie -o /bin/ollama .
 

filename: app/README.md
patch: @@ -75,9 +75,9 @@ The `-dev` flag enables:
 CI builds with Xcode 14.1 for OS compatibility prior to v13.  If you want to manually build v11+ support, you can download the older Xcode [here](https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_14.1/Xcode_14.1.xip), extract, then `mv ./Xcode.app /Applications/Xcode_14.1.0.app` then activate with:
 
 ```
-export CGO_CFLAGS=-mmacosx-version-min=12.0
-export CGO_CXXFLAGS=-mmacosx-version-min=12.0
-export CGO_LDFLAGS=-mmacosx-version-min=12.0
+export CGO_CFLAGS="-O3 -mmacosx-version-min=12.0"
+export CGO_CXXFLAGS="-O3 -mmacosx-version-min=12.0"
+export CGO_LDFLAGS="-mmacosx-version-min=12.0"
 export SDKROOT=/Applications/Xcode_14.1.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
 export DEVELOPER_DIR=/Applications/Xcode_14.1.0.app/Contents/Developer
 ```

filename: scripts/build_darwin.sh
patch: @@ -14,8 +14,8 @@
 VOL_NAME=${VOL_NAME:-"Ollama"}
 export VERSION=${VERSION:-$(git describe --tags --first-parent --abbrev=7 --long --dirty --always | sed -e "s/^v//g")}
 export GOFLAGS="'-ldflags=-w -s \"-X=github.com/ollama/ollama/version.Version=${VERSION#v}\" \"-X=github.com/ollama/ollama/server.mode=release\"'"
-export CGO_CFLAGS="-mmacosx-version-min=14.0"
-export CGO_CXXFLAGS="-mmacosx-version-min=14.0"
+export CGO_CFLAGS="-O3 -mmacosx-version-min=14.0"
+export CGO_CXXFLAGS="-O3 -mmacosx-version-min=14.0"
 export CGO_LDFLAGS="-mmacosx-version-min=14.0"
 
 set -e

filename: scripts/build_windows.ps1
patch: @@ -56,6 +56,12 @@ function checkEnv {
 
     $script:DIST_DIR="${script:SRC_DIR}\dist\windows-${script:TARGET_ARCH}"
     $env:CGO_ENABLED="1"
+    if (-not $env:CGO_CFLAGS) {
+        $env:CGO_CFLAGS = "-O3"
+    }
+    if (-not $env:CGO_CXXFLAGS) {
+        $env:CGO_CXXFLAGS = "-O3"
+    }
     Write-Output "Checking version"
     if (!$env:VERSION) {
         $data=(git describe --tags --first-parent --abbrev=7 --long --dirty --always)
Repository: huggingface/transformers
Pull request: Fix `layer_types` type hint for `AFMoE` and `Llama4`

`Llama4`'s was incorrect and causing `StrictDataclassFieldValidationErrors`.

`AFMoE`'s was was fine but now it's more specific.

Changed files:
filename: src/transformers/models/afmoe/configuration_afmoe.py
patch: @@ -87,7 +87,7 @@ class AfmoeConfig(PreTrainedConfig):
     output_router_logits: bool = False
     global_attn_every_n_layers: int | None = 4
     sliding_window: int | None = 1024
-    layer_types: list | None = None
+    layer_types: list[str] | None = None
     attention_dropout: float | int | None = 0.0
     mup_enabled: bool | None = False
     eos_token_id: int | list[int] | None = None

filename: src/transformers/models/llama4/configuration_llama4.py
patch: @@ -166,7 +166,7 @@ class Llama4TextConfig(PreTrainedConfig):
     no_rope_layers: list[int] | None = None
     no_rope_layer_interval: int = 4
     attention_chunk_size: int = 8192
-    layer_types: list[int] | None = None
+    layer_types: list[str] | None = None
     attn_temperature_tuning: bool = True
     floor_scale: int = 8192
     attn_scale: float = 0.1
Repository: ollama/ollama
Pull request: qwen3next: avoid inplace sigmoid for shared gate

Fixes https://github.com/ollama/ollama/issues/14076

Changed files:
filename: ml/backend.go
patch: @@ -175,6 +175,7 @@ type Tensor interface {
 	SILU(ctx Context, up ...Tensor) Tensor
 	RELU(ctx Context, up ...Tensor) Tensor
 	Sigmoid(ctx Context) Tensor
+	SigmoidOut(ctx Context) Tensor
 
 	// AlphaLimitSILU is a variant of SILU that clamps the input to the range [-limit, limit]
 	SILUAlphaLimit(ctx Context, up Tensor, alpha, limit float32) Tensor

filename: ml/backend/ggml/ggml.go
patch: @@ -1468,6 +1468,13 @@ func (t *Tensor) Sigmoid(ctx ml.Context) ml.Tensor {
 	}
 }
 
+func (t *Tensor) SigmoidOut(ctx ml.Context) ml.Tensor {
+	return &Tensor{
+		b: t.b,
+		t: C.ggml_sigmoid(ctx.(*Context).ctx, t.t),
+	}
+}
+
 func (t *Tensor) View(ctx ml.Context, offset int, shape ...int) ml.Tensor {
 	switch len(shape) {
 	case 1:

filename: model/models/qwen3next/model.go
patch: @@ -135,7 +135,7 @@ func (mlp *sparse) Forward(ctx ml.Context, hiddenStates ml.Tensor, opts *Options
 		// Apply shared expert gating
 		if mlp.SharedGateInp != nil {
 			sharedGateVal := mlp.SharedGateInp.Forward(ctx, hiddenStates2D)
-			sharedGateVal = sharedGateVal.Sigmoid(ctx)
+			sharedGateVal = sharedGateVal.SigmoidOut(ctx)
 			// Broadcast gate to match dimensions
 			sharedGateVal = sharedGateVal.Repeat(ctx, 0, sharedOut.Dim(0))
 			sharedOut = sharedOut.Mul(ctx, sharedGateVal)
Repository: rust-lang/rust
Pull request: Add a test for a now fixed ICE with `offset_of!()`

Adds a test for rust-lang/rust#125805, which was an ICE with `offset_of!()` on a field with the type of a trait object missing `dyn` and a required lifetime parameter.

Closes rust-lang/rust#125805.


Changed files:
filename: tests/ui/offset-of/offset-of-unsized-trait-object-missing-lifetime.rs
patch: @@ -0,0 +1,20 @@
+//@ edition:2021
+// Regression test for #125805.
+// ICE when using `offset_of!` on a field whose type is a bare trait object
+// with a missing lifetime parameter.
+
+trait X<'a> {}
+
+use std::mem::offset_of;
+
+struct T {
+    y: X,
+    //~^ ERROR missing lifetime specifier [E0106]
+    //~| ERROR expected a type, found a trait [E0782]
+}
+
+fn other() {
+    offset_of!(T, y);
+}
+
+fn main() {}

filename: tests/ui/offset-of/offset-of-unsized-trait-object-missing-lifetime.stderr
patch: @@ -0,0 +1,27 @@
+error[E0106]: missing lifetime specifier
+  --> $DIR/offset-of-unsized-trait-object-missing-lifetime.rs:11:8
+   |
+LL |     y: X,
+   |        ^ expected named lifetime parameter
+   |
+help: consider introducing a named lifetime parameter
+   |
+LL ~ struct T<'a> {
+LL ~     y: X<'a>,
+   |
+
+error[E0782]: expected a type, found a trait
+  --> $DIR/offset-of-unsized-trait-object-missing-lifetime.rs:11:8
+   |
+LL |     y: X,
+   |        ^
+   |
+help: you can add the `dyn` keyword if you want a trait object
+   |
+LL |     y: dyn X,
+   |        +++
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0106, E0782.
+For more information about an error, try `rustc --explain E0106`.
Repository: nodejs/node
Pull request: test,crypto: fix conditional SHA3-* skip on BoringSSL

as title suggests

Changed files:
filename: test/parallel/test-webcrypto-sign-verify-rsa.js
patch: @@ -241,13 +241,13 @@ async function testSaltLength(keyLength, hash, hLen) {
       ['SHA-256', 32],
       ['SHA-384', 48],
       ['SHA-512', 64],
-      ['SHA3-256', 32],
-      ['SHA3-384', 48],
-      ['SHA3-512', 64],
+      ...(!process.features.openssl_is_boringssl ? [
+        ['SHA3-256', 32],
+        ['SHA3-384', 48],
+        ['SHA3-512', 64],
+      ] : []),
     ]) {
-      if (hash.startsWith('SHA-3') && !process.features.openssl_is_boringssl) {
-        variations.push(testSaltLength(keyLength, hash, hLen));
-      }
+      variations.push(testSaltLength(keyLength, hash, hLen));
     }
   }
Repository: ollama/ollama
Pull request: qwen3next: fix issue in delta net

`gDiffExp` was being broadcast across the wrong axis when multiplying with k. This fix reshapes `gDiffExp` to [1, chunkSize, nChunks, ...]

Changed files:
filename: model/models/qwen3next/deltanet.go
patch: @@ -406,8 +406,10 @@ func (gdn *GatedDeltaNet) deltaNetChunked(
 	gDiff := gCumsum.Neg(ctx).Add(ctx, gLast)
 	gDiffExp := gDiff.Exp(ctx)
 
-	// key_gdiff = k * exp(g_diff)
-	keyGDiff := k.Mul(ctx, gDiffExp)
+	// Reshapes g_diff_exp to [1, chunkSize, nChunks, ...]
+	gDiffExpReshaped := gDiffExp.Reshape(ctx, 1, chunkSize, nChunks, numVHeads*nSeqs)
+	keyGDiff := k.Mul(ctx, gDiffExpReshaped)
+	keyGDiffT := keyGDiff.Permute(ctx, 1, 0, 2, 3).Contiguous(ctx)
 
 	// Process chunks and update state
 	var coreAttnOut ml.Tensor
@@ -444,12 +446,9 @@ func (gdn *GatedDeltaNet) deltaNetChunked(
 			coreAttnOut = coreAttnOut.Concat(ctx, coreAttnOutChunk, 1)
 		}
 
-		// Update state for next chunk using pre-computed values
+		// Update state for next chunk
 		gExpLastChunk := gLastExp.Slice(ctx, 2, chunk, chunk+1, 1)
-		kGDiffChunk := keyGDiff.Slice(ctx, 2, chunk, chunk+1, 1)
-
-		// kgdmulvnew = key_gdiff^T @ v_new
-		kGDiffChunkT := kGDiffChunk.Permute(ctx, 1, 0, 2, 3).Contiguous(ctx)
+		kGDiffChunkT := keyGDiffT.Slice(ctx, 2, chunk, chunk+1, 1)
 		kgdMulVNew := vNewT.Mulmat(ctx, kGDiffChunkT)
 
 		// state = state * g_last + kgdmulvnew
Repository: huggingface/transformers
Pull request: Fix nemotron_h modular

# What does this PR do?



Changed files:
filename: src/transformers/models/nemotron_h/modeling_nemotron_h.py
patch: @@ -1083,7 +1083,6 @@ class NemotronHPreTrainedModel(PreTrainedModel):
     _keep_in_fp32_modules_strict = [
         "e_score_correction_bias",
     ]
-    _tied_weights_keys = {}
     _keys_to_ignore_on_load_unexpected = [r"mtp.*"]
 
     @torch.no_grad()
@@ -1247,7 +1246,7 @@ def _update_mamba_mask(self, attention_mask, past_key_values):
 class NemotronHForCausalLM(NemotronHPreTrainedModel, GenerationMixin):
     _tied_weights_keys = {}
 
-    def __init__(self, config):
+    def __init__(self, config: NemotronHConfig):
         super().__init__(config)
         self.model = NemotronHModel(config)
         self.vocab_size = config.vocab_size

filename: src/transformers/models/nemotron_h/modular_nemotron_h.py
patch: @@ -354,7 +354,6 @@ class NemotronHPreTrainedModel(PreTrainedModel):
     _keep_in_fp32_modules_strict = [
         "e_score_correction_bias",
     ]
-    _tied_weights_keys = {}
     _keys_to_ignore_on_load_unexpected = [r"mtp.*"]
 
     @torch.no_grad()
@@ -517,10 +516,6 @@ def _update_mamba_mask(self, attention_mask, past_key_values):
 class NemotronHForCausalLM(ZambaForCausalLM):
     _tied_weights_keys = {}
 
-    def __init__(self, config):
-        super().__init__(config)
-        del self._tied_weights_keys
-
     @can_return_tuple
     @auto_docstring
     def forward(
Repository: ollama/ollama
Pull request: runner: discard compute results if sequence replaced mid-batch

If a sequence is replaced in s.seqs while a batch is computing, the old logits can be decoded into the new sequence. This change rechecks the sequence pointer after compute and skips decoding for replaced entries, preventing stale results from being applied.

Changed files:
filename: runner/ollamarunner/runner.go
patch: @@ -740,7 +740,11 @@ func (s *Server) computeBatch(activeBatch batchState) {
 		if seq == nil || nextBatchTokens[i] == nil {
 			continue
 		}
-
+		// If the sequence was replaced while this batch was computing, discard results.
+		if activeBatch.seqs[i] != seq {
+			logutil.Trace("computeBatch: sequence replaced, discarding its results", "batchID", activeBatch.id, "seqIdx", i)
+			continue
+		}
 		seq.lastUpdatedAt = t
 		if seq.numPredicted == 1 {
 			seq.processingDuration = seq.lastUpdatedAt.Sub(seq.startedAt)
Repository: vercel/next.js
Pull request: Enable thin LTO for release builds

# What

Add `lto = "thin"` to the workspace-level `[profile.release]` in `Cargo.toml`.

# Why

Thin LTO enables cross-crate optimization at link time, improving runtime
performance of the final artifacts (next-napi-bindings native module,
turbopack-cli binary, and benchmarks) without the full build time cost of
fat LTO.

# How

Added `lto = "thin"` to the workspace root `[profile.release]` section.
This applies to all release-profile link targets in the workspace, including
binaries, cdylibs, and benchmarks. The `release-with-assertions` and
`release-with-debug` profiles inherit from `release`, so they also benefit.

Changed files:
filename: .github/workflows/build_and_deploy.yml
patch: @@ -21,7 +21,6 @@ env:
   NAPI_CLI_VERSION: 2.18.4
   TURBO_VERSION: 2.8.11
   NODE_LTS_VERSION: 20
-  CARGO_PROFILE_RELEASE_LTO: 'true'
   TURBO_TEAM: 'vercel'
   TURBO_CACHE: 'remote:rw'
   # Without this environment variable, rust-lld will fail because some dependencies defaults to newer version of macOS by default.

filename: Cargo.toml
patch: @@ -45,6 +45,7 @@ opt-level = 1
 opt-level = 3
 
 [profile.release]
+lto = "thin"
 
 [profile.release.package]
 

filename: crates/next-napi-bindings/Cargo.toml
patch: @@ -5,7 +5,7 @@ version = "0.0.0"
 publish = false
 
 [lib]
-crate-type = ["cdylib", "rlib"]
+crate-type = ["cdylib"]
 
 [features]
 # Instead of enabling all the plugin-related functionality by default, make it
Repository: huggingface/transformers
Pull request: Fix CircleCI summary report not showing due to missing dependency

# What does this PR do?

Our beautiful Dashboard is missing ..... damm

Changed files:
filename: .circleci/create_circleci_config.py
patch: @@ -64,6 +64,7 @@ def to_dict(self):
             steps.extend(
                 [
                     "checkout",
+                    {"run": "pip install requests || true"},
                     {"run": """while [[ $(curl --location --request GET "https://circleci.com/api/v2/workflow/$CIRCLE_WORKFLOW_ID/job" --header "Circle-Token: $CCI_TOKEN"| jq -r '.items[]|select(.name != "collection_job")|.status' | grep -c "running") -gt 0 ]]; do sleep 5; done || true"""},
                     {"run": 'python utils/process_circleci_workflow_test_reports.py --workflow_id $CIRCLE_WORKFLOW_ID || true'},
                     {"store_artifacts": {"path": "outputs"}},
Repository: electron/electron
Pull request: fix: fall back to default DPI when GTK returns 0 on Linux

Backport of #50453

See that PR for details.


Notes: none.

Changed files:
filename: shell/browser/printing/printing_utils.cc
patch: @@ -59,6 +59,8 @@ gfx::Size GetDefaultPrinterDPI(const std::u16string& device_name) {
   GtkPrintSettings* print_settings = gtk_print_settings_new();
   int dpi = gtk_print_settings_get_resolution(print_settings);
   g_object_unref(print_settings);
+  if (dpi <= 0)
+    dpi = printing::kDefaultPdfDpi;
   return {dpi, dpi};
 #endif
 }
Repository: facebook/react
Pull request: Defer useDeferredValue updates in Gestures

If an initial value is specified, then it's always used regardless as part of the gesture render.

If a gesture render causes an update, then previously that was not treated as deferred and could therefore be blocking the render. However, a gesture is supposed to flush synchronously ideally. Therefore we should consider these as urgent.

The effect is that useDeferredValue renders the previous state.

Changed files:
filename: packages/react-reconciler/src/ReactFiberLane.js
patch: @@ -621,7 +621,8 @@ export function includesOnlyRetries(lanes: Lanes): boolean {
 export function includesOnlyNonUrgentLanes(lanes: Lanes): boolean {
   // TODO: Should hydration lanes be included here? This function is only
   // used in `updateDeferredValueImpl`.
-  const UrgentLanes = SyncLane | InputContinuousLane | DefaultLane;
+  const UrgentLanes =
+    SyncLane | InputContinuousLane | DefaultLane | GestureLane;
   return (lanes & UrgentLanes) === NoLanes;
 }
 export function includesOnlyTransitions(lanes: Lanes): boolean {
Repository: vercel/next.js
Pull request: Rename SingleModuleReference::asset to SingleModuleReference::module

The field holds a Module, not a generic asset. This aligns the naming with the type it actually stores.

Changed files:
filename: turbopack/crates/turbopack-core/src/reference/mod.rs
patch: @@ -61,30 +61,27 @@ impl ModuleReferences {
 #[derive(ValueToString)]
 #[value_to_string(self.description)]
 pub struct SingleModuleReference {
-    asset: ResolvedVc<Box<dyn Module>>,
+    module: ResolvedVc<Box<dyn Module>>,
     description: RcStr,
 }
 
 #[turbo_tasks::value_impl]
 impl ModuleReference for SingleModuleReference {
     #[turbo_tasks::function]
     fn resolve_reference(&self) -> Vc<ModuleResolveResult> {
-        *ModuleResolveResult::module(self.asset)
+        *ModuleResolveResult::module(self.module)
     }
 }
 
 #[turbo_tasks::value_impl]
 impl SingleModuleReference {
-    /// Create a new instance that resolves to the given asset.
-    #[turbo_tasks::function]
-    pub fn new(asset: ResolvedVc<Box<dyn Module>>, description: RcStr) -> Vc<Self> {
-        Self::cell(SingleModuleReference { asset, description })
-    }
-
-    /// The [`Vc<Box<dyn Module>>`][Module] that this reference resolves to.
+    /// Create a new instance that resolves to the given module.
     #[turbo_tasks::function]
-    pub fn asset(&self) -> Vc<Box<dyn Module>> {
-        *self.asset
+    pub fn new(module: ResolvedVc<Box<dyn Module>>, description: RcStr) -> Vc<Self> {
+        Self::cell(SingleModuleReference {
+            module,
+            description,
+        })
     }
 }
Repository: nodejs/node
Pull request: lib: make SubtleCrypto.supports enumerable

Per [WebIDL § 3.7.7](https://webidl.spec.whatwg.org/#js-operations), static operations use the same "define the operations" algorithm as regular operations:

> To **define the operations** *operations* of interface or namespace *definition* on *target*, given realm *realm*, run the following steps:
>
> 1. For each operation *op* of *operations*:
>    1. If *op* is not exposed in *realm*, then continue.
>    2. Let *method* be the result of creating an operation function given *op*, *definition*, and *realm*.
>    3. Let *modifiable* be **false** if *op* is unforgeable and **true** otherwise.
>    4. Let *desc* be the PropertyDescriptor{[[Value]]: *method*, [[Writable]]: *modifiable*, **[[Enumerable]]: true**, [[Configurable]]: *modifiable*}.
>    5. Let *id* be *op*'s identifier.
>    6. Perform ! DefinePropertyOrThrow(*target*, *id*, *desc*).

The `[[Enumerable]]: true` in step 4 applies to both regular and static operations. JavaScript `static` class methods are non-enumerable by default, so we need to explicitly set `enumerable: true` on `SubtleCrypto.supports` to match the spec just like we do with all other prototype methods.

Changed files:
filename: lib/internal/crypto/webcrypto.js
patch: @@ -1894,6 +1894,10 @@ ObjectDefineProperties(
     },
   });
 
+ObjectDefineProperties(SubtleCrypto, {
+  supports: kEnumerableProperty,
+});
+
 module.exports = {
   Crypto,
   CryptoKey,
Repository: electron/electron
Pull request: fix: fall back to default DPI when GTK returns 0 on Linux

#### Description of Change

`GetDefaultPrinterDPI()` creates a blank GtkPrintSettings and reads its resolution, which returns 0 for uninitialized settings. With DPI=0, `SetPrintableAreaIfValid()` computes a zero scale factor, producing empty page dimensions that fail `PrintMsgPrintParamsIsValid()`.

Fall back to kDefaultPdfDpi (72) when GTK returns 0, matching the existing Windows fallback pattern when CreateDC fails.

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included
- [x] I have built and tested this PR
- [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: none.

Changed files:
filename: shell/browser/printing/printing_utils.cc
patch: @@ -59,6 +59,8 @@ gfx::Size GetDefaultPrinterDPI(const std::u16string& device_name) {
   GtkPrintSettings* print_settings = gtk_print_settings_new();
   int dpi = gtk_print_settings_get_resolution(print_settings);
   g_object_unref(print_settings);
+  if (dpi <= 0)
+    dpi = printing::kDefaultPdfDpi;
   return {dpi, dpi};
 #endif
 }
Repository: nodejs/node
Pull request: doc: enhance clarification about the main field

removed "this" to enhance sentence flow.

because a reader might assume that **this** is referencing the **main** field which is the title of the section.


Changed files:
filename: doc/api/packages.md
patch: @@ -1012,7 +1012,7 @@ added: v0.4.0
 The `"main"` field defines the entry point of a package when imported by name
 via a `node_modules` lookup.  Its value is a path.
 
-When a package has an [`"exports"`][] field, this will take precedence over the
+The [`"exports"`][] field, if it exists, takes precedence over the
 `"main"` field when importing the package by name.
 
 It also defines the script that is used when the [package directory is loaded