Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1367a54
simplify findDependency logic with resolveInheritedRange
suhdonghwi Nov 6, 2025
4b02aea
add prettierrc & format files
suhdonghwi Nov 6, 2025
d2f79b5
better return types for findDependency
suhdonghwi Nov 6, 2025
0c0360b
findAllAccessibleGroups removal, replace with findDependency
suhdonghwi Nov 6, 2025
4f7372f
values<string>
suhdonghwi Nov 6, 2025
94bc8f8
remove console.log for debugging
suhdonghwi Nov 6, 2025
da22044
getValidationInfoForNonCatalogDependency add
suhdonghwi Nov 6, 2025
a0c131d
separate files
suhdonghwi Nov 6, 2025
e032632
configuration directory separation
suhdonghwi Nov 6, 2025
f1d82c4
ValidationLevel type separation
suhdonghwi Nov 6, 2025
96e37e2
add typecheck script
suhdonghwi Nov 6, 2025
50234d1
use omit
suhdonghwi Nov 6, 2025
a73b669
validateCatalogUsability
suhdonghwi Nov 6, 2025
00201bb
getCatalogProtocolUsability
suhdonghwi Nov 6, 2025
e22397b
getUnusedCatalogDependencies
suhdonghwi Nov 6, 2025
5b6e27e
return descriptors
suhdonghwi Nov 6, 2025
a585773
build plugin
suhdonghwi Nov 6, 2025
c63da0f
use biome instead of prettier
Nov 7, 2025
f780e89
move configuration reading related methods to top
Nov 7, 2025
8ca2058
move methods (2)
Nov 7, 2025
685753f
clearCache better input
Nov 7, 2025
6415e63
move getInheritanceChain into utils.ts
Nov 7, 2025
ff95562
file separation
Nov 7, 2025
85d3f08
move files into utils/
Nov 7, 2025
3b4b45a
utils/functions
Nov 7, 2025
1e4e43c
rename functions
Nov 7, 2025
3085872
make private functions non exported
Nov 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://biomejs.dev/schemas/2.0.5/schema.json",
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"linter": {
"enabled": true
}
}
6 changes: 3 additions & 3 deletions bundles/@yarnpkg/plugin-catalogs.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"build:dev": "builder build plugin --no-minify",
"clean": "rimraf bundles",
"test": "yarn build && vitest run",
"test:watch": "yarn build && vitest watch"
"test:watch": "yarn build && vitest watch",
"typecheck": "tsc --noEmit"
},
"packageManager": "[email protected]"
}
16 changes: 8 additions & 8 deletions sources/__tests__/utils.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { dir as tmpDir } from "tmp-promise";
import { writeFile } from "fs/promises";
import { join } from "path";
import { execFile } from "child_process";
import { promisify } from "util";
import { writeFile } from "node:fs/promises";
import { join } from "node:path";
import { execFile } from "node:child_process";
import { promisify } from "node:util";
import { dump as yamlDump } from "js-yaml";
import * as fs from "fs/promises";
import * as fs from "node:fs/promises";

const execFileAsync = promisify(execFile);

Expand Down Expand Up @@ -58,7 +58,7 @@ export async function createTestWorkspace(): Promise<TestWorkspace> {
const existingContent = await fs
.readFile(yarnrcPath, "utf8")
.catch(() => "");
await writeFile(yarnrcPath, existingContent + "\n" + yamlDump(content));
await writeFile(yarnrcPath, `${existingContent}\n${yamlDump(content)}`);
};

return {
Expand All @@ -75,7 +75,7 @@ export async function createTestWorkspace(): Promise<TestWorkspace> {
*/
export async function createTestProtocolPlugin(
workspace: TestWorkspace,
protocolName: string
protocolName: string,
): Promise<string> {
const pluginCode = `
module.exports = {
Expand Down Expand Up @@ -122,7 +122,7 @@ export function extractDependencies(log: string): string[] {
.filter((str) => str != null && str.length > 0)
.map(
(depsString) =>
JSON.parse(depsString) as { value: string; children: object }
JSON.parse(depsString) as { value: string; children: object },
)
.reduce((result, item) => [...result, item.value], [] as string[]);
}
Loading