PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: FHIR/sushi (ts)

Issue:
Cannot assign ValueSets to contained element in instances
If you create a value set using `ValueSet:`, then you _can_ assign it to `^contained` in a profile, but you _can't_ assign it to `contained` in an instance.  But... it _should_ work in both cases.  _(NOTE: We should also ensure it works for other things like `CodeSystem`, `Profile`, `Extension`, etc)._

FSH Online: https://fshschool.org/FSHOnline/#/share/3rLqOJ5

Pull request:
All resource types supported as instance values on fixed value rules
Fixes #971, allowing `ValueSets` (and all other resource types) to be included on Instances as the value in fixed value rules. Also changes the copyrightDate in our `sushi-config.yaml` fixtures to reflect the new year.

Patch:
diff --git a/src/export/InstanceExporter.ts b/src/export/InstanceExporter.ts
index d18443a..d34276f 100644
--- a/src/export/InstanceExporter.ts
+++ b/src/export/InstanceExporter.ts
@@ -318,6 +318,12 @@ export class InstanceExporter implements Fishable {
       if (fshDefinition) {
         this.exportInstance(fshDefinition);
         result = this.pkg.fish(item, Type.Instance) as InstanceDefinition;
+      } else {
+        // If we don't find any Instances with the name, fish for other resources
+        const fishedFHIR = this.fisher.fishForFHIR(item);
+        if (fishedFHIR && fishedFHIR.resourceType) {
+          result = InstanceDefinition.fromJSON(fishedFHIR);
+        }
       }
     }
     return result;


Test patch:
diff --git a/test/export/InstanceExporter.test.ts b/test/export/InstanceExporter.test.ts
index 689b79d..c17cecd 100644
--- a/test/export/InstanceExporter.test.ts
+++ b/test/export/InstanceExporter.test.ts
@@ -3703,6 +3703,24 @@ describe('InstanceExporter', () => {
         ]);
       });
 
+      it('should assign other resources to an instance', () => {
+        const containedRule1 = new AssignmentRule('contained[0]');
+        containedRule1.value = 'allergyintolerance-clinical';
+        containedRule1.isInstance = true;
+        patientInstance.rules.push(containedRule1); // * contained[0] = allergyintolerance-clinical
+
+        const containedRule2 = new AssignmentRule('contained[1]');
+        containedRule2.value = 'w3c-provenance-activity-type';
+        containedRule2.isInstance = true;
+        patientInstance.rules.push(containedRule2); // * contained[1] = w3c-provenance-activity-type
+
+        const exported = exportInstance(patientInstance);
+        expect(exported.contained[0].id).toBe('allergyintolerance-clinical');
+        expect(exported.contained[0].resourceType).toBe('ValueSet');
+        expect(exported.contained[1].id).toBe('w3c-provenance-activity-type');
+        expect(exported.contained[1].resourceType).toBe('CodeSystem');
+      });
+
       it('should assign an inline resource to an instance element with a specific type', () => {
         const bundleValRule = new AssignmentRule('entry[PatientsOnly].resource');
         bundleValRule.value = 'MyInlinePatient';
Repository: streamich/memfs (ts)

Issue:
"utimes" doesn't work for directories: "EISDIR: illegal operation on a directory, open ..." error
`utimes` calls `utimesBase` which uses `openSync` call internally but `openSync` call on a directory obviously throws `EISDIR` error.

https://github.com/streamich/memfs/blob/674a1e78469e1e9e766db7e3160538e958fdd97b/src/volume.ts#L1771-L1778

Pull request:
fix: support calling `utimes` on a directory
- "EISDIR: illegal operation on a directory, open ..." error
- https://github.com/streamich/memfs/issues/391

Resolves #391

Patch:
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644
index 00000000..4407bb3f
--- /dev/null
+++ b/.github/workflows/lint.yml
@@ -0,0 +1,15 @@
+name: Lint
+on: [pull_request]
+
+jobs:
+  commitlint:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+      - uses: wagoid/commitlint-github-action@v5
+        with:
+          configFile: './package.json'
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/package.json b/package.json
index aa0a83d9..891fd6c4 100644
--- a/package.json
+++ b/package.json
@@ -49,6 +49,11 @@
       "path": "git-cz"
     }
   },
+  "commitlint": {
+    "extends": [
+      "@commitlint/config-conventional"
+    ]
+  },
   "jest": {
     "moduleFileExtensions": [
       "ts",
diff --git a/src/volume.ts b/src/volume.ts
index 4f635324..18cbf780 100644
--- a/src/volume.ts
+++ b/src/volume.ts
@@ -1881,7 +1881,7 @@ export class Volume {
   }
 
   private utimesBase(filename: string, atime: number, mtime: number) {
-    const fd = this.openSync(filename, 'r+');
+    const fd = this.openSync(filename, 'r');
     try {
       this.futimesBase(fd, atime, mtime);
     } finally {


Test patch:
diff --git a/src/__tests__/volume.test.ts b/src/__tests__/volume.test.ts
index 9950c247..7f393a31 100644
--- a/src/__tests__/volume.test.ts
+++ b/src/__tests__/volume.test.ts
@@ -968,10 +968,17 @@ describe('volume', () => {
     });
     describe('.utimesSync(path, atime, mtime)', () => {
       const vol = new Volume();
+      vol.mkdirSync('/foo');
       it('Set times on file', () => {
-        vol.writeFileSync('/lol', '12345');
-        vol.utimesSync('/lol', 1234, 12345);
-        const stats = vol.statSync('/lol');
+        vol.writeFileSync('/foo/lol', '12345');
+        vol.utimesSync('/foo/lol', 1234, 12345);
+        const stats = vol.statSync('/foo/lol');
+        expect(Math.round(stats.atime.getTime() / 1000)).toBe(1234);
+        expect(Math.round(stats.mtime.getTime() / 1000)).toBe(12345);
+      });
+      it('Sets times on a directory', () => {
+        vol.utimesSync('/foo', 1234, 12345);
+        const stats = vol.statSync('/foo');
         expect(Math.round(stats.atime.getTime() / 1000)).toBe(1234);
         expect(Math.round(stats.mtime.getTime() / 1000)).toBe(12345);
       });