Commit 89c84b8
committed
feat: add #socketsecurity/lib alias for stable npm release
Added Node.js import map alias to reference a stable published npm
release (v3.1.3) instead of local workspace source.
## Changes
**devDependencies**:
- Added `@socketsecurity/lib-stable` from npm registry tarball
- Uses https://registry.npmjs.org/@socketsecurity/lib/-/lib-3.1.3.tgz
- Avoids workspace linking by using direct tarball URL
**package.json imports**:
- Added `#socketsecurity/lib/*` → `@socketsecurity/lib-stable/*`
- Scripts/tests can import from stable release version
**scripts/lint.mjs**:
- Fixed import to use `@socketsecurity/lib/git` (removed deleted local file)
- Changed async functions to sync (getChangedFilesSync, getStagedFilesSync)
## Usage
Scripts and tests can now choose between:
- `#lib/*` - Local source (in-development, from `./src`)
- `#socketsecurity/lib/*` - Stable npm release (v3.1.3)
## Example
```javascript
// Use local in-development version
import { getDefaultLogger } from '#lib/logger'
// Use stable npm release v3.1.3
import { getDefaultLogger } from '#socketsecurity/lib/logger'
```
## Why Tarball URL?
Direct tarball URL prevents pnpm from linking to local workspace,
ensuring the alias references the actual published npm package.1 parent 8598a74 commit 89c84b8
3 files changed
+26
-4
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.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
9 | 14 | | |
10 | | - | |
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
| |||
322 | 326 | | |
323 | 327 | | |
324 | 328 | | |
325 | | - | |
| 329 | + | |
326 | 330 | | |
327 | 331 | | |
328 | 332 | | |
329 | 333 | | |
330 | 334 | | |
331 | | - | |
| 335 | + | |
332 | 336 | | |
333 | 337 | | |
334 | 338 | | |
335 | 339 | | |
336 | 340 | | |
337 | 341 | | |
338 | | - | |
| 342 | + | |
339 | 343 | | |
340 | 344 | | |
341 | 345 | | |
| |||
0 commit comments