You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+33-25Lines changed: 33 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Thank you for your interest in contributing! ❤️ This document provides guide
8
8
9
9
## Goals
10
10
11
-
The goal of [vscode-npmx](https://marketplace.visualstudio.com/items?itemName=npmx-dev.vscode-npmx)is to build a useful extension around [npmx.dev](https://npmx.dev), making it easier for developers to manage npm packages within VS Code.
11
+
The goal of this project is to build useful editor extensions around [npmx.dev](https://npmx.dev), making it easier for developers to manage npm packages within their editors. Currently, the [VS Code extension](https://marketplace.visualstudio.com/items?itemName=npmx-dev.vscode-npmx) is the primary package.
12
12
13
13
## Table of Contents
14
14
@@ -62,44 +62,52 @@ The goal of [vscode-npmx](https://marketplace.visualstudio.com/items?itemName=np
62
62
### Available commands
63
63
64
64
```bash
65
-
# Development
65
+
# Development (run from extensions/vscode/)
66
66
pnpm dev # Start development server
67
67
pnpm build # Production build
68
-
pnpm package # Save extension as vsix file to root
68
+
pnpm package # Save extension as vsix file
69
69
70
-
# Code Quality
70
+
# Code Quality (run from root)
71
71
pnpm lint # Run linter (ESLint)
72
72
pnpm lint:fix # Auto-fix lint issues
73
73
pnpm typecheck # TypeScript type checking (tsgo)
74
74
75
-
# Testing
75
+
# Testing (run from root)
76
76
pnpm test# Run tests
77
77
```
78
78
79
79
### Project structure
80
80
81
+
This project is organized as a monorepo using pnpm workspaces:
82
+
81
83
```
84
+
extensions/
85
+
└── vscode/ # VS Code extension
86
+
├── src/ # Extension source code
87
+
│ ├── api/ # API clients (package, replacement, vulnerability)
88
+
│ ├── commands/ # Command handlers (vscode API only, no reactive-vscode)
-**Extractor**– Parses a supported file (`package.json`, `pnpm-workspace.yaml`, `.yarnrc.yml`) and extracts dependency information with AST ranges. Each file format has its own extractor in `src/core/extractors/`.
121
+
-**Extractor**– Parses a supported file (`package.json`, `pnpm-workspace.yaml`, `.yarnrc.yml`) and extracts dependency information with AST ranges. Each file format has its own extractor in `extensions/vscode/src/core/extractors/`.
114
122
-**WorkspaceContext**– Holds per-workspace-folder state: detected package manager, resolved catalogs, and memoized dependency info. Created lazily and invalidated when workspace-level files change.
115
123
-**ResolvedDependencyInfo**– A dependency with its protocol resolved (e.g., `catalog:` → actual version, `npm:alias@version` → underlying package). Providers consume resolved dependencies instead of raw AST data.
116
124
-**Provider**– VS Code language feature (hover, completion, diagnostics, etc.) that operates on resolved dependencies.
<ahref="https://kermanx.github.io/reactive-vscode/"target="__blank"><imgsrc="https://img.shields.io/badge/made_with-reactive--vscode-%23007ACC?style=flat&labelColor=%23229863"alt="Made with reactive-vscode" /></a>
12
-
</p>
5
+
<h1align="center">npmx Extensions</h1>
13
6
14
7
> [!NOTE]
15
-
> 🚧 **Preview Version** - This extension is under active development. Some features and configurations may change.
8
+
> 🚧 **Preview Version** - These extensions are under active development. Some features and configurations may change.
|[`extensions/vscode`](./extensions/vscode)|[VS Code extension](https://marketplace.visualstudio.com/items?itemName=npmx-dev.vscode-npmx) for npmx |
25
15
26
16
## Features
27
17
@@ -42,65 +32,6 @@
42
32
- Open [npmx.dev](https://npmx.dev) in external browser
43
33
- Open `node_modules` files on [npmx.dev](https://npmx.dev) code viewer with syntax highlighting (from editor title, editor context menu, explorer context menu, or command palette)
|`npmx.diagnostics.upgrade`| Show hints when a newer version of a package is available |`boolean`|`true`|
66
-
|`npmx.diagnostics.deprecation`| Show warnings for deprecated packages |`boolean`|`true`|
67
-
|`npmx.diagnostics.replacement`| Show suggestions for package replacements |`boolean`|`true`|
68
-
|`npmx.diagnostics.vulnerability`| Show warnings for packages with known vulnerabilities |`boolean`|`true`|
69
-
|`npmx.diagnostics.distTag`| Show warnings when a dependency uses a dist tag |`boolean`|`true`|
70
-
|`npmx.diagnostics.engineMismatch`| Show warnings when dependency engines mismatch with the current package |`boolean`|`true`|
71
-
|`npmx.packageLinks`| Enable clickable links for package names |`string`|`"declared"`|
72
-
|`npmx.ignore.upgrade`| Ignore list for upgrade diagnostics ("name" or "name@version"). See [Ignore Diagnostics](https://github.com/npmx-dev/vscode-npmx#ignore-diagnostics)|`array`|`[]`|
73
-
|`npmx.ignore.deprecation`| Ignore list for deprecation diagnostics ("name" or "name@version"). See [Ignore Diagnostics](https://github.com/npmx-dev/vscode-npmx#ignore-diagnostics)|`array`|`[]`|
74
-
|`npmx.ignore.replacement`| Ignore list for replacement diagnostics ("name" only). See [Ignore Diagnostics](https://github.com/npmx-dev/vscode-npmx#ignore-diagnostics)|`array`|`[]`|
75
-
|`npmx.ignore.vulnerability`| Ignore list for vulnerability diagnostics ("name" or "name@version"). See [Ignore Diagnostics](https://github.com/npmx-dev/vscode-npmx#ignore-diagnostics)|`array`|`[]`|
76
-
77
-
<!-- configs -->
78
-
79
-
## Ignore Diagnostics
80
-
81
-
`npmx` supports ignore lists for selected diagnostics.
82
-
83
-
Matching rules:
84
-
85
-
-`npmx.ignore.upgrade`, `npmx.ignore.deprecation`, and `npmx.ignore.vulnerability` support `name` and `name@version`.
86
-
-`npmx.ignore.replacement` supports `name` only.
87
-
88
-
When a diagnostic supports ignore actions, quick fixes can add entries directly:
0 commit comments