helloadhavan/github_issues huggingface dataset:
Repository: huggingface/transformers
Pull request: Fix overriding common_kwargs defaults in processor calls

# What does this PR do?

After https://github.com/huggingface/transformers/pull/40931, the `common_kwargs` (`return_tensors` really) defaults were set after updating them with call kwargs, which mean it's impossible to override the defaults.
This fixes it by setting the common kwargs defaults before updating them with call kwargs, and fixes a test in `test_image_processing_owlv2.py` that was failing because of it (as Owlv2 sets return_tensors to `np` by default for some reasons)

Cc @zucchini-nlp to make sure I'm not missing anything!

Changed files:
filename: src/transformers/processing_utils.py
patch: @@ -1305,6 +1305,13 @@ class MyProcessingKwargs(ProcessingKwargs, CommonKwargs, TextKwargs, ImagesKwarg
         # pass defaults to output dictionary
         output_kwargs.update(default_kwargs)
 
+        # For `common_kwargs` just update all modality-specific kwargs with same key/values
+        common_kwargs = ModelProcessorKwargs._defaults.get("common_kwargs", {})
+        common_kwargs.update(kwargs.get("common_kwargs", {}))
+        if common_kwargs:
+            for kwarg in output_kwargs.values():
+                kwarg.update(common_kwargs)
+
         # update modality kwargs with passed kwargs
         non_modality_kwargs = set(kwargs) - set(output_kwargs)
         for modality, output_kwarg in output_kwargs.items():
@@ -1354,13 +1361,6 @@ class MyProcessingKwargs(ProcessingKwargs, CommonKwargs, TextKwargs, ImagesKwarg
                         f"Keyword argument `{key}` is not a valid argument for this processor and will be ignored."
                     )
 
-        # For `common_kwargs` just update all modality-specific kwargs with same key/values
-        common_kwargs = kwargs.get("common_kwargs", {})
-        common_kwargs.update(ModelProcessorKwargs._defaults.get("common_kwargs", {}))
-        if common_kwargs:
-            for kwarg in output_kwargs.values():
-                kwarg.update(common_kwargs)
-
         return output_kwargs
 
     @classmethod
Repository: ollama/ollama
Pull request: Update generate scripts with new `LLAMA_CUDA` variable, set `HIP_PLATFORM` on Windows to avoid compiler errors


Changed files:
filename: llm/generate/gen_linux.sh
patch: @@ -172,7 +172,7 @@ if [ -d "${CUDA_LIB_DIR}" ]; then
         # Disabling has minimal performance effect while maintaining compatibility. 
         ARM64_DEFS="-DLLAMA_AVX=off -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_CUDA_F16=off"
     fi
-    CMAKE_DEFS="-DLLAMA_CUBLAS=on -DLLAMA_CUDA_FORCE_MMQ=on -DCMAKE_CUDA_ARCHITECTURES=${CMAKE_CUDA_ARCHITECTURES} ${COMMON_CMAKE_DEFS} ${CMAKE_DEFS} ${ARM64_DEFS}"
+    CMAKE_DEFS="-DLLAMA_CUDA=on -DLLAMA_CUDA_FORCE_MMQ=on -DCMAKE_CUDA_ARCHITECTURES=${CMAKE_CUDA_ARCHITECTURES} ${COMMON_CMAKE_DEFS} ${CMAKE_DEFS} ${ARM64_DEFS}"
     BUILD_DIR="../build/linux/${ARCH}/cuda${CUDA_VARIANT}"
     EXTRA_LIBS="-L${CUDA_LIB_DIR} -lcudart -lcublas -lcublasLt -lcuda"
     build

filename: llm/generate/gen_windows.ps1
patch: @@ -242,7 +242,7 @@ if ($null -ne $script:CUDA_LIB_DIR) {
     }
     init_vars
     $script:buildDir="../build/windows/${script:ARCH}/cuda$script:CUDA_VARIANT"
-    $script:cmakeDefs += @("-A", "x64", "-DLLAMA_CUBLAS=ON", "-DLLAMA_AVX=on", "-DLLAMA_AVX2=off", "-DCUDAToolkit_INCLUDE_DIR=$script:CUDA_INCLUDE_DIR", "-DCMAKE_CUDA_ARCHITECTURES=${script:CMAKE_CUDA_ARCHITECTURES}")
+    $script:cmakeDefs += @("-A", "x64", "-DLLAMA_CUDA=ON", "-DLLAMA_AVX=on", "-DLLAMA_AVX2=off", "-DCUDAToolkit_INCLUDE_DIR=$script:CUDA_INCLUDE_DIR", "-DCMAKE_CUDA_ARCHITECTURES=${script:CMAKE_CUDA_ARCHITECTURES}")
     build
     sign
     compress
@@ -261,6 +261,7 @@ if ($null -ne $env:HIP_PATH) {
         "-DCMAKE_C_COMPILER=clang.exe",
         "-DCMAKE_CXX_COMPILER=clang++.exe",
         "-DLLAMA_HIPBLAS=on",
+        "-DHIP_PLATFORM=amd",
         "-DLLAMA_AVX=on",
         "-DLLAMA_AVX2=off",
         "-DCMAKE_POSITION_INDEPENDENT_CODE=on",
Repository: electron/electron
Pull request: feat: add support for --no-experimental-global-navigator

Backport of #47370

See that PR for details.


Notes: add support for `--no-experimental-global-navigator` flag

Changed files:
filename: docs/api/command-line-switches.md
patch: @@ -323,6 +323,10 @@ Set the directory to which all Node.js diagnostic output files are written. Defa
 
 Affects the default output directory of [v8.setHeapSnapshotNearHeapLimit](https://nodejs.org/docs/latest/api/v8.html#v8setheapsnapshotnearheaplimitlimit).
 
+### `--no-experimental-global-navigator`
+
+Disable exposition of [Navigator API][] on the global scope from Node.js.
+
 [app]: app.md
 [append-switch]: command-line.md#commandlineappendswitchswitch-value
 [debugging-main-process]: ../tutorial/debugging-main-process.md
@@ -331,3 +335,4 @@ Affects the default output directory of [v8.setHeapSnapshotNearHeapLimit](https:
 [play-silent-audio]: https://github.com/atom/atom/pull/9485/files
 [ready]: app.md#event-ready
 [severities]: https://source.chromium.org/chromium/chromium/src/+/main:base/logging.h?q=logging::LogSeverity&ss=chromium
+[Navigator API]: https://github.com/nodejs/node/blob/main/doc/api/globals.md#navigator

filename: shell/common/node_bindings.cc
patch: @@ -359,6 +359,7 @@ bool IsAllowedOption(const std::string_view option) {
       "--throw-deprecation",
       "--trace-deprecation",
       "--trace-warnings",
+      "--no-experimental-global-navigator",
   });
 
   if (debug_options.contains(option))

filename: spec/api-utility-process-spec.ts
patch: @@ -780,5 +780,33 @@ describe('utilityProcess module', () => {
       expect(stat.size).to.be.greaterThan(0);
       await fs.rm(tmpDir, { recursive: true });
     });
+
+    it('supports --no-experimental-global-navigator flag', async () => {
+      {
+        const child = utilityProcess.fork(path.join(fixturesPath, 'navigator.js'), [], {
+          stdio: 'ignore'
+        });
+        await once(child, 'spawn');
+        const [data] = await once(child, 'message');
+        expect(data).to.be.true();
+        const exit = once(child, 'exit');
+        expect(child.kill()).to.be.true();
+        await exit;
+      }
+      {
+        const child = utilityProcess.fork(path.join(fixturesPath, 'navigator.js'), [], {
+          stdio: 'ignore',
+          execArgv: [
+            '--no-experimental-global-navigator'
+          ]
+        });
+        await once(child, 'spawn');
+        const [data] = await once(child, 'message');
+        expect(data).to.be.false();
+        const exit = once(child, 'exit');
+        expect(child.kill()).to.be.true();
+        await exit;
+      }
+    });
   });
 });

