Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3c13eab
chore: update dependencies and ESLint configuration
equiman Apr 25, 2026
516fe59
refactor: simplify error handling in various helper functions
equiman Apr 25, 2026
aa940e7
chore: update semver and @types/semver to latest versions
equiman Apr 25, 2026
e523d66
chore: update update-notifier to version 7.3.1
equiman Apr 25, 2026
dc04ec4
refactor: enhance command execution by resolving OS-specific spawn ar…
equiman Apr 25, 2026
e607b46
chore: update TypeScript to version 6.0.3 and adjust tsconfig settings
equiman Apr 25, 2026
845f700
chore: update chalk to version 5.6.2 in package.json and package-lock…
equiman Apr 25, 2026
cdd4b28
chore: update type-fest to version 5.6.0 in package.json and package-…
equiman Apr 25, 2026
7d0009a
chore: update dependencies and improve test mocks
equiman Apr 25, 2026
db0f5cb
chore: update package dependencies and switch from 'find-up' to 'path…
equiman Apr 25, 2026
3cabac3
chore: update 'open' package to version 11.0.0 and ensure absolute pa…
equiman Apr 25, 2026
ed1eef3
fix: open configuration for paths
equiman Apr 25, 2026
6f222c7
feat: bump yargs version
equiman Apr 26, 2026
834c0aa
chore: bump project version
equiman Apr 26, 2026
ebcd935
docs: developer instructions
equiman Apr 26, 2026
c0f3b92
test: update config exclusions
equiman Apr 26, 2026
af680c6
chore: update vscode settings
equiman Apr 26, 2026
3019abf
test: update config exclusions
equiman Apr 26, 2026
2414ae7
docs: update docs version
equiman Apr 26, 2026
d01f760
remove: sonar configurations
equiman Apr 26, 2026
7b98486
feat: add status command
equiman Apr 26, 2026
dc976ae
docs: add cheatsheet
equiman Apr 26, 2026
aecd1e3
feat: add done command support
equiman Apr 26, 2026
967d7fd
fix: revert wsl explorer command
equiman May 1, 2026
00ed6e1
fix: build failure with any type
equiman May 1, 2026
94040a6
chore: remove unused file and code
equiman May 1, 2026
5c31c8a
chore: linter fix
equiman May 1, 2026
0347049
chore: better dev documentation
equiman May 1, 2026
b41f1d5
Merge branch 'main' of https://github.com/deinsoftware/swpm into pack…
equiman May 2, 2026
884540e
chore: replaced with an skill
equiman May 2, 2026
a8e2051
chore: comments in english
equiman May 2, 2026
448948d
chore: update packages
equiman May 2, 2026
6ff36a6
chore: remove comments
equiman May 2, 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
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

18 changes: 0 additions & 18 deletions .eslintrc.cjs

This file was deleted.

4 changes: 2 additions & 2 deletions .vitest/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const testCommandResult = (command: string): string => {
try {
const child = execSync(command)
return child.toString().trim()
} catch (error) {
} catch {
return ''
}
}
Expand All @@ -13,7 +13,7 @@ export const testCommandArray = (command: string): string[] => {
try {
const child = execSync(command)
return child.toString().split('\n')
} catch (error) {
} catch {
return ['']
}
}
34 changes: 33 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,43 @@
# Changelog

<!-- http://keepachangelog.com/en/1.0.0/
Added for new features.
Changed for changes in existing functionality.
Deprecated for once-stable features removed in upcoming releases.
Removed for deprecated features removed in this release.
Fixed for any bug fixes.
Security to invite users to upgrade in case of vulnerabilities.
-->

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [3.0.0] - 2026-04-25

### ⚠️ BREAKING CHANGES

- Node.js Requirement: The minimum supported version is now Node.js v20. This change aligns with the underlying updates in the CLI engine and modern security standards.

### Added

- Status Command: Introduced `swpm status` (alias `s`) to show current configuration in different formats (`json`, `json:path`, `plain:path`). Especially useful for CI tools and scripts.
- Formal validation for the latest Node.js LTS releases.

### Changed

- Major CLI Engine Upgrade: Migrated yargs from v17.7.2 to v18.0.0, providing better performance and modern ESM argument parsing.
- Dependency Refresh: Comprehensive update of core libraries including chalk, update-notifier, semver, and open to ensure compatibility with the new major version.
- Typing System: Updated @types/yargs to v17.0.35 for improved developer experience and type safety.

