Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ body:
attributes:
label: .NET Version
description: "Output of `dotnet --version`"
placeholder: "e.g., 8.0.300"
placeholder: "e.g., 10.0.100"

- type: input
id: os
Expand Down
37 changes: 6 additions & 31 deletions .github/workflows/verso-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
10.0.x
dotnet-version: "10.0.x"

# The Python kernel launches the user's own interpreter, so a large part of its suite needs
# a real one on PATH and reports a missing prerequisite without it. Pinned rather than left
Expand Down Expand Up @@ -135,31 +133,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
10.0.x

- name: Bundle blazor.web.js for CLI
run: |
DIR="src/Verso.Cli/bin/Release/net8.0/wwwroot/_framework"
mkdir -p "$DIR"
DLL=$(find "$DOTNET_ROOT/shared/Microsoft.AspNetCore.App" \
-path "*/8.*/Microsoft.AspNetCore.Components.Endpoints.dll" | head -1)
if [ -z "$DLL" ]; then
echo "::warning::Could not find .NET 8 Components.Endpoints.dll"
exit 0
fi
dotnet new console -o /tmp/_ebjs --no-restore -f net8.0
cat > /tmp/_ebjs/Program.cs << 'EOF'
var asm = System.Reflection.Assembly.LoadFrom(args[0]);
using var s = asm.GetManifestResourceStream("_framework/blazor.web.js");
if (s == null) { Console.Error.WriteLine("Resource not found"); return; }
Directory.CreateDirectory(Path.GetDirectoryName(args[1])!);
using var f = File.Create(args[1]);
s.CopyTo(f);
Console.WriteLine($"Extracted blazor.web.js ({f.Length} bytes)");
EOF
dotnet run --project /tmp/_ebjs -- "$DLL" "$DIR/blazor.web.js"
dotnet-version: "10.0.x"

- name: Build
run: dotnet build Verso.sln -c Release
Expand Down Expand Up @@ -187,6 +161,9 @@ jobs:
dotnet pack samples/showcase/slide-studio/src/Verso.Showcase.SlideStudio/Verso.Showcase.SlideStudio.csproj -c Release -p:GeneratePackageOnBuild=false -o packages
dotnet pack samples/showcase/dag-notebook/src/Verso.Showcase.DagNotebook/Verso.Showcase.DagNotebook.csproj -c Release -p:GeneratePackageOnBuild=false -o packages

- name: Check the CLI tool carries blazor.web.js
run: unzip -l packages/Verso.Cli.*.nupkg | grep -q "tools/net10.0/any/wwwroot/_framework/blazor.web.js"

# The showcases sit outside Verso.sln, so their tests are not part of the main test run.
- name: Test showcase samples
run: |
Expand Down Expand Up @@ -223,9 +200,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
10.0.x
dotnet-version: "10.0.x"

# Builds the CLI it serves from along with the tests, so the run always serves this commit.
- name: Run browser tests
Expand Down
36 changes: 5 additions & 31 deletions .github/workflows/verso-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
10.0.x
dotnet-version: "10.0.x"

# The Python kernel launches a real interpreter, and a large part of its suite treats a
# missing one as a failure on a build server rather than a skip. Pinned here for the same
Expand All @@ -51,31 +49,6 @@ jobs:
- name: Install Python test dependencies
run: python -m pip install --upgrade pip jedi

- name: Bundle blazor.web.js for CLI
run: |
# blazor.web.js is embedded in Components.Endpoints.dll in .NET 8/9
# but not in .NET 10+. Extract it so verso serve works when the tool
# rolls forward to a runtime that no longer bundles the script.
DIR="src/Verso.Cli/bin/Release/net8.0/wwwroot/_framework"
mkdir -p "$DIR"
DLL=$(find "$DOTNET_ROOT/shared/Microsoft.AspNetCore.App" \
-path "*/8.*/Microsoft.AspNetCore.Components.Endpoints.dll" | head -1)
if [ -z "$DLL" ]; then
echo "::warning::Could not find .NET 8 Components.Endpoints.dll"
exit 0
fi
dotnet new console -o /tmp/_ebjs --no-restore -f net8.0
cat > /tmp/_ebjs/Program.cs << 'EOF'
var asm = System.Reflection.Assembly.LoadFrom(args[0]);
using var s = asm.GetManifestResourceStream("_framework/blazor.web.js");
if (s == null) { Console.Error.WriteLine("Resource not found"); return; }
Directory.CreateDirectory(Path.GetDirectoryName(args[1])!);
using var f = File.Create(args[1]);
s.CopyTo(f);
Console.WriteLine($"Extracted blazor.web.js ({f.Length} bytes)");
EOF
dotnet run --project /tmp/_ebjs -- "$DLL" "$DIR/blazor.web.js"

