PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: canjs/can-zone (js)
Issue: Allow taking an Array in the constructor argument
Instead of having to do:

```js
new Zone({
  plugins: [...]
});
```

This would be nice if you're only using plugins:

```js
new Zone([
  ...
]);
```
Pull request description: Allow passing only an array as the ZoneSpec
This makes an Array a valid ZoneSpec. This is useful in the case where
you are only using plugins and not writing any of your own (which is
		common), so that you can write like so:

```js
new Zone([
  plugin(),

  another(arg)
]);
```

Closes #133

Patch:
diff --git a/lib/zone.js b/lib/zone.js
index 07c6fcb..208096f 100644
--- a/lib/zone.js
+++ b/lib/zone.js
@@ -86,6 +86,8 @@ function buildZoneSpec(zone, spec, plugins, processedSpecs){
 	plugins = plugins || [];
 	if(typeof spec === "function") {
 		spec = spec(zone.data);
+	} else if(Array.isArray(spec)) {
+		spec = { plugins: spec };
 	}
 
 	// Depth-first, call all of the plugins.


Test patch:
diff --git a/test/test.js b/test/test.js
index fa6c753..836b963 100644
--- a/test/test.js
+++ b/test/test.js
@@ -83,6 +83,19 @@ describe("new Zone", function(){
 		}).then(done);
 	});
 
