diff --git a/.github/workflows/buddy-bot-daily.yml b/.github/workflows/buddy-bot-daily.yml index e95c1abc308..359368e45d6 100644 --- a/.github/workflows/buddy-bot-daily.yml +++ b/.github/workflows/buddy-bot-daily.yml @@ -43,7 +43,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} - name: Setup Bun - uses: oven-sh/setup-bun@v2 + uses: oven-sh/setup-bun@v2.0.2 with: bun-version: latest diff --git a/.github/workflows/buddy-bot.yml b/.github/workflows/buddy-bot.yml index 4ed077f46bb..acbf3ad4c0c 100644 --- a/.github/workflows/buddy-bot.yml +++ b/.github/workflows/buddy-bot.yml @@ -130,7 +130,7 @@ jobs: - name: Setup PHP and Composer (if needed) if: ${{ hashFiles('composer.json') != '' }} - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@2.35.5 with: php-version: '8.4' tools: composer @@ -248,7 +248,7 @@ jobs: - name: Setup PHP and Composer (if needed) if: ${{ hashFiles('composer.json') != '' }} - uses: shivammathur/setup-php@v2 + uses: shivammathur/setup-php@2.35.5 with: php-version: '8.4' tools: composer diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d485a4c9de..8767d574985 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,10 +21,10 @@ jobs: - uses: actions/checkout@v4 - name: Install Bun - uses: oven-sh/setup-bun@v2 + uses: oven-sh/setup-bun@v2.0.2 - name: Use cached node_modules - uses: actions/cache@v4 + uses: actions/cache@v4.3.0 with: path: node_modules key: node-modules-${{ hashFiles('**/bun.lock') }} @@ -44,10 +44,10 @@ jobs: - uses: actions/checkout@v4 - name: Install Bun - uses: oven-sh/setup-bun@v2 + uses: oven-sh/setup-bun@v2.0.2 - name: Use cached node_modules - uses: actions/cache@v4 + uses: actions/cache@v4.3.0 with: path: node_modules key: node-modules-${{ hashFiles('**/bun.lock') }} @@ -67,10 +67,10 @@ jobs: - uses: actions/checkout@v4 - name: Install Bun - uses: oven-sh/setup-bun@v2 + uses: oven-sh/setup-bun@v2.0.2 - name: Use cached node_modules - uses: actions/cache@v4 + uses: actions/cache@v4.3.0 with: path: node_modules key: node-modules-${{ hashFiles('**/bun.lock') }} @@ -89,10 +89,10 @@ jobs: - uses: actions/checkout@v4 - name: Install Bun - uses: oven-sh/setup-bun@v2 + uses: oven-sh/setup-bun@v2.0.2 - name: Use cached node_modules - uses: actions/cache@v4 + uses: actions/cache@v4.3.0 with: path: node_modules key: node-modules-${{ hashFiles('**/bun.lock') }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ba12c66de59..679a6eeb12f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,7 @@ on: jobs: npm: + name: npm runs-on: ubuntu-latest steps: @@ -30,12 +31,10 @@ jobs: node-modules- - name: Install Dependencies - run: | - bun install - bun add -g logsmith + run: bun install - name: Publish to npm - run: ./scripts/publish-packages.sh + run: ./scripts/publish.sh env: BUN_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} @@ -45,7 +44,7 @@ jobs: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - name: Attach Binaries - uses: stacksjs/action-releaser@v1.1.0 + uses: stacksjs/action-releaser@v1.2.5 with: files: | packages/stx/bin/stx-linux-x64.zip @@ -55,39 +54,3 @@ jobs: packages/stx/bin/stx-darwin-arm64.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract Version - id: version - run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT - - - name: Generate Release Changelog - run: | - # Generate changelog for this release only - PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD~1 2>/dev/null || echo "") - if [ -n "$PREVIOUS_TAG" ]; then - logsmith --from "$PREVIOUS_TAG" --to "${{ steps.version.outputs.VERSION }}" \ - --theme github --format markdown --output RELEASE_NOTES.md - else - logsmith --to "${{ steps.version.outputs.VERSION }}" \ - --theme github --format markdown --output RELEASE_NOTES.md - fi - - - name: Update Full Changelog - run: | - logsmith --theme github --output CHANGELOG.md - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add CHANGELOG.md - git commit -m "docs: update changelog for ${{ steps.version.outputs.VERSION }}" || exit 0 - git push origin HEAD:main - - - name: Create GitHub Release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.version.outputs.VERSION }} - release_name: Release ${{ steps.version.outputs.VERSION }} - body_path: RELEASE_NOTES.md - draft: false - prerelease: false diff --git a/deps.yaml b/deps.yaml new file mode 100644 index 00000000000..6578a3f02ee --- /dev/null +++ b/deps.yaml @@ -0,0 +1,2 @@ +dependencies: + bun.sh: ^1.3.0 diff --git a/package.json b/package.json index 05bcac1222d..90ce0a05609 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "stx", "type": "module", - "version": "0.0.14", + "version": "0.1.12", "private": true, "description": "A fast & powerful UI / templating engine. Laravel Blade-inspired. Powered by Bun.", "author": "Chris Breuer ", @@ -45,6 +45,8 @@ ], "scripts": { "build": "cd packages/bun-plugin && bun --bun build.ts && cd ../stx && bun --bun build.ts && cd ../.. && bun run compile", + "build:css": "cd packages/stx && bun run build:css && cd ../..", + "css:watch": "cd packages/stx && bun run css:watch && cd ../..", "compile": "bun build ./packages/stx/bin/cli.ts --compile --minify --outfile bin/stx", "compile:all": "bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:windows-x64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64", "compile:linux-x64": "bun build ./packages/stx/bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile bin/stx-linux-x64", @@ -60,10 +62,6 @@ "zip:darwin-x64": "zip -j bin/stx-darwin-x64.zip bin/stx-darwin-x64", "zip:darwin-arm64": "zip -j bin/stx-darwin-arm64.zip bin/stx-darwin-arm64", "lint:staged": "bun eslint --fix", - "prettier:fix": "bun prettier --write", - "prettier:staged": "bun prettier --write", - "stylelint:fix": "bun stylelint --fix", - "stylelint:staged": "bun stylelint --fix", "fresh": "bunx rimraf node_modules/ bun.lock && bun i", "prepublishOnly": "bun run build", "setup": "bun run scripts/setup.ts", @@ -72,33 +70,25 @@ "lint:fix": "bunx --bun eslint . --fix", "changelog": "bunx logsmith --verbose", "changelog:generate": "bunx logsmith --output CHANGELOG.md", - "release": "bun run changelog:generate && bunx bumpx prompt --recursive", - "postinstall": "bunx git-hooks", + "release": "bun run changelog:generate && bunx --bun bumpx prompt --recursive", "dev:docs": "bun --bun vitepress dev docs", "build:docs": "bun --bun vitepress build docs", "preview:docs": "bun --bun vitepress preview docs", "typecheck": "bun tsc --noEmit" }, "devDependencies": { - "@stacksjs/bumpx": "^0.1.17", + "@stacksjs/bumpx": "^0.2.2", "@stacksjs/docs": "^0.70.23", "@stacksjs/eslint-config": "^4.14.0-beta.3", "@stacksjs/gitlint": "^0.1.5", - "@stacksjs/logsmith": "^0.1.8", - "@types/bun": "^1.2.18", - "buddy-bot": "^0.8.9", - "bumpx": "^0.1.1", - "bun-git-hooks": "^0.2.19", - "bun-plugin-dtsx": "^0.21.12", - "bunfig": "^0.10.1", + "@stacksjs/logsmith": "^0.2.0", + "@types/bun": "^1.3.0", + "buddy-bot": "^0.9.9", + "bun-git-hooks": "^0.3.1", + "bun-plugin-dtsx": "0.21.12", "happy-dom": "^18.0.1", - "prettier": "^3.6.2", - "stylelint": "^16.21.1", - "stylelint-config-standard": "^38.0.0", - "typescript": "^5.8.3" - }, - "overrides": { - "eslint": "^9.31.0" + "typescript": "^5.9.3", + "very-happy-dom": "link:very-happy-dom" }, "git-hooks": { "pre-commit": { diff --git a/packages/benchmarks/package.json b/packages/benchmarks/package.json new file mode 100644 index 00000000000..0570ea07f76 --- /dev/null +++ b/packages/benchmarks/package.json @@ -0,0 +1,39 @@ +{ + "name": "@stacksjs/benchmarks", + "type": "module", + "version": "0.1.15", + "private": true, + "description": "Performance benchmarks comparing @stacksjs/markdown and @stacksjs/sanitizer against competitors", + "main": "./src/index.ts", + "scripts": { + "bench": "bun run src/index.ts", + "bench:markdown": "bun run src/markdown-bench.ts", + "bench:frontmatter": "bun run src/frontmatter-bench.ts", + "bench:yaml": "bun run src/yaml-bench.ts", + "bench:sanitizer": "bun run src/sanitizer-bench.ts", + "bench:all": "bun run src/all-bench.ts", + "bench:js-framework": "bun run --cwd js-framework-benchmark bench" + }, + "dependencies": { + "@stacksjs/markdown": "workspace:*", + "@stacksjs/sanitizer": "workspace:*", + "dompurify": "^3.3.0", + "gray-matter": "^4.0.3", + "isomorphic-dompurify": "^2.29.0", + "js-yaml": "^4.1.0", + "markdown-it": "^14.1.0", + "marked": "^16.4.0", + "remark": "^15.0.1", + "remark-html": "^16.0.1", + "sanitize-html": "^2.17.0", + "showdown": "^2.1.0", + "tinybench": "^5.0.1", + "xss": "^1.0.15" + }, + "devDependencies": { + "@types/dompurify": "^3.2.0", + "@types/marked": "^6.0.0", + "@types/sanitize-html": "^2.16.0", + "jsdom": "^27.0.0" + } +} diff --git a/packages/devtools/package.json b/packages/devtools/package.json index 695e0d1c318..637a60e75ec 100644 --- a/packages/devtools/package.json +++ b/packages/devtools/package.json @@ -1,8 +1,8 @@ { - "name": "@stx/devtools", + "name": "@stacksjs/devtools", "version": "1.0.0", "private": true, - "description": "Development tools for STX templating engine", + "description": "Development tools for stx templating engine", "main": "src/index.ts", "scripts": { "dev": "bun run devtools-server.ts", @@ -15,6 +15,6 @@ "bun-plugin-stx": "workspace:*" }, "devDependencies": { - "unocss": "^66.3.3" + "unocss": "^66.5.2" } } diff --git a/packages/markdown/package.json b/packages/markdown/package.json new file mode 100644 index 00000000000..e2bcd2a95aa --- /dev/null +++ b/packages/markdown/package.json @@ -0,0 +1,54 @@ +{ + "name": "@stacksjs/markdown", + "type": "module", + "version": "0.1.15", + "description": "A fast, native Bun-powered markdown parser with frontmatter support. Replaces gray-matter, marked, and yaml.", + "author": "Chris Breuer ", + "license": "MIT", + "homepage": "https://github.com/stacksjs/stx#readme", + "repository": { + "type": "git", + "url": "git+https://github.com/stacksjs/stx.git" + }, + "bugs": { + "url": "https://github.com/stacksjs/stx/issues" + }, + "keywords": [ + "markdown", + "frontmatter", + "parser", + "bun", + "yaml", + "gray-matter", + "marked", + "performance" + ], + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + }, + "./*": { + "import": "./dist/*" + } + }, + "module": "./dist/index.js", + "types": "./dist/index.d.ts", + "files": [ + "LICENSE.md", + "README.md", + "dist" + ], + "scripts": { + "build": "bun --bun build.ts", + "test": "bun test", + "test:watch": "bun test --watch", + "test:coverage": "bun test --coverage", + "typecheck": "bun tsc --noEmit" + }, + "devDependencies": { + "@types/bun": "^1.3.0", + "bun-plugin-dtsx": "^0.21.12", + "typescript": "^5.8.3" + } +} diff --git a/packages/stx/package.json b/packages/stx/package.json index f4ec9cdf53f..a43143ca42d 100644 --- a/packages/stx/package.json +++ b/packages/stx/package.json @@ -2,7 +2,7 @@ "name": "@stacksjs/stx", "type": "module", "version": "0.0.10", - "description": "A Bun plugin that allows for using Laravel Blade-like syntax.", + "description": "A performant UI Framework. Powered by Bun.", "author": "Chris Breuer ", "license": "MIT", "homepage": "https://github.com/stacksjs/stx#readme", @@ -43,7 +43,9 @@ "dist" ], "scripts": { - "build": "bun --bun build.ts", + "build": "bun run build:css && bun --bun build.ts", + "build:css": "bun ./scripts/build-css.ts", + "css:watch": "bun ./scripts/watch-css.ts", "compile": "bun build ./bin/cli.ts --compile --minify --outfile ./bin/stx", "compile:all": "bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:windows-x64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64", "compile:linux-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile ./bin/stx-linux-x64", @@ -70,13 +72,12 @@ "typecheck": "bun tsc --noEmit" }, "dependencies": { + "@stacksjs/headwind": "^0.1.1", + "@stacksjs/markdown": "workspace:*", + "@stacksjs/sanitizer": "workspace:*", "bun-plugin-stx": "workspace:*", - "gray-matter": "^4.0.3", - "marked": "^16.0.0", - "shiki": "^3.8.0", - "yaml": "^2.8.0" - }, - "devDependencies": { - "@types/marked": "^6.0.0" + "bunfig": "^0.15.0", + "cac": "^6.7.14", + "shiki": "^3.13.0" } } diff --git a/packages/vscode/deps.yaml b/packages/vscode/deps.yaml new file mode 100644 index 00000000000..ea3829f4aba --- /dev/null +++ b/packages/vscode/deps.yaml @@ -0,0 +1,3 @@ +dependencies: + bun.sh: ^1.2.10 + node: ^23.11.1 diff --git a/packages/vscode/package.json b/packages/vscode/package.json index aa37fd89c9f..08036ecd978 100644 --- a/packages/vscode/package.json +++ b/packages/vscode/package.json @@ -2,7 +2,7 @@ "publisher": "Stacks", "name": "vscode-stacks", "displayName": "Stacks", - "version": "0.70.25", + "version": "0.1.15", "description": "A modern Stacks development environment, including stx language support.", "license": "MIT", "funding": "https://github.com/sponsors/chrisbbreuer", @@ -34,7 +34,7 @@ "main": "./dist/extension.js", "icon": "logo.png", "engines": { - "vscode": "^1.102.0" + "vscode": "^1.80.0" }, "activationEvents": [ "workspaceContains:**/*.stx", @@ -57,7 +57,7 @@ "commands": [ { "command": "stx.setLanguageMode", - "title": "Set Language Mode to STX" + "title": "Set Language Mode to stx" } ], "grammars": [ @@ -454,7 +454,62 @@ "stxTypescriptPlugin.enabled": { "type": "boolean", "default": true, - "description": "Enable TypeScript language features in STX files" + "description": "Enable TypeScript language features in stx files" + }, + "stx.diagnostics.enable": { + "type": "boolean", + "default": true, + "description": "Enable diagnostics (errors and warnings) for stx files" + }, + "stx.diagnostics.validateUnclosedDirectives": { + "type": "boolean", + "default": true, + "description": "Validate unclosed directives like @if without @endif" + }, + "stx.diagnostics.validateMismatchedDirectives": { + "type": "boolean", + "default": true, + "description": "Validate mismatched directives like @if closed with @endforeach" + }, + "stx.diagnostics.validateTemplatePaths": { + "type": "boolean", + "default": true, + "description": "Validate that template paths in @include and @component directives exist" + }, + "stx.completion.enable": { + "type": "boolean", + "default": true, + "description": "Enable auto-completion for stx directives" + }, + "stx.completion.showSnippets": { + "type": "boolean", + "default": true, + "description": "Show snippet completions with placeholders for directive parameters" + }, + "stx.hover.enable": { + "type": "boolean", + "default": true, + "description": "Enable hover documentation for stx directives" + }, + "stx.hover.showExamples": { + "type": "boolean", + "default": true, + "description": "Show code examples in hover documentation" + }, + "stx.codeActions.enable": { + "type": "boolean", + "default": true, + "description": "Enable quick fixes and code actions" + }, + "stx.folding.enable": { + "type": "boolean", + "default": true, + "description": "Enable code folding for directive blocks" + }, + "stx.semanticHighlighting.enable": { + "type": "boolean", + "default": true, + "description": "Enable semantic syntax highlighting for directives" } } }, @@ -475,10 +530,10 @@ "theme": "light" }, "devDependencies": { - "@types/vscode": "^1.102.0", - "@vscode/vsce": "^3.6.0", - "typescript": "^5.8.3", - "vscode-html-languageservice": "^5.5.1", + "@types/vscode": "^1.105.0", + "@vscode/vsce": "^3.6.3-0", + "typescript": "^5.9.3", + "vscode-html-languageservice": "^5.5.2", "vscode-languageclient": "^9.0.1", "vscode-languageserver-textdocument": "^1.0.12", "vscode-languageserver-types": "^3.17.5" diff --git a/packages/vscode/pkgx.yaml b/packages/vscode/pkgx.yaml index 158cd0e20a7..ea3829f4aba 100644 --- a/packages/vscode/pkgx.yaml +++ b/packages/vscode/pkgx.yaml @@ -1,3 +1,3 @@ dependencies: bun.sh: ^1.2.10 - node: ^23.9.0 + node: ^23.11.1 diff --git a/pkgx.yaml b/pkgx.yaml index 03bf2f93721..4655bab3829 100644 --- a/pkgx.yaml +++ b/pkgx.yaml @@ -1,2 +1,2 @@ dependencies: - bun.sh: ^1.2.10 + bun.sh: ^1.2.20