Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d5ac9cd
Introduce husky to execute qa pre-commit hooks
kaiserls Sep 25, 2026
ba8869b
Improve Node.js dependency maintenance (#1)
kaiserls Sep 25, 2026
04facda
Add Contributing section to readme
kaiserls Sep 26, 2026
57ce1ed
Merge pull request #2 from kaiserls/feature/husky
kaiserls Sep 26, 2026
2a92366
test: add unit and VS Code test layers (#3)
kaiserls Sep 27, 2026
c2e047b
Introduce a pixi project as test fixture
kaiserls Sep 27, 2026
b2378f8
Use pixi-project test fixture in launch and test execution
kaiserls Sep 27, 2026
0782668
Switch from npm watch to npm compile as default build command
kaiserls Sep 27, 2026
05324fc
Make logging more robust
kaiserls Sep 27, 2026
e0868c1
test: reproduce Pixi environment selection failure
kaiserls Sep 27, 2026
30b73a3
fix: register Pixi managers with extension ID
kaiserls Sep 27, 2026
4dbb940
Merge pull request #4 from kaiserls/feature/testing
kaiserls Sep 27, 2026
688e9b8
Prevent prettier from formatting pixi env and lock files
kaiserls Sep 27, 2026
f400e87
Declare and install pixi as test requirement
kaiserls Sep 27, 2026
2dfce2b
Exclude test folder and pixi enviroments in general from the pixi-cod…
kaiserls Sep 27, 2026
c6c7956
Merge pull request #6 from kaiserls/fix/prettier-pixi
kaiserls Sep 27, 2026
2ea06fd
Rename extension from renan-r-santos.pixi-code to kaiserls.pixi-code …
kaiserls Sep 27, 2026
63852b8
fix: keep valid Pixi environments when one target is unsupported
kaiserls Sep 27, 2026
ce6e8d7
fix: handle package refresh failures and use Pixi environment names
kaiserls Sep 27, 2026
2365903
feat: resolve configured Pixi paths relative to workspaces
kaiserls Sep 27, 2026
d1b8b50
docs: document PR 52 port and bump version to 0.2.1
kaiserls Sep 27, 2026
7640933
test: run configured Pixi executable from a spaced path
kaiserls Sep 27, 2026
d9b2fb1
Merge pull request #7 from kaiserls/fix/port-pr-52-unsupported-envs
kaiserls Sep 27, 2026
89fb9a5
Override mocha requirement of @vscode/test-cli to fix vulnerabilities
kaiserls Sep 27, 2026
d9055b8
docs: complete 0.2.1 changelog from post-0.2.0 commits
kaiserls Sep 27, 2026
c05c6da
Merge pull request #8 - Update test dependencies and complete the 0.2…
kaiserls Sep 27, 2026
e914554
Improve logging messages
kaiserls Sep 27, 2026
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
41 changes: 26 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,22 @@ 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 Pixi
run: |
curl -fsSL https://pixi.sh/install.sh | sh
echo "$HOME/.pixi/bin" >> "$GITHUB_PATH"

- name: Install dependencies
run: npm ci

Expand All @@ -37,6 +43,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 +55,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 +82,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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ dist
node_modules
.vscode-test/
*.vsix

# Pixi environments in test fixtures and projects
**/.pixi/*
!**/.pixi/config.toml
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 .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/pixi.lock
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
12 changes: 12 additions & 0 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from '@vscode/test-cli';
import { fileURLToPath } from 'node:url';

export default defineConfig({
files: 'out/test/**/*.vscode.test.js',
version: 'stable',
workspaceFolder: fileURLToPath(new URL('./test/fixtures/pixi-project/', import.meta.url)),
mocha: {
ui: 'tdd',
timeout: 20_000,
},
});
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"args": ["${workspaceFolder}/test/fixtures/pixi-project", "--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
}
Expand Down
12 changes: 10 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "compile",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "npm",
"script": "watch",
Expand All @@ -11,8 +20,7 @@
"group": "watchers"
},
"group": {
"kind": "build",
"isDefault": true
"kind": "build"
}
},
{
Expand Down
2 changes: 2 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
**/.github/
.vscode/**
.vscode-test/**
test/**
**/.pixi/**
out/**
node_modules/**
src/**
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ All notable changes to the "pixi-code" extension will be documented in this file
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.2.1]

- Publish as `kaiserls.pixi-code` and fix Pixi manager registration with Python Environments
- Keep valid Python environments visible when a Pixi environment targets an unsupported platform
- Handle package refresh failures and use Pixi environment names for package queries
- Support relative paths and `${workspaceFolder}` in `pixi-code.pixiExecutable`
- Use the first workspace folder as the default working directory for Pixi commands
- Improve activation diagnostics in the Pixi output channel
- Exclude test fixtures and local Pixi environments from the extension package
- Add automated tests and dependency security checks, and update vulnerable test dependencies

## [0.2.0]

- Use published @vscode/python-environments API package
Expand Down
47 changes: 21 additions & 26 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,43 @@ Code extension that integrates Pixi environments with the Python Environments ex
1. **Prerequisites**
- Node.js 20+
- VS Code with the Python Environments extension installed
- Pixi installed on your system
- [Pixi](https://pixi.prefix.dev/latest/installation/) installed on your system

2. **Clone and setup**

```bash
git clone https://github.com/renan-r-santos/pixi-code.git
git clone https://github.com/kaiserls/pixi-code.git
cd pixi-code
npm install
```

3. **Development workflow**

```bash
npm run compile # Build the extension
npm run watch # Watch for changes during development
npm run watch # Rebuild while you edit
npm test # Run the full validation suite before submitting
```

Press `F5` in VS Code to launch an Extension Development Host, then open a project containing `pixi.toml` or a
`pyproject.toml` with a `[tool.pixi]` table.

## Code style and quality

This project maintains strict code quality standards using TypeScript, ESLint, and Prettier. All code must pass these
quality checks before being merged.
This project uses TypeScript, ESLint, and Prettier. `npm test` runs the required checks before its unit and extension
tests. Husky formats and fixes staged files at commit time.

```bash
npm run lint # Check for linting issues
npm run format:check # Check code formatting
npm run compile # Build and verify compilation
```
### Tests

Fixing issues:
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.

```bash
npm run format # Auto-fix formatting issues
npm run lint -- --fix # Auto-fix linting issues where possible
```
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.

For focused work, run `npm run test:unit` or `npm run test:vscode` individually. `npm run typecheck` is available when
you only need TypeScript validation.

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

## Making a contribution

Expand All @@ -60,16 +64,7 @@ git checkout -b feature/your-feature-name
- **Code formatting**: Use Prettier to format your code
- **Logging**: Use the provided logging utilities in `src/common/logging.ts`

### 3. Extension testing

Test the extension functionality:

1. Press `F5` in launch VS Code in debug mode
2. Open a project containing `pixi.toml` or `pyproject.toml`
3. Verify Pixi environments are discovered and functional
4. Test environment switching and terminal activation

### 4. Commit and submit
### 3. Commit and submit

- Reference any related issues
- Submit a pull request with detailed description
Loading