Skip to content

Commit 2ce72f9

Browse files
authored
chore: merge pull request #12 from websublime/feature/json-parse
chore: update workspace-node-tools crate
2 parents 879ca4c + 101bbdd commit 2ce72f9

File tree

2 files changed

+15
-56
lines changed

2 files changed

+15
-56
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
authors = ["Miguel Ramos <[email protected]>"]
33
edition = "2021"
44
name = "websublime_workspace-tools"
5-
version = "0.7.7"
5+
version = "0.7.8"
66
exclude = ["tests/*", "examples/*", "node_modules/*", "target/*"]
77

88
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -17,7 +17,7 @@ napi = { version = "2.16.8", default-features = false, features = [
1717
"serde-json",
1818
"tokio_rt",
1919
] }
20-
workspace-node-tools = { version = "1.0.12", features = [
20+
workspace-node-tools = { version = "1.0.13", features = [
2121
"napi",
2222
"napi-derive",
2323
] }

index.d.ts

Lines changed: 13 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export enum Bump {
3434
Major = 'Major',
3535
Minor = 'Minor',
3636
Patch = 'Patch',
37-
Snapshot = 'Snapshot',
37+
Snapshot = 'Snapshot'
3838
}
3939

4040
export interface BumpOptions {
@@ -79,11 +79,7 @@ export type ChangesData = {
7979
* @param packages_name - The list of package names
8080
* @param cwd - The root path to start searching from
8181
*/
82-
export declare function changeExist(
83-
branchName: string,
84-
packagesName: Array<string>,
85-
cwd?: string | undefined | null,
86-
): boolean
82+
export declare function changeExist(branchName: string, packagesName: Array<string>, cwd?: string | undefined | null): boolean
8783

8884
export interface Changes {
8985
changes: ChangesData
@@ -164,11 +160,7 @@ export declare function detectPackageManager(root: string): PackageManager | nul
164160
* @param branch - The branch to compare against
165161
* @param cwd - The root path to start searching from
166162
*/
167-
export declare function getAllFilesChangedSinceBranch(
168-
packageInfo: Array<PackageInfo>,
169-
branch: string,
170-
cwd?: string | undefined | null,
171-
): Array<string>
163+
export declare function getAllFilesChangedSinceBranch(packageInfo: Array<PackageInfo>, branch: string, cwd?: string | undefined | null): Array<string>
172164

173165
/**
174166
* Get bumps
@@ -212,10 +204,7 @@ export declare function getChange(branchName: string, cwd?: string | undefined |
212204
* @param sha - The commit sha to compare against (normally main branch)
213205
* @param cwd - The root path to start searching from
214206
*/
215-
export declare function getChangedPackages(
216-
sha?: string | undefined | null,
217-
cwd?: string | undefined | null,
218-
): Array<PackageInfo>
207+
export declare function getChangedPackages(sha?: string | undefined | null, cwd?: string | undefined | null): Array<PackageInfo>
219208

220209
/**
221210
* Get changes
@@ -245,11 +234,7 @@ export declare function getChanges(cwd?: string | undefined | null): Changes
245234
* @param since - The commit id (accepts branch, tag)
246235
* @param relative - The relative path to search from
247236
*/
248-
export declare function getCommitsSince(
249-
cwd?: string | undefined | null,
250-
since?: string | undefined | null,
251-
relative?: string | undefined | null,
252-
): Array<Commit>
237+
export declare function getCommitsSince(cwd?: string | undefined | null, since?: string | undefined | null, relative?: string | undefined | null): Array<Commit>
253238

254239
/**
255240
* Get the conventional for a package
@@ -266,12 +251,7 @@ export declare function getCommitsSince(
266251
* @param cwd - The root path to start searching from
267252
* @param conventional_options - The conventional options
268253
*/
269-
export declare function getConventionalForPackage(
270-
packageInfo: PackageInfo,
271-
noFetchAll?: boolean | undefined | null,
272-
cwd?: string | undefined | null,
273-
conventionalOptions?: ConventionalPackageOptions | undefined | null,
274-
): ConventionalPackage
254+
export declare function getConventionalForPackage(packageInfo: PackageInfo, noFetchAll?: boolean | undefined | null, cwd?: string | undefined | null, conventionalOptions?: ConventionalPackageOptions | undefined | null): ConventionalPackage
275255

276256
/**
277257
* Get the defined package manager
@@ -315,10 +295,7 @@ export declare function getDivergedCommit(refer: string, cwd?: string | undefine
315295
* @param package_info - The list of package info
316296
* @param cwd - The root path to start searching from
317297
*/
318-
export declare function getLastKnownPublishTagInfoForAllPackages(
319-
packageInfo: Array<PackageInfo>,
320-
cwd?: string | undefined | null,
321-
): Array<PublishTagInfo | undefined | null>
298+
export declare function getLastKnownPublishTagInfoForAllPackages(packageInfo: Array<PackageInfo>, cwd?: string | undefined | null): Array<PublishTagInfo | undefined | null>
322299

323300
/**
324301
* Get the last known publish tag info for a package
@@ -333,10 +310,7 @@ export declare function getLastKnownPublishTagInfoForAllPackages(
333310
* @param package_info - The package info
334311
* @param cwd - The root path to start searching from
335312
*/
336-
export declare function getLastKnownPublishTagInfoForPackage(
337-
packageInfo: PackageInfo,
338-
cwd?: string | undefined | null,
339-
): PublishTagInfo | null
313+
export declare function getLastKnownPublishTagInfoForPackage(packageInfo: PackageInfo, cwd?: string | undefined | null): PublishTagInfo | null
340314

341315
/**
342316
* Get packages available in the monorepo
@@ -379,10 +353,7 @@ export declare function getProjectRootPath(root?: string | undefined | null): st
379353
* @param cwd - The root path to start searching from
380354
* @param local - Fetch local tags
381355
*/
382-
export declare function getRemoteOrLocalTags(
383-
cwd?: string | undefined | null,
384-
local?: boolean | undefined | null,
385-
): Array<RemoteTags>
356+
export declare function getRemoteOrLocalTags(cwd?: string | undefined | null, local?: boolean | undefined | null): Array<RemoteTags>
386357

387358
/**
388359
* Git add file to staging
@@ -443,12 +414,7 @@ export declare function gitAllFilesChangedSinceSha(sha: string, cwd?: string | u
443414
* @param footer - The commit footer
444415
* @param cwd - The root path to start searching from
445416
*/
446-
export declare function gitCommit(
447-
message: string,
448-
body?: string | undefined | null,
449-
footer?: string | undefined | null,
450-
cwd?: string | undefined | null,
451-
): boolean
417+
export declare function gitCommit(message: string, body?: string | undefined | null, footer?: string | undefined | null, cwd?: string | undefined | null): boolean
452418

453419
/**
454420
* Get the branch name from a commit id
@@ -581,11 +547,7 @@ export declare function gitPush(cwd?: string | undefined | null, followTags?: bo
581547
* @param message - The tag message
582548
* @param cwd - The root path to start searching from
583549
*/
584-
export declare function gitTag(
585-
tag: string,
586-
message?: string | undefined | null,
587-
cwd?: string | undefined | null,
588-
): boolean
550+
export declare function gitTag(tag: string, message?: string | undefined | null, cwd?: string | undefined | null): boolean
589551

590552
/**
591553
* Init changes
@@ -599,10 +561,7 @@ export declare function gitTag(
599561
*
600562
* @param cwd - The root path to start searching from
601563
*/
602-
export declare function initChanges(
603-
cwd?: string | undefined | null,
604-
changeOptions?: ChangesOptions | undefined | null,
605-
): ChangesFileData
564+
export declare function initChanges(cwd?: string | undefined | null, changeOptions?: ChangesOptions | undefined | null): ChangesFileData
606565

607566
/**
608567
* Check if the workdir is unclean
@@ -636,7 +595,7 @@ export enum PackageManager {
636595
Npm = 'Npm',
637596
Yarn = 'Yarn',
638597
Pnpm = 'Pnpm',
639-
Bun = 'Bun',
598+
Bun = 'Bun'
640599
}
641600

642601
export interface PackageRepositoryInfo {

0 commit comments

Comments
 (0)