PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: unjs/ufo (ts)

Issue:
override urls with protocol with `withBase`
Reference: https://github.com/unjs/ohmyfetch/pull/113

Current behavior:

```js
// http://base/http://domain
ufo.withBase('http://domain', 'http://base')
```

New behavior:

```js
// http://domain
ufo.withBase('http://domain', 'http://base'})
```

URL behavior:

```js
// http://domain/
new URL('http://domain', 'http://base').toString()
```


Pull request:
fix: ensure `withBase` does not prefix URLs with protocol
resolves #67

Patch:
diff --git a/src/utils.ts b/src/utils.ts
index bb706db..88efeb7 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -62,7 +62,7 @@ export function cleanDoubleSlashes (input: string = ''): string {
 }
 
 export function withBase (input: string, base: string) {
-  if (isEmptyURL(base)) {
+  if (isEmptyURL(base) || hasProtocol(input)) {
     return input
   }
   const _base = withoutTrailingSlash(base)


Test patch:
diff --git a/test/base.test.ts b/test/base.test.ts
index 661471b..3cbd91e 100644
--- a/test/base.test.ts
+++ b/test/base.test.ts
@@ -10,7 +10,9 @@ describe('withBase', () => {
     { base: '/base/', input: '/base', out: '/base' },
     { base: '/base', input: '/base/', out: '/base/' },
     { base: '/base', input: '/base/a', out: '/base/a' },
-    { base: '/base/', input: '/base/a', out: '/base/a' }
+    { base: '/base/', input: '/base/a', out: '/base/a' },
+    { base: '/base/', input: 'https://test.com', out: 'https://test.com' },
+    { base: '/', input: 'https://test.com', out: 'https://test.com' }
   ]
 
   for (const t of tests) {
@@ -33,7 +35,9 @@ describe('withoutBase', () => {
     { base: '/base/a/', input: '/base/a', out: '/' },
     { base: '/', input: '/test/', out: '/test/' },
     { base: '/', input: '/?test', out: '/?test' },
-    { base: '/api', input: '/api?test', out: '/?test' }
+    { base: '/api', input: '/api?test', out: '/?test' },
+    { base: '/base/', input: 'https://test.com', out: 'https://test.com' },
+    { base: '/', input: 'https://test.com', out: 'https://test.com' }
   ]
 
   for (const t of tests) {
Repository: maragudk/gomponents (go)

Issue:
Add svg element

Pull request:
Add svg element
Also add `cols` and `rows` attributes.

Fixes #43.

Patch:
diff --git a/attr/simple.go b/attr/simple.go
index d7d4ab8..a96c139 100644
--- a/attr/simple.go
+++ b/attr/simple.go
@@ -20,6 +20,10 @@ func Class(v string) g.Node {
 	return g.Attr("class", v)
 }
 
+func Cols(v string) g.Node {
+	return g.Attr("cols", v)
+}
+
 func Content(v string) g.Node {
 	return g.Attr("content", v)
 }
@@ -80,6 +84,10 @@ func Rel(v string) g.Node {
 	return g.Attr("rel", v)
 }
 
+func Rows(v string) g.Node {
+	return g.Attr("rows", v)
+}
+
 func Src(v string) g.Node {
 	return g.Attr("src", v)
 }
diff --git a/el/simple.go b/el/simple.go
index 2fb4c3e..1ebf33f 100644
--- a/el/simple.go
+++ b/el/simple.go
@@ -216,6 +216,10 @@ func Summary(children ...g.Node) g.NodeFunc {
 	return g.El("summary", children...)
 }
 
+func SVG(children ...g.Node) g.NodeFunc {
+	return g.El("svg", children...)
+}
+
 func Table(children ...g.Node) g.NodeFunc {
 	return g.El("table", children...)
 }


Test patch:
diff --git a/attr/simple_test.go b/attr/simple_test.go
index 6181322..d006b76 100644
--- a/attr/simple_test.go
+++ b/attr/simple_test.go
@@ -15,6 +15,7 @@ func TestSimpleAttributes(t *testing.T) {
 		"autocomplete": attr.AutoComplete,
 		"charset":      attr.Charset,
 		"class":        attr.Class,
+		"cols":         attr.Cols,
 		"content":      attr.Content,
 		"form":         attr.Form,
 		"height":       attr.Height,
@@ -30,6 +31,7 @@ func TestSimpleAttributes(t *testing.T) {
 		"preload":      attr.Preload,
 		"placeholder":  attr.Placeholder,
 		"rel":          attr.Rel,
+		"rows":         attr.Rows,
 		"src":          attr.Src,
 		"style":        attr.Style,
 		"tabindex":     attr.TabIndex,
diff --git a/el/simple_test.go b/el/simple_test.go
index f01ba51..2621982 100644
--- a/el/simple_test.go
+++ b/el/simple_test.go
@@ -54,6 +54,7 @@ func TestSimpleElements(t *testing.T) {
 		"span":       el.Span,
 		"style":      el.Style,
 		"summary":    el.Summary,
+		"svg":        el.SVG,
 		"table":      el.Table,
 		"tbody":      el.TBody,
 		"td":         el.Td,
Repository: ant-design/ant-design-mobile (ts)

Issue:
touchstart 页面其他位置时，应该立即隐藏 popover
- [x] I have searched the [issues](https://github.com/ant-design/ant-design-mobile/issues) of this repository and believe that this is not a duplicate.

### What problem does this feature solve?
不立即隐藏的情况下，拖放屏幕滚动时 Popover 一直固定在同一个位置上，和 trigger 分离。如图示：

![popover](https://user-images.githubusercontent.com/143572/71142610-d25a0900-2252-11ea-9c94-03bf6fe41b66.gif)

### What does the proposed API look like?
希望 touchstart 页面其他位置时，立即隐藏 Popover 组件。


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->

Pull request:
fix: Popover should close when screen move
fix #3497

Patch:
diff --git a/src/components/popover/popover.tsx b/src/components/popover/popover.tsx
index 5f192224e..968818665 100644
--- a/src/components/popover/popover.tsx
+++ b/src/components/popover/popover.tsx
@@ -69,7 +69,7 @@ export const Popover = forwardRef<PopoverRef, PopoverProps>((p, ref) => {
   const { mode = 'light' } = props
   const placement = normalizePlacement(props.placement)
 
-  const [visible, setVisible] = usePropsValue({
+  const [visible, setVisible] = usePropsValue<boolean>({
     value: props.visible,
     defaultValue: props.defaultVisible,
     onChange: props.onVisibleChange,
@@ -201,7 +201,8 @@ export const Popover = forwardRef<PopoverRef, PopoverProps>((p, ref) => {
       if (!props.trigger) return
       setVisible(false)
     },
-    () => targetRef.current?.element
+    [() => targetRef.current?.element, floatingRef],
+    ['click', 'touchmove']
   )
 
   const shouldRender = useShouldRender(visible, false, props.destroyOnHide)


Test patch:
diff --git a/src/components/popover/tests/popover.test.tsx b/src/components/popover/tests/popover.test.tsx
new file mode 100644
index 000000000..a8e4821db
--- /dev/null
+++ b/src/components/popover/tests/popover.test.tsx
@@ -0,0 +1,27 @@
+import * as React from 'react'
+import { render, cleanup, fireEvent } from 'testing'
+import Popover from '..'
+import Button from '../../button'
+
+describe('Popover', () => {
+  test('Touch outside to move should close Popover', () => {
+    const { container } = render(
+      <Popover content='Bamboo' trigger='click' defaultVisible>
+        <Button />
+      </Popover>
+    )
+
+    expect(document.querySelector('.adm-popover-hidden')).toBeFalsy()
+    expect(
+      document.querySelector('.adm-popover-inner-content')?.textContent
+    ).toEqual('Bamboo')
+
+    // Not close
+    fireEvent.touchMove(document.querySelector('.adm-popover-inner-content')!)
+    expect(document.querySelector('.adm-popover-hidden')).toBeFalsy()
+
+    // Close
+    fireEvent.touchMove(document.body)
+    expect(document.querySelector('.adm-popover-hidden')).toBeTruthy()
+  })
+})
Repository: yannickcr/eslint-plugin-react (js)

Issue:
no-deprecated - React.addons.TestUtils doesn't create a warning
When using `React.addons.TestUtils` a warning should be thrown, since the addons entry point is deprecated as of **15.5.0** (as per the [official documentation](https://reactjs.org/docs/addons.html))

The error that should be thrown is:
**React.addons.TestUtils is deprecated since React 15.5.0, use ReactDOM.TestUtils instead.**


Pull request:
Adding a warning for React.addons.TestUtils.
This pull request fixes #1644.

Patch:
diff --git a/lib/rules/no-deprecated.js b/lib/rules/no-deprecated.js
index 78ae1c81..6e8c88e2 100644
--- a/lib/rules/no-deprecated.js
+++ b/lib/rules/no-deprecated.js
@@ -69,6 +69,7 @@ module.exports = {
       deprecated['Perf.getMeasurementsSummaryMap'] = ['15.0.0', 'Perf.getWasted'];
       // 15.5.0
       deprecated[`${pragma}.createClass`] = ['15.5.0', 'the npm module create-react-class'];
+      deprecated[`${pragma}.addons.TestUtils`] = ['15.5.0', 'ReactDOM.TestUtils'];
       deprecated[`${pragma}.PropTypes`] = ['15.5.0', 'the npm module prop-types'];
       // 15.6.0
       deprecated[`${pragma}.DOM`] = ['15.6.0', 'the npm module react-dom-factories'];


Test patch:
diff --git a/tests/lib/rules/no-deprecated.js b/tests/lib/rules/no-deprecated.js
index a360c752..9ddcd6b9 100644
--- a/tests/lib/rules/no-deprecated.js
+++ b/tests/lib/rules/no-deprecated.js
@@ -68,6 +68,11 @@ ruleTester.run('no-deprecated', rule, {
     errors: [{
       message: 'this.transferPropsTo is deprecated since React 0.12.0, use spread operator ({...}) instead'
     }]
+  }, {
+    code: 'React.addons.TestUtils',
+    errors: [{
+      message: 'React.addons.TestUtils is deprecated since React 15.5.0, use ReactDOM.TestUtils instead'
+    }]
   }, {
     code: 'React.addons.classSet()',
     errors: [{
Repository: ota-meshi/eslint-plugin-regexp (ts)

Issue:
`no-useless-lazy` doesn't handle negated lookarounds correctly
**Description**
I just noticed that `no-useless-lazy` didn't report `/\b\w+?\b/` even though the lazy modifier is useless because the quantifier is effectively possessive.

![image](https://user-images.githubusercontent.com/20878432/134643916-03e50bc5-8783-403f-a562-30e44f8784dc.png)


```js
/* ✗ BAD */
var foo = /f\w+?(?=\W)/; // correct
var foo = /f\w+?\b/;     // false negative
var foo = /f\w+?(?!\w)/; // false negative
var foo = /f\w+?$/;      // false negative
```

Pull request:
Fix `no-useless-lazy` false negative
This fixes #334.

![image](https://user-images.githubusercontent.com/20878432/134643976-128ce079-69bf-4b93-8109-1baefa8a0041.png)


Patch:
diff --git a/lib/rules/no-useless-lazy.ts b/lib/rules/no-useless-lazy.ts
index 1987a67..ed2f26d 100644
--- a/lib/rules/no-useless-lazy.ts
+++ b/lib/rules/no-useless-lazy.ts
@@ -102,10 +102,7 @@ export default createRule("no-useless-lazy", {
                             matchingDir,
                             flags,
                         )
-                        if (
-                            !after.edge &&
-                            firstChar.char.isDisjointWith(after.char)
-                        ) {
+                        if (firstChar.char.isDisjointWith(after.char)) {
                             context.report({
                                 node,
                                 loc: getLazyLoc(regexpContext, qNode),


Test patch:
diff --git a/tests/lib/rules/no-useless-lazy.ts b/tests/lib/rules/no-useless-lazy.ts
index 58e35c6..3fbf3ec 100644
--- a/tests/lib/rules/no-useless-lazy.ts
+++ b/tests/lib/rules/no-useless-lazy.ts
@@ -82,5 +82,26 @@ tester.run("no-useless-lazy", rule as any, {
             output: `/(?:a|cd)+(?:b+|zzz)/`,
             errors: [{ messageId: "possessive" }],
         },
+
+        {
+            code: String.raw`/\b\w+?(?=\W)/`,
+            output: String.raw`/\b\w+(?=\W)/`,
+            errors: [{ messageId: "possessive" }],
+        },
+        {
+            code: String.raw`/\b\w+?(?!\w)/`,
+            output: String.raw`/\b\w+(?!\w)/`,
+            errors: [{ messageId: "possessive" }],
+        },
+        {
+            code: String.raw`/\b\w+?\b/`,
+            output: String.raw`/\b\w+\b/`,
+            errors: [{ messageId: "possessive" }],
+        },
+        {
+            code: String.raw`/\b\w+?$/`,
+            output: String.raw`/\b\w+$/`,
+            errors: [{ messageId: "possessive" }],
+        },
     ],
 })
Repository: zeromicro/go-zero (go)

Issue:
a doubt of goctl help message
**Describe the bug**
![image](https://user-images.githubusercontent.com/9588681/190881599-17e941c6-4b8e-4990-b419-8e07fe3f6e53.png)

**To Reproduce**
goctl api -h         

1. The code is

   ```go
   goCmd = &cobra.Command{
		Use:   "go",
		Short: "Generate go files for provided api in yaml file",
		RunE:  gogen.GoCommand,
	}
   ```

2. The error is

   ```
   Generate go files for provided api in yaml file
   ```

**Expected behavior**
Generate go files for provided api in api file



**Environments (please complete the following information):**
 - OS: [Linux]
 - go-zero version [1.4.0]

**More description**

I think, Generate go files for provided api in api file not in yaml file




Pull request:
fix goctl help message
fix #2408 

Patch:
diff --git a/tools/goctl/api/cmd.go b/tools/goctl/api/cmd.go
index 8bd0e9a7..71667c1b 100644
--- a/tools/goctl/api/cmd.go
+++ b/tools/goctl/api/cmd.go
@@ -43,7 +43,7 @@ var (
 
 	goCmd = &cobra.Command{
 		Use:   "go",
-		Short: "Generate go files for provided api in yaml file",
+		Short: "Generate go files for provided api in api file",
 		RunE:  gogen.GoCommand,
 	}
 


Test patch:
diff --git a/gateway/internal/requestparser_test.go b/gateway/internal/requestparser_test.go
index ede871f0..c910d02a 100644
--- a/gateway/internal/requestparser_test.go
+++ b/gateway/internal/requestparser_test.go
@@ -53,3 +53,16 @@ func TestNewRequestParserWithForm(t *testing.T) {
 	assert.Nil(t, err)
 	assert.NotNil(t, parser)
 }
+
+func TestNewRequestParserWithBadForm(t *testing.T) {
+	req := httptest.NewRequest("GET", "/val?a%1=b", nil)
+	parser, err := NewRequestParser(req, nil)
+	assert.NotNil(t, err)
+	assert.Nil(t, parser)
+}
+
+func TestRequestParser_buildJsonRequestParser(t *testing.T) {
+	parser, err := buildJsonRequestParser(map[string]interface{}{"a": make(chan int)}, nil)
+	assert.NotNil(t, err)
+	assert.Nil(t, parser)
+}