Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: workspace node tools update to fix check and duplicated entries #16

Merged
merged 1 commit into from
Sep 9, 2024
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
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
authors = ["Miguel Ramos <[email protected]>"]
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
Expand All @@ -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",
] }
Expand Down
67 changes: 54 additions & 13 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export enum Bump {
Major = 'Major',
Minor = 'Minor',
Patch = 'Patch',
Snapshot = 'Snapshot'
Snapshot = 'Snapshot',
}

export interface BumpOptions {
Expand Down Expand Up @@ -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<string>, cwd?: string | undefined | null): boolean
export declare function changeExist(
branchName: string,
packagesName: Array<string>,
cwd?: string | undefined | null,
): boolean

export interface Changes {
changes: ChangesData
Expand Down Expand Up @@ -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<PackageInfo>, branch: string, cwd?: string | undefined | null): Array<string>
export declare function getAllFilesChangedSinceBranch(
packageInfo: Array<PackageInfo>,
branch: string,
cwd?: string | undefined | null,
): Array<string>

/**
* Get bumps
Expand Down Expand Up @@ -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<PackageInfo>
export declare function getChangedPackages(
sha?: string | undefined | null,
cwd?: string | undefined | null,
): Array<PackageInfo>

/**
* Get changes
Expand Down Expand Up @@ -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<Commit>
export declare function getCommitsSince(
cwd?: string | undefined | null,
since?: string | undefined | null,
relative?: string | undefined | null,
): Array<Commit>

/**
* Get the conventional for a package
Expand All @@ -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
Expand Down Expand Up @@ -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<PackageInfo>, cwd?: string | undefined | null): Array<PublishTagInfo | undefined | null>
export declare function getLastKnownPublishTagInfoForAllPackages(
packageInfo: Array<PackageInfo>,
cwd?: string | undefined | null,
): Array<PublishTagInfo | undefined | null>

/**
* Get the last known publish tag info for a package
Expand All @@ -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
Expand Down Expand Up @@ -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<RemoteTags>
export declare function getRemoteOrLocalTags(
cwd?: string | undefined | null,
local?: boolean | undefined | null,
): Array<RemoteTags>

/**
* Git add file to staging
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -595,7 +636,7 @@ export enum PackageManager {
Npm = 'Npm',
Yarn = 'Yarn',
Pnpm = 'Pnpm',
Bun = 'Bun'
Bun = 'Bun',
}

export interface PackageRepositoryInfo {
Expand Down