filename: spec/fixtures/api/utility-process/navigator.js
patch: @@ -0,0 +1 @@
+process.parentPort.postMessage(typeof navigator === 'object');
Repository: nodejs/node
Pull request: crypto: fix subtle.getPublicKey error for secret type key inputs

As per https://wicg.github.io/webcrypto-modern-algos/#SubtleCrypto-method-getPublicKey

> 3. If the cryptographic algorithm identified by algorithm does not support deriving a public key from a private key, then return a Promise rejected with a `NotSupportedError`.

Any secret-type key input should give `NotSupportedError`.

> 8. If the `[[type]]` internal slot of key is not "private", then throw an `InvalidAccessError`.

Public-type key input should give `InvalidAccessError`.

Changed files:
filename: lib/internal/crypto/webcrypto.js
patch: @@ -1090,7 +1090,8 @@ async function getPublicKey(key, keyUsages) {
   });
 
   if (key[kKeyType] !== 'private')
-    throw lazyDOMException('key must be a private key', 'InvalidAccessError');
+    throw lazyDOMException('key must be a private key',
+                           key[kKeyType] === 'secret' ? 'NotSupportedError' : 'InvalidAccessError');
 
   const keyObject = createPublicKey(key[kKeyObject]);
 

filename: test/parallel/test-webcrypto-get-public-key.mjs
patch: @@ -41,11 +41,16 @@ for await (const { privateKey } of [
     name: 'SyntaxError',
     message: /Unsupported key usage/
   });
