helloadhavan/github_issues huggingface dataset:
Repository: denoland/deno
Pull request: fix: `global` global should be writeable

Closes https://github.com/denoland/deno/issues/30012

Makes `global` global a writeable property.

Changed files:
filename: runtime/js/98_global_scope_shared.js
patch: @@ -145,11 +145,7 @@ const windowOrWorkerGlobalScope = {
   setImmediate: core.propWritable(setImmediate),
   clearImmediate: core.propWritable(clearImmediate),
   Buffer: core.propWritable(Buffer),
-  global: {
-    enumerable: true,
-    configurable: true,
-    get: () => globalThis,
-  },
+  global: core.propWritable(globalThis),
   reportError: core.propWritable(event.reportError),
   setInterval: core.propWritable(timers.setInterval),
   setTimeout: core.propWritable(timers.setTimeout),

filename: tests/unit/globals_test.ts
patch: @@ -200,3 +200,11 @@ Deno.test(function mapGroupBy() {
     quantity: 5,
   }]);
 });
+
+// Regression test for https://github.com/denoland/deno/issues/30012
+Deno.test(function globalGlobalIsWritable() {
+  // @ts-ignore the typings here are wrong
+  globalThis.global = "can write to `global`";
+  // @ts-ignore the typings here are wrong
+  globalThis.global = globalThis;
+});
Repository: facebook/react
Pull request: Add `enableComponentStackLocations` to `ReactNativeInternalFeatureFlags` libdef

## Summary

Fixing something I accidentally broke this in https://github.com/facebook/react/commit/25dbb3556ee9802c18f45c278abf3c33711237eb.

## How did you test this change?

Ran the following successfully:

```
$ yarn flow dom-node
```

Changed files:
filename: scripts/flow/xplat.js
patch: @@ -9,6 +9,7 @@
 
 declare module 'ReactNativeInternalFeatureFlags' {
   declare export var alwaysThrottleRetries: boolean;
+  declare export var enableComponentStackLocations: boolean;
   declare export var enableDeferRootSchedulingToMicrotask: boolean;
   declare export var enableUseRefAccessWarning: boolean;
   declare export var passChildrenWhenCloningPersistedNodes: boolean;
Repository: vercel/next.js
Pull request: [Pages] fix: `_error` page's `req.url` can be overwritten to dynamic param on minimal mode

In minimal mode, if there was `/[slug].js` with `notFound: true` on the same segment of `_error.js`, `req.url` and `ctx.asPath` were returned as `/[slug]`, since it was re-initialized to the request url.

Therefore, don't re-initialize the URL if it is in minimal mode && is the `_error` page.

Fixes NEXT-4660

Changed files:
filename: packages/next/src/server/base-server.ts
patch: @@ -2355,7 +2355,13 @@ export default abstract class Server<
         initPathname = normalizer.normalize(initPathname)
       }
     }
-    request.url = `${initPathname}${parsedInitUrl.search || ''}`
+
+    // On minimal mode, the request url of dynamic route can be a
+    // literal dynamic route ('/[slug]') instead of actual URL, so overwriting to initPathname
+    // will transform back the resolved url to the dynamic route pathname.
+    if (!(this.minimalMode && isErrorPathname)) {
+      request.url = `${initPathname}${parsedInitUrl.search || ''}`
+    }
 
     // propagate the request context for dev
     setRequestMeta(request, getRequestMeta(req))

filename: test/e2e/error-handler-not-found-req-url/error-handler-not-found-req-url.test.ts
patch: @@ -0,0 +1,13 @@
+import { nextTestSetup } from 'e2e-utils'
+
+describe('error-handler-not-found-req-url', () => {
+  const { next } = nextTestSetup({
+    files: __dirname,
+  })
+
+  it('should log the correct request url and asPath for not found _error page', async () => {
+    const browser = await next.browser('/3')
+    const p = await browser.elementByCss('p')
+    expect(await p.text()).toBe('reqUrl: /3, asPath: /3')
+  })
+})