+	it("Can pass plugins if using an Array as the Zone argument", function(done){
+		var endZone = {
+			ended: function(){
+				this.data.hasEnded = true;
+			}
+		};
+
+		new Zone([endZone]).run(function(){}).then(function(data){
+			assert.ok(data.hasEnded, "This zone was used");
+		})
+		.then(done, done);
+	});
+
 	it("Provides beforeRun and afterRun hooks", function(done){
 		var zone = new Zone(function(data){
 			return {
Repository: postcss/postcss-selector-parser (js)
Issue: Nested selector bug in lossy mode
#7 Introduced a bug in lossy mode.

It removes a 'space' combinator after a nested '&' token.

So '& .class' is parsed to '&.class', note the removal of the space.

I'll submit a PR.
Pull request description: Fix lossy bug using nested selectors
fix(lossy): bug removing space combinator after nested token. Fixes #102.

Patch:
diff --git a/src/parser.js b/src/parser.js
index 3b67048..629f033 100644
--- a/src/parser.js
+++ b/src/parser.js
@@ -129,7 +129,7 @@ export default class Parser {
                 node.spaces.after = this.parseSpace(this.currToken[1]);
             } else if (this.currToken[0] === 'combinator') {
                 node.value = this.currToken[1];
-            } else if (this.currToken[0] === 'space' && !(this.lossy && this.prevToken[0] === '&')) {
+            } else if (this.currToken[0] === 'space') {
                 node.value = this.parseSpace(this.currToken[1], ' ');
             }
             this.position ++;


Test patch:
diff --git a/src/__tests__/lossy.js b/src/__tests__/lossy.js
index aa9fdc4..b05114c 100644
--- a/src/__tests__/lossy.js
+++ b/src/__tests__/lossy.js
@@ -62,7 +62,7 @@ ava('universal - qualified universal selector', testLossy, '*[href] *:not(*.gree
 
 ava('nesting - spacing before', testLossy, '  &.class', '&.class');
 ava('nesting - spacing after', testLossy, '&.class  ', '&.class');
-ava('nesting - spacing between', testLossy, '&  .class  ', '&.class');
+ava('nesting - spacing between', testLossy, '&  .class  ', '& .class');
 
 ava('pseudo (single) - spacing before', testLossy, '  :after', ':after');
 ava('pseudo (single) - spacing after', testLossy, ':after  ', ':after');
Repository: lingui/js-lingui (ts)
Issue: t macro with variable id extracted as message with undefined id
**Describe the bug**
`t({id: foo})` calls are being extracted with `undefined` message id
```po
#~ messages.po

#: src/path/file.tsx:##
msgid "undefined"
msgstr ""
```

**To Reproduce**

```
// src/path/file.tsx

import {t} from "@lingui/macro"

const foo = t`foo`

const Component = () => {
  const text = t({id: foo})

  return <span>{text}</span>
}
```

**Expected behavior**
No `messages.po` changes

**Additional context**
Dependencies

```json
    "@lingui/cli": "3.2.3",
    "@lingui/loader": "3.2.3",
    "@lingui/macro": "3.2.3",
    "@lingui/react": "3.2.3",
    "babel-plugin-macros": "2.8.0",
    "react-scripts": "3.4.3",
    "typescript": "3.9.7",
```
Pull request description: fix: prevent adding undefined msgid to messages
Changes in `babel-plugin-extract-messages` packages:
- added reproduction test case where undefined msgid is being generated
- added a fix for that test case
- refactored related function a bit

Closes #905

Patch:
diff --git a/packages/babel-plugin-extract-messages/src/index.ts b/packages/babel-plugin-extract-messages/src/index.ts
index dd81c52c..8eaf1bca 100644
--- a/packages/babel-plugin-extract-messages/src/index.ts
+++ b/packages/babel-plugin-extract-messages/src/index.ts
@@ -19,6 +19,9 @@ function addMessage(
   messages,
   { id, message: newDefault, origin, comment, ...props }
 ) {
+  // prevent from adding undefined msgid
+  if (id === undefined) return
+
   if (messages.has(id)) {
     const message = messages.get(id)
 
@@ -27,15 +30,15 @@ function addMessage(
       throw path.buildCodeFrameError(
         "Different defaults for the same message ID."
       )
-    } else {
-      if (newDefault) {
-        message.message = newDefault
-      }
+    }
 
-      ;[].push.apply(message.origin, origin)
-      if (comment) {
-        ;[].push.apply(message.extractedComments, [comment])
-      }
+    if (newDefault) {
+      message.message = newDefault
+    }
+
+    ;[].push.apply(message.origin, origin)
+    if (comment) {
+      ;[].push.apply(message.extractedComments, [comment])
     }
   } else {
     const extractedComments = comment ? [comment] : []


Test patch:
diff --git a/packages/babel-plugin-extract-messages/test/fixtures/js-with-macros.js b/packages/babel-plugin-extract-messages/test/fixtures/js-with-macros.js
index f7c1ed96..607eb9c0 100644
--- a/packages/babel-plugin-extract-messages/test/fixtures/js-with-macros.js
+++ b/packages/babel-plugin-extract-messages/test/fixtures/js-with-macros.js
@@ -20,3 +20,9 @@ const withTId = t({
   id: "ID Some",
   message: "Message with id some"
 })
+
+const id = 'message id'
+
+const withUnknownId = t({
+  id: id
+})
Repository: jsonata-js/jsonata (js)
Issue: Transform error with null values
Hello,
I believe this is an error:

Input:

```json
{
  "hi": "world",
  "bye": null
}
```

Transform:

```js
$ ~> | ** ["hi"] | {"hello": hi}, ["hi"] |
```

Output with http://try.jsonata.org :

```
u is null
```

Instead, I would expect the following output:

```json
{
  "bye": null,
  "hello": "world"
}
```

Pull request description: check that target is an object before deleting property
Attempted to delete a property from a non-object value. 

Resolves #396 

Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>

Patch:
diff --git a/src/jsonata.js b/src/jsonata.js
index 8b03727..d23cfe4 100644
--- a/src/jsonata.js
+++ b/src/jsonata.js
@@ -1317,7 +1317,9 @@ var jsonata = (function() {
                                 };
                             }
                             for (var jj = 0; jj < deletions.length; jj++) {
-                                delete match[deletions[jj]];
+                                if(typeof match === 'object' && match !== null) {
+                                    delete match[deletions[jj]];
+                                }
                             }
                         }
                     }


Test patch:
diff --git a/test/test-suite/groups/transforms/case013.json b/test/test-suite/groups/transforms/case013.json
new file mode 100644
index 0000000..cedd37e
--- /dev/null
+++ b/test/test-suite/groups/transforms/case013.json
@@ -0,0 +1,12 @@
+{
+    "expr": "$ ~> | ** ['hi'] | {'hello': hi}, ['hi'] |",
+    "data": {
+        "hi": "world",
+        "bye": null
+    },
+    "bindings": {},
+    "result": {
+        "hello": "world",
+        "bye": null
+    }
+}
diff --git a/test/test-suite/groups/transforms/case014.json b/test/test-suite/groups/transforms/case014.json
new file mode 100644
index 0000000..053814f
--- /dev/null
+++ b/test/test-suite/groups/transforms/case014.json
@@ -0,0 +1,12 @@
+{
+    "expr": "$ ~> | ** [hi] | {'hello': hi}, ['hi'] |",
+    "data": {
+        "hi": "world",
+        "bye": null
+    },
+    "bindings": {},
+    "result": {
+        "bye": null,
+        "hello": "world"
+    }
+}
Repository: tailwindlabs/tailwindcss-jit (js)
Issue: Arbitrary styles issue with transition-duration
I tried to change the duration of transition, but jit compiler doesn't apply this. It always applies the default 150ms value. 

`transition duration-[250ms]`

Generated css; 
```css
.transition {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
```
Pull request description: Add support for arbitrary transition-duration
Resolves #68 

Patch:
diff --git a/src/corePlugins/transitionDuration.js b/src/corePlugins/transitionDuration.js
index 50dc15b..0a3cf92 100644
--- a/src/corePlugins/transitionDuration.js
+++ b/src/corePlugins/transitionDuration.js
@@ -1,9 +1,9 @@
-const { nameClass } = require('../pluginUtils')
+const { nameClass, asValue } = require('../pluginUtils')
 
 module.exports = function ({ matchUtilities, jit: { theme } }) {
   matchUtilities({
     duration: (modifier, { theme }) => {
-      let value = theme.transitionDuration[modifier]
+      let value = asValue(modifier, theme.transitionDuration)
 
       if (value === undefined) {
         return []


Test patch:
diff --git a/tests/08-arbitrary-values.test.css b/tests/08-arbitrary-values.test.css
index 1458d5a..29f73b4 100644
--- a/tests/08-arbitrary-values.test.css
+++ b/tests/08-arbitrary-values.test.css
@@ -76,3 +76,6 @@
 .text-\[2\.23rem\] {
   font-size: 2.23rem;
 }
+.duration-\[2s\] {
+  transition-duration: 2s;
+}
diff --git a/tests/08-arbitrary-values.test.html b/tests/08-arbitrary-values.test.html
index 68f9db4..f414c70 100644
--- a/tests/08-arbitrary-values.test.html
+++ b/tests/08-arbitrary-values.test.html
@@ -21,5 +21,6 @@
     <div class="grid-cols-[200px,repeat(auto-fill,minmax(15%,100px)),300px]"></div>
     <div class="rotate-[23deg] rotate-[2.3rad] rotate-[401grad] rotate-[1.5turn]"></div>
     <div class="text-[2.23rem]"></div>
+    <div class="duration-[2s]"></div>
   </body>
 </html>
Repository: mholt/PapaParse (js)
Issue: QuoteChar option in `unparse` blows up the parser if it's a regex special char
If you specify a regex special char as a quoteChar then the library blows up:

```
Papa.unparse('[{"a": "1", "b": "2", "c": "3"}]', { quoteChar: '(' })
```

> papaparse.min.js:6 Uncaught SyntaxError: Invalid regular expression: /(/: Unterminated group
>    at new RegExp (<anonymous>)
>    at Object.b [as unparse] (papaparse.min.js:6)
>    at <anonymous>:1:6


Pull request description: Consistently apply regex escaping to quoteChar
Closes #424 

Patch:
diff --git a/papaparse.js b/papaparse.js
index 66dba9d..7febbaf 100755
--- a/papaparse.js
+++ b/papaparse.js
@@ -278,7 +278,7 @@ License: MIT
 
 		unpackConfig();
 
-		var quoteCharRegex = new RegExp(_quoteChar, 'g');
+		var quoteCharRegex = new RegExp(escapeRegExp(_quoteChar), 'g');
 
 		if (typeof _input === 'string')
 			_input = JSON.parse(_input);
@@ -1417,7 +1417,7 @@ License: MIT
 
 			var nextDelim = input.indexOf(delim, cursor);
 			var nextNewline = input.indexOf(newline, cursor);
-			var quoteCharRegex = new RegExp(escapeChar.replace(/[-[\]/{}()*+?.\\^$|]/g, '\\$&') + quoteChar, 'g');
+			var quoteCharRegex = new RegExp(escapeRegExp(escapeChar) + escapeRegExp(quoteChar), 'g');
 			var quoteSearch;
 
 			// Parser loop


Test patch:
diff --git a/tests/test-cases.js b/tests/test-cases.js
index 69b9b25..2e19d68 100644
--- a/tests/test-cases.js
+++ b/tests/test-cases.js
@@ -1358,7 +1358,7 @@ var PARSE_TESTS = [
 		}
 	},
 	{
-		description: "Using reserved regex characters as quote characters",
+		description: "Using reserved regex character . as quote character",
 		input: '.a\na.,b\r\nc,d\r\ne,f\r\ng,h\r\ni,j',
 		config: { quoteChar: '.' },
 		expected: {
@@ -1373,6 +1373,22 @@ var PARSE_TESTS = [
 			}
 		}
 	},
+	{
+		description: "Using reserved regex character | as quote character",
+		input: '|a\na|,b\r\nc,d\r\ne,f\r\ng,h\r\ni,j',
+		config: { quoteChar: '|' },
+		expected: {
+			data: [['a\na', 'b'], ['c', 'd'], ['e', 'f'], ['g', 'h'], ['i', 'j']],
+			errors: [],
+			meta: {
+				linebreak: '\r\n',
+				delimiter: ',',
+				cursor: 27,
+				aborted: false,
+				truncated: false
+			}
+		}
+	},
 	{
 		description: "Parsing with skipEmptyLines set to 'greedy'",
 		notes: "Must parse correctly without lines with no content",