Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 26 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Some pull request checks

on:
pull_request:

jobs:
type-check:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
run: yarn install --ignore-scripts

- name: Run TypeScript compiler
run: yarn tsc

# - name: Run Vitest
# run: yarn vitest:once
5 changes: 0 additions & 5 deletions src/virtual-drive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,6 @@ class VirtualDrive {
return BigInt(jsTime) * 10000n + 116444736000000000n;
}

async getItemsIds(): Promise<ItemInfo[]> {
console.log("getItemsIdsSync");
return addon.getItemsIds(this.syncRootPath);
}

async getFileIdentity(relativePath: string): Promise<string> {
const fullPath = path.join(this.syncRootPath, relativePath);
return addon.getFileIdentity(fullPath);
Expand Down
2 changes: 1 addition & 1 deletion src/watcher/detect-context-menu-action.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class DetectContextMenuActionService {
const status = await self.virtualDriveFn.CfGetPlaceHolderState(path);
self.writeLog("status", status);

const attribute: Attributes = await self.virtualDriveFn.CfGetPlaceHolderAttributes(path);
const attribute = await self.virtualDriveFn.CfGetPlaceHolderAttributes(path);
self.writeLog("attribute", attribute);

const itemId = self.virtualDriveFn.CfGetPlaceHolderIdentity(path);
Expand Down
4 changes: 3 additions & 1 deletion src/watcher/watcher.interface.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { addonZod } from "@/addon/addon-zod";
import { Status } from "src/types/placeholder.type";
import { z } from "zod";

export interface IVirtualDriveFunctions {
CfHydrate?: () => void;
Expand All @@ -14,6 +16,6 @@ export interface IVirtualDriveFunctions {
CfUpdateItem?: () => void;
CfGetPlaceHolderState: (path: string) => Status;
CfGetPlaceHolderIdentity: (path: string) => string;
CfGetPlaceHolderAttributes: (path: string) => Promise<any>;
CfGetPlaceHolderAttributes: (path: string) => z.infer<typeof addonZod.getPlaceholderAttribute>;
CfConverToPlaceholder: (path: string, fileIdentity: string) => void;
}
3 changes: 1 addition & 2 deletions test/utils/setup.helper.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { mkdirSync, rmSync } from "fs";
import { mkdirSync } from "fs";
import { join } from "path";
import { cwd } from "process";

export const TEST_FILES = join(cwd(), "test-files");

rmSync(TEST_FILES, { recursive: true, force: true });
mkdirSync(TEST_FILES, { recursive: true });
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"outDir": "./dist",
"baseUrl": ".",
"resolveJsonModule": true,
"skipLibCheck": true,
"types": ["vitest/globals"],
"paths": {
"@/*": ["./src/*"],
Expand Down
Loading