### Fixed

- Security & Vulnerabilities: Applied multiple patches identified by Snyk across the dependency tree.
- Parser Consistency: Refined the internal command mapping to ensure that flags and aliases behave consistently across all supported package managers (npm, pnpm, yarn, and bun) under the new v18 parser.

## [2.7.0] - 2026-05-02

### Added
Expand Down Expand Up @@ -622,8 +653,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `pin`, `use`, `get`, `see` and `info` options
- Pinned validation

[unreleased]: https://github.com/deinsoftware/swpm/compare/v3.0.0...HEAD
[3.0.0]: https://github.com/deinsoftware/swpm/compare/v2.7.0...v3.0.0
[2.7.0]: https://github.com/deinsoftware/swpm/compare/v2.6.0...v2.7.0
[unreleased]: https://github.com/deinsoftware/swpm/compare/v2.8.0...HEAD
[2.6.0]: https://github.com/deinsoftware/swpm/compare/v2.5.2...v2.6.0
[2.5.2]: https://github.com/deinsoftware/swpm/compare/v2.5.1...v2.5.2
[2.5.1]: https://github.com/deinsoftware/swpm/compare/v2.5.0...v2.5.1
Expand Down
87 changes: 44 additions & 43 deletions CHEATSHEET.md

Large diffs are not rendered by default.

54 changes: 53 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@
- [Prerequisites](#prerequisites)
- [Installing](#installing)
- [swpm](#swpm)
- [Help](#help)
- [Commands](#commands)
- [Install](#install)
- [Add](#add)
- [Remove](#remove)
- [Update](#update)
- [Upgrade](#upgrade)
- [Interactive](#interactive)
- [Open](#open)
- [Clean](#clean)
- [Status](#status)
- [swpx](#swpx)
- [Alias](#alias)
- [Flags](#flags)
Expand Down Expand Up @@ -90,6 +101,7 @@ Commands:
swpm interactive [args] update packages interactive [aliases: ui]
swpm open [resource] [args] open in the file explore or browser[aliases: o]
swpm clean [args] clean packages [aliases: c]
swpm status [format] show information in different formats [aliases: s]

Options:
-u, --use use a package manager
Expand Down Expand Up @@ -304,7 +316,47 @@ swpm clean [args]
| `--all` | | Run all args and also delete the **.yarn** folder |

> `--fresh` is a good choice when you want to clean the project and reinstall all packages again with `swpm install --frozen` and preserving the lock files intact.
> `--all` is a good choice when you want to clean the project and migrate to a different Package Manager or reinstalling all packages and create/update the lock files.
> `--all` is a good choice when you want to clean the project and migrate to a different Package Manager or reinstalling all packages and create/update the lock files.

#### Status

Show current configuration in different formats. Useful for CI tools or scripts.

```bash
swpm status [format]
```

> Alias: `s`

The `[format]` parameter allows you to choose the output format:

| Format | Description |
| -------------- | ------------------------------------------------------------------ |
| `json` | Full information in JSON format (default) |
| `json:<path>` | A specific property in JSON format (e.g., `json:versions.node`) |
| `plain:<path>` | A specific property in plain text (e.g., `plain:using`) |

**Examples:**

```bash
swpm status
# {
# "_": "npm",
# "using": "npm",
# "origin": "pinned",
# "versions": {
# "swpm": "3.0.0",
# "node": "24.15.0",
# "npm": "11.12.1"
# }
# }

swpm status json:using
# "npm"

swpm status plain:using
# npm
```

⇧ [Back to menu](#menu)

Expand Down
33 changes: 33 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import js from '@eslint/js'
import tseslint from 'typescript-eslint'
import globals from 'globals'

export default tseslint.config(
{
ignores: ['**/build/**', '**/coverage/**', '**/bin/**', '**/dist/**', '**/node_modules/**']
},
js.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.node,
...globals.es2021
}
},
rules: {
'semi': ['error', 'never'], // without ;
'quotes': ['error', 'single'], // single quotes
'indent': ['error', 2], // 2 spaces
'comma-dangle': ['error', 'never'], // no trailing comma
'object-curly-spacing': ['error', 'always'],

// Reglas de TypeScript para swpm
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/no-explicit-any': 'warn'
}
}
)
Loading
Loading