nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: mozilla-services/react-jsonschema-form
Pull request #1341 (2019-06-30 22:28:56)

Pass maximum and minimum to NumberField
Pass the `maximum` and `minimum` schema fields to NumberField (to the `max` and `min` props, respectively).


Patch:
diff --git a/src/components/widgets/BaseInput.js b/src/components/widgets/BaseInput.js
index 30afb03cd..698208e53 100644
--- a/src/components/widgets/BaseInput.js
+++ b/src/components/widgets/BaseInput.js
@@ -49,6 +49,14 @@ function BaseInput(props) {
     inputProps.step = schema.multipleOf;
   }
 
+  if (typeof schema.minimum !== "undefined") {
+    inputProps.min = schema.minimum;
+  }
+
+  if (typeof schema.maximum !== "undefined") {
+    inputProps.max = schema.maximum;
+  }
+
   const _onChange = ({ target: { value } }) => {
     return props.onChange(value === "" ? options.emptyValue : value);
   };


Test patch:
diff --git a/test/NumberField_test.js b/test/NumberField_test.js
index ac2ee08aa..42bb7f285 100644
--- a/test/NumberField_test.js
+++ b/test/NumberField_test.js
@@ -308,6 +308,28 @@ describe("NumberField", () => {
 
       expect(node.querySelector("input").step).to.eql("5");
     });
+
+    it("should use min to represent the minimum keyword", () => {
+      const { node } = createFormComponent({
+        schema: {
+          type: "number",
+          minimum: 0,
+        },
+      });
+
+      expect(node.querySelector("input").min).to.eql("0");
+    });
+
+    it("should use max to represent the maximum keyword", () => {
+      const { node } = createFormComponent({
+        schema: {
+          type: "number",
+          maximum: 100,
+        },
+      });
+
+      expect(node.querySelector("input").max).to.eql("100");
+    });
   });
 
   describe("SelectWidget", () => {
Repository: source-academy/js-slang
Pull request #111 (2018-11-04 11:47:41)

Fix multidimensional arrays as string.
Temporary fix, as no truncation is done for arrays with too many elements.

coveralls: ## Pull Request Test Coverage Report for [Build 262](https://coveralls.io/builds/19897070)

* **1** of **1**   **(100.0%)**  changed or added relevant line in **1** file are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage increased (+**0.1%**) to **52.542%**

---



|  Totals | [![Coverage Status](https://coveralls.io/builds/19897070/badge)](https://coveralls.io/builds/19897070) |
| :-- | --: |
| Change from base [Build 258](https://coveralls.io/builds/19859664): |  0.1% |
| Covered Lines: | 990 |
| Relevant Lines: | 1760 |

---
##### 💛  - [Coveralls](https://coveralls.io)

openorclose: done

Patch:
diff --git a/package.json b/package.json
index ec7f9ccf..1dbf5851 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "js-slang",
-  "version": "0.1.16",
+  "version": "0.1.17",
   "description": "Javascript-based interpreter for slang, written in Typescript",
   "author": {
     "name": "Source Academy",
diff --git a/src/interop.ts b/src/interop.ts
index e55db7ce..aae9a6a1 100644
--- a/src/interop.ts
+++ b/src/interop.ts
@@ -50,7 +50,7 @@ const stripBody = (body: string) => {
 const arrayToString = (value: Value[], length: number) => {
   // Normal Array
   if (value.length > 2 || value.length === 1) {
-    return `[${value}]`
+    return `[${value.map(v => toString(v, length + 1)).join(', ')}]`
   } else if (value.length === 0) {
     return '[]'
   } else {


Test patch:
diff --git a/src/__tests__/__snapshots__/index.ts.snap b/src/__tests__/__snapshots__/index.ts.snap
index fc429cc0..6b8d1a69 100644
--- a/src/__tests__/__snapshots__/index.ts.snap
+++ b/src/__tests__/__snapshots__/index.ts.snap
@@ -251,6 +251,13 @@ Object {
 }
 `;
 
+exports[`Multi-dimensional arrays display properly 1`] = `
+Object {
+  "status": "finished",
+  "value": "[1, function a() {}, 3, [() => 1, 5]]",
+}
+`;
+
 exports[`Simple inifinite recursion represents CallExpression well 1`] = `
 "Line 1: Infinite recursion
   x(x => x(x))..  x(x => x(x))..  x(x => x(x)).."
diff --git a/src/__tests__/index.ts b/src/__tests__/index.ts
index 96c10714..321040a1 100644
--- a/src/__tests__/index.ts
+++ b/src/__tests__/index.ts
@@ -208,3 +208,17 @@ test('Metacircular Interpreter parses Arrow Function Assignments properly', () =
     expect(obj.status).toBe('finished')
   })
 })
+
+test('Multi-dimensional arrays display properly', () => {
+  const code = `
+    function a() {} 
+    ""+[1, a, 3, [() => 1, 5]];
+   `;
+  const context = mockContext(4)
+  const promise = runInContext(code, context, { scheduler: 'preemptive' })
+  return promise.then(obj => {
+    expect(obj).toMatchSnapshot()
+    expect(obj.status).toBe('finished')
+    expect((obj as Finished).value).toBe('[1, function a() {}, 3, [() => 1, 5]]')
+  })
+})