cross-bump 0.2.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +0 -4
- package/dist/index.js +6 -11
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -16,7 +16,6 @@ declare function getGitignores(cwd?: string, ignoreGlobs?: string[]): Set<string
|
|
|
16
16
|
* @returns An array of glob patterns.
|
|
17
17
|
*/
|
|
18
18
|
declare function parseGitingore(content: string, gitignoreFilePath: string, projectRoot: string): string[];
|
|
19
|
-
|
|
20
19
|
//#endregion
|
|
21
20
|
//#region src/project.d.ts
|
|
22
21
|
declare const supportedProjectCategory: readonly ["java", "javascript", "rust"];
|
|
@@ -43,11 +42,9 @@ type ProjectFile = {
|
|
|
43
42
|
* @return An array of file paths that match the search criteria.
|
|
44
43
|
*/
|
|
45
44
|
declare function findProjectFiles(cwd?: string, ignore?: string[], recursive?: boolean): ProjectFile[];
|
|
46
|
-
|
|
47
45
|
//#endregion
|
|
48
46
|
//#region src/util.d.ts
|
|
49
47
|
declare function isBlankPath(path?: PathLike): path is "" | undefined;
|
|
50
|
-
|
|
51
48
|
//#endregion
|
|
52
49
|
//#region src/version.d.ts
|
|
53
50
|
type VersionNumbers = {
|
|
@@ -121,6 +118,5 @@ declare function upgradeCargoVersion(filePath: PathLike, version: string, opts?:
|
|
|
121
118
|
declare function upgradeProjectVersion(nextVersion: string, projectFile?: ProjectFile, opts?: UpgradeOptions): Promise<void>;
|
|
122
119
|
declare function getProjectVersion(projectFile: ProjectFile): Promise<string | undefined>;
|
|
123
120
|
declare function isVersionValid(version?: string): boolean;
|
|
124
|
-
|
|
125
121
|
//#endregion
|
|
126
122
|
export { DEFAULT_IGNORED_GLOBS, G_GITIGNORE, ProjectCategory, ProjectFile, ProjectFileName, findProjectFiles, getGitignores, getJSProjectVersion, getJavaProjectVersion, getNextVersions, getProjectVersion, getRustProjectVersion, isBlankPath, isVersionValid, parseGitingore, parseVersion, supportedProjectCategory, supportedProjectFiles, supportedProjectGlobs, upgradeCargoVersion, upgradePackageVersion, upgradePomVersion, upgradeProjectVersion };
|
package/dist/index.js
CHANGED
|
@@ -24,7 +24,7 @@ function getGitignores(cwd, ignoreGlobs = DEFAULT_IGNORED_GLOBS) {
|
|
|
24
24
|
ignore: ignoreGlobs,
|
|
25
25
|
onlyFiles: true
|
|
26
26
|
});
|
|
27
|
-
const set = new Set();
|
|
27
|
+
const set = /* @__PURE__ */ new Set();
|
|
28
28
|
for (const gitignoreFilePath of gitignoreFiles) {
|
|
29
29
|
const rules = readFileSync(gitignoreFilePath, { encoding: "utf8" });
|
|
30
30
|
const globs = parseGitingore(rules, gitignoreFilePath, cwd = process.cwd());
|
|
@@ -294,31 +294,26 @@ async function upgradeCargoVersion(filePath, version, opts = {}) {
|
|
|
294
294
|
}
|
|
295
295
|
async function upgradeProjectVersion(nextVersion, projectFile, opts = {}) {
|
|
296
296
|
switch (projectFile?.category) {
|
|
297
|
-
case "java":
|
|
297
|
+
case "java":
|
|
298
298
|
upgradePomVersion(projectFile.path, nextVersion, opts);
|
|
299
299
|
break;
|
|
300
|
-
|
|
301
|
-
case "javascript": {
|
|
300
|
+
case "javascript":
|
|
302
301
|
upgradePackageVersion(projectFile.path, nextVersion, opts);
|
|
303
302
|
break;
|
|
304
|
-
|
|
305
|
-
case "rust": {
|
|
303
|
+
case "rust":
|
|
306
304
|
await upgradeCargoVersion(projectFile.path, nextVersion, opts);
|
|
307
305
|
break;
|
|
308
|
-
}
|
|
309
306
|
}
|
|
310
307
|
}
|
|
311
308
|
async function getProjectVersion(projectFile) {
|
|
312
309
|
let projectVersion;
|
|
313
310
|
switch (projectFile?.category) {
|
|
314
|
-
case "java":
|
|
311
|
+
case "java":
|
|
315
312
|
projectVersion = getJavaProjectVersion(projectFile.path);
|
|
316
313
|
break;
|
|
317
|
-
|
|
318
|
-
case "javascript": {
|
|
314
|
+
case "javascript":
|
|
319
315
|
projectVersion = getJSProjectVersion(projectFile.path);
|
|
320
316
|
break;
|
|
321
|
-
}
|
|
322
317
|
case "rust": projectVersion = await getRustProjectVersion(projectFile.path);
|
|
323
318
|
}
|
|
324
319
|
return projectVersion;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cross-bump",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"description": "cross language bump utility",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "rainbowatcher",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"./dist"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@rainbowatcher/toml-edit-js": "^0.
|
|
38
|
-
"cheerio": "1.
|
|
37
|
+
"@rainbowatcher/toml-edit-js": "^0.6.0",
|
|
38
|
+
"cheerio": "^1.1.2",
|
|
39
39
|
"detect-indent": "^7.0.1",
|
|
40
40
|
"fast-glob": "^3.3.3",
|
|
41
41
|
"is-glob": "^4.0.3",
|