Skip to content

Commit 07f7467

Browse files
chore: update dependencies
Signed-off-by: Henry Gressmann <[email protected]>
1 parent 40b76d1 commit 07f7467

File tree

4 files changed

+135
-67
lines changed

4 files changed

+135
-67
lines changed

biome.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
"enabled": false
99
},
1010
"files": {
11-
"ignore": ["**/node_modules/*", "**/dist/*", "**/.turbo/*"]
11+
"ignore": [
12+
"**/node_modules/*",
13+
"**/dist/*",
14+
"**/.turbo/*"
15+
]
1216
},
1317
"linter": {
1418
"enabled": true,
@@ -25,8 +29,9 @@
2529
"noRedeclare": "off"
2630
},
2731
"complexity": {
28-
"noBannedTypes": "off"
32+
"noBannedTypes": "off",
33+
"noForEach": "off"
2934
}
3035
}
3136
}
32-
}
37+
}

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
"test": "turbo run test --include-dependencies"
1212
},
1313
"devDependencies": {
14-
"@biomejs/biome": "1.2.2",
15-
"@biomejs/cli-linux-x64": "^1.2.2",
14+
"@biomejs/biome": "1.3.1",
15+
"@biomejs/cli-linux-x64": "^1.3.1",
1616
"@changesets/changelog-github": "^0.4.8",
1717
"@changesets/cli": "^2.26.2",
18-
"@types/node": "^20.8.2",
18+
"@types/node": "^20.8.7",
1919
"scripts": "workspace:*",
20-
"turbo": "^1.10.15"
20+
"turbo": "^1.10.16"
2121
},
2222
"dependencies": {
2323
"typescript": "^5.2.2"
2424
}
25-
}
25+
}

packages/unlocked/lib/utils.ts

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,36 @@ import { resolve } from "import-meta-resolve";
33
import { readdir, readFile, stat } from "node:fs/promises";
44
import { join, relative } from "node:path";
55
import { fileURLToPath, pathToFileURL } from "node:url";
6-
import type { CommonLock, DependencyName, Funding, PackageJson, QualifiedDependencyName } from "./types";
6+
import type {
7+
CommonLock,
8+
Dependencies,
9+
DependencyName,
10+
ImporterSnapshots,
11+
PackageJson,
12+
PackageSnapshots,
13+
QualifiedDependencyName,
14+
} from "./types";
715

816
export const mergeCommonLockFiles = (...lockFiles: CommonLock[]): CommonLock => {
17+
const importers: ImporterSnapshots = {};
18+
const packages: PackageSnapshots = {};
19+
const overrides: Dependencies = {};
20+
21+
for (const lock of lockFiles) {
22+
Object.assign(importers, lock.importers);
23+
Object.assign(packages, lock.packages);
24+
Object.assign(overrides, lock.overrides);
25+
}
26+
927
const lockfile: CommonLock = {
1028
commonLockVersion: 0,
1129
lockfileType: "unknown",
1230
lockfileVersion: 0,
1331
name: "unknown",
1432
version: "0.0.0",
15-
importers: lockFiles.reduce((acc, lock) => ({ ...acc, ...lock.importers }), {}),
16-
packages: lockFiles.reduce((acc, lock) => ({ ...acc, ...lock.packages }), {}),
17-
overrides: lockFiles.reduce((acc, lock) => ({ ...acc, ...lock.overrides }), {}),
33+
importers,
34+
packages,
35+
overrides,
1836
};
1937

2038
return lockfile;

0 commit comments

Comments
 (0)