diff --git a/.changeset/flat-parents-hang.md b/.changeset/flat-parents-hang.md new file mode 100644 index 0000000000..a656036a41 --- /dev/null +++ b/.changeset/flat-parents-hang.md @@ -0,0 +1,5 @@ +--- +"vs-code-extension": minor +--- + +introduce inlang settings component diff --git a/.changeset/quick-ties-kneel.md b/.changeset/quick-ties-kneel.md new file mode 100644 index 0000000000..16973ca55d --- /dev/null +++ b/.changeset/quick-ties-kneel.md @@ -0,0 +1,7 @@ +--- +"@inlang/message-lint-rule-identical-pattern": patch +"@inlang/plugin-next-intl": patch +"@inlang/plugin-i18next": patch +--- + +fix typo diff --git a/inlang/source-code/ide-extension/assets/settings-view.css b/inlang/source-code/ide-extension/assets/settings-view.css new file mode 100644 index 0000000000..cb08cb0ac0 --- /dev/null +++ b/inlang/source-code/ide-extension/assets/settings-view.css @@ -0,0 +1,120 @@ +/* settings webview */ + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +html, body { + font-family: -apple-system, BlinkMacSystemFont, "Segoe WUI", "Ubuntu", sans-serif; + color: var(--vscode-foreground); + background-color: var(--vscode-sideBar-background); + margin: 0; + padding: 0; + box-sizing: border-box; + user-select: text; + -webkit-user-select: text; +} + +main { + padding: 20px; +} + +main > h1 { + font-size: 22px; + margin-block-end: 20px; +} + +inlang-settings { + /* Primary */ + --inlang-color-primary: var(--vscode-button-background); + --inlang-color-neutral: var(--vscode-foreground); + /* Input */ + --sl-input-background-color: var(--vscode-input-background); + --sl-input-background-color-disabled: var(--vscode-input-background); + --sl-input-border-color: var(--vscode-input-border); + --sl-input-border-color-hover: var(--vscode-input-activeBorder); + --sl-input-border-color-focus: var(--vscode-input-activeBorder); + --sl-input-border-radius: 4px; + --sl-input-border-width: 1px; + --sl-input-color: var(--vscode-input-foreground); + --sl-input-color-hover: var(--vscode-input-foreground); + --sl-input-color-focus: var(--vscode-input-foreground); + --sl-input-color-disabled: var(--vscode-disabledForeground); + --sl-input-focus-ring-color: var(--vscode-focusBorder); + --sl-input-icon-color: var(--vscode-input-foreground); + --sl-input-icon-color-hover: var(--vscode-input-foreground); + --sl-input-icon-color-focus: var(--vscode-input-foreground); + --sl-input-placeholder-color: var(--vscode-input-foreground); + --sl-input-placeholder-color-disabled: var(--vscode-disabledForeground); + /* Input Filled */ + --sl-input-filled-background-color: var(--vscode-input-background); + --sl-input-filled-background-color-hover: var(--vscode-input-background); + --sl-input-filled-background-color-focus: var(--vscode-input-background); + --sl-input-filled-background-color-disabled: var(--vscode-input-background); + --sl-input-filled-color: var(--vscode-input-foreground); + --sl-input-filled-color-hover: var(--vscode-input-foreground); + --sl-input-filled-color-focus: var(--vscode-disabledForeground); + --sl-input-filled-color-disabled: var(--vscode-); + --sl-input-help-text-color: var(--vscode-descriptionForeground); + /* Focus Ring */ + --sl-focus-ring-color: var(--vscode-focusBorder); + --sl-focus-ring-width: 3px; + --sl-focus-ring-offset: 1px; + /* Tooltip */ + --sl-tooltip-background-color: var(--vscode-button-background); + --sl-tooltip-color: var(--vscode-button-foreground); + /* Panels */ + --sl-panel-background-color: var(--vscode-sideBar-background); + --sl-panel-border-color: var(--vscode-sideBar-background); + --sl-panel-border-width: 1px; +} + +inlang-settings::part(base) { + gap: 36px; +} + +inlang-settings::part(module) { + gap: 28px; +} + + +inlang-settings::part(property-title) { + font-size: 16px; + font-weight: 600; +} + +inlang-settings::part(property-paragraph) { + font-size: 14px; + color: var(--vscode-descriptionForeground); +} + +inlang-settings::part(option-wrapper) { + /* FIXME after https://github.com/shoelace-style/shoelace/issues/1968 */ + background-color: var(--vscode-input-background) !important; +} + +inlang-settings::part(option) { + color: var(--vscode-input-foreground); + /* FIXME after https://github.com/shoelace-style/shoelace/issues/1968 */ + background-color: var(--vscode-input-background) !important; + font-size: 14px; + padding: 8px 12px; +} + +inlang-settings::part(button) { + color: var(--vscode-button-secondaryForeground); + background-color: var(--vscode-button-secondaryBackground); + border-color: var(--vscode-button-secondaryBackground); +} + +inlang-settings::part(float) { + background-color: var(--vscode-sideBar-background); + color: var(--vscode-sideBar-foreground); + border: 1px solid var(--vscode-sideBar-border); +} +inlang-settings::part(cancel) { + background-color: var(--vscode-button-secondaryBackground); + color: var(--vscode-button-secondaryForeground); +} diff --git a/inlang/source-code/ide-extension/package.json b/inlang/source-code/ide-extension/package.json index f47a0badef..6faab9c863 100644 --- a/inlang/source-code/ide-extension/package.json +++ b/inlang/source-code/ide-extension/package.json @@ -86,6 +86,11 @@ "title": "Open settings file", "icon": "$(go-to-file)" }, + { + "command": "sherlock.openSettingsView", + "title": "Open settings view", + "icon": "$(settings-gear)" + }, { "command": "sherlock.copyError", "title": "Copy Error", @@ -95,13 +100,13 @@ "menus": { "view/item/context": [ { - "when": "view == projectView && viewItem == projectViewNode", - "command": "sherlock.openProject", + "when": "view == projectView", + "command": "sherlock.openSettingsFile", "group": "navigation" }, { - "when": "view == projectView && viewItem == projectViewNode", - "command": "sherlock.openSettingsFile", + "when": "view == projectView && viewItem == projectViewNodeSelected", + "command": "sherlock.openSettingsView", "group": "inline" }, { @@ -157,11 +162,13 @@ "@inlang/result": "workspace:*", "@inlang/rpc": "workspace:*", "@inlang/sdk": "workspace:*", + "@inlang/settings-component": "workspace:*", "@inlang/telemetry": "workspace:*", "@lix-js/client": "workspace:*", "@lix-js/fs": "workspace:*", "@vitest/coverage-v8": "0.34.6", "https-proxy-agent": "7.0.2", + "lit-html": "^3.1.2", "require-from-string": "^2.0.2", "throttle-debounce": "^5.0.0", "vitest": "0.34.6" diff --git a/inlang/source-code/ide-extension/src/commands/openSettingsView.ts b/inlang/source-code/ide-extension/src/commands/openSettingsView.ts new file mode 100644 index 0000000000..4e86e24391 --- /dev/null +++ b/inlang/source-code/ide-extension/src/commands/openSettingsView.ts @@ -0,0 +1,18 @@ +import { commands } from "vscode" +import { telemetry } from "../services/telemetry/implementation.js" +import { settingsPanel } from "../utilities/settings/settingsView.js" +import type { ProjectViewNode } from "../utilities/project/project.js" + +export const openSettingsViewCommand = { + command: "sherlock.openSettingsView", + title: "Sherlock: Open Settings View", + register: commands.registerCommand, + callback: async function (node: ProjectViewNode) { + await settingsPanel({ context: node.context }) + + telemetry.capture({ + event: "IDE-EXTENSION Settings View opened", + }) + return undefined + }, +} diff --git a/inlang/source-code/ide-extension/src/configuration.ts b/inlang/source-code/ide-extension/src/configuration.ts index e034fcbc49..52020fa0d8 100644 --- a/inlang/source-code/ide-extension/src/configuration.ts +++ b/inlang/source-code/ide-extension/src/configuration.ts @@ -10,6 +10,7 @@ import { copyErrorCommand } from "./commands/copyError.js" import { previewLanguageTagCommand } from "./commands/previewLanguageTagCommand.js" import { jumpToPositionCommand } from "./commands/jumpToPosition.js" import { machineTranslateMessageCommand } from "./commands/machineTranslate.js" +import { openSettingsViewCommand } from "./commands/openSettingsView.js" export const CONFIGURATION = { EVENTS: { @@ -18,6 +19,7 @@ export const CONFIGURATION = { ON_DID_PROJECT_TREE_VIEW_CHANGE: new EventEmitter(), ON_DID_ERROR_TREE_VIEW_CHANGE: new EventEmitter(), ON_DID_PREVIEW_LANGUAGE_TAG_CHANGE: new EventEmitter(), + ON_DID_SETTINGS_VIEW_CHANGE: new EventEmitter(), }, COMMANDS: { EDIT_MESSAGE: editMessageCommand, @@ -27,6 +29,7 @@ export const CONFIGURATION = { OPEN_IN_EDITOR: openInEditorCommand, OPEN_PROJECT: openProjectCommand, OPEN_SETTINGS_FILE: openSettingsFileCommand, + OPEN_SETTINGS_VIEW: openSettingsViewCommand, COPY_ERROR: copyErrorCommand, MACHINE_TRANSLATE_MESSAGE: machineTranslateMessageCommand, }, diff --git a/inlang/source-code/ide-extension/src/main.ts b/inlang/source-code/ide-extension/src/main.ts index 7f935cd109..b63bcd5cc0 100644 --- a/inlang/source-code/ide-extension/src/main.ts +++ b/inlang/source-code/ide-extension/src/main.ts @@ -83,10 +83,15 @@ async function main(args: { vscode.commands.executeCommand("setContext", "sherlock:hasProjectInWorkspace", true) + // Recommendation Banner await recommendationBannerView(args) + // Project Listings await projectView(args) + // Messages await messageView(args) + // Errors await errorView(args) + // Status Bar await statusBar(args) registerExtensionComponents(args) diff --git a/inlang/source-code/ide-extension/src/services/telemetry/events.ts b/inlang/source-code/ide-extension/src/services/telemetry/events.ts index c3a8941023..258b594712 100644 --- a/inlang/source-code/ide-extension/src/services/telemetry/events.ts +++ b/inlang/source-code/ide-extension/src/services/telemetry/events.ts @@ -12,3 +12,4 @@ export type TelemetryEvents = | "IDE-EXTENSION completed create config file" | "IDE-EXTENSION loaded project" | "IDE-EXTENSION Editor opened via tooltip" + | "IDE-EXTENSION Settings View opened" diff --git a/inlang/source-code/ide-extension/src/utilities/messages/messages.ts b/inlang/source-code/ide-extension/src/utilities/messages/messages.ts index bc04875075..a83f3f3d7e 100644 --- a/inlang/source-code/ide-extension/src/utilities/messages/messages.ts +++ b/inlang/source-code/ide-extension/src/utilities/messages/messages.ts @@ -103,6 +103,13 @@ export function createMessageWebviewProvider(args: { }) ) + // when settings view changes, update webview + args.context.subscriptions.push( + CONFIGURATION.EVENTS.ON_DID_SETTINGS_VIEW_CHANGE.event(() => { + updateMessages() + }) + ) + const updateWebviewContent = async () => { const activeEditor = vscode.window.activeTextEditor const fileContent = activeEditor ? activeEditor.document.getText() : "" diff --git a/inlang/source-code/ide-extension/src/utilities/project/project.test.ts b/inlang/source-code/ide-extension/src/utilities/project/project.test.ts index 4aa8e55c90..90dc5b009f 100644 --- a/inlang/source-code/ide-extension/src/utilities/project/project.test.ts +++ b/inlang/source-code/ide-extension/src/utilities/project/project.test.ts @@ -99,12 +99,9 @@ vi.mock("@lix-js/client", () => ({ findRepoRoot: vi.fn(), })) -beforeEach(() => { - // Reset all mocks before each test - vi.clearAllMocks() -}) - describe("createProjectViewNodes", () => { + const mockContext = {} as vscode.ExtensionContext + beforeEach(() => { vi.resetAllMocks() }) @@ -123,7 +120,7 @@ describe("createProjectViewNodes", () => { selectedProjectPath: "/path/to/project2", }) - const nodes = createProjectViewNodes() + const nodes = createProjectViewNodes({ context: mockContext }) expect(nodes.length).toBe(2) expect(nodes[0]?.label).toBe("to/project1") expect(nodes[1]?.isSelected).toBe(true) @@ -135,7 +132,7 @@ describe("createProjectViewNodes", () => { projectsInWorkspace: [], selectedProjectPath: "/path/to/project2", }) - const nodes = createProjectViewNodes() + const nodes = createProjectViewNodes({ context: mockContext }) expect(nodes).toEqual([]) }) @@ -149,18 +146,21 @@ describe("createProjectViewNodes", () => { ], selectedProjectPath: "/path/to/project2", }) - const nodes = createProjectViewNodes() + const nodes = createProjectViewNodes({ context: mockContext }) expect(nodes.some((node) => node.label === "")).toBe(true) }) }) describe("getTreeItem", () => { + const mockContext = {} as vscode.ExtensionContext + it("should return a TreeItem for a given ProjectViewNode", () => { const node: ProjectViewNode = { label: "TestProject", path: "/path/to/testproject", isSelected: true, collapsibleState: vscode.TreeItemCollapsibleState.Collapsed, + context: mockContext, } const workspaceFolder = { uri: { @@ -179,12 +179,15 @@ describe("getTreeItem", () => { }) describe("handleTreeSelection", () => { + const mockContext = {} as vscode.ExtensionContext + it("should handle tree selection and update state", async () => { const selectedNode: ProjectViewNode = { label: "SelectedProject", path: "/path/to/selected", isSelected: true, collapsibleState: vscode.TreeItemCollapsibleState.Collapsed, + context: mockContext, } const nodeishFs = {} as NodeishFilesystem const workspaceFolder = { @@ -213,6 +216,7 @@ describe("handleTreeSelection", () => { path: "/path/to/selected", isSelected: true, collapsibleState: vscode.TreeItemCollapsibleState.Collapsed, + context: mockContext, } const nodeishFs = {} as NodeishFilesystem const workspaceFolder = { @@ -236,11 +240,14 @@ describe("handleTreeSelection", () => { }) it("should handle error when project loading fails", async () => { + const mockContext = {} as vscode.ExtensionContext + const selectedNode: ProjectViewNode = { label: "selected/project.inlang", path: "/path/to/selected/project.inlang", isSelected: true, collapsibleState: vscode.TreeItemCollapsibleState.Collapsed, + context: mockContext, } const nodeishFs = {} as NodeishFilesystem const workspaceFolder = { @@ -262,6 +269,8 @@ describe("handleTreeSelection", () => { }) describe("createTreeDataProvider", () => { + const mockContext = {} as vscode.ExtensionContext + it("should create a TreeDataProvider", () => { const nodeishFs = {} as NodeishFilesystem const workspaceFolder = { @@ -269,7 +278,11 @@ describe("createTreeDataProvider", () => { fsPath: "/path/to/workspace", }, } as vscode.WorkspaceFolder - const treeDataProvider = createTreeDataProvider({ nodeishFs, workspaceFolder }) + const treeDataProvider = createTreeDataProvider({ + nodeishFs, + workspaceFolder, + context: mockContext, + }) expect(treeDataProvider).toBeDefined() expect(treeDataProvider.getTreeItem).toBeInstanceOf(Function) expect(treeDataProvider.getChildren).toBeInstanceOf(Function) diff --git a/inlang/source-code/ide-extension/src/utilities/project/project.ts b/inlang/source-code/ide-extension/src/utilities/project/project.ts index 196b1652fb..791c7fe1e7 100644 --- a/inlang/source-code/ide-extension/src/utilities/project/project.ts +++ b/inlang/source-code/ide-extension/src/utilities/project/project.ts @@ -16,9 +16,12 @@ export interface ProjectViewNode { path: string isSelected: boolean collapsibleState: vscode.TreeItemCollapsibleState + context: vscode.ExtensionContext } -export function createProjectViewNodes(): ProjectViewNode[] { +export function createProjectViewNodes(args: { + context: vscode.ExtensionContext +}): ProjectViewNode[] { const projectsInWorkspace = state().projectsInWorkspace if (!projectsInWorkspace) { @@ -34,6 +37,7 @@ export function createProjectViewNodes(): ProjectViewNode[] { path: "", isSelected: false, collapsibleState: vscode.TreeItemCollapsibleState.Collapsed, + context: args.context, } as ProjectViewNode } @@ -45,6 +49,7 @@ export function createProjectViewNodes(): ProjectViewNode[] { path: project.projectPath, isSelected: project.projectPath === state().selectedProjectPath, collapsibleState: vscode.TreeItemCollapsibleState.Collapsed, + context: args.context, } as ProjectViewNode }) @@ -62,7 +67,7 @@ export function getTreeItem(args: { iconPath: args.element.isSelected ? new vscode.ThemeIcon("pass-filled", new vscode.ThemeColor("sideBar.foreground")) : new vscode.ThemeIcon("circle-large-outline", new vscode.ThemeColor("sideBar.foreground")), - contextValue: "projectViewNode", + contextValue: args.element.isSelected ? "projectViewNodeSelected" : "projectViewNode", command: { command: "sherlock.openProject", title: "Open File", @@ -133,11 +138,12 @@ export async function handleTreeSelection(args: { export function createTreeDataProvider(args: { nodeishFs: NodeishFilesystem workspaceFolder: vscode.WorkspaceFolder + context: vscode.ExtensionContext }): vscode.TreeDataProvider { return { getTreeItem: (element: ProjectViewNode) => getTreeItem({ element, nodeishFs: args.nodeishFs, workspaceFolder: args.workspaceFolder }), - getChildren: () => createProjectViewNodes(), + getChildren: () => createProjectViewNodes({ context: args.context }), onDidChangeTreeData: CONFIGURATION.EVENTS.ON_DID_PROJECT_TREE_VIEW_CHANGE.event, } } @@ -150,6 +156,7 @@ export const projectView = async (args: { const treeDataProvider = createTreeDataProvider({ nodeishFs: args.nodeishFs, workspaceFolder: args.workspaceFolder, + context: args.context, }) treeDataProvider.getChildren() diff --git a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts new file mode 100644 index 0000000000..3ea9aca9c5 --- /dev/null +++ b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.test.ts @@ -0,0 +1,67 @@ +import { describe, it, expect, vi } from "vitest" +import { settingsPanel, getWebviewContent } from "./settingsView.js" +import * as vscode from "vscode" + +vi.mock("vscode", () => ({ + window: { + createWebviewPanel: vi.fn().mockReturnValue({ + webview: { + html: "", + onDidReceiveMessage: vi.fn(), + asWebviewUri: vi.fn().mockImplementation((uri: vscode.Uri) => uri), + }, + }), + }, + Uri: { + file: vi.fn().mockReturnValue("mock-file-uri"), + joinPath: vi.fn().mockReturnValue("mock-join-path-uri"), + }, + ViewColumn: { + One: 1, + }, + EventEmitter: vi.fn(), + commands: { + executeCommand: vi.fn(), + }, +})) + +vi.mock("../state.js", () => ({ + state: () => ({ + selectedProjectPath: "Users/username/happy-elephant.inlang", + project: { + settings: vi.fn().mockReturnValue({}), + installed: { + plugins: vi.fn().mockReturnValue([]), + messageLintRules: vi.fn().mockReturnValue([]), + }, + }, + }), +})) + +describe("settingsPanel", () => { + it("should create a webview panel with the correct properties", async () => { + const mockContext = { extensionPath: "path/to/extension" } as unknown as vscode.ExtensionContext + await settingsPanel({ context: mockContext }) + expect(vscode.window.createWebviewPanel).toHaveBeenCalledWith( + "settingsPanel", + "happy-elephant.inlang", + vscode.ViewColumn.One, + expect.objectContaining({ + enableScripts: true, + localResourceRoots: [expect.anything()], + }) + ) + }) +}) + +describe("getWebviewContent", () => { + it("should return expected HTML content", () => { + const mockWebview = { asWebviewUri: vi.fn() } as unknown as vscode.Webview + const mockContext = { extensionUri: "uri" } as unknown as vscode.ExtensionContext + // @ts-expect-error + mockWebview.asWebviewUri.mockImplementation((uri: any) => uri) + + const htmlContent = getWebviewContent({ context: mockContext, webview: mockWebview }) + expect(htmlContent).toContain("Settings") + }) +}) diff --git a/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts new file mode 100644 index 0000000000..abe22a8606 --- /dev/null +++ b/inlang/source-code/ide-extension/src/utilities/settings/settingsView.ts @@ -0,0 +1,98 @@ +import * as vscode from "vscode" +import { state } from "../state.js" +import { CONFIGURATION } from "../../configuration.js" + +export async function settingsPanel(args: { context: vscode.ExtensionContext }) { + const panel = vscode.window.createWebviewPanel( + "settingsPanel", + state().selectedProjectPath.split("/").pop() ?? "Settings", + vscode.ViewColumn.One, + { + enableScripts: true, + localResourceRoots: [vscode.Uri.file(args.context.extensionPath)], + } + ) + + panel.webview.html = getWebviewContent({ + context: args.context, + webview: panel.webview, + }) + + panel.webview.onDidReceiveMessage(async (message) => { + switch (message.command) { + case "setSettings": + state().project.setSettings(message.settings) + CONFIGURATION.EVENTS.ON_DID_SETTINGS_VIEW_CHANGE.fire() + break + } + }) +} + +export function getWebviewContent(args: { + context: vscode.ExtensionContext + webview: vscode.Webview +}): string { + const styleUri = args.webview.asWebviewUri( + vscode.Uri.joinPath(args.context.extensionUri, "assets", "settings-view.css") + ) + + const scriptUri = args.webview.asWebviewUri( + vscode.Uri.joinPath( + args.context.extensionUri, + "node_modules", + "@inlang", + "settings-component", + "dist", + "index.mjs" + ) + ) + + const litHtmlUri = args.webview.asWebviewUri( + vscode.Uri.joinPath(args.context.extensionUri, "node_modules", "lit-html", "lit-html.js") + ) + + const settings = state().project.settings() + const installedPlugins = state().project.installed.plugins() + const installedMessageLintRules = state().project.installed.messageLintRules() + + return ` + + + + + Settings + + + + + +
+

Project settings

+
+
+ + + ` +} diff --git a/inlang/source-code/message-lint-rules/identicalPattern/src/identicalPattern.ts b/inlang/source-code/message-lint-rules/identicalPattern/src/identicalPattern.ts index 2071e29d69..94edb07bd6 100644 --- a/inlang/source-code/message-lint-rules/identicalPattern/src/identicalPattern.ts +++ b/inlang/source-code/message-lint-rules/identicalPattern/src/identicalPattern.ts @@ -13,7 +13,7 @@ const RuleSettings = Type.Object({ description: "All items in the array need quotaion marks at the end and beginning", }), { - title: "DEPRICATED. Ignore paths", + title: "DEPRECATED. Ignore paths", description: "Set a path that should be ignored.", } ) diff --git a/inlang/source-code/plugins/i18next/src/settings.test.ts b/inlang/source-code/plugins/i18next/src/settings.test.ts index f3b05d70e4..a417d4e9a5 100644 --- a/inlang/source-code/plugins/i18next/src/settings.test.ts +++ b/inlang/source-code/plugins/i18next/src/settings.test.ts @@ -56,7 +56,7 @@ test("if curly brackets {} does to cointain the word languageTag", async () => { }) expect(isValid).toBe(false) }) -test("if pathPattern doesn't includes a '*' wildcard. This was depricated in version 3.0.0.", async () => { +test("if pathPattern doesn't includes a '*' wildcard. This was deprecated in version 3.0.0.", async () => { const pathPattern = "./{languageTag}/*.json" const isValid = Value.Check(plugin.settingsSchema!, { pathPattern, diff --git a/inlang/source-code/plugins/next-intl/src/settings.test.ts b/inlang/source-code/plugins/next-intl/src/settings.test.ts index ae896c175c..f64bc6060a 100644 --- a/inlang/source-code/plugins/next-intl/src/settings.test.ts +++ b/inlang/source-code/plugins/next-intl/src/settings.test.ts @@ -56,7 +56,7 @@ test("if curly brackets {} does to cointain the word languageTag", async () => { }) expect(isValid).toBe(false) }) -test("if pathPattern doesn't includes a '*' wildcard. This was depricated in version 3.0.0.", async () => { +test("if pathPattern doesn't includes a '*' wildcard. This was deprecated in version 3.0.0.", async () => { const pathPattern = "./{languageTag}/*.json" const isValid = Value.Check(plugin.settingsSchema!, { pathPattern, diff --git a/inlang/source-code/sdk/src/api.ts b/inlang/source-code/sdk/src/api.ts index 1043f09bfa..890963ddb5 100644 --- a/inlang/source-code/sdk/src/api.ts +++ b/inlang/source-code/sdk/src/api.ts @@ -80,7 +80,7 @@ export type MessageQueryApi = { } includedMessageIds: Subscribable /* - * getAll is depricated do not use it + * getAll is deprecated do not use it */ getAll: Subscribable> update: (args: { where: { id: Message["id"] }; data: Partial }) => boolean diff --git a/inlang/source-code/settings-component/src/mock/project.ts b/inlang/source-code/settings-component/src/mock/project.ts index 05ffe1f6fc..a9f82ee3ca 100644 --- a/inlang/source-code/settings-component/src/mock/project.ts +++ b/inlang/source-code/settings-component/src/mock/project.ts @@ -170,7 +170,7 @@ export const mockInstalledMessageLintRules = [ description: "All items in the array need quotaion marks at the end and beginning", type: "string", }, - title: "DEPRICATED. Ignore paths", + title: "DEPRECATED. Ignore paths", description: "Set a path that should be ignored.", }, }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 35be14a898..cea6029b26 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -757,6 +757,9 @@ importers: '@inlang/sdk': specifier: workspace:* version: link:../sdk + '@inlang/settings-component': + specifier: workspace:* + version: link:../settings-component '@inlang/telemetry': specifier: workspace:* version: link:../telemetry @@ -772,6 +775,9 @@ importers: https-proxy-agent: specifier: 7.0.2 version: 7.0.2 + lit-html: + specifier: ^3.1.2 + version: 3.1.2 require-from-string: specifier: ^2.0.2 version: 2.0.2