From 7bbba0c2626e39b79fc8e9a71b3beb3ae3e23e48 Mon Sep 17 00:00:00 2001
From: Alois Klink <alois@mermaidchart.com>
Date: Mon, 22 Apr 2024 19:04:31 +0900
Subject: [PATCH 1/2] fix(cli): add title for linking MD diagrams

This title is just the `<filename>:<lineno>`, and won't be updated when
the diagram is updated, even if the line number and/or filename change
in the future.
---
 packages/cli/src/remark.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/cli/src/remark.ts b/packages/cli/src/remark.ts
index 2677e79..192ba9b 100644
--- a/packages/cli/src/remark.ts
+++ b/packages/cli/src/remark.ts
@@ -53,7 +53,7 @@ export function plugin({ client, ...options }: MCPluginOptions) {
         case 'link':
           node.value = await link(node.value, client, {
             cache: options.cache,
-            title: ``,
+            title, // TODO: should we update this title in the future, since the filename/line number might change
             getProjectId: options.getProjectId,
             ignoreAlreadyLinked: true,
           });

From 80aac644543800b66d299e650155c59b01328e56 Mon Sep 17 00:00:00 2001
From: Alois Klink <alois@mermaidchart.com>
Date: Mon, 22 Apr 2024 19:06:32 +0900
Subject: [PATCH 2/2] chore(cli): publish @mermaidchart/cli v0.1.0

This is the initial release.
---
 packages/cli/CHANGELOG.md | 10 ++++++++++
 packages/cli/package.json |  6 ++----
 packages/sdk/package.json |  2 +-
 pnpm-lock.yaml            |  2 +-
 4 files changed, 14 insertions(+), 6 deletions(-)
 create mode 100644 packages/cli/CHANGELOG.md

diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md
new file mode 100644
index 0000000..61556b2
--- /dev/null
+++ b/packages/cli/CHANGELOG.md
@@ -0,0 +1,10 @@
+# Changelog
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [Unreleased]
+
+## [0.1.0] - 2024-04-22
+
+Initial release.
diff --git a/packages/cli/package.json b/packages/cli/package.json
index e2a148e..0ce3f28 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -1,13 +1,11 @@
 {
   "name": "@mermaidchart/cli",
-  "version": "0.1.0-alpha.0",
+  "version": "0.1.0",
   "description": "CLI for interacting with https://MermaidChart.com, the platform that makes collaborating with Mermaid diagrams easy",
   "main": "index.js",
   "bin": {
     "mermaid-chart": "dist/cli.js"
   },
-  "//1": "temporarily disable pushing until we finish progress on this",
-  "private": true,
   "engines": {
     "node": "^18.18.0 || ^20.0.0"
   },
@@ -57,7 +55,7 @@
     "@inquirer/confirm": "^2.0.15",
     "@inquirer/input": "^1.2.14",
     "@inquirer/select": "^1.3.1",
-    "@mermaidchart/sdk": "workspace:^",
+    "@mermaidchart/sdk": "^0.2.1-alpha.0",
     "commander": "^11.1.0",
     "remark": "^15.0.1",
     "remark-frontmatter": "^5.0.0",
diff --git a/packages/sdk/package.json b/packages/sdk/package.json
index e87f246..389c28b 100644
--- a/packages/sdk/package.json
+++ b/packages/sdk/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@mermaidchart/sdk",
-  "version": "0.2.0",
+  "version": "0.2.1-alpha.0",
   "description": "Access the MermaidChart services with OAuth and type safety.",
   "browser": "dist/bundle.iife.js",
   "types": "dist/index.d.ts",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 2a051e3..12ae247 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -84,7 +84,7 @@ importers:
         specifier: ^1.3.1
         version: 1.3.1
       '@mermaidchart/sdk':
-        specifier: workspace:^
+        specifier: ^0.2.1-alpha.0
         version: link:../sdk
       commander:
         specifier: ^11.1.0