PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: blitz-js/superjson (ts)

Issue:
Custom error serialization broken in 1.4.0
I added `registerClass` in Blitz internals so that blitz custom errors are fully deserialized on the client to work with `instanceof`. This works great in 1.3.0, but breaks in 1.4.0.

In 1.4.0, the custom error is serialized as a plain Error instead of the custom error class.

Also, I noticed that in 1.4.0 extra static properties on the error are not serialized. In 1.3.0 blitz errors have `statusCode` properly serialized, but in `1.4.0` they don't.

Related Blitz PR: https://github.com/blitz-js/blitz/pull/1414

Pull request:
Fix #80
Closes #80 

Patch:
diff --git a/src/transformer.ts b/src/transformer.ts
index 54dd8c3..0aee497 100644
--- a/src/transformer.ts
+++ b/src/transformer.ts
@@ -240,24 +240,24 @@ const compositeRules = [classRule, symbolRule, customRule];
 export const transformValue = (
   value: any
 ): { value: any; type: TypeAnnotation } | undefined => {
-  const applicableSimpleRule = find(simpleRules, rule =>
+  const applicableCompositeRule = find(compositeRules, rule =>
     rule.isApplicable(value)
   );
-
-  if (applicableSimpleRule) {
+  if (applicableCompositeRule) {
     return {
-      value: applicableSimpleRule.transform(value as never),
-      type: applicableSimpleRule.annotation,
+      value: applicableCompositeRule.transform(value as never),
+      type: applicableCompositeRule.annotation(value),
     };
   }
 
-  const applicableCompositeRule = find(compositeRules, rule =>
+  const applicableSimpleRule = find(simpleRules, rule =>
     rule.isApplicable(value)
   );
-  if (applicableCompositeRule) {
+
+  if (applicableSimpleRule) {
     return {
-      value: applicableCompositeRule.transform(value as never),
-      type: applicableCompositeRule.annotation(value),
+      value: applicableSimpleRule.transform(value as never),
+      type: applicableSimpleRule.annotation,
     };
   }
 


Test patch:
diff --git a/src/index.test.ts b/src/index.test.ts
index 25fd2e2..bfebe31 100644
--- a/src/index.test.ts
+++ b/src/index.test.ts
@@ -716,4 +716,27 @@ describe('stringify & parse', () => {
 
     global.BigInt = oldBigInt;
   });
+
+  test('regression #80: Custom error serialisation isnt overriden', () => {
+    class CustomError extends Error {
+      constructor(public readonly customProperty: number) {
+        super("I'm a custom error");
+        // eslint-disable-next-line es5/no-es6-static-methods
+        Object.setPrototypeOf(this, CustomError.prototype);
+      }
+    }
+
+    expect(new CustomError(10)).toBeInstanceOf(CustomError);
+
+    SuperJSON.registerClass(CustomError);
+
+    const { error } = SuperJSON.deserialize(
+      SuperJSON.serialize({
+        error: new CustomError(10),
+      })
+    ) as any;
+
+    expect(error).toBeInstanceOf(CustomError);
+    expect(error.customProperty).toEqual(10);
+  });
 });
Repository: stylelint/vscode-stylelint (ts)

Issue:
[Bug]: Updating the Stylelint configuration in a workspace doesn't cause files to be re-linted
### How did you encounter this bug?

Updating the Stylelint configuration in a workspace doesn't cause files to be re-linted.

### Code Snippet

_No response_

### Stylelint Configuration

_No response_

### Extension Configuration

_No response_

### Actual Behaviour

Files are not re-linted when configuration files are updated.

### Expected Behaviour

Files should be re-linted when configuration files are updated.

### Logs

_No response_

### Stylelint Version

v14.1.0

### vscode-stylelint Version

v1.2.1

### Node.js Version

v17.1.0

### Operating System

Windows 11 21H2

### Windows Subsystem for Linux

_No response_

### Code of Conduct

- [X] I agree to follow vscode-stylelint's Code of Conduct

Pull request:
fix: de-nest globs used for watching config files
Closes #343

Patch:
diff --git a/src/extension/extension.ts b/src/extension/extension.ts
index 85a62b4..489e2f7 100644
--- a/src/extension/extension.ts
+++ b/src/extension/extension.ts
@@ -34,9 +34,10 @@ export function activate({ subscriptions }: vscode.ExtensionContext): PublicApi
 			documentSelector: [{ scheme: 'file' }, { scheme: 'untitled' }],
 			diagnosticCollectionName: 'Stylelint',
 			synchronize: {
-				fileEvents: workspace.createFileSystemWatcher(
-					'**/{.stylelintrc{,.js,.json,.yaml,.yml},stylelint.config.js,.stylelintignore}',
-				),
+				fileEvents: [
+					workspace.createFileSystemWatcher('**/.stylelintrc{,.js,.json,.yaml,.yml}'),
+					workspace.createFileSystemWatcher('**/{stylelint.config.js,.stylelintignore}'),
+				],
 			},
 		},
 	);


Test patch:
diff --git a/src/extension/__tests__/__snapshots__/extension.ts.snap b/src/extension/__tests__/__snapshots__/extension.ts.snap
index 55ff3e2..69d1b0e 100644
--- a/src/extension/__tests__/__snapshots__/extension.ts.snap
+++ b/src/extension/__tests__/__snapshots__/extension.ts.snap
@@ -28,7 +28,10 @@ Array [
       },
     ],
     "synchronize": Object {
-      "fileEvents": undefined,
+      "fileEvents": Array [
+        undefined,
+        undefined,
+      ],
     },
   },
 ]
diff --git a/src/extension/__tests__/extension.ts b/src/extension/__tests__/extension.ts
index c80b36b..c4323ab 100644
--- a/src/extension/__tests__/extension.ts
+++ b/src/extension/__tests__/extension.ts
@@ -117,10 +117,15 @@ describe('Extension entry point', () => {
 	it('should watch for changes to Stylelint configuration files', () => {
 		activate(mockExtensionContext);
 
-		expect(mockWorkspace.createFileSystemWatcher).toHaveBeenCalled();
+		expect(mockWorkspace.createFileSystemWatcher).toHaveBeenCalledTimes(2);
 		expect(mockWorkspace.createFileSystemWatcher.mock.calls[0]).toMatchInlineSnapshot(`
 		Array [
-		  "**/{.stylelintrc{,.js,.json,.yaml,.yml},stylelint.config.js,.stylelintignore}",
+		  "**/.stylelintrc{,.js,.json,.yaml,.yml}",
+		]
+	`);
+		expect(mockWorkspace.createFileSystemWatcher.mock.calls[1]).toMatchInlineSnapshot(`
+		Array [
+		  "**/{stylelint.config.js,.stylelintignore}",
 		]
 	`);
 	});