filename: test/e2e/error-handler-not-found-req-url/pages/[slug].tsx
patch: @@ -0,0 +1,16 @@
+export default function Page() {
+  return <p>hello world</p>
+}
+
+export async function getStaticProps() {
+  return {
+    notFound: true,
+  }
+}
+
+export async function getStaticPaths() {
+  return {
+    paths: [],
+    fallback: 'blocking',
+  }
+}

filename: test/e2e/error-handler-not-found-req-url/pages/_error.tsx
patch: @@ -0,0 +1,22 @@
+import type { NextPageContext } from 'next'
+
+Error.getInitialProps = (ctx: NextPageContext) => {
+  return {
+    reqUrl: ctx.req?.url,
+    asPath: ctx.asPath,
+  }
+}
+
+export default function Error({
+  reqUrl,
+  asPath,
+}: {
+  reqUrl?: string
+  asPath?: string
+}) {
+  return (
+    <p>
+      reqUrl: {reqUrl}, asPath: {asPath}
+    </p>
+  )
+}

filename: test/e2e/error-handler-not-found-req-url/pages/index.tsx
patch: @@ -0,0 +1,3 @@
+export default function Page() {
+  return <p>hello world</p>
+}
Repository: ollama/ollama
Pull request: restart server more gracefully

fix for https://github.com/jmorganca/ollama/issues/154

Changed files:
filename: app/package.json
patch: @@ -11,7 +11,9 @@
     "make": "electron-forge make",
     "make:sign": "SIGN=1 electron-forge make",
     "publish": "SIGN=1 electron-forge publish",
-    "lint": "eslint --ext .ts,.tsx ."
+    "lint": "eslint --ext .ts,.tsx .",
+    "format": "prettier --check . --ignore-path .gitignore",
+    "format:fix": "prettier --write . --ignore-path .gitignore"
   },
   "keywords": [],
   "author": {

filename: app/src/declarations.d.ts
patch: @@ -1,4 +1,4 @@
 declare module '*.svg' {
-  const content: string;
-  export default content;
-}
\ No newline at end of file
+  const content: string
+  export default content
+}

