Skip to content

Commit 5538620

Browse files
chore(release): bump monorepo to v2.1.0
update root and workspace package versions to 2.1.0 sync internal dependency and peerDependency ranges to ^2.1.0 update core VERSION constant and harden scripts/version.js to keep internal ranges aligned Signed-off-by: night-slayer18 <samanuaia257@gmail.com>
1 parent 85ecaff commit 5538620

8 files changed

Lines changed: 46 additions & 13 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "autodocs-monorepo",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"private": true,
55
"license": "Apache-2.0",
66
"packageManager": "npm@11.9.0",

packages/cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opensyntaxhq/autodocs",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"description": "CLI for Autodocs documentation generator",
55
"bin": {
66
"autodocs": "dist/index.js"
@@ -30,7 +30,7 @@
3030
}
3131
},
3232
"dependencies": {
33-
"@opensyntaxhq/autodocs-core": "^2.0.0",
33+
"@opensyntaxhq/autodocs-core": "^2.1.0",
3434
"chalk": "^5.6.2",
3535
"chokidar": "^5.0.0",
3636
"commander": "^14.0.3",

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opensyntaxhq/autodocs-core",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"license": "Apache-2.0",
55
"description": "Core parsing and extraction engine for Autodocs",
66
"repository": {

packages/core/src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '2.0.0';
1+
export const VERSION = '2.1.0';

packages/plugins/examples/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opensyntaxhq/autodocs-plugin-examples",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"license": "Apache-2.0",
55
"description": "Code example validation and extraction plugin for Autodocs",
66
"repository": {
@@ -45,10 +45,10 @@
4545
"typescript": "^5.9.3"
4646
},
4747
"peerDependencies": {
48-
"@opensyntaxhq/autodocs-core": "^2.0.0"
48+
"@opensyntaxhq/autodocs-core": "^2.1.0"
4949
},
5050
"devDependencies": {
51-
"@opensyntaxhq/autodocs-core": "^2.0.0",
51+
"@opensyntaxhq/autodocs-core": "^2.1.0",
5252
"@types/node": "^25.2.2",
5353
"tsup": "^8.5.1"
5454
}

packages/plugins/markdown/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opensyntaxhq/autodocs-plugin-markdown",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"license": "Apache-2.0",
55
"description": "Markdown guide plugin for Autodocs",
66
"repository": {
@@ -47,10 +47,10 @@
4747
"marked": "^17.0.1"
4848
},
4949
"peerDependencies": {
50-
"@opensyntaxhq/autodocs-core": "^2.0.0"
50+
"@opensyntaxhq/autodocs-core": "^2.1.0"
5151
},
5252
"devDependencies": {
53-
"@opensyntaxhq/autodocs-core": "^2.0.0",
53+
"@opensyntaxhq/autodocs-core": "^2.1.0",
5454
"@types/node": "^25.2.2",
5555
"tsup": "^8.5.1",
5656
"typescript": "^5.9.3"

packages/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opensyntaxhq/autodocs-ui",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"private": true,
55
"type": "module",
66
"scripts": {

scripts/version.js

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ const packageFiles = [
2323
'packages/plugins/examples/package.json',
2424
];
2525

26+
const dependencyFields = [
27+
'dependencies',
28+
'devDependencies',
29+
'peerDependencies',
30+
'optionalDependencies',
31+
];
32+
2633
function readPackageJson(filePath) {
2734
if (!fs.existsSync(filePath)) {
2835
throw new Error(`Package file not found: ${filePath}`);
@@ -37,10 +44,36 @@ function readPackageJson(filePath) {
3744
}
3845

3946
try {
40-
for (const pkgPath of packageFiles) {
47+
const packageEntries = packageFiles.map((pkgPath) => {
4148
const absolutePath = path.resolve(__dirname, '..', pkgPath);
4249
const pkg = readPackageJson(absolutePath);
50+
return { pkgPath, absolutePath, pkg };
51+
});
52+
53+
const internalPackageNames = new Set(
54+
packageEntries
55+
.map((entry) => entry.pkg.name)
56+
.filter((name) => typeof name === 'string' && name.startsWith('@opensyntaxhq/'))
57+
);
58+
59+
for (const entry of packageEntries) {
60+
const { pkgPath, absolutePath, pkg } = entry;
4361
pkg.version = version;
62+
63+
for (const field of dependencyFields) {
64+
const deps = pkg[field];
65+
if (!deps || typeof deps !== 'object') {
66+
continue;
67+
}
68+
69+
for (const depName of Object.keys(deps)) {
70+
if (!internalPackageNames.has(depName)) {
71+
continue;
72+
}
73+
deps[depName] = `^${version}`;
74+
}
75+
}
76+
4477
fs.writeFileSync(absolutePath, JSON.stringify(pkg, null, 2) + '\n');
4578
console.log(`Updated ${pkgPath} to ${version}`);
4679
}

0 commit comments

Comments
 (0)