- name: Build
run: dotnet build Verso.sln -c Release -p:Version=${{ steps.version.outputs.version }}

Expand Down Expand Up @@ -107,6 +80,9 @@ jobs:
dotnet pack samples/showcase/slide-studio/src/Verso.Showcase.SlideStudio/Verso.Showcase.SlideStudio.csproj -c Release -p:Version=${{ steps.version.outputs.version }} -p:GeneratePackageOnBuild=false -o packages
dotnet pack samples/showcase/dag-notebook/src/Verso.Showcase.DagNotebook/Verso.Showcase.DagNotebook.csproj -c Release -p:Version=${{ steps.version.outputs.version }} -p:GeneratePackageOnBuild=false -o packages

- name: Check the CLI tool carries blazor.web.js
run: unzip -l packages/Verso.Cli.*.nupkg | grep -q "tools/net10.0/any/wwwroot/_framework/blazor.web.js"

- name: Upload NuGet packages
uses: actions/upload-artifact@v4
with:
Expand All @@ -129,9 +105,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
10.0.x
dotnet-version: "10.0.x"

- name: Set version
run: npm version ${{ needs.build-and-test.outputs.version }} --no-git-tag-version
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
published by newer releases.
-->
<Version>1.3.0</Version>
<VersoLibTargetFrameworks>net8.0;net10.0</VersoLibTargetFrameworks>
<VersoLibTargetFrameworks>net10.0</VersoLibTargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<p>
<a href="LICENSE.md"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT" /></a>
<a href="https://dotnet.microsoft.com/download/dotnet/10.0"><img src="https://img.shields.io/badge/.NET-8.0%20%7C%2010.0-purple.svg" alt=".NET 8 | 10" /></a>
<a href="https://dotnet.microsoft.com/download/dotnet/10.0"><img src="https://img.shields.io/badge/.NET-10.0-purple.svg" alt=".NET 10" /></a>
<a href="https://github.com/DataficationSDK/Verso/actions/workflows/verso-ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/DataficationSDK/Verso/verso-ci.yml?branch=main&label=CI" alt="CI" /></a>
<a href="https://www.nuget.org/packages/Verso"><img src="https://img.shields.io/nuget/v/Verso?label=NuGet" alt="NuGet" /></a>
<a href="https://github.com/DataficationSDK/Verso/releases"><img src="https://img.shields.io/github/v/release/DataficationSDK/Verso?label=Release" alt="GitHub Release" /></a>
Expand Down Expand Up @@ -46,7 +46,7 @@ dotnet tool install -g Verso.Cli
verso serve
```

Requirements: the VS Code extension needs the [.NET runtime, version 8.0 or later](https://dotnet.microsoft.com/download/dotnet) and offers to install it for you if it is missing; the `verso` CLI needs the [.NET SDK](https://dotnet.microsoft.com/download/dotnet/10.0) for `dotnet tool install`. [Node.js 18+](https://nodejs.org/) and [Python 3.8 or newer](https://www.python.org/downloads/) are optional; they enable the JavaScript/TypeScript and Python kernels (JavaScript falls back to the pure .NET Jint interpreter when Node.js is absent).
Requirements: the VS Code extension needs the [.NET runtime, version 10.0 or later](https://dotnet.microsoft.com/download/dotnet/10.0) and offers to install it for you if it is missing; the `verso` CLI needs the [.NET SDK](https://dotnet.microsoft.com/download/dotnet/10.0) for `dotnet tool install`. [Node.js 18+](https://nodejs.org/) and [Python 3.8 or newer](https://www.python.org/downloads/) are optional; they enable the JavaScript/TypeScript and Python kernels (JavaScript falls back to the pure .NET Jint interpreter when Node.js is absent).

## Why Verso

Expand Down
6 changes: 3 additions & 3 deletions THIRD-PARTY-NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ The original copyright notices and license texts are provided for each component

| Component | Version | License | Project |
|---|---|---|---|
| Microsoft.CodeAnalysis (Roslyn) | 4.12.0 | MIT | [dotnet/roslyn](https://github.com/dotnet/roslyn) |
| Microsoft.CodeAnalysis (Roslyn) | 5.0.0 | MIT | [dotnet/roslyn](https://github.com/dotnet/roslyn) |
| NuGet.Protocol | 6.9.1 | Apache-2.0 | [NuGet/NuGet.Client](https://github.com/NuGet/NuGet.Client) |
| Microsoft.AspNetCore.Components | 8.0.0 | MIT | [dotnet/aspnetcore](https://github.com/dotnet/aspnetcore) |
| Microsoft.PowerShell.SDK | 7.4.7 | MIT | [PowerShell/PowerShell](https://github.com/PowerShell/PowerShell) |
| Microsoft.AspNetCore.Components | 10.0.14 | MIT | [dotnet/aspnetcore](https://github.com/dotnet/aspnetcore) |
| Microsoft.PowerShell.SDK | 7.6.9 | MIT | [PowerShell/PowerShell](https://github.com/PowerShell/PowerShell) |
| FSharp.Compiler.Service | 43.12.202 | MIT | [dotnet/fsharp](https://github.com/dotnet/fsharp) |
| Jint | 4.12.0 | BSD-2-Clause | [sebastienros/jint](https://github.com/sebastienros/jint) |
| Markdig | 0.37.0 | BSD-2-Clause | [lunet-io/markdig](https://github.com/lunet-io/markdig) |
Expand Down
4 changes: 2 additions & 2 deletions docs/extensions/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ Where possible, keep your extensions stateless. The Dice sample demonstrates thi

### Random Number Generators

If using `Random`, be aware that `System.Random` is not thread-safe prior to .NET 6. On .NET 8, `Random.Shared` is the preferred thread-safe option:
If using `Random`, be aware that `System.Random` is not thread-safe prior to .NET 6. `Random.Shared` is the thread-safe option:

```csharp
// Good - thread-safe on .NET 8
// Good - thread-safe
var roll = Random.Shared.Next(1, sides + 1);

