Skip to content

Commit ae9dfd2

Browse files
committed
Release 0.4.0
43 mix tasks, 141 library modules, 2697 tests. Major additions: mix deps-style install output, dependency graph analysis, package metadata introspection, security/supply chain tools, structured error messages, progress reporting, .npmrc multi-layer resolution, topological sorting, outdated report formatting, project scaffolding.
1 parent a464000 commit ae9dfd2

12 files changed

Lines changed: 126 additions & 378 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ npm-*.tar
2323
/tmp/
2424
memory
2525
*.tar
26+
27+
# Autoresearch
28+
autoresearch.*

CHANGELOG.md

Lines changed: 99 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,22 @@
22

33
## 0.4.0
44

5-
### New Tasks (22 new, 26 total)
5+
### New Mix Tasks (21 new, 43 total)
6+
67
- `mix npm.init` — create a new `package.json`
78
- `mix npm.update` — update all or specific packages
89
- `mix npm.outdated` — show packages with newer versions available
9-
- `mix npm.tree` — display full dependency tree with circular detection
10-
- `mix npm.why` — explain why a package is installed
11-
- `mix npm.info` — show package details from the registry
10+
- `mix npm.tree` — display full dependency tree
11+
- `mix npm.why` / `mix npm.explain` — explain why a package is installed
12+
- `mix npm.info` / `mix npm.view` — show package details from the registry
1213
- `mix npm.search` — search the npm registry
1314
- `mix npm.run` — run scripts from `package.json`
1415
- `mix npm.exec` — execute binaries from `node_modules/.bin/`
1516
- `mix npm.ci` — frozen lockfile install (CI shortcut)
16-
- `mix npm.check` — verify installation state
17+
- `mix npm.check` / `mix npm.verify` — verify installation state
1718
- `mix npm.clean` — remove `node_modules/`
18-
- `mix npm.cache status|clean` — manage global cache
19-
- `mix npm.config` — show configuration
19+
- `mix npm.cache` — manage global cache
20+
- `mix npm.config` / `mix npm.set` — show and modify configuration
2021
- `mix npm.version` — show npm_ex version
2122
- `mix npm.link` — link local packages for development
2223
- `mix npm.diff` — show lockfile changes since last commit
@@ -27,29 +28,107 @@
2728
- `mix npm.fund` — show package funding info
2829
- `mix npm.rebuild` — clean and reinstall from lockfile
2930
- `mix npm.uninstall` — alias for `npm.remove`
31+
- `mix npm.deps` — list installed packages (`mix deps`-style output)
32+
- `mix npm.deprecations` — show deprecated packages
33+
- `mix npm.doctor` — diagnose common setup problems
34+
- `mix npm.licenses` — list dependency licenses
35+
- `mix npm.ls` — alias for `mix npm.list`
36+
- `mix npm.publish` — publish package to registry
37+
- `mix npm.shrinkwrap` — generate npm-shrinkwrap.json
38+
- `mix npm.size` — estimate installed package sizes
39+
- `mix npm.stats` — show dependency statistics
40+
- `mix npm.token` — manage registry auth tokens
41+
- `mix npm.completion` — shell completion helpers
42+
43+
### Install UX
44+
45+
- `mix deps`-style output after install — packages listed as `* name version (npm registry)`
46+
- Progress reporting for resolution, fetching, and linking steps
47+
- Structured error messages with actionable suggestions
48+
- Lockfile diff output showing added/removed/updated packages on install
49+
- Project setup checklist (`NPM.ProjectInit`)
50+
51+
### Dependency Analysis (30+ modules)
52+
53+
- `NPM.DepGraph` — adjacency list, fan-in/out, cycle detection, orphans
54+
- `NPM.GraphOps` — transitive closure, shortest path, impact scoring
55+
- `NPM.DepSort` — topological sorting, parallel install levels
56+
- `NPM.DepRange` — classify ranges (exact, caret, tilde, star, file, git, url)
57+
- `NPM.DepConflict` — detect version conflicts between dependency groups
58+
- `NPM.DepFreshness` — classify package freshness (current, outdated, ancient)
59+
- `NPM.DepStats` — aggregate statistics (scope distribution, version breakdown)
60+
- `NPM.DepPath` — resolve bin and module paths within node_modules
61+
- `NPM.DepCheck` — verify installed tree matches lockfile
62+
- `NPM.PhantomDep` — detect undeclared (phantom) dependencies
63+
- `NPM.HoistingConflict` — detect version conflicts from hoisting
64+
- `NPM.PeerDep` / `NPM.PeerDepsCheck` — peer dependency validation
65+
- `NPM.PackageUpdate` — compute available major/minor/patch updates
66+
- `NPM.OutdatedReport` — npm outdated-style table formatting
67+
- `NPM.SnapshotDiff` — lockfile snapshot comparison
68+
- `NPM.ManifestDiff` — diff two package.json files
69+
- `NPM.IntegrityCheck` — verify installed packages match lockfile
70+
- `NPM.LockfileCheck` / `NPM.LockfileStats` — lockfile validation and metrics
71+
72+
### Package Metadata (20+ modules)
73+
74+
- `NPM.Validate` — package.json schema validation
75+
- `NPM.Engines` / `NPM.NodeVersion` — engine constraints and .nvmrc/.tool-versions parsing
76+
- `NPM.Compat` — Node.js version compatibility checking
77+
- `NPM.Funding` — funding field parsing
78+
- `NPM.TypeField` — module type detection (ESM/CJS)
79+
- `NPM.SideEffects` — tree-shaking side-effects field
80+
- `NPM.Conditional` — conditional exports/imports resolution
81+
- `NPM.Exports` / `NPM.TypesResolution` — package exports and types resolution
82+
- `NPM.PublishConfig` — publish configuration
83+
- `NPM.Corepack` — packageManager field parsing
84+
- `NPM.PackageQuality` — metadata quality scoring
85+
- `NPM.PackageFiles` — files field and .npmignore analysis
86+
- `NPM.BundleAnalysis` — bundle-friendliness scoring
87+
- `NPM.ImportMap` — browser import map generation
88+
- `NPM.TypesCompanion` — suggest @types/* companion packages
89+
- `NPM.ScriptRunner` — script analysis and pattern detection
90+
- `NPM.ReleaseNotes` — changelog version extraction
91+
92+
### Security & Supply Chain
93+
94+
- `NPM.CVE` — CVE detection and scoring
95+
- `NPM.SBOM` — software bill of materials generation
96+
- `NPM.SupplyChain` — supply chain risk assessment
97+
- `NPM.Provenance` — package provenance verification
98+
- `NPM.DeprecationAnalysis` — deprecation severity analysis
99+
100+
### Configuration
101+
102+
- `NPM.Npmrc` — .npmrc file parsing
103+
- `NPM.NpmrcMerge` — multi-layer .npmrc resolution (project → user → global)
104+
- `NPM.RegistryUrl` — registry URL resolution with scope support
105+
- `NPM.InstallStrategy` — hoisted/nested/isolated install strategies
106+
- `NPM.Workspaces` — workspace configuration and glob matching
107+
- `NPM.Migration` — npm version migration guidance
108+
109+
### Infrastructure
110+
111+
- `NPM.Compiler` — Mix compiler for automatic npm installs
112+
- `NPM.CacheStats` — cache hit/miss metrics and disk usage
113+
- `NPM.ProgressReporter` — structured progress output
114+
- `NPM.ErrorMessage` — error formatting with suggestions
115+
- `NPM.DepsOutput``mix deps`-style package listing
116+
- `NPM.Diagnostics` — project health diagnostics
117+
- `NPM.Gitignore` — .gitignore management for npm projects
118+
119+
### Other
30120

31-
### Features
32121
- `devDependencies` support (`--save-dev`, `--production`)
33122
- `optionalDependencies` support (`--save-optional`)
34123
- `--save-exact` flag for pinning exact versions
35-
- `node_modules/.bin/` executable linking (string, map, and `directories.bin`)
36-
- Stale package pruning from `node_modules/` on re-install (preserves dotfiles)
37-
- Peer dependency warnings during resolution
38-
- Deprecation warnings during install
39-
- Lockfile diff output showing added/removed/updated packages
124+
- `node_modules/.bin/` executable linking
40125
- `overrides` support in `package.json`
41-
- Workspaces support (`workspaces` field with glob patterns)
42126
- Custom registry URL via `NPM_REGISTRY` env var
43127
- Auth token support via `NPM_TOKEN` env var
44128
- SHA-256 integrity verification (in addition to SHA-512 and SHA-1)
45129
- Retry with exponential backoff for failed HTTP requests
46-
- `engines`, `bin`, `deprecated`, `hasInstallScript` registry metadata parsing
47-
- `NPM.Validator` module for name/range validation
48-
- `NPM.Compiler` — Mix compiler for automatic npm installs
49130
- `file:` dependency references
50-
- Fix: scoped package copy strategy now creates parent directories
51-
- Fix: prune preserves `.bin/` and other dotfile directories
52-
- 200+ tests (up from 64)
131+
- 2,697 tests (up from 64)
53132

54133
## 0.3.1
55134

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Resolve, fetch, cache, and link npm packages directly from Mix.
1111

1212
```elixir
1313
def deps do
14-
[{:npm, "~> 0.3.0"}]
14+
[{:npm, "~> 0.4.0"}]
1515
end
1616
```
1717

autoresearch.checks.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

autoresearch.ideas.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)