+
+  await assert.rejects(() => subtle.getPublicKey(publicKey, publicKey.usages), {
+    name: 'InvalidAccessError',
+    message: 'key must be a private key'
+  });
 }
 
 const secretKey = await subtle.generateKey(
   { name: 'AES-CBC', length: 128 }, true, ['encrypt', 'decrypt']);
 await assert.rejects(() => subtle.getPublicKey(secretKey, ['encrypt', 'decrypt']), {
-  name: 'InvalidAccessError',
+  name: 'NotSupportedError',
   message: 'key must be a private key'
 });
Repository: electron/electron
Pull request: feat: add support for --no-experimental-global-navigator

Backport of #47370

See that PR for details.


Notes: add support for `--no-experimental-global-navigator` flag

Changed files:
filename: docs/api/command-line-switches.md
patch: @@ -325,6 +325,10 @@ Set the directory to which all Node.js diagnostic output files are written. Defa
 
 Affects the default output directory of [v8.setHeapSnapshotNearHeapLimit](https://nodejs.org/docs/latest/api/v8.html#v8setheapsnapshotnearheaplimitlimit).
 
+### `--no-experimental-global-navigator`
+
+Disable exposition of [Navigator API][] on the global scope from Node.js.
+
 [app]: app.md
 [append-switch]: command-line.md#commandlineappendswitchswitch-value
 [debugging-main-process]: ../tutorial/debugging-main-process.md
@@ -333,3 +337,4 @@ Affects the default output directory of [v8.setHeapSnapshotNearHeapLimit](https:
 [play-silent-audio]: https://github.com/atom/atom/pull/9485/files
 [ready]: app.md#event-ready
 [severities]: https://source.chromium.org/chromium/chromium/src/+/main:base/logging.h?q=logging::LogSeverity&ss=chromium
+[Navigator API]: https://github.com/nodejs/node/blob/main/doc/api/globals.md#navigator

filename: shell/common/node_bindings.cc
patch: @@ -375,6 +375,7 @@ bool IsAllowedOption(const std::string_view option) {
       "--throw-deprecation",
       "--trace-deprecation",
       "--trace-warnings",
+      "--no-experimental-global-navigator",
   });
 
   if (debug_options.contains(option))

filename: spec/api-utility-process-spec.ts
patch: @@ -800,5 +800,33 @@ describe('utilityProcess module', () => {
       expect(stat.size).to.be.greaterThan(0);
       await fs.rm(tmpDir, { recursive: true });
     });
+
+    it('supports --no-experimental-global-navigator flag', async () => {
+      {
+        const child = utilityProcess.fork(path.join(fixturesPath, 'navigator.js'), [], {
+          stdio: 'ignore'
+        });
+        await once(child, 'spawn');
+        const [data] = await once(child, 'message');
+        expect(data).to.be.true();
+        const exit = once(child, 'exit');
+        expect(child.kill()).to.be.true();
+        await exit;
+      }
+      {
+        const child = utilityProcess.fork(path.join(fixturesPath, 'navigator.js'), [], {
+          stdio: 'ignore',
+          execArgv: [
+            '--no-experimental-global-navigator'
+          ]
+        });
+        await once(child, 'spawn');
+        const [data] = await once(child, 'message');
+        expect(data).to.be.false();
+        const exit = once(child, 'exit');
+        expect(child.kill()).to.be.true();
+        await exit;
+      }
+    });
   });
 });

