From 0c76dede88995a31d761a6924c1d8d4486eda70d Mon Sep 17 00:00:00 2001 From: Miguel Ramos Date: Mon, 9 Sep 2024 12:30:12 +0100 Subject: [PATCH] fix: workspace node tools update to fix check and duplicated entries --- Cargo.toml | 8 +++---- index.d.ts | 67 +++++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 58 insertions(+), 17 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 41b0959..bf88f6b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ authors = ["Miguel Ramos "] edition = "2021" name = "websublime_workspace-tools" -version = "0.7.11" +version = "0.7.12" exclude = ["tests/*", "examples/*", "node_modules/*", "target/*"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -11,13 +11,13 @@ exclude = ["tests/*", "examples/*", "node_modules/*", "target/*"] crate-type = ["cdylib"] [dependencies] -napi-derive = "2.16.10" -napi = { version = "2.16.8", default-features = false, features = [ +napi-derive = "2.16.11" +napi = { version = "2.16.9", default-features = false, features = [ "napi9", "serde-json", "tokio_rt", ] } -workspace-node-tools = { version = "1.0.16", features = [ +workspace-node-tools = { version = "1.0.17", features = [ "napi", "napi-derive", ] } diff --git a/index.d.ts b/index.d.ts index ff400f2..5f09092 100644 --- a/index.d.ts +++ b/index.d.ts @@ -34,7 +34,7 @@ export enum Bump { Major = 'Major', Minor = 'Minor', Patch = 'Patch', - Snapshot = 'Snapshot' + Snapshot = 'Snapshot', } export interface BumpOptions { @@ -79,7 +79,11 @@ export type ChangesData = { * @param packages_name - The list of package names * @param cwd - The root path to start searching from */ -export declare function changeExist(branchName: string, packagesName: Array, cwd?: string | undefined | null): boolean +export declare function changeExist( + branchName: string, + packagesName: Array, + cwd?: string | undefined | null, +): boolean export interface Changes { changes: ChangesData @@ -160,7 +164,11 @@ export declare function detectPackageManager(root: string): PackageManager | nul * @param branch - The branch to compare against * @param cwd - The root path to start searching from */ -export declare function getAllFilesChangedSinceBranch(packageInfo: Array, branch: string, cwd?: string | undefined | null): Array +export declare function getAllFilesChangedSinceBranch( + packageInfo: Array, + branch: string, + cwd?: string | undefined | null, +): Array /** * Get bumps @@ -204,7 +212,10 @@ export declare function getChange(branchName: string, cwd?: string | undefined | * @param sha - The commit sha to compare against (normally main branch) * @param cwd - The root path to start searching from */ -export declare function getChangedPackages(sha?: string | undefined | null, cwd?: string | undefined | null): Array +export declare function getChangedPackages( + sha?: string | undefined | null, + cwd?: string | undefined | null, +): Array /** * Get changes @@ -234,7 +245,11 @@ export declare function getChanges(cwd?: string | undefined | null): Changes * @param since - The commit id (accepts branch, tag) * @param relative - The relative path to search from */ -export declare function getCommitsSince(cwd?: string | undefined | null, since?: string | undefined | null, relative?: string | undefined | null): Array +export declare function getCommitsSince( + cwd?: string | undefined | null, + since?: string | undefined | null, + relative?: string | undefined | null, +): Array /** * Get the conventional for a package @@ -251,7 +266,12 @@ export declare function getCommitsSince(cwd?: string | undefined | null, since?: * @param cwd - The root path to start searching from * @param conventional_options - The conventional options */ -export declare function getConventionalForPackage(packageInfo: PackageInfo, noFetchAll?: boolean | undefined | null, cwd?: string | undefined | null, conventionalOptions?: ConventionalPackageOptions | undefined | null): ConventionalPackage +export declare function getConventionalForPackage( + packageInfo: PackageInfo, + noFetchAll?: boolean | undefined | null, + cwd?: string | undefined | null, + conventionalOptions?: ConventionalPackageOptions | undefined | null, +): ConventionalPackage /** * Get the defined package manager @@ -295,7 +315,10 @@ export declare function getDivergedCommit(refer: string, cwd?: string | undefine * @param package_info - The list of package info * @param cwd - The root path to start searching from */ -export declare function getLastKnownPublishTagInfoForAllPackages(packageInfo: Array, cwd?: string | undefined | null): Array +export declare function getLastKnownPublishTagInfoForAllPackages( + packageInfo: Array, + cwd?: string | undefined | null, +): Array /** * Get the last known publish tag info for a package @@ -310,7 +333,10 @@ export declare function getLastKnownPublishTagInfoForAllPackages(packageInfo: Ar * @param package_info - The package info * @param cwd - The root path to start searching from */ -export declare function getLastKnownPublishTagInfoForPackage(packageInfo: PackageInfo, cwd?: string | undefined | null): PublishTagInfo | null +export declare function getLastKnownPublishTagInfoForPackage( + packageInfo: PackageInfo, + cwd?: string | undefined | null, +): PublishTagInfo | null /** * Get packages available in the monorepo @@ -353,7 +379,10 @@ export declare function getProjectRootPath(root?: string | undefined | null): st * @param cwd - The root path to start searching from * @param local - Fetch local tags */ -export declare function getRemoteOrLocalTags(cwd?: string | undefined | null, local?: boolean | undefined | null): Array +export declare function getRemoteOrLocalTags( + cwd?: string | undefined | null, + local?: boolean | undefined | null, +): Array /** * Git add file to staging @@ -414,7 +443,12 @@ export declare function gitAllFilesChangedSinceSha(sha: string, cwd?: string | u * @param footer - The commit footer * @param cwd - The root path to start searching from */ -export declare function gitCommit(message: string, body?: string | undefined | null, footer?: string | undefined | null, cwd?: string | undefined | null): boolean +export declare function gitCommit( + message: string, + body?: string | undefined | null, + footer?: string | undefined | null, + cwd?: string | undefined | null, +): boolean /** * Get the branch name from a commit id @@ -547,7 +581,11 @@ export declare function gitPush(cwd?: string | undefined | null, followTags?: bo * @param message - The tag message * @param cwd - The root path to start searching from */ -export declare function gitTag(tag: string, message?: string | undefined | null, cwd?: string | undefined | null): boolean +export declare function gitTag( + tag: string, + message?: string | undefined | null, + cwd?: string | undefined | null, +): boolean /** * Init changes @@ -561,7 +599,10 @@ export declare function gitTag(tag: string, message?: string | undefined | null, * * @param cwd - The root path to start searching from */ -export declare function initChanges(cwd?: string | undefined | null, changeOptions?: ChangesOptions | undefined | null): ChangesFileData +export declare function initChanges( + cwd?: string | undefined | null, + changeOptions?: ChangesOptions | undefined | null, +): ChangesFileData /** * Check if the workdir is unclean @@ -595,7 +636,7 @@ export enum PackageManager { Npm = 'Npm', Yarn = 'Yarn', Pnpm = 'Pnpm', - Bun = 'Bun' + Bun = 'Bun', } export interface PackageRepositoryInfo {