Skip to content

Commit 42bd980

Browse files
committed
2.0.0-pre3
1 parent ac85013 commit 42bd980

File tree

9 files changed

+42
-30
lines changed

9 files changed

+42
-30
lines changed

cmd/compile.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ import { denoPlugins } from "@luca/esbuild-deno-loader";
44
import * as esbuild from "esbuild";
55
import { bundleAssets } from "../lib/asset_bundle/builder.ts";
66
import type { Manifest } from "../lib/plugos/types.ts";
7-
// import { version } from "../version.ts";
8-
9-
const workerRuntimeUrl = new URL(
10-
"../lib/plugos/worker_runtime.ts",
11-
import.meta.url,
12-
);
13-
// TODO: Re-enable this once we have a stable version
14-
// const workerRuntimeUrl =
15-
// `https://deno.land/x/silverbullet@${version}/lib/plugos/worker_runtime.ts`;
7+
import { version } from "../version.ts";
8+
9+
// const workerRuntimeUrl = new URL(
10+
// "../lib/plugos/worker_runtime.ts",
11+
// import.meta.url,
12+
// );
13+
const workerRuntimeUrl =
14+
`https://deno.land/x/silverbullet@${version}/lib/plugos/worker_runtime.ts`;
1615

1716
export type CompileOptions = {
1817
debug?: boolean;

cmd/update_version.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import denoJson from "../deno.json" with {
2+
type: "json",
3+
};
14
export async function updateVersionFile() {
25
const command = new Deno.Command("git", {
36
args: ["describe", "--tags", "--long"],
@@ -9,8 +12,10 @@ export async function updateVersionFile() {
912
const commitVersion = new TextDecoder().decode(stdout).trim();
1013

1114
const versionFilePath = "./version.ts";
12-
const versionContent =
13-
`export const version = "2.0-beta (${commitVersion})";\n`;
15+
const versionContent = `
16+
export const publicVersion = "2.0-beta (${commitVersion})";
17+
export const version = "${denoJson.version}";
18+
`;
1419

1520
await Deno.writeTextFile(versionFilePath, versionContent);
1621
console.log(`Updated version.ts with version information: ${commitVersion}`);

cmd/version.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { version } from "../version.ts";
1+
import {publicVersion } from "../version.ts";
22

33
export function versionCommand() {
4-
console.log(version);
4+
console.log(publicVersion);
55
}

deno.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@silverbulletmd/silverbullet",
3-
"version": "2.0.0-pre2",
3+
"version": "2.0.0-pre3",
44
"exports": {
55
"./syscall": "./plug-api/syscall.ts",
66
"./syscalls": "./plug-api/syscalls.ts",
@@ -97,6 +97,24 @@
9797
"imports": {
9898
"@cliffy/command": "jsr:@cliffy/command@^1.0.0-rc.7",
9999
"@cliffy/prompt": "jsr:@cliffy/prompt@^1.0.0-rc.7",
100+
"@silverbulletmd/silverbullet/syscall": "./plug-api/syscall.ts",
101+
"@silverbulletmd/silverbullet/syscalls": "./plug-api/syscalls.ts",
102+
"@silverbulletmd/silverbullet/type/client": "./type/client.ts",
103+
"@silverbulletmd/silverbullet/type/command": "./type/command.ts",
104+
"@silverbulletmd/silverbullet/type/config": "./type/config.ts",
105+
"@silverbulletmd/silverbullet/type/datastore": "./type/datastore.ts",
106+
"@silverbulletmd/silverbullet/type/event": "./type/event.ts",
107+
"@silverbulletmd/silverbullet/type/index": "./type/index.ts",
108+
"@silverbulletmd/silverbullet/type/rpc": "./type/rpc.ts",
109+
"@silverbulletmd/silverbullet/lib/json": "./plug-api/lib/json.ts",
110+
"@silverbulletmd/silverbullet/lib/tree": "./plug-api/lib/tree.ts",
111+
"@silverbulletmd/silverbullet/lib/attribute": "./plug-api/lib/attribute.ts",
112+
"@silverbulletmd/silverbullet/lib/page_ref": "./plug-api/lib/page_ref.ts",
113+
"@silverbulletmd/silverbullet/lib/resolve": "./plug-api/lib/resolve.ts",
114+
"@silverbulletmd/silverbullet/lib/query_expression": "./plug-api/lib/query_expression.ts",
115+
"@silverbulletmd/silverbullet/lib/native_fetch": "./plug-api/lib/native_fetch.ts",
116+
"@silverbulletmd/silverbullet/lib/frontmatter": "./plug-api/lib/frontmatter.ts",
117+
"@silverbulletmd/silverbullet/lib/tags": "./plug-api/lib/tags.ts",
100118
"@codemirror/autocomplete": "https://esm.sh/@codemirror/autocomplete@6.18.1?external=@codemirror/state,@codemirror/commands,@lezer/common,@codemirror/view,@codemirror/language&target=es2022",
101119
"@codemirror/commands": "https://esm.sh/@codemirror/commands@6.7.0?external=@codemirror/state,@codemirror/view,@codemirror/language,@lezer/common&target=es2022",
102120
"@codemirror/lang-css": "https://esm.sh/@codemirror/lang-css@6.3.0?external=@codemirror/language,@codemirror/autocomplete,@codemirror/state,@lezer/common,@lezer/css&target=es2022",

plugs/editor/editor.plug.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,6 @@ functions:
262262
command:
263263
name: "Client: Version"
264264

265-
gettingStartedCommand:
266-
path: ./help.ts:gettingStartedCommand
267-
command:
268-
name: "Help: Getting Started"
269-
270265
uploadFileCommand:
271266
path: ./upload.ts:uploadFile
272267
command:

plugs/editor/help.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
import { editor } from "@silverbulletmd/silverbullet/syscalls";
2-
import { version } from "../../version.ts";
2+
import { publicVersion } from "../../version.ts";
33

44
export async function versionCommand() {
55
await editor.flashNotification(
6-
`You are currently running SilverBullet ${version}`,
6+
`You are currently running SilverBullet ${publicVersion}`,
77
);
88
}
9-
10-
export async function gettingStartedCommand() {
11-
await editor.openUrl("https://silverbullet.md/Getting%20Started");
12-
}

scripts/release.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
VERSION=$1
44

55
# Patch version is version.ts and deno.json
6-
echo "export const version = \"$VERSION\";" > version.ts
76
sed -i '' "s/\(\"version\": \"\)[^\"]*\(\"\)/\1$VERSION\2/" deno.json
87
git commit -am $VERSION
98
git tag $VERSION

silverbullet.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Command } from "@cliffy/command";
22

3-
import { version } from "./version.ts";
3+
import { publicVersion } from "./version.ts";
44

55
import { upgradeCommand, upgradeEdgeCommand } from "./cmd/upgrade.ts";
66
import { versionCommand } from "./cmd/version.ts";
@@ -16,7 +16,7 @@ globalThis.addEventListener("unhandledrejection", (event) => {
1616
await new Command()
1717
.name("silverbullet")
1818
.description("Workshop for the mind")
19-
.version(version)
19+
.version(publicVersion)
2020
.helpOption(false)
2121
.usage("<options> <folder> | <command> (see below)")
2222
// Main command

web/syscalls/system.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { SysCallMapping } from "../../lib/plugos/system.ts";
22
import type { Client } from "../client.ts";
3-
import { version } from "../../version.ts";
3+
import { publicVersion } from "../../version.ts";
44
import type { CommandDef } from "../../lib/manifest.ts";
55
import type { SyscallMeta } from "../../type/index.ts";
66

@@ -147,7 +147,7 @@ export function systemSyscalls(
147147
return readOnlyMode ? "ro" : "rw";
148148
},
149149
"system.getVersion": () => {
150-
return version;
150+
return publicVersion;
151151
},
152152
"system.getConfig": (_ctx, key: string, defaultValue: any = undefined) => {
153153
return client.config.get(key, defaultValue);

0 commit comments

Comments
 (0)