filename: spec/fixtures/api/utility-process/navigator.js
patch: @@ -0,0 +1 @@
+process.parentPort.postMessage(typeof navigator === 'object');
Repository: denoland/deno
Pull request: fix(ext/node): "node:readline" handles emoji width correctly

## Summary
- Characters with the Unicode `Emoji_Presentation` property (like ⚡ U+26A1) are rendered as width 2 in terminals, but `getStringWidth` was returning 1 since they aren't classified as East Asian Wide. This caused cursor positioning issues in `node:readline` when emoji were used in prompts.
- Added a `\p{Emoji_Presentation}` regex check in `getStringWidth` to properly detect emoji that should be wide
- Extended `isFullWidthCodePoint` to cover missing SMP emoji ranges (Transport/Map Symbols 0x1F680-0x1F6FF, Supplemental Symbols 0x1F900-0x1F9FF, Chess Symbols 0x1FA00-0x1FA6F, Symbols Extended-A 0x1FA70-0x1FAFF)

Closes #30042

## Test plan
- [x] Verified `⚡` prompt now reports correct cursor position (cols=3 for "⚡ " instead of cols=2)
- [x] Verified other Emoji_Presentation=Yes characters (🚀, 🤔, ⌚, 🩺) also report width 2
- [x] Verified non-emoji-presentation characters (like ☀ without VS16) still report width 1
- [x] Verified ASCII and CJK characters are unaffected
- [ ] Run existing readline spec tests
- [ ] Run `test-icu-stringwidth` node compat test

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Changed files:
filename: ext/node/polyfills/internal/util/inspect.mjs
patch: @@ -286,6 +286,8 @@ const ansiPattern = "[\\u001B\\u009B][[\\]()#;?]*" +
   "|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))";
 const ansi = new SafeRegExp(ansiPattern, "g");
 
+const reEmojiPresentation = new SafeRegExp("^\\p{Emoji_Presentation}$", "u");
+
 /**
  * Returns the number of columns required to display the given string.
  */
