Skip to content
Closed
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
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: npm
directory: /
schedule:
interval: weekly

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
36 changes: 21 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Install Nodejs
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24

- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Install Nodejs
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: npm

- name: Install dependencies
run: npm ci

Expand All @@ -37,6 +38,9 @@ jobs:
- name: Build extension
run: npm run compile

- name: Run tests
run: xvfb-run -a npm test

- name: Package extension
run: npx vsce package

Expand All @@ -46,16 +50,17 @@ jobs:
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Install Nodejs
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24

- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Install Nodejs
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: npm

- run: npm ci

- name: Set pre-release version
Expand All @@ -72,16 +77,17 @@ jobs:
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Install Nodejs
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24

- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Install Nodejs
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: npm

- run: npm ci

- name: Set pre-release version
Expand Down
33 changes: 18 additions & 15 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@ jobs:
name: 'Check version'
runs-on: ubuntu-latest
steps:
- name: Install Nodejs
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24

- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: ${{ env.FETCH_DEPTH }}

- name: Install Nodejs
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: npm

- name: Validate package version matches git tag
run: |
TAG_VERSION=${GITHUB_REF#refs/tags/v}
Expand All @@ -34,16 +35,17 @@ jobs:
runs-on: ubuntu-latest
needs: check-version
steps:
- name: Install Nodejs
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24

- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Install Nodejs
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: npm

# Install Node dependencies.
- run: npm ci

Expand All @@ -56,16 +58,17 @@ jobs:
runs-on: ubuntu-latest
needs: check-version
steps:
- name: Install Nodejs
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24

- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Install Nodejs
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: npm

# Install Node dependencies.
- run: npm ci

Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/security-audit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Dependency security audit

on:
schedule:
- cron: '23 4 * * 1'
workflow_dispatch:

permissions:
contents: read

jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .nvmrc
cache: npm

- run: npm ci
- run: npm audit --audit-level=high
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged --concurrent false
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24.21.0
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"printWidth": 120,
"tabWidth": 4,
"useTabs": false,
"endOfLine": "auto",
"overrides": [
{
"files": ["*.yml", "*.yaml"],
Expand Down
10 changes: 10 additions & 0 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from '@vscode/test-cli';

export default defineConfig({
files: 'out/test/**/*.vscode.test.js',
version: 'stable',
mocha: {
ui: 'tdd',
timeout: 20_000,
},
});
21 changes: 19 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ Code extension that integrates Pixi environments with the Python Environments ex

3. **Development workflow**
```bash
npm run compile # Build the extension
npm run watch # Watch for changes during development
npm run compile # Build the extension
npm run watch # Watch for changes during development
npm run typecheck # Check TypeScript types without creating output files
npm run test:unit # Run fast Node.js unit tests
npm run test:vscode # Run tests in an isolated VS Code extension host
npm test # Run all checks and tests
```

## Code style and quality
Expand All @@ -42,6 +46,19 @@ npm run format # Auto-fix formatting issues
npm run lint -- --fix # Auto-fix linting issues where possible
```

### Tests

Use unit tests for pure TypeScript logic, such as Pixi command construction and parsing. They run directly in Node.js and
must not import the `vscode` runtime module.

Use VS Code extension-host tests for interactions with the `vscode` API, extension activation, and extension
contributions. The first run downloads an isolated VS Code instance into `.vscode-test/`; later runs reuse it.

The CI `test` job runs `npm test` before either pre-release publishing job is allowed to start.

After `npm install`, Husky installs a pre-commit hook that applies ESLint fixes and Prettier to staged files. The full
lint, formatting, and compile checks run in CI.

## Making a contribution

### 1. Fork and branch
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ Check the "Pixi Environment Manager" output channel:
- Verify `pixi.toml` or `pyproject.toml` exists in project root
- Run `pixi install` to ensure environments are set up

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and workflow details.

## License

MIT
Loading