@alexaegis/standard-version 0.4.1 → 0.5.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/config/config.d.ts.map +1 -1
- package/index.cjs +3 -4
- package/index.d.ts.map +1 -1
- package/index.js +3 -4
- package/index.spec.d.ts.map +1 -1
- package/package.json +10 -11
- package/readme.md +2 -2
- package/workspace/collect-packages.d.ts.map +1 -1
- package/workspace/generic-updater.d.ts.map +1 -1
- package/workspace/package-json-updater.d.ts.map +1 -1
package/config/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config/config.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;CA6BvC,CAAC"}
|
package/index.cjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const node_path = require("node:path");
|
|
4
|
-
const common = require("@alexaegis/common");
|
|
5
4
|
const glob = require("glob");
|
|
6
5
|
const jsYaml = require("js-yaml");
|
|
7
6
|
const node_fs = require("node:fs");
|
|
@@ -56,7 +55,7 @@ const collectPackages = () => {
|
|
|
56
55
|
} catch {
|
|
57
56
|
return void 0;
|
|
58
57
|
}
|
|
59
|
-
}).filter(
|
|
58
|
+
}).filter((pkg) => !!pkg);
|
|
60
59
|
return { workspacePackage, subPackages };
|
|
61
60
|
};
|
|
62
61
|
const getWorkspaceRoot = (cwd = process.cwd()) => {
|
|
@@ -95,7 +94,7 @@ const createGenericUpdater = (packages) => {
|
|
|
95
94
|
return results[0]?.[1] ?? "0.0.0";
|
|
96
95
|
},
|
|
97
96
|
writeVersion: (contents, version) => {
|
|
98
|
-
return packages.map((localPackage) => localPackage.packageJson.name).filter(
|
|
97
|
+
return packages.map((localPackage) => localPackage.packageJson.name).filter((name) => !!name).reduce(
|
|
99
98
|
(r, localPackageName) => r.replaceAll(
|
|
100
99
|
new RegExp(`"${localPackageName}": "(workspace:)([~^])?.*"`, "g"),
|
|
101
100
|
`"${localPackageName}": "$1$2"`
|
|
@@ -126,7 +125,7 @@ const createPackageJsonUpdater = (packages) => {
|
|
|
126
125
|
const indent = " ";
|
|
127
126
|
const newline = contents.includes("\r\n") ? "\r\n" : "\n";
|
|
128
127
|
packageJson.version = version;
|
|
129
|
-
for (const localPackageName of packages.map((localPackage) => localPackage.packageJson.name).filter(
|
|
128
|
+
for (const localPackageName of packages.map((localPackage) => localPackage.packageJson.name).filter((name) => !!name)) {
|
|
130
129
|
for (const dependencyField of PACKAGE_JSON_DEPENDENCY_FIELDS) {
|
|
131
130
|
const dependencies = packageJson[dependencyField];
|
|
132
131
|
const localDependency = dependencies?.[localPackageName];
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { join, relative, dirname, normalize } from "node:path";
|
|
2
|
-
import { isNotNullish } from "@alexaegis/common";
|
|
3
2
|
import { globSync } from "glob";
|
|
4
3
|
import { load } from "js-yaml";
|
|
5
4
|
import { readFileSync, statSync, existsSync } from "node:fs";
|
|
@@ -54,7 +53,7 @@ const collectPackages = () => {
|
|
|
54
53
|
} catch {
|
|
55
54
|
return void 0;
|
|
56
55
|
}
|
|
57
|
-
}).filter(
|
|
56
|
+
}).filter((pkg) => !!pkg);
|
|
58
57
|
return { workspacePackage, subPackages };
|
|
59
58
|
};
|
|
60
59
|
const getWorkspaceRoot = (cwd = process.cwd()) => {
|
|
@@ -93,7 +92,7 @@ const createGenericUpdater = (packages) => {
|
|
|
93
92
|
return results[0]?.[1] ?? "0.0.0";
|
|
94
93
|
},
|
|
95
94
|
writeVersion: (contents, version) => {
|
|
96
|
-
return packages.map((localPackage) => localPackage.packageJson.name).filter(
|
|
95
|
+
return packages.map((localPackage) => localPackage.packageJson.name).filter((name) => !!name).reduce(
|
|
97
96
|
(r, localPackageName) => r.replaceAll(
|
|
98
97
|
new RegExp(`"${localPackageName}": "(workspace:)([~^])?.*"`, "g"),
|
|
99
98
|
`"${localPackageName}": "$1$2"`
|
|
@@ -124,7 +123,7 @@ const createPackageJsonUpdater = (packages) => {
|
|
|
124
123
|
const indent = " ";
|
|
125
124
|
const newline = contents.includes("\r\n") ? "\r\n" : "\n";
|
|
126
125
|
packageJson.version = version;
|
|
127
|
-
for (const localPackageName of packages.map((localPackage) => localPackage.packageJson.name).filter(
|
|
126
|
+
for (const localPackageName of packages.map((localPackage) => localPackage.packageJson.name).filter((name) => !!name)) {
|
|
128
127
|
for (const dependencyField of PACKAGE_JSON_DEPENDENCY_FIELDS) {
|
|
129
128
|
const dependencies = packageJson[dependencyField];
|
|
130
129
|
const localDependency = dependencies?.[localPackageName];
|
package/index.spec.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.spec.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.spec.d.ts","sourceRoot":"","sources":["../src/index.spec.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexaegis/standard-version",
|
|
3
3
|
"description": "Standard version",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
7
7
|
"archetype": {
|
|
@@ -51,22 +51,21 @@
|
|
|
51
51
|
"./readme": "./readme.md"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@alexaegis/
|
|
55
|
-
"@alexaegis/
|
|
56
|
-
"
|
|
57
|
-
"glob": "^10.3.1",
|
|
54
|
+
"@alexaegis/coverage-tools": "^0.4.4",
|
|
55
|
+
"@alexaegis/workspace-tools": "^0.4.4",
|
|
56
|
+
"glob": "^10.3.3",
|
|
58
57
|
"js-yaml": "^4.1.0"
|
|
59
58
|
},
|
|
60
59
|
"devDependencies": {
|
|
61
|
-
"@alexaegis/eslint-config-vitest": "^0.
|
|
62
|
-
"@alexaegis/ts": "^0.
|
|
63
|
-
"@alexaegis/vite": "^0.
|
|
64
|
-
"@alexaegis/vitest": "^0.
|
|
60
|
+
"@alexaegis/eslint-config-vitest": "^0.5.0",
|
|
61
|
+
"@alexaegis/ts": "^0.5.0",
|
|
62
|
+
"@alexaegis/vite": "^0.5.0",
|
|
63
|
+
"@alexaegis/vitest": "^0.5.0",
|
|
65
64
|
"@types/js-yaml": "^4.0.5",
|
|
66
|
-
"@types/node": "^20.4.
|
|
65
|
+
"@types/node": "^20.4.2",
|
|
67
66
|
"publint": "^0.1.16",
|
|
68
67
|
"typescript": "^5.1.6",
|
|
69
|
-
"vite": "^4.4.
|
|
68
|
+
"vite": "^4.4.4",
|
|
70
69
|
"vitest": "^0.33.0"
|
|
71
70
|
},
|
|
72
71
|
"scripts": {
|
package/readme.md
CHANGED
|
@@ -12,13 +12,13 @@ functions had to be reimplemented, albeit in a much simpler form.
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
14
|
```sh
|
|
15
|
-
npm i @alexaegis/standard-version@0.
|
|
15
|
+
npm i @alexaegis/standard-version@0.5.0
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
```json
|
|
19
19
|
{
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@alexaegis/standard-version": "^0.
|
|
21
|
+
"@alexaegis/standard-version": "^0.5.0"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collect-packages.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"collect-packages.d.ts","sourceRoot":"","sources":["../../src/workspace/collect-packages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkC,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAQnG,eAAO,MAAM,8BAA8B,0FAKjC,CAAC;AAEX;;;;;;GAMG;AACH,eAAO,MAAM,eAAe;sBACT,gBAAgB;iBACrB,gBAAgB,EAAE;CAyD/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic-updater.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"generic-updater.d.ts","sourceRoot":"","sources":["../../src/workspace/generic-updater.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,aAAc,gBAAgB,EAAE;4BAEvC,MAAM,KAAG,MAAM;6BAId,MAAM,WAAW,MAAM,KAAG,MAAM;CAuB1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package-json-updater.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"package-json-updater.d.ts","sourceRoot":"","sources":["../../src/workspace/package-json-updater.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAOhF;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,aAAc,gBAAgB,EAAE;4BAE3C,MAAM,KAAG,MAAM;6BAId,MAAM,WAAW,MAAM,KAAG,MAAM;CA+B1D,CAAC"}
|