Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

fix: `just format`

hippietrailf73502ebd555
diff --git a/packages/vscode-plugin/package.json b/packages/vscode-plugin/package.json
index 486a375f0..49f9496ce 100644
--- a/packages/vscode-plugin/package.json
+++ b/packages/vscode-plugin/package.json
@@ -1844,7 +1844,5 @@
"dependencies": {
"vscode-languageclient": "^9.0.1"
},
- "media": [
- "media/harper.woff"
- ]
+ "media": ["media/harper.woff"]
}
diff --git a/packages/vscode-plugin/src/tests/suite/font.test.ts b/packages/vscode-plugin/src/tests/suite/font.test.ts
index c60db9312..676e4fb62 100644
--- a/packages/vscode-plugin/src/tests/suite/font.test.ts
+++ b/packages/vscode-plugin/src/tests/suite/font.test.ts
@@ -1,29 +1,33 @@
-import * as path from 'node:path';
import * as fs from 'node:fs/promises';
+import * as path from 'node:path';
import { workspace } from 'vscode';
describe('Font >', () => {
- it('font file is included in extension package', async () => {
- // Get the workspace folder path
- const workspacePath = workspace.workspaceFolders![0].uri.fsPath;
-
- // Get the extension root path by going up to the package.json location
- const extensionRootPath = path.join(workspacePath, '..', '..', '..');
-
- // Check if the media directory exists in the extension root
- const mediaPath = path.join(extensionRootPath, 'media');
- try {
- await fs.access(mediaPath);
- } catch (error) {
- throw new Error(`Media directory not found at ${mediaPath}. This indicates that the media directory may not have been properly included in the extension package.`);
- }
+ it('font file is included in extension package', async () => {
+ // Get the workspace folder path
+ const workspacePath = workspace.workspaceFolders![0].uri.fsPath;
+
+ // Get the extension root path by going up to the package.json location
+ const extensionRootPath = path.join(workspacePath, '..', '..', '..');
+
+ // Check if the media directory exists in the extension root
+ const mediaPath = path.join(extensionRootPath, 'media');
+ try {
+ await fs.access(mediaPath);
+ } catch (error) {
+ throw new Error(
+ `Media directory not found at ${mediaPath}. This indicates that the media directory may not have been properly included in the extension package.`,
+ );
+ }
- // Check if the font file exists in the media directory
- const fontPath = path.join(mediaPath, 'harper.woff');
- try {
- await fs.access(fontPath);
- } catch (error) {
- throw new Error(`Font file not found at ${fontPath}. This indicates that the font file may not have been properly included in the extension package.`);
- }
- });
-});
\ No newline at end of file
+ // Check if the font file exists in the media directory
+ const fontPath = path.join(mediaPath, 'harper.woff');
+ try {
+ await fs.access(fontPath);
+ } catch (error) {
+ throw new Error(
+ `Font file not found at ${fontPath}. This indicates that the font file may not have been properly included in the extension package.`,
+ );
+ }
+ });
+});
diff --git a/packages/vscode-plugin/src/tests/suite/vsix.test.ts b/packages/vscode-plugin/src/tests/suite/vsix.test.ts
index 631466461..ebe3c046a 100644
--- a/packages/vscode-plugin/src/tests/suite/vsix.test.ts
+++ b/packages/vscode-plugin/src/tests/suite/vsix.test.ts
@@ -1,50 +1,50 @@
-import * as path from 'node:path';
+import * as child_process from 'child_process';
import * as fsPromises from 'node:fs/promises';
+import * as path from 'node:path';
import { workspace } from 'vscode';
-import * as child_process from 'child_process';
describe('VSIX Package >', () => {
- it('contains the font file', async () => {
- // Get the workspace folder path
- const workspacePath = workspace.workspaceFolders![0].uri.fsPath;
-
- // Get the extension root path by going up to the package.json location
- const extensionRootPath = path.join(workspacePath, '..', '..', '..');
-
- // Verify the VSIX package contents
- const vsixPath = path.join(extensionRootPath, 'harper-0.29.0.vsix');
- try {
- // Check if the VSIX file exists
- await fsPromises.access(vsixPath);
-
- // Create a temporary directory to extract the VSIX
- const tempDir = path.join(extensionRootPath, 'temp-vsix-extract');
- await fsPromises.mkdir(tempDir, { recursive: true });
-
- // Extract the VSIX using the system unzip command with -o flag to overwrite
- const unzipResult = child_process.spawnSync('unzip', [
- '-o', // Overwrite existing files without prompting
- vsixPath,
- '-d',
- tempDir
- ]);
-
- if (unzipResult.status !== 0) {
- throw new Error(`Failed to extract VSIX package: ${unzipResult.stderr.toString()}`);
- }
-
- // Verify the font file exists in the extracted VSIX
- const fontPath = path.join(tempDir, 'extension', 'media', 'harper.woff');
- try {
- await fsPromises.access(fontPath);
- } catch (error) {
- throw new Error(`Font file not found in VSIX package at ${fontPath}`);
- }
-
- // Clean up
- await fsPromises.rm(tempDir, { recursive: true, force: true });
- } catch (error) {
- throw new Error(`Failed to verify VSIX package contents: ${error}`);
- }
- });
-});
\ No newline at end of file
+ it('contains the font file', async () => {
+ // Get the workspace folder path
+ const workspacePath = workspace.workspaceFolders![0].uri.fsPath;
+
+ // Get the extension root path by going up to the package.json location
+ const extensionRootPath = path.join(workspacePath, '..', '..', '..');
+
+ // Verify the VSIX package contents
+ const vsixPath = path.join(extensionRootPath, 'harper-0.29.0.vsix');
+ try {
+ // Check if the VSIX file exists
+ await fsPromises.access(vsixPath);
+
+ // Create a temporary directory to extract the VSIX
+ const tempDir = path.join(extensionRootPath, 'temp-vsix-extract');
+ await fsPromises.mkdir(tempDir, { recursive: true });
+
+ // Extract the VSIX using the system unzip command with -o flag to overwrite
+ const unzipResult = child_process.spawnSync('unzip', [
+ '-o', // Overwrite existing files without prompting
+ vsixPath,
+ '-d',
+ tempDir,
+ ]);
+
+ if (unzipResult.status !== 0) {
+ throw new Error(`Failed to extract VSIX package: ${unzipResult.stderr.toString()}`);
+ }
+
+ // Verify the font file exists in the extracted VSIX
+ const fontPath = path.join(tempDir, 'extension', 'media', 'harper.woff');
+ try {
+ await fsPromises.access(fontPath);
+ } catch (error) {
+ throw new Error(`Font file not found in VSIX package at ${fontPath}`);
+ }
+
+ // Clean up
+ await fsPromises.rm(tempDir, { recursive: true, force: true });
+ } catch (error) {
+ throw new Error(`Failed to verify VSIX package contents: ${error}`);
+ }
+ });
+});