PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: pinojs/pino (js)
Issue: v8.3.0 throws "SonicBoom supports only file descriptors and files"
After upgrading from 8.2.0 to 8.3.0 my very basic usage of `pino` is now throwing:

```
Error: SonicBoom supports only file descriptors and files
 ❯ new SonicBoom node_modules/sonic-boom/index.js:121:11
 ❯ buildSafeSonicBoom node_modules/pino/lib/tools.js:214:18
 ❯ normalizeArgs node_modules/pino/lib/tools.js:308:18
 ❯ Proxy.pino node_modules/pino/pino.js:84:28
```

My code is:

```js
import pino from 'pino';
const logger = pino();
export default logger;
```

Rolling back to 8.2.0 makes the problem go away. I looked at the diff between 8.2.0 and 8.3.0 and I can't figure out what's wrong. Could something in the `sonic-boom` package upgrade be causing this?
Pull request description: Do not assume process.stdout has a file descriptor
Signed-off-by: Matteo Collina <hello@matteocollina.com>

Fixes #1502 

Patch:
diff --git a/lib/tools.js b/lib/tools.js
index 530c5a5..147be2c 100644
--- a/lib/tools.js
+++ b/lib/tools.js
@@ -305,7 +305,9 @@ function createArgsNormalizer (defaultOptions) {
     if (enabled === false) opts.level = 'silent'
     if (!stream) {
       if (!hasBeenTampered(process.stdout)) {
-        stream = buildSafeSonicBoom({ fd: process.stdout.fd })
+        // If process.stdout.fd is undefined, it means that we are running
+        // in a worker thread. Let's assume we are logging to file descriptor 1.
+        stream = buildSafeSonicBoom({ fd: process.stdout.fd || 1 })
       } else {
         stream = process.stdout
       }


Test patch:
diff --git a/test/stdout-protection.test.js b/test/stdout-protection.test.js
index c37e008..ec27341 100644
--- a/test/stdout-protection.test.js
+++ b/test/stdout-protection.test.js
@@ -23,3 +23,10 @@ test('do not use SonicBoom is someone has passed process.stdout to pino', async
   const logger = pino(process.stdout)
   equal(logger[pino.symbols.streamSym], process.stdout)
 })
+
+test('do not crash if process.stdout has no fd', async ({ teardown }) => {
+  const fd = process.stdout.fd
+  delete process.stdout.fd
+  teardown(function () { process.stdout.fd = fd })
+  pino()
+})
diff --git a/test/transport/core.test.js b/test/transport/core.test.js
index 5b3f429..dcfff30 100644
--- a/test/transport/core.test.js
+++ b/test/transport/core.test.js
@@ -12,8 +12,10 @@ const strip = require('strip-ansi')
 const execa = require('execa')
 const writer = require('flush-write-stream')
 const rimraf = require('rimraf')
+const { promisify } = require('util')
 const { tmpdir } = os
 
+const immediate = promisify(setImmediate)
 const pid = process.pid
 const hostname = os.hostname()
 
@@ -398,6 +400,7 @@ test('stdout in worker', async ({ not }) => {
     cb()
   }))
   await once(child, 'close')
+  await immediate()
   not(strip(actual).match(/Hello/), null)
 })
 
@@ -410,6 +413,7 @@ test('log and exit on ready', async ({ not }) => {
     cb()
   }))
   await once(child, 'close')
+  await immediate()
   not(strip(actual).match(/Hello/), null)
 })
Repository: yamatoiizuka/palt-typesetting (ts)
Issue: Remove thin spaces between Latin punctuation and Japanese segment
日本語と半角カンマ、ピリオドとの間に発生する四分アキを取り除く

## 現状
**入力**
```
ラテン, 日本語.
```

**出力**
```
ラテン<thin-space />, 日本語<thin-space />.
```

## 修正後
thin space が挿入されず、そのままのスペースを維持するように修正します。
**入力**
```
ラテン, 日本語.
```

