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
60 changes: 60 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Bug report
description: Report incorrect behavior in the MDS compiler, CLI, bindings, or plugins
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to file a bug! Please **do not** use this form
for security vulnerabilities — see [SECURITY.md](../security/policy) and use
private vulnerability reporting instead.
- type: dropdown
id: component
attributes:
label: Component
description: Which part of MDS is affected?
options:
- CLI (`mds` binary)
- Library (`mds-core`)
- Native addon (`@mdscript/mds-napi`)
- WASM (`@mdscript/mds-wasm`)
- Universal bindings (`@mdscript/mds`)
- Vite plugin
- Rollup plugin
- Webpack loader
- Other / not sure
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: Crate or npm package version (e.g. `mds-cli 0.1.0`, `@mdscript/mds 0.1.0`).
placeholder: "0.1.0"
validations:
required: true
- type: textarea
id: what-happened
attributes:
label: What happened?
description: A clear description of the bug, including the actual vs. expected behavior.
validations:
required: true
- type: textarea
id: repro
attributes:
label: Reproduction
description: >
A minimal `.mds` template (and any vars/imports) plus the exact command or
API call that triggers the bug. Minimal, self-contained repros get fixed fastest.
render: markdown
validations:
required: true
- type: textarea
id: environment
attributes:
label: Environment
description: OS + arch, Node version (if applicable), Rust version (if building from source).
placeholder: "macOS 14 arm64, Node 22.3, rustc 1.88"
validations:
required: false
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Report a security vulnerability
url: https://github.com/dean0x/mds/security/advisories/new
about: Please report security issues privately, not as public issues. See SECURITY.md.
- name: Question or discussion
url: https://github.com/dean0x/mds/discussions
about: For usage questions and open-ended discussion, please use Discussions.
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Feature request
description: Suggest a new capability or improvement for MDS
labels: ["enhancement"]
body:
- type: textarea
id: problem
attributes:
label: Problem / motivation
description: What are you trying to do that MDS doesn't support today? What's the use case?
validations:
required: true
- type: textarea
id: proposal
attributes:
label: Proposed solution
description: >
What should MDS do? If it's language syntax, show an example `.mds` snippet
and the Markdown you'd expect it to compile to.
render: markdown
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives considered
description: Other approaches you've thought about, and why they fall short.
validations:
required: false
- type: dropdown
id: component
attributes:
label: Component
options:
- Language / compiler
- CLI
- JS/TS bindings
- Bundler plugins
- Documentation
- Other
validations:
required: false
22 changes: 22 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!--
Thanks for contributing to MDS! Please fill out the checklist below.
PR titles follow Conventional Commits (feat:, fix:, refactor:, chore:, docs:, ...).
-->

## What does this PR do?

<!-- A short description of the change and the motivation behind it. -->

## Related issues

<!-- e.g. Closes #123 -->

## Checklist

- [ ] PR title follows [Conventional Commits](https://www.conventionalcommits.org/)
- [ ] Tests added/updated for the change (and assert behavior, not implementation)
- [ ] `CHANGELOG.md` updated under `## [Unreleased]` (for user-facing changes)
- [ ] Rust gates pass: `cargo test --workspace`, `cargo fmt --all --check`,
`cargo clippy --workspace --all-targets -- -D warnings`
- [ ] JS gates pass (if touched): `npm run build --workspaces && npm test --workspaces`
- [ ] No new compiler/linter warnings
24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: 2
updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
commit-message:
prefix: "chore(deps)"

- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
commit-message:
prefix: "chore(deps)"

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
commit-message:
prefix: "chore(ci)"
99 changes: 99 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: CI

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

# Cancel superseded runs on the same ref to save CI minutes.
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
rust:
name: Rust — fmt, clippy, test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Format check
run: cargo fmt --all --check
- name: Clippy (warnings are errors)
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Test
run: cargo test --workspace

msrv:
name: MSRV (Rust 1.88)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# rust-version = 1.88 is declared workspace-wide; verify the published
# crates still compile on it. napi/wasm bindings are checked on stable
# in their own jobs since their toolchain needs can differ.
- uses: dtolnay/rust-toolchain@1.88
- uses: Swatinem/rust-cache@v2
- run: cargo check -p mds-core -p mds-cli

wasm:
name: WASM — build & test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- uses: jetli/wasm-pack-action@v0.4.0
with:
version: latest
- name: Build (nodejs + web targets)
run: |
wasm-pack build crates/mds-wasm --target nodejs --out-dir pkg
wasm-pack build crates/mds-wasm --target web --out-dir pkg-web
- name: Test (node)
run: wasm-pack test --node crates/mds-wasm

js:
name: JS packages — build & test
# Run on every host OS so the native addon path is exercised everywhere.
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
# Build the native addon for the host so @mdscript/mds resolves a backend.
# --no-js preserves the hand-maintained crates/mds-napi/index.js loader.
- name: Build native addon (host)
working-directory: crates/mds-napi
run: npx napi build --platform --release --no-js
# Build the WASM pkg so the WASM fallback (and wasm-backend tests) work.
- uses: jetli/wasm-pack-action@v0.4.0
with:
version: latest
- name: Build WASM (nodejs)
run: wasm-pack build crates/mds-wasm --target nodejs --out-dir pkg
- name: Build TS packages
run: npm run build --workspaces --if-present
- name: Test
run: npm test --workspaces --if-present
Loading
Loading