Skip to content
Open
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
33 changes: 33 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "Solid Monaco Development",
"image": "node:24-bullseye",
"features": {
"ghcr.io/devcontainers/features/git:1": {}
},
"customizations": {
"vscode": {
"extensions": [
"esbenp.prettier-vscode",
"ms-vscode.vscode-typescript-next"
],
"settings": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"typescript.preferences.importModuleSpecifier": "relative"
}
}
},
"postCreateCommand": "corepack enable pnpm && pnpm install",
"remoteUser": "root",
"workspaceFolder": "/workspace",
"mounts": [
"source=${localWorkspaceFolder},target=/workspace,type=bind,consistency=cached"
],
"forwardPorts": [5173],
"portsAttributes": {
"5173": {
"label": "Vite Dev Server",
"onAutoForward": "notify"
}
}
}
35 changes: 25 additions & 10 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,50 @@ jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
timeout-minutes: 360
permissions:
security-events: write
packages: read
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
with:
languages: javascript
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
upload: false
output: sarif-results

# Only include files that are public
- name: filter-sarif
uses: advanced-security/filter-sarif@main
uses: advanced-security/filter-sarif@v1
with:
patterns: |
/src/**/*.*
+src/**/*.ts
+src/**/*.tsx
-**/*.test.*
input: sarif-results/javascript.sarif
output: sarif-results/javascript.sarif
-**/*.spec.*
input: sarif-results/${{ matrix.language }}.sarif
output: sarif-results/${{ matrix.language }}.sarif

- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v1
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: sarif-results/javascript.sarif
sarif_file: sarif-results/${{ matrix.language }}.sarif
13 changes: 8 additions & 5 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@ jobs:
contents: write

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2.2.4
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 8

- name: Setup Node.js environment
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: pnpm

# "git restore ." discards changes to package-lock.json
- name: Install dependencies
Expand All @@ -32,6 +35,6 @@ jobs:
run: pnpm run format

- name: Add, Commit and Push
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'Format'
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write

steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run tests
run: pnpm run test

- name: Build package
run: pnpm run build

- name: Publish to NPM
run: pnpm publish --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
81 changes: 71 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,39 @@ on:
branches: [main]

jobs:
build:
test:
name: Test (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest


strategy:
matrix:
node-version: [18, 20, 22]

steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2

- uses: pnpm/action-setup@v2.2.4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 8

- name: Setup Node.js environment
uses: actions/setup-node@v3
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 18
node-version: ${{ matrix.node-version }}
cache: pnpm

- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile

- name: Type check
run: pnpm run lint:types

- name: Lint
run: pnpm run lint:code

- name: Build
run: pnpm run build
Expand All @@ -35,5 +49,52 @@ jobs:
env:
CI: true

- name: Lint
run: pnpm run lint
build-check:
name: Build Check
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 8

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build library
run: pnpm run build

- name: Check build output
run: |
if [ ! -d "dist" ]; then
echo "❌ Build failed: dist directory not found"
exit 1
fi
if [ ! -f "dist/index.js" ]; then
echo "❌ Build failed: index.js not found"
exit 1
fi
if [ ! -f "dist/index.d.ts" ]; then
echo "❌ Build failed: index.d.ts not found"
exit 1
fi
echo "✅ Build output verified"

- name: Test package installation
run: |
# Create a test project to verify the package can be installed
mkdir test-install
cd test-install
npm init -y
npm install ../
echo "✅ Package installation test passed"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ dist
gitignore
.idea
.vscode
.pnpm-store

# tsup
tsup.config.bundled_*.{m,c,}s
Expand Down
Loading