filename: app/src/index.ts
patch: @@ -67,25 +67,25 @@ function firstRunWindow() {
 
 function createSystemtray() {
   let iconPath = nativeTheme.shouldUseDarkColors
-    ? path.join(__dirname, '..', '..', 'assets', 'ollama_icon_16x16Template.png') 
+    ? path.join(__dirname, '..', '..', 'assets', 'ollama_icon_16x16Template.png')
     : path.join(__dirname, '..', '..', 'assets', 'ollama_outline_icon_16x16Template.png')
 
   if (app.isPackaged) {
     iconPath = nativeTheme.shouldUseDarkColors
-    ? path.join(process.resourcesPath, 'ollama_icon_16x16Template.png') 
-    : path.join(process.resourcesPath, 'ollama_outline_icon_16x16Template.png')
+      ? path.join(process.resourcesPath, 'ollama_icon_16x16Template.png')
+      : path.join(process.resourcesPath, 'ollama_outline_icon_16x16Template.png')
   }
 
   tray = new Tray(iconPath)
 
-  nativeTheme.on('updated', function theThemeHasChanged () {
+  nativeTheme.on('updated', function theThemeHasChanged() {
     if (nativeTheme.shouldUseDarkColors) {
-      app.isPackaged 
-        ? tray.setImage(path.join(process.resourcesPath, 'ollama_icon_16x16Template.png')) 
+      app.isPackaged
+        ? tray.setImage(path.join(process.resourcesPath, 'ollama_icon_16x16Template.png'))
         : tray.setImage(path.join(__dirname, '..', '..', 'assets', 'ollama_icon_16x16Template.png'))
     } else {
-      app.isPackaged 
-        ? tray.setImage(path.join(process.resourcesPath, 'ollama_outline_icon_16x16Template.png')) 
+      app.isPackaged
+        ? tray.setImage(path.join(process.resourcesPath, 'ollama_outline_icon_16x16Template.png'))
         : tray.setImage(path.join(__dirname, '..', '..', 'assets', 'ollama_outline_icon_16x16Template.png'))
     }
   })
@@ -116,8 +116,7 @@ function server() {
   })
 
   function restart() {
-    logger.info('Restarting the server...')
-    server()
+    setTimeout(server, 3000)
   }
 
   proc.on('exit', restart)
Repository: facebook/react
Pull request: Dynamic `enableComponentStackLocations` Flag for React Native (FB)

## Summary

Changes the `enableComponentStackLocations` feature flag to be dynamic for React Native (FB), so that it can be evaluated for compatibility before eventually being enabled for React Native.

## How did you test this change?

I'll be importing this PR to test it.

Changed files:
filename: packages/shared/forks/ReactFeatureFlags.native-fb-dynamic.js
patch: @@ -21,6 +21,7 @@ import typeof * as DynamicFlagsType from 'ReactNativeInternalFeatureFlags';
 // update the test configuration.
 
 export const alwaysThrottleRetries = __VARIANT__;
+export const enableComponentStackLocations = __VARIANT__;
 export const enableDeferRootSchedulingToMicrotask = __VARIANT__;
 export const enableUseRefAccessWarning = __VARIANT__;
 export const passChildrenWhenCloningPersistedNodes = __VARIANT__;

filename: packages/shared/forks/ReactFeatureFlags.native-fb.js
patch: @@ -19,6 +19,7 @@ import * as dynamicFlags from 'ReactNativeInternalFeatureFlags';
 // the exports object every time a flag is read.
 export const {
   alwaysThrottleRetries,
+  enableComponentStackLocations,
   enableDeferRootSchedulingToMicrotask,
   enableUseRefAccessWarning,
   passChildrenWhenCloningPersistedNodes,
@@ -62,7 +63,6 @@ export const enableCPUSuspense = true;
 export const enableUseMemoCacheHook = true;
 export const enableUseEffectEventHook = false;
 export const enableClientRenderFallbackOnTextMismatch = true;
-export const enableComponentStackLocations = false;
 export const enableLegacyFBSupport = false;
 export const enableFilterEmptyStringAttributesDOM = true;
 export const enableGetInspectorDataForInstanceInProduction = true;
Repository: nodejs/node
Pull request: build: fix building with system icu 76

ICU 76 decided to reduce overlinking[^1] thus `icu-i18n` will no longer add `icu-uc` when linking to shared libraries. This results in undefined symbols/references when trying to build with system ICU 76.

[^1]: unicode-org/icu@199bc82

---

Example of build error (seen on v22.10.0 and v23.1.0) is:
```
.../out/Release/obj.target/gen-regexp-special-case/deps/v8/src/regexp/gen-regexp-special-case.o: in function `v8::internal::PrintSet(std::basic_ofstream<char, std::char_traits<char> >&, char const*, icu_76::UnicodeSet const&)':
gen-regexp-special-case.cc:(.text._ZN2v88internal8PrintSetERSt14basic_ofstreamIcSt11char_traitsIcEEPKcRKN6icu_7610UnicodeSetE+0x9c): undefined reference to `icu_76::UnicodeSet::getRangeStart(int) const'
/home/linuxbrew/.linuxbrew/opt/binutils/bin/ld: gen-regexp-special-case.cc:(.text._ZN2v88internal8PrintSetERSt14basic_ofstreamIcSt11char_traitsIcEEPKcRKN6icu_7610UnicodeSetE+0xc4): undefined reference to `icu_76::UnicodeSet::getRangeEnd(int) const'
```

ICU 76:
```console
$ pkg-config --libs-only-l icu-i18n
-licui18n

$ pkg-config --libs-only-l icu-i18n icu-uc
-licui18n -licuuc
```

ICU 75:
```console
$ pkg-config --libs-only-l icu-i18n
-licui18n -licuuc -licudata
```

---

Specifically seen at Homebrew when testing new ICU 76.1 release https://github.com/Homebrew/homebrew-core/pull/193114.

CI successfully built v22.10.0 after applying this patch.

Should be backwards compatible as `icu-uc.pc` has existed as long as `icu-i18n.pc` - https://github.com/unicode-org/icu/commit/d39075895576f183ef9756aabe34db8b64e6af38

Changed files:
filename: configure.py
patch: @@ -1879,7 +1879,7 @@ def icu_download(path):
   elif with_intl == 'system-icu':
     # ICU from pkg-config.
     o['variables']['v8_enable_i18n_support'] = 1
-    pkgicu = pkg_config('icu-i18n')
+    pkgicu = pkg_config(['icu-i18n', 'icu-uc'])
     if not pkgicu[0]:
       error('''Could not load pkg-config data for "icu-i18n".
        See above errors or the README.md.''')
Repository: vercel/next.js
Pull request: Backport "[Pages] fix: `_error` page's `req.url` can be overwritten t…

…o dynamic param on minimal mode (#82347)"

Changed files:
filename: packages/next/src/server/base-server.ts
patch: @@ -2649,7 +2649,13 @@ export default abstract class Server<
                 initPathname = normalizer.normalize(initPathname)
               }
             }
-            request.url = `${initPathname}${parsedInitUrl.search || ''}`
+
+            // On minimal mode, the request url of dynamic route can be a
+            // literal dynamic route ('/[slug]') instead of actual URL, so overwriting to initPathname
+            // will transform back the resolved url to the dynamic route pathname.
+            if (!(this.minimalMode && isErrorPathname)) {
+              request.url = `${initPathname}${parsedInitUrl.search || ''}`
+            }
 
             // propagate the request context for dev
             setRequestMeta(request, getRequestMeta(req))

filename: test/e2e/error-handler-not-found-req-url/error-handler-not-found-req-url.test.ts
patch: @@ -0,0 +1,13 @@
+import { nextTestSetup } from 'e2e-utils'
+
+describe('error-handler-not-found-req-url', () => {
+  const { next } = nextTestSetup({
+    files: __dirname,
+  })
+
+  it('should log the correct request url and asPath for not found _error page', async () => {
+    const browser = await next.browser('/3')
+    const p = await browser.elementByCss('p')
+    expect(await p.text()).toBe('reqUrl: /3, asPath: /3')
+  })
+})

filename: test/e2e/error-handler-not-found-req-url/pages/[slug].tsx
patch: @@ -0,0 +1,16 @@
+export default function Page() {
+  return <p>hello world</p>
+}
+
+export async function getStaticProps() {
+  return {
+    notFound: true,
+  }
+}
+
+export async function getStaticPaths() {
+  return {
+    paths: [],
+    fallback: 'blocking',
+  }
+}

filename: test/e2e/error-handler-not-found-req-url/pages/_error.tsx
patch: @@ -0,0 +1,22 @@
+import type { NextPageContext } from 'next'
+
+Error.getInitialProps = (ctx: NextPageContext) => {
+  return {
+    reqUrl: ctx.req?.url,
+    asPath: ctx.asPath,
+  }
+}
+
+export default function Error({
+  reqUrl,
+  asPath,
+}: {
+  reqUrl?: string
+  asPath?: string
+}) {
+  return (
+    <p>
+      reqUrl: {reqUrl}, asPath: {asPath}
+    </p>
+  )
+}

filename: test/e2e/error-handler-not-found-req-url/pages/index.tsx
patch: @@ -0,0 +1,3 @@
+export default function Page() {
+  return <p>hello world</p>
+}
Repository: huggingface/transformers
Pull request: Fix PerceptionLM image preprocessing for non-tiled image input.

Add support for vanilla image that only has C,H,W dims but not tiles dim.
This is non-default image shapes used in PLM but it's useful in demos and low-resoure devices.

@zucchini-nlp 

Changed files:
filename: src/transformers/models/perception_lm/image_processing_perception_lm_fast.py
patch: @@ -310,7 +310,7 @@ def _preprocess(
             )
             processed_images_grouped[shape] = stacked_images
         processed_images = reorder_images(processed_images_grouped, grouped_images_index)
-
+        processed_images = [p[None] if p.ndim == 3 else p for p in processed_images]  # add tiles dimension if needed
         processed_images = torch.stack(processed_images, dim=0) if return_tensors else processed_images
         return BatchFeature(data={"pixel_values": processed_images}, tensor_type=return_tensors)
 

filename: tests/models/perception_lm/test_processing_perception_lm.py
patch: @@ -115,6 +115,36 @@ def test_image_token_filling(self):
         )
         image_tokens = (inputs["input_ids"] == image_token_index).sum().item()
         self.assertEqual(expected_image_tokens, image_tokens)
+        self.assertEqual(inputs["pixel_values"].ndim, 5)
+
+    def test_vanilla_image_with_no_tiles_token_filling(self):
+        processor = self.processor_class.from_pretrained(self.tmpdirname)
+        processor.image_processor.vision_input_type = "vanilla"
+        # Important to check with non square image
+        image = torch.randn((1, 3, 450, 500))
+        #  1 tile
+        #  448/patch_size/pooling_ratio = 16 => 16*16 tokens per tile
+        expected_image_tokens = 16 * 16 * 1
+        image_token_index = processor.image_token_id
+
+        messages = [
+            {
+                "role": "user",
+                "content": [
+                    {"type": "image"},
+                    {"type": "text", "text": "What is shown in this image?"},
+                ],
+            },
+        ]
+        inputs = processor(
+            text=[processor.apply_chat_template(messages)],
+            images=[image],
+            return_tensors="pt",
+        )
+        image_tokens = (inputs["input_ids"] == image_token_index).sum().item()
+        self.assertEqual(expected_image_tokens, image_tokens)
+        self.assertEqual(inputs["pixel_values"].ndim, 5)
+        self.assertEqual(inputs["pixel_values"].shape[1], 1)  # 1 tile
 
 
 CHAT_TEMPLATE = (
Repository: huggingface/transformers
Pull request: Update notification service MI325


Changed files:
filename: utils/notification_service.py
patch: @@ -1397,8 +1397,8 @@ def pop_default(l: list[Any], i: int, default: Any) -> Any:
 
     nvidia_daily_ci_workflow = "huggingface/transformers/.github/workflows/self-scheduled-caller.yml"
     amd_daily_ci_workflows = (
-        "huggingface/transformers/.github/workflows/self-scheduled-amd-mi250-caller.yml",
         "huggingface/transformers/.github/workflows/self-scheduled-amd-mi300-caller.yml",
+        "huggingface/transformers/.github/workflows/self-scheduled-amd-mi325-caller.yml",
     )
     is_nvidia_daily_ci_workflow = os.environ.get("GITHUB_WORKFLOW_REF").startswith(nvidia_daily_ci_workflow)
     is_amd_daily_ci_workflow = os.environ.get("GITHUB_WORKFLOW_REF").startswith(amd_daily_ci_workflows)
Repository: ggml-org/llama.cpp
Pull request: tests : add -INF blocks to the KQ mask in the FA tests

ref https://github.com/ggml-org/llama.cpp/pull/16372#issuecomment-3357627756

The mask that we use in the FA tests is always filled with non-INF values, while in practice it often contains -INF blocks due to causal masking or due to padding. Extend the tests to add -INF values so we can exercise any logic that relies on detecting such blocks in the mask.

Changed files:
filename: ggml/src/ggml-cpu/ops.cpp
patch: @@ -8135,7 +8135,7 @@ static void ggml_compute_forward_flash_attn_ext_f16(
         }
 
         // V /= S
-        const float S_inv = 1.0f/S;
+        const float S_inv = S == 0.0f ? 0.0f : 1.0f/S;
         ggml_vec_scale_f32(DV, VKQ32, S_inv);
 
         // dst indices

filename: tests/test-backend-ops.cpp
patch: @@ -131,6 +131,50 @@ static void init_tensor_uniform(ggml_tensor * tensor, float min = -1.0f, float m
     }
 }
 
+// generate an F16 mask where certain blocks are randomly masked with -INF value
+static void init_tensor_kq_mask(ggml_tensor * tensor, float min = -1.0f, float max = 1.0f) {
+    GGML_ASSERT(tensor->type == GGML_TYPE_F16);
+
+    GGML_TENSOR_LOCALS( int32_t, ne, tensor, ne);
+
+    std::vector<float>       data_f32(ne0*ne1*ne2*ne3);
+    std::vector<ggml_fp16_t> data_f16(ne0*ne1*ne2*ne3);
+
+    std::random_device rd;
+    std::mt19937 gen(rd());
+    std::uniform_real_distribution<float> dis(min, max);
+
+    for (size_t i = 0; i < data_f32.size(); i++) {
+        data_f32[i] = dis(gen);
+    }
+
+    // block size
+    const int blck0 = 128;
+    const int blck1 = 64;
+
+    // number of INF blocks
+    const int n_inf_blocks = 0.1*(ne0*ne1*ne2*ne3)/(blck0*blck1);
+
+    for (int b = 0; b < n_inf_blocks; b++) {
+        const int p3 = (rd() % ne3);
+        const int p2 = (rd() % ne2);
+        const int p1 = (rd() % ne1);
+        const int p0 = (rd() % ne0);
+
+        for (int i1 = 0; i1 < blck1 && p1 + i1 < ne1; i1++) {
+            const int idx = p3*ne2*ne1*ne0 + p2*ne1*ne0 + (p1 + i1)*ne0 + p0;
+
+            for (int i0 = 0; i0 < blck0 && p0 + i0 < ne0; i0++) {
+                data_f32[idx + i0] = -INFINITY;
+            }
+        }
+    }
+
+    ggml_fp32_to_fp16_row(data_f32.data(), data_f16.data(), ne0*ne1*ne2*ne3);
+
+    ggml_backend_tensor_set(tensor, data_f16.data(), 0, data_f16.size()*sizeof(ggml_fp16_t));
+}
+
 static std::vector<float> tensor_to_float(const ggml_tensor * t) {
     std::vector<float> tv;
     tv.reserve(ggml_nelements(t));
@@ -5111,6 +5155,8 @@ struct test_flash_attn_ext : public test_case {
             if (strcmp(t->name, "s") == 0) {
                 // make the sink values more noticable in order to trigger a test failure when the implementation is wrong
                 init_tensor_uniform(t, -10.0f, 10.0f);
+            } else if (strcmp(t->name, "m") == 0) {
+                init_tensor_kq_mask(t);
             } else {
                 init_tensor_uniform(t);
             }
Repository: huggingface/transformers
Pull request: Fix repo consistency

# What does this PR do?

As per title, I merged a PR without rebasing on `main`

Changed files:
filename: src/transformers/models/glm4v_moe/modeling_glm4v_moe.py
patch: @@ -1730,14 +1730,9 @@ def _repeat_interleave_samples(x, lengths, repeat_times):
                         dict_to_expand[key], lengths=lengths, repeat_times=expand_size
                     )
                 elif key == "second_per_grid_ts":
-                    if not isinstance(dict_to_expand[key], list):
-                        raise TypeError(
-                            f"Expected value for key '{key}' to be a list, but got {type(dict_to_expand[key])} instead."
-                        )
-                    tensor = torch.tensor(dict_to_expand[key])
-                    lengths = list(video_nums)
-                    tensor = _repeat_interleave_samples(tensor, lengths=lengths, repeat_times=expand_size)
-                    dict_to_expand[key] = tensor.tolist()
+                    dict_to_expand[key] = _repeat_interleave_samples(
+                        dict_to_expand[key], lengths=list(video_nums), repeat_times=expand_size
+                    )
             return dict_to_expand
 
         def _expand_dict_for_generation(dict_to_expand):
Repository: nodejs/node
Pull request: dns: honor the order option

Fixes: https://github.com/nodejs/node/issues/55391

<!--
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: lib/dns.js
patch: @@ -193,7 +193,7 @@ function lookup(hostname, options, callback) {
     }
     if (options?.order != null) {
       validateOneOf(options.order, 'options.order', ['ipv4first', 'ipv6first', 'verbatim']);
-      dnsOrder = options.dnsOrder;
+      dnsOrder = options.order;
     }
   }
 

filename: test/parallel/test-dns-default-order-verbatim.js
patch: @@ -46,4 +46,14 @@ function allowFailed(fn) {
 
   await allowFailed(dnsPromises.lookup('example.org', {}));
   checkParameter(cares.DNS_ORDER_VERBATIM);
+
+  await allowFailed(
+    promisify(dns.lookup)('example.org', { order: 'ipv4first' })
+  );
+  checkParameter(cares.DNS_ORDER_IPV4_FIRST);
+
+  await allowFailed(
+    promisify(dns.lookup)('example.org', { order: 'ipv6first' })
+  );
+  checkParameter(cares.DNS_ORDER_IPV6_FIRST);
 })().then(common.mustCall());