@@ -298,7 +300,10 @@ export function getStringWidth(str, removeControlChars = true) {
   str = StringPrototypeNormalize(str, "NFC");
   for (const char of new SafeStringIterator(str)) {
     const code = StringPrototypeCodePointAt(char, 0);
-    if (isFullWidthCodePoint(code)) {
+    if (
+      isFullWidthCodePoint(code) ||
+      RegExpPrototypeTest(reEmojiPresentation, char)
+    ) {
       width += 2;
     } else if (!isZeroWidthCodePoint(code)) {
       width++;
@@ -345,6 +350,14 @@ const isFullWidthCodePoint = (code) => {
     // Miscellaneous Symbols and Pictographs 0x1f300 - 0x1f5ff
     // Emoticons 0x1f600 - 0x1f64f
     (code >= 0x1f300 && code <= 0x1f64f) ||
+    // Transport and Map Symbols
+    (code >= 0x1f680 && code <= 0x1f6ff) ||
+    // Supplemental Symbols and Pictographs
+    (code >= 0x1f900 && code <= 0x1f9ff) ||
+    // Chess Symbols
+    (code >= 0x1fa00 && code <= 0x1fa6f) ||
+    // Symbols and Pictographs Extended-A
+    (code >= 0x1fa70 && code <= 0x1faff) ||
     // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
     (code >= 0x20000 && code <= 0x3fffd)
   );
Repository: ollama/ollama
Pull request: no rope parameters

rope parameters should be omitted because the model should set it

Changed files:
filename: api/types.go
patch: @@ -121,8 +121,6 @@ type Runner struct {
 	VocabOnly          bool    `json:"vocab_only,omitempty"`
 	UseMMap            bool    `json:"use_mmap,omitempty"`
 	UseMLock           bool    `json:"use_mlock,omitempty"`
-	RopeFrequencyBase  float32 `json:"rope_frequency_base,omitempty"`
-	RopeFrequencyScale float32 `json:"rope_frequency_scale,omitempty"`
 	NumThread          int     `json:"num_thread,omitempty"`
 }
 
@@ -383,8 +381,6 @@ func DefaultOptions() Options {
 		Runner: Runner{
 			// options set when the model is loaded
 			NumCtx:             2048,
-			RopeFrequencyBase:  10000.0,
-			RopeFrequencyScale: 1.0,
 			NumBatch:           512,
 			NumGPU:             -1, // -1 here indicates that NumGPU should be set dynamically
 			NumGQA:             1,

filename: convert/convert.go
patch: @@ -32,7 +32,6 @@ type Params struct {
 	AttentionHeads   int      `json:"num_attention_heads"` // n_head
 	KeyValHeads      int      `json:"num_key_value_heads"`
 	NormEPS          float64  `json:"rms_norm_eps"`
-	RopeFreqBase     float64  `json:"rope_theta"`
 	BoSTokenID       int      `json:"bos_token_id"`
 	EoSTokenID       int      `json:"eos_token_id"`
 	HeadDimension    int      `json:"head_dim"`

filename: convert/mistral.go
patch: @@ -144,7 +144,6 @@ func (m *MistralModel) WriteGGUF() (string, error) {
 		"llama.attention.head_count":             uint32(m.Params.AttentionHeads),
 		"llama.attention.head_count_kv":          uint32(m.Params.KeyValHeads),
 		"llama.attention.layer_norm_rms_epsilon": float32(m.Params.NormEPS),
-		"llama.rope.freq_base":                   float32(m.Params.RopeFreqBase),
 		"general.file_type":                      uint32(1),
 		"tokenizer.ggml.model":                   "llama",
 

filename: llm/server.go
patch: @@ -172,14 +172,6 @@ func NewLlamaServer(model string, adapters, projectors []string, opts api.Option
 		params = append(params, "--main-gpu", fmt.Sprintf("%d", opts.MainGPU))
 	}
 
-	if opts.RopeFrequencyBase > 0 {
-		params = append(params, "--rope-freq-base", fmt.Sprintf("%f", opts.RopeFrequencyBase))
-	}
-
-	if opts.RopeFrequencyScale > 0 {
-		params = append(params, "--rope-freq-scale", fmt.Sprintf("%f", opts.RopeFrequencyScale))
-	}
-
 	if len(adapters) > 0 {
 		// TODO: applying multiple adapters is not supported by the llama.cpp server yet
 		params = append(params, "--lora", adapters[0])
Repository: ggml-org/llama.cpp
Pull request: mtmd: explicitly forbidden inclusion of private header and libcommon

This is a foolproof solution against misuse of internal mtmd headers and libcommon

These changes can potentially be overlooked on some PRs when there are a lot of code changing. Notably https://github.com/ggml-org/llama.cpp/pull/16910 ; other examples can be: https://github.com/ggml-org/llama.cpp/pull/17223, https://github.com/ggml-org/llama.cpp/pull/17914

Changed files:
filename: tools/mtmd/CMakeLists.txt
patch: @@ -53,6 +53,15 @@ if (TARGET BUILD_INFO)
     add_dependencies(mtmd-helper BUILD_INFO)
 endif()
 
+# if mtmd is linked against common, we throw an error
+if (TARGET mtmd)
+    get_target_property(libs mtmd LINK_LIBRARIES)
+    if (libs AND "common" IN_LIST libs)
+        message(FATAL_ERROR "mtmd is designed to be a public library.\n"
+                            "It must not link against common")
+    endif()
+endif()
+
 add_executable(llama-llava-cli    deprecation-warning.cpp)
 add_executable(llama-gemma3-cli   deprecation-warning.cpp)
 add_executable(llama-minicpmv-cli deprecation-warning.cpp)

filename: tools/mtmd/clip-impl.h
patch: @@ -13,6 +13,8 @@
 
 // Internal header for clip.cpp
 
+#define MTMD_INTERNAL_HEADER
+
 #define KEY_FTYPE               "general.file_type"
 #define KEY_NAME                "general.name"
 #define KEY_DESCRIPTION         "general.description"

filename: tools/mtmd/clip.h
patch: @@ -7,6 +7,8 @@
 
 // !!! Internal header, to be used by mtmd only !!!
 
+#define MTMD_INTERNAL_HEADER
+
 struct clip_ctx;
 
 struct clip_image_size {

filename: tools/mtmd/mtmd-audio.h
patch: @@ -6,6 +6,8 @@
 #include <vector>
 #include <string>
 
+#define MTMD_INTERNAL_HEADER
+
 #define WHISPER_ASSERT GGML_ASSERT
 
 #define WHISPER_SAMPLE_RATE 16000

filename: tools/mtmd/mtmd-helper.cpp
patch: @@ -32,6 +32,10 @@
 #define STB_IMAGE_IMPLEMENTATION
 #include "stb/stb_image.h"
 
+#ifdef MTMD_INTERNAL_HEADER
+#error "mtmd-helper is a public library outside of mtmd. it must not include internal headers"
+#endif
+
 //
 // internal logging functions
 //
Repository: facebook/react
Pull request: [Fiber/DevTools] Stop injecting findHostInstanceByFiber

This is not used by DevTools since it has its own implementation of it.

This function is getting removed since `findDOMNode` is getting removed so we shouldn't keep around extra bytes unnecessarily.

There is also `findHostInstancesForRefresh` which should really be implemented on the `react-refresh` side. Not using an injection but that's a heavier lift and only affects `__DEV__`.

Changed files:
filename: packages/react-reconciler/src/ReactFiberReconciler.js
patch: @@ -827,14 +827,6 @@ if (__DEV__) {
   };
 }
 
-function findHostInstanceByFiber(fiber: Fiber): Instance | TextInstance | null {
-  const hostFiber = findCurrentHostFiber(fiber);
-  if (hostFiber === null) {
-    return null;
-  }
-  return hostFiber.stateNode;
-}
-
 function emptyFindFiberByHostInstance(
   instance: Instance | TextInstance,
 ): Fiber | null {
@@ -863,7 +855,6 @@ export function injectIntoDevTools(devToolsConfig: DevToolsConfig): boolean {
     setSuspenseHandler,
     scheduleUpdate,
     currentDispatcherRef: ReactSharedInternals,
-    findHostInstanceByFiber,
     findFiberByHostInstance:
       findFiberByHostInstance || emptyFindFiberByHostInstance,
     // React Refresh
Repository: ollama/ollama
Pull request: add command-r graph estimate


Changed files:
filename: llm/ggml.go
patch: @@ -327,7 +327,7 @@ func (llm GGML) GraphSize(context, batch int) (int64, bool) {
 	}
 
 	switch llm.KV().Architecture() {
-	case "gemma":
+	case "gemma", "command-r":
 		return 4 * int64(batch) * int64(embeddingLength+uint64(vocabLength)), true
 	case "phi2":
 		return max(
Repository: denoland/deno
Pull request: test: disable flaky WPT test

Regression from https://github.com/denoland/deno/pull/32347,
already tracked in https://github.com/denoland/deno/issues/32349.

Changed files:
filename: tests/wpt/runner/expectation.json
patch: @@ -14663,11 +14663,6 @@
         "close.any.worker.html?default": false,
         "remote-close.any.html?wpt_flags=h2": false,
         "remote-close.any.html?wss": false,
-        "remote-close.any.worker.html?default": [
-          "clean close should be clean",
-          "close with unwritten data should not be considered clean",
-          "abrupt close should give an error"
-        ],
         "remote-close.any.worker.html?wpt_flags=h2": false,
         "remote-close.any.worker.html?wss": false,
         "websocket-error.any.html": true,
Repository: nodejs/node
Pull request: crypto: add KeyObject Symbol.toStringTag

Same as #46042 but for the Node.js own KeyObject.

Changed files:
filename: lib/internal/crypto/keys.js
patch: @@ -7,6 +7,7 @@ const {
   ObjectDefineProperties,
   ObjectSetPrototypeOf,
   Symbol,
+  SymbolToStringTag,
   Uint8Array,
 } = primordials;
 
@@ -139,6 +140,14 @@ const {
     }
   }
 
+  ObjectDefineProperties(KeyObject.prototype, {
+    [SymbolToStringTag]: {
+      __proto__: null,
+      configurable: true,
+      value: 'KeyObject',
+    },
+  });
+
   class SecretKeyObject extends KeyObject {
     constructor(handle) {
       super('secret', handle);

filename: test/parallel/test-crypto-key-objects.js
patch: @@ -69,6 +69,7 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
   const keybuf = randomBytes(32);
   const key = createSecretKey(keybuf);
   assert.strictEqual(key.type, 'secret');
+  assert.strictEqual(key.toString(), '[object KeyObject]');
   assert.strictEqual(key.symmetricKeySize, 32);
   assert.strictEqual(key.asymmetricKeyType, undefined);
   assert.strictEqual(key.asymmetricKeyDetails, undefined);
@@ -150,27 +151,32 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem',
 
   const publicKey = createPublicKey(publicPem);
   assert.strictEqual(publicKey.type, 'public');
+  assert.strictEqual(publicKey.toString(), '[object KeyObject]');
   assert.strictEqual(publicKey.asymmetricKeyType, 'rsa');
   assert.strictEqual(publicKey.symmetricKeySize, undefined);
 
   const privateKey = createPrivateKey(privatePem);
   assert.strictEqual(privateKey.type, 'private');
+  assert.strictEqual(privateKey.toString(), '[object KeyObject]');
   assert.strictEqual(privateKey.asymmetricKeyType, 'rsa');
   assert.strictEqual(privateKey.symmetricKeySize, undefined);
 
   // It should be possible to derive a public key from a private key.
   const derivedPublicKey = createPublicKey(privateKey);
   assert.strictEqual(derivedPublicKey.type, 'public');
+  assert.strictEqual(derivedPublicKey.toString(), '[object KeyObject]');
   assert.strictEqual(derivedPublicKey.asymmetricKeyType, 'rsa');
   assert.strictEqual(derivedPublicKey.symmetricKeySize, undefined);
 
   const publicKeyFromJwk = createPublicKey({ key: publicJwk, format: 'jwk' });
   assert.strictEqual(publicKey.type, 'public');
+  assert.strictEqual(publicKey.toString(), '[object KeyObject]');
   assert.strictEqual(publicKey.asymmetricKeyType, 'rsa');
   assert.strictEqual(publicKey.symmetricKeySize, undefined);
 
   const privateKeyFromJwk = createPrivateKey({ key: jwk, format: 'jwk' });
   assert.strictEqual(privateKey.type, 'private');
+  assert.strictEqual(privateKey.toString(), '[object KeyObject]');
   assert.strictEqual(privateKey.asymmetricKeyType, 'rsa');
   assert.strictEqual(privateKey.symmetricKeySize, undefined);