From 04a55733fa554688ca647ef03bc2428186899538 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 7 Jan 2026 21:54:28 +0000 Subject: [PATCH 1/2] Initial plan From 53e7e3cd00438e529c6bbc828800680872669f3d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 7 Jan 2026 22:06:48 +0000 Subject: [PATCH 2/2] feat(oxlint/napi): enhance workspace management with improved documentation Co-authored-by: Sysix <3897725+Sysix@users.noreply.github.com> --- apps/oxlint/src-js/plugins/workspace.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/apps/oxlint/src-js/plugins/workspace.ts b/apps/oxlint/src-js/plugins/workspace.ts index e8682895c6b9d..fb1e417f1ad21 100644 --- a/apps/oxlint/src-js/plugins/workspace.ts +++ b/apps/oxlint/src-js/plugins/workspace.ts @@ -16,7 +16,13 @@ import { registeredPluginUrls, registeredRules } from "./load.js"; const workspaceRoots = new Set(); /** - * Create a new workspace. + * Creates a new workspace and initializes plugin and rule storage for it. + * + * Registers the workspace root directory and sets up empty collections for + * plugin URLs and rules. Throws an error in DEBUG mode if the workspace + * already exists. + * + * @param rootDir - The root directory of the workspace to create. */ export const createWorkspace = async (rootDir: string): Promise => { if (DEBUG) { @@ -30,7 +36,13 @@ export const createWorkspace = async (rootDir: string): Promise => { }; /** - * Destroy a workspace. + * Destroys an existing workspace and frees all associated resources. + * + * Removes the workspace root directory from the internal sets and maps, + * effectively clearing all plugin URLs and rules registered for this workspace. + * Throws an error in DEBUG mode if the workspace does not exist. + * + * @param rootDir - The root directory of the workspace to destroy. */ export const destroyWorkspace = (rootDir: string): undefined => { if (DEBUG) {