// Risky - private instance may be called from multiple threads
Expand Down
12 changes: 6 additions & 6 deletions docs/extensions/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ This guide walks you through creating your first Verso extension, from setting u

## Prerequisites

- [.NET 8 SDK](https://dotnet.microsoft.com/download/dotnet/8.0) or later
- [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0) or later
- A code editor (Visual Studio, VS Code, or Rider)
- Familiarity with C# and async/await

Verify your SDK installation:

```bash
dotnet --version
# Should output 8.0.x or higher
# Should output 10.0.x or higher
```

## Installing the Verso Extension Template
Expand Down Expand Up @@ -89,7 +89,7 @@ The generated `.csproj` references the `Verso.Abstractions` NuGet package and en
```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
Expand Down Expand Up @@ -145,7 +145,7 @@ dotnet build MyDashboard/
dotnet build MyDashboard/MyDashboard.Tests/
```

The build output (DLL) will be in `bin/Debug/net8.0/`. Because `GeneratePackageOnBuild` is set, a `.nupkg` is also produced on each build.
The build output (DLL) will be in `bin/Debug/net10.0/`. Because `GeneratePackageOnBuild` is set, a `.nupkg` is also produced on each build.

## Running Tests

Expand All @@ -164,15 +164,15 @@ During development you can load your extension straight from its build output, w
**From a notebook**, use the `#!extension` magic command with the path to your compiled assembly:

```
#!extension ./MyDashboard/bin/Debug/net8.0/MyDashboard.dll
#!extension ./MyDashboard/bin/Debug/net10.0/MyDashboard.dll
```

The path is resolved relative to the notebook's directory, and local assemblies load without a consent prompt.

**From the CLI**, point any command at a directory of extension assemblies with `--extensions`:

```bash
verso serve notebook.verso --extensions ./MyDashboard/bin/Debug/net8.0/
verso serve notebook.verso --extensions ./MyDashboard/bin/Debug/net10.0/
```

Verso scans that directory for extension DLLs and loads them alongside the built-ins. The `--extensions` flag works on `serve`, `run`, `repl`, `convert`, and `export`. In VS Code, set the `verso.extensionsPath` setting instead.
Expand Down
4 changes: 2 additions & 2 deletions docs/extensions/packaging-and-publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The Verso extension template generates a `.csproj` that is already configured fo
```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>

Expand Down Expand Up @@ -195,7 +195,7 @@ Once your package is on NuGet.org (or any feed in a user's NuGet configuration),
- macOS and Linux: `~/.verso/extensions/<package-id>/<version>/<target-framework>/`
- Windows: `%APPDATA%\verso\extensions\<package-id>\<version>\<target-framework>\`

The `<target-framework>` segment records the runtime the assemblies were installed for, so hosts running on different .NET versions each keep a compatible copy side by side. A package that multi-targets (for example `net8.0` and `net10.0`) lets each host pick the newest lib group its runtime can load; a single `net8.0` target also works on newer runtimes.
The `<target-framework>` segment records the runtime the assemblies were installed for, so hosts running on different .NET versions each keep a compatible copy side by side. Extensions that reference Verso.Abstractions 1.3.0 or later target `net10.0`. Packages built earlier for `net8.0` still load, because a newer runtime runs older assets.

Because an extension is executable code, Verso asks the user to approve a package the first time it loads, and remembers that approval per version. A new version prompts again. Keep this in mind when you publish updates: bumping the version is a deliberate re-consent point for your users, not a silent upgrade.

Expand Down
2 changes: 1 addition & 1 deletion docs/extensions/testing-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Add `Verso.Testing` (and a test framework) to your test project:
```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<IsPackable>false</IsPackable>
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dotnet tool install -g Verso.Cli
dotnet tool update -g Verso.Cli
```

It requires the .NET 8.0 SDK or later. After installing, `verso --help` lists the commands, and every command has its own `--help`.
It requires the .NET 10 SDK or later. After installing, `verso --help` lists the commands, and every command has its own `--help`.

## Global options

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Install the **Verso Notebook** extension (`datafication.verso-notebook`) from th

### Command line

Verso is also a .NET global tool. It needs the .NET 8.0 SDK or later:
Verso is also a .NET global tool. It needs the .NET 10 SDK or later:

```bash
dotnet tool install -g Verso.Cli
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/managing-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Installed packages are unpacked into a managed store on disk:
- macOS and Linux: `~/.verso/extensions/<package-id>/<version>/<target-framework>/`
- Windows: `%APPDATA%\verso\extensions\<package-id>\<version>\<target-framework>\`

Each version lives in its own folder, so multiple versions can coexist. Inside a version folder, assemblies are grouped by the .NET runtime they were installed for (for example `net8.0`), so notebook hosts running on different .NET versions can share the same store.
Each version lives in its own folder, so multiple versions can coexist. Inside a version folder, assemblies are grouped by the .NET runtime they were installed for (for example `net10.0`), so notebook hosts running on different .NET versions can share the same store.

Once a package is installed, its row lists what it added: a kernel, a layout engine, a theme, and so on. A package that loaded but contributed no extension point at all is marked as adding nothing, which is worth knowing since the marketplace searches all of NuGet and will happily install an ordinary library.

Expand Down Expand Up @@ -74,15 +74,15 @@ You do not need to publish to a feed to try an extension you are building. Two o
- From a notebook, use the `#!extension` magic command with a path to the compiled assembly:

```
#!extension ./MyExtension/bin/Debug/net8.0/MyExtension.dll
#!extension ./MyExtension/bin/Debug/net10.0/MyExtension.dll
```

The path is resolved relative to the notebook's directory, and a local assembly loads without a consent prompt.

- From the CLI, point any command at a directory of extension assemblies:

```bash
verso serve notebook.verso --extensions ./MyExtension/bin/Debug/net8.0/
verso serve notebook.verso --extensions ./MyExtension/bin/Debug/net10.0/
```

The `--extensions` flag works on `serve`, `run`, `repl`, `convert`, and `export`. In VS Code, set the `verso.extensionsPath` setting to the same directory.
Expand Down
2 changes: 1 addition & 1 deletion docs/showcase/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ dotnet build samples/showcase/grid-studio/src/Verso.Showcase.GridStudio
Load the result into a notebook with a `#!extension` line naming the built assembly, then switch layouts. The path resolves relative to the notebook's folder:

```
#!extension ./src/Verso.Showcase.GridStudio/bin/Debug/net8.0/Verso.Showcase.GridStudio.dll
#!extension ./src/Verso.Showcase.GridStudio/bin/Debug/net10.0/Verso.Showcase.GridStudio.dll
```

This is the loop to work in if you are reading a sample in order to write your own layout: edit, build, reopen, look.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>10</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>10</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>10</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>10</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
2 changes: 1 addition & 1 deletion samples/kernels/Verso.Sample.Perl/Verso.Sample.Perl.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>10</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>10</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>10</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>10</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
Loading
Loading