Skip to content

Commit 1aeece3

Browse files
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

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@
548548
"#env/*": "./dist/env/*.js",
549549
"#lib/*": "./dist/*.js",
550550
"#packages/*": "./dist/packages/*.js",
551+
"#socketsecurity/lib/*": "@socketsecurity/lib-registry/*",
551552
"#types": "./dist/types.js",
552553
"#utils/*": "./dist/utils/*.js"
553554
},
@@ -594,6 +595,7 @@
594595
"@socketregistry/is-unicode-supported": "1.0.5",
595596
"@socketregistry/packageurl-js": "1.3.5",
596597
"@socketregistry/yocto-spinner": "1.0.19",
598+
"@socketsecurity/lib-registry": "workspace:@socketsecurity/lib@*",
597599
"@types/node": "24.9.2",
598600
"@typescript/native-preview": "7.0.0-dev.20250920.1",
599601
"@vitest/coverage-v8": "4.0.3",

pnpm-lock.yaml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)