**出力**
```
ラテン, 日本語.
```
Pull request description: Remove thin spaces between Latin punctuation and Japanese segment
Fix #209 

Patch:
diff --git a/src/util-regex.ts b/src/util-regex.ts
index ae1eae9..6296058 100644
--- a/src/util-regex.ts
+++ b/src/util-regex.ts
@@ -4,6 +4,16 @@
 export const latinRegex =
   /[\p{scx=Latin}0-9⁰¹²³⁴-⁾₀-₎¢¤$€£¥+−×÷=≠><≥≤±≈~¬∅∞∫∏∑√∂%‰@&.,:;!¡?¿'"‘’“”\-(){}[\]|/\\^_`*#\s]+/gu
 
+/**
+ * 読点類（ラテン文字）
+ */
+export const latinCommaRegex = /,/
+
+/**
+ * 句点類（ラテン文字）
+ */
+export const latinPeriodRegex = /\./
+
 /**
  * 日本語
  */
diff --git a/src/util-text-classes.ts b/src/util-text-classes.ts
index 77729d7..44fea00 100644
--- a/src/util-text-classes.ts
+++ b/src/util-text-classes.ts
@@ -65,7 +65,10 @@ const CharClass = {
    */
   startsWithPunctuation: (segment: string): boolean => {
     // periodsRegexとcommasRegexを組み合わせて一つの正規表現を作成
-    const combinedRegex = new RegExp(`^[${util.periodsRegex.source}${util.commasRegex.source}]`)
+    // 半角カンマ・ピリオドも含める
+    const combinedRegex = new RegExp(
+      `^[${util.periodsRegex.source}${util.commasRegex.source}${util.latinPeriodRegex.source}${util.latinCommaRegex.source}]`
+    )
     return combinedRegex.test(segment)
   },
 }


Test patch:
diff --git a/tests/insert-separators.test.ts b/tests/insert-separators.test.ts
index de1dc9d..2df740a 100644
--- a/tests/insert-separators.test.ts
+++ b/tests/insert-separators.test.ts
@@ -35,6 +35,20 @@ describe('insertSeparators', () => {
     expect(insertSeparatorsToText(currentText, nextText, options)).toEqual(expected)
   })
 
+  it('does not insert a thin space before a latin comma', () => {
+    const currentText = '文字'
+    const nextText = ','
+    const expected = '文字'
+    expect(insertSeparatorsToText(currentText, nextText, options)).toEqual(expected)
+  })
+
+  it('does not insert a thin space before a latin period', () => {
+    const currentText = '言語'
+    const nextText = '.'
+    const expected = '言語'
+    expect(insertSeparatorsToText(currentText, nextText, options)).toEqual(expected)
+  })
+
   it('does not insert a thin space before a line fead', () => {
     const currentText = 'です。'
     const nextText = '\n'
Repository: platers/obsidian-linter (ts)
Issue: Bug: `remove-empty-list-markers` not working with non-Latin languages
- [x] I have verified that I am on the latest version of the Linter

## Describe the Bug

Rule `remove-empty-list-markers` not working if content of the line starts with non-Latin characters

## How to Reproduce

Example to reproduce issue with

``` markdown
- - test content
- - тест content
- - 测试 content
```

Output after ctrl + s:
``` markdown
- test content
- - тест content
- - 测试 content
```

Expected output:

``` markdown
- test content
- тест content
- 测试 content
```

## Device

- [x] Desktop
- [ ] Mobile

Pull request description: Fix Non-Latin Characters Not Working for `remove-consecutive-list-markers`
Fixes #1278

There was an issue where I was matching on word boundaries for regex for `remove-consecutive-list-markers`. However it seems that non-Latin languages do not have their characters included as a part of word boundaries. So instead I am going to a unicode letter. Hopefully that fixes the issue moving forward.

Changes Made:
- Added a UT for the scenario in question
- Swap from matching on word boundary for matching on unicode letter

Patch:
diff --git a/src/rules/remove-consecutive-list-markers.ts b/src/rules/remove-consecutive-list-markers.ts
index 0756d66..5d8e48b 100644
--- a/src/rules/remove-consecutive-list-markers.ts
+++ b/src/rules/remove-consecutive-list-markers.ts
@@ -19,7 +19,7 @@ export default class RemoveConsecutiveListMarkers extends RuleBuilder<RemoveCons
     return RemoveConsecutiveListMarkersOptions;
   }
   apply(text: string, options: RemoveConsecutiveListMarkersOptions): string {
-    return text.replace(/^([ |\t]*)- - \b/gm, '$1- ');
+    return text.replace(/^([ |\t]*)- - (\p{L})/gmu, '$1- $2');
   }
   get exampleBuilders(): ExampleBuilder<RemoveConsecutiveListMarkersOptions>[] {
     return [


Test patch:
diff --git a/__tests__/remove-consecutive-list-markers.test.ts b/__tests__/remove-consecutive-list-markers.test.ts
new file mode 100644
index 0000000..d761df6
--- /dev/null
+++ b/__tests__/remove-consecutive-list-markers.test.ts
@@ -0,0 +1,22 @@
+import RemoveConsecutiveListMarkers from '../src/rules/remove-consecutive-list-markers';
+import dedent from 'ts-dedent';
+import {ruleTest} from './common';
+
+ruleTest({
+  RuleBuilderClass: RemoveConsecutiveListMarkers,
+  testCases: [
+    { // accounts for https://github.com/platers/obsidian-linter/issues/1278
+      testName: 'Make sure consecutive list markers are removed when dealing with non-latin characters',
+      before: dedent`
+        - - test content
+        - - тест content
+        - - 测试 content
+      `,
+      after: dedent`
+        - test content
+        - тест content
+        - 测试 content
+      `,
+    },
+  ],
+});
Repository: myelin-ai/mockiato (rust)
Issue: Change wording if no calls were expected
Replace `The following calls were expected:` with `No calls were expected`
Pull request description: Change wording if no calls were expected
Resolves #65

Patch:
diff --git a/mockiato/src/internal/method.rs b/mockiato/src/internal/method.rs
index 6eb5817..2e6c9b6 100644
--- a/mockiato/src/internal/method.rs
+++ b/mockiato/src/internal/method.rs
@@ -43,7 +43,8 @@ where
     }
 
     pub fn call_unwrap<'a>(&'a self, arguments: <A as ArgumentsMatcher<'a>>::Arguments) -> R {
-        self.call(arguments).unwrap_or_else(|err| panic!("{}", err))
+        self.call(arguments)
+            .unwrap_or_else(|err| panic!("\n\n{}\n", err))
     }
 
     pub fn verify_unwrap(&self) {
@@ -101,22 +102,22 @@ where
 {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         match self {
-            CallError::NoMatching(arguments, method) => write!(
-                f,
-                r#"
-The call {:?} was not expected.
-The following calls were expected:
-{}
-"#,
-                arguments,
-                DisplayCalls(&method.calls.iter().collect::<Vec<_>>())
-            ),
-            CallError::MoreThanOneMatching(arguments, calls) => write!(
+            CallError::NoMatching(arguments, method) => {
+                writeln!(f, "The call {:?} was not expected.", arguments,)?;
+
+                if method.calls.is_empty() {
+                    writeln!(f, "No calls to {} were expected.", method.name)
+                } else {
+                    writeln!(
+                        f,
+                        "The following calls were expected:\n{}",
+                        DisplayCalls(&method.calls.iter().collect::<Vec<_>>())
+                    )
+                }
+            }
+            CallError::MoreThanOneMatching(arguments, calls) => writeln!(
                 f,
-                r#"
-The call {:?} matches more than one expected call:
-{}
-"#,
+                "\nThe call {:?} matches more than one expected call:\n{}",
                 arguments,
                 DisplayCalls(&calls)
             ),


Test patch:
diff --git a/mockiato/tests/panic_with_no_expected_calls.rs b/mockiato/tests/panic_with_no_expected_calls.rs
new file mode 100644
index 0000000..7e41823
--- /dev/null
+++ b/mockiato/tests/panic_with_no_expected_calls.rs
@@ -0,0 +1,16 @@
+use mockiato::mockable;
+
+#[mockable]
+trait Greeter {
+    fn greet(&self, name: &str) -> String;
+}
+
+#[test]
+#[should_panic(
+    expected = "The call (\"John\",) was not expected.\nNo calls to GreeterMock::greet were expected."
+)]
+fn panics_with_no_expected_calls() {
+    let greeter = GreeterMock::new();
+
+    greeter.greet("John");
+}
Repository: sindresorhus/query-string (js)
Issue: Existing query params in URL get sorted even when sort is disabled for stringifyUrl
Is the following expectation correct ?

```js
test('stringify URL without sorting params', t => {
	t.deepEqual(queryString.stringifyUrl({
        url: 'https://foo.bar?C=3&A=1', query: {D: 4, B: 2}}, {sort: false}), 
             'https://foo.bar?C=3&A=1&D=4&B=2');
});
```

Currently the above test will fail because the query parameters that are already present in the URL get sorted, giving

```
'https://foo.bar?A=1&C=3&D=4&B=2'
```

Pull request description: Fix sorting existing query params in URL when `sort` option is false
Fixes #264 .

Bug is fixed by passing the `options` object received in the `stringifyUrl` function to the internal use of `parse` function. Don't know if this could have other repercussions, but all tests passed that currently pass on master.

Patch:
diff --git a/index.js b/index.js
index f8ca0df..de1d7b1 100644
--- a/index.js
+++ b/index.js
@@ -361,7 +361,7 @@ exports.stringifyUrl = (input, options) => {
 
 	const url = removeHash(input.url).split('?')[0] || '';
 	const queryFromUrl = exports.extract(input.url);
-	const parsedQueryFromUrl = exports.parse(queryFromUrl);
+	const parsedQueryFromUrl = exports.parse(queryFromUrl, {sort: false});
 
 	const query = Object.assign(parsedQueryFromUrl, input.query);
 	let queryString = exports.stringify(query, options);


Test patch:
diff --git a/test/stringify-url.js b/test/stringify-url.js
index 98055cc..2b3c372 100644
--- a/test/stringify-url.js
+++ b/test/stringify-url.js
@@ -52,3 +52,7 @@ test('stringify URL from the result of `parseUrl` with query string that contain
 	const parsedUrl = queryString.parseUrl(url);
 	t.deepEqual(queryString.stringifyUrl(parsedUrl, {encode: false}), url);
 });
+
+test('stringify URL without sorting existing query params', t => {
+	t.deepEqual(queryString.stringifyUrl({url: 'https://foo.bar?C=3&A=1', query: {D: 4, B: 2}}, {sort: false}), 'https://foo.bar?C=3&A=1&D=4&B=2');
+});
Repository: ember-template-lint/ember-template-lint (js)
Issue: no-shadowed-elements should allow component names including a dot to start lower case
Currently this is considered a violation of `no-shadowed-elements` rule:

```
<Foo as |s|>
  <s.bar />
</Foo>
```

If local variable is a hash and therefore component is referred to be dot notation, it can't shadow elements. Therefore the hash should not be enforced to start with an uppercase char IMO.
Pull request description: element containing dot should not be considered ambiguous
Before a yielded hash had to start with uppercase char to not violate no-shadowed-elements rule even so it could not shadow any element cause having a dot in path.

Fixes #473

Patch:
diff --git a/lib/rules/lint-no-shadowed-elements.js b/lib/rules/lint-no-shadowed-elements.js
index b80922a3..d97d3305 100644
--- a/lib/rules/lint-no-shadowed-elements.js
+++ b/lib/rules/lint-no-shadowed-elements.js
@@ -21,8 +21,9 @@ module.exports = class NoShadowedElements extends Rule {
 
         let firstChar = node.tag.charAt(0);
         let startsWithUpperCase = firstChar === firstChar.toUpperCase() && firstChar !== firstChar.toLowerCase();
+        let containsDot = node.tag.includes('.');
 
-        if (!startsWithUpperCase) {
+        if (!startsWithUpperCase && !containsDot) {
           this.log({
             message: `Ambiguous element used (\`${node.tag}\`)`,
             line: node.loc && node.loc.start.line,


Test patch:
diff --git a/test/unit/rules/lint-no-shadowed-elements-test.js b/test/unit/rules/lint-no-shadowed-elements-test.js
index c5f206ee..c073a605 100644
--- a/test/unit/rules/lint-no-shadowed-elements-test.js
+++ b/test/unit/rules/lint-no-shadowed-elements-test.js
@@ -11,6 +11,7 @@ generateRuleTests({
     '{{#foo-bar as |Baz|}}<Baz />{{/foo-bar}}',
     '<FooBar as |Baz|><Baz /></FooBar>',
     '{{#with foo=(component "blah-zorz") as |Div|}}<Div></Div>{{/with}}',
+    '<Foo as |bar|><bar.baz /></Foo>',
   ],
 
   bad: [
Repository: typedorm/typedorm (ts)
Issue: Allow updating items with empty values for attributes
When trying to build update expression for attribute with falsy value, expression fails with "no value for given expression name"


Pull request description: fix(core): allow updating attributes with undefined value
# Changes
- Allows updating attribute with undefined values 

closes #41 

Patch:
diff --git a/packages/core/src/classes/expression-builder.ts b/packages/core/src/classes/expression-builder.ts
index d27be22..5867ff4 100644
--- a/packages/core/src/classes/expression-builder.ts
+++ b/packages/core/src/classes/expression-builder.ts
@@ -59,7 +59,7 @@ export class ExpressionBuilder {
 
         const expValKey = `:val${index}`;
         acc.UpdateExpression += ` ${expAttrKey} = ${expValKey}`;
-        acc.ExpressionAttributeValues[expValKey] = item[key];
+        acc.ExpressionAttributeValues[expValKey] = item[key] ?? null;
         return acc;
       },
       {


Test patch:
diff --git a/packages/core/src/classes/__test__/expression-builder.spec.ts b/packages/core/src/classes/__test__/expression-builder.spec.ts
index f81e323..38635f2 100644
--- a/packages/core/src/classes/__test__/expression-builder.spec.ts
+++ b/packages/core/src/classes/__test__/expression-builder.spec.ts
@@ -87,3 +87,43 @@ test('builds update expression for complex nested object', () => {
     },
   });
 });
+
+/**
+ * Issue 41
+ */
+test('allows updating attribute with undefined value', () => {
+  const item = {
+    'user.name': undefined,
+  };
+  const expression = expressionBuilder.buildUpdateExpression(item);
+  expect(expression).toEqual({
+    UpdateExpression: 'SET #attr0_inner0.#attr0_inner1 = :val0',
+    ExpressionAttributeNames: {
+      '#attr0_inner0': 'user',
+      '#attr0_inner1': 'name',
+    },
+    ExpressionAttributeValues: {
+      ':val0': null,
+    },
+  });
+});
+
+/**
+ * Issue 41
+ */
+test('allows updating attribute with empty string', () => {
+  const item = {
+    'user.name': '',
+  };
+  const expression = expressionBuilder.buildUpdateExpression(item);
+  expect(expression).toEqual({
+    UpdateExpression: 'SET #attr0_inner0.#attr0_inner1 = :val0',
+    ExpressionAttributeNames: {
+      '#attr0_inner0': 'user',
+      '#attr0_inner1': 'name',
+    },
+    ExpressionAttributeValues: {
+      ':val0': '',
+    },
+  });
+});