Commit 1aeece3
committed
feat: add #socketsecurity/lib alias for npm registry version
Added Node.js import map alias to reference the stable published npm
registry version instead of local source files.
## Changes
**package.json imports**:
- Added `#socketsecurity/lib/*` → `@socketsecurity/lib-registry/*`
- This allows scripts and tests to import from the stable npm version
- Example: `import { logger } from '#socketsecurity/lib/logger'`
**devDependencies**:
- Added `@socketsecurity/lib-registry@npm:@socketsecurity/[email protected]`
- Uses npm alias feature to avoid self-reference conflict
- Pinned to specific version for stability
## Usage
Scripts and tests can now choose between:
- `#lib/*` - Local source (in-development, from `./src`)
- `#socketsecurity/lib/*` - Stable npm registry version (published)
This enables testing against the stable release while developing
new features, ensuring backward compatibility.
## Example
```javascript
// Use local in-development version
import { getDefaultLogger } from '#lib/logger'
// Use stable npm registry version
import { getDefaultLogger } from '#socketsecurity/lib/logger'
```1 parent 8598a74 commit 1aeece3
2 files changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
| 551 | + | |
551 | 552 | | |
552 | 553 | | |
553 | 554 | | |
| |||
594 | 595 | | |
595 | 596 | | |
596 | 597 | | |
| 598 | + | |
597 | 599 | | |
598 | 600 | | |
599 | 601 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments