Skip to content

Commit b3ab4f8

Browse files
committed
chore(release): bump version to 2.9.0
Added Socket.dev URL constants and enhanced error messages across library.
1 parent 3bbd6c7 commit b3ab4f8

File tree

3 files changed

+124
-1
lines changed

3 files changed

+124
-1
lines changed

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,34 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.9.0](https://github.com/SocketDev/socket-lib/releases/tag/v2.9.0) - 2025-10-30
9+
10+
### Added
11+
12+
- **Socket.dev URL constants**: Added centralized URL constants for Socket.dev services
13+
- `SOCKET_WEBSITE_URL`: Main Socket.dev website
14+
- `SOCKET_CONTACT_URL`: Contact page
15+
- `SOCKET_DASHBOARD_URL`: Dashboard homepage
16+
- `SOCKET_API_TOKENS_URL`: API tokens settings page
17+
- `SOCKET_PRICING_URL`: Pricing information
18+
- `SOCKET_STATUS_URL`: Service status page
19+
- `SOCKET_DOCS_URL`: Documentation site
20+
- Available via `@socketsecurity/lib/constants/socket`
21+
22+
### Changed
23+
24+
- **Enhanced error messages across library**: Comprehensive audit and improvement of error handling
25+
- Added actionable error messages with resolution steps throughout modules
26+
- Improved file system operation errors (permissions, read-only filesystems, path issues)
27+
- Enhanced DLX error messages with clear troubleshooting guidance
28+
- Better error context in process locking, binary downloads, and package operations
29+
- Consistent error formatting with helpful user guidance
30+
- **Consolidated process locking**: Standardized on directory-based lock format across all modules
31+
- All locking operations now use `process-lock` module exclusively
32+
- Lock directories provide atomic guarantees across all filesystems including NFS
33+
- Consistent mtime-based stale detection with 5-second timeout (aligned with npm npx)
34+
- Automatic cleanup on process exit with proper signal handling
35+
836
## [2.8.4](https://github.com/SocketDev/socket-lib/releases/tag/v2.8.4) - 2025-10-30
937

1038
### Added

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@socketsecurity/lib",
3-
"version": "2.8.4",
3+
"version": "2.9.0",
44
"license": "MIT",
55
"description": "Core utilities and infrastructure for Socket.dev security tools",
66
"keywords": [

test/constants/socket.test.ts

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@ import {
99
REGISTRY,
1010
REGISTRY_SCOPE_DELIMITER,
1111
SOCKET_API_BASE_URL,
12+
SOCKET_API_TOKENS_URL,
1213
SOCKET_APP_PREFIX,
1314
SOCKET_CLI_APP_NAME,
15+
SOCKET_CONTACT_URL,
16+
SOCKET_DASHBOARD_URL,
1417
SOCKET_DLX_APP_NAME,
18+
SOCKET_DOCS_URL,
1519
SOCKET_FIREWALL_APP_NAME,
1620
SOCKET_GITHUB_ORG,
1721
SOCKET_IPC_HANDSHAKE,
1822
SOCKET_OVERRIDE_SCOPE,
23+
SOCKET_PRICING_URL,
1924
SOCKET_PUBLIC_API_KEY,
2025
SOCKET_PUBLIC_API_TOKEN,
2126
SOCKET_REGISTRY_APP_NAME,
@@ -24,6 +29,8 @@ import {
2429
SOCKET_REGISTRY_REPO_NAME,
2530
SOCKET_REGISTRY_SCOPE,
2631
SOCKET_SECURITY_SCOPE,
32+
SOCKET_STATUS_URL,
33+
SOCKET_WEBSITE_URL,
2734
} from '@socketsecurity/lib/constants/socket'
2835

2936
describe('constants/socket', () => {
@@ -75,6 +82,94 @@ describe('constants/socket', () => {
7582
})
7683
})
7784

85+
describe('Socket.dev URLs', () => {
86+
it('should export SOCKET_WEBSITE_URL', () => {
87+
expect(SOCKET_WEBSITE_URL).toBe('https://socket.dev')
88+
})
89+
90+
it('should export SOCKET_CONTACT_URL', () => {
91+
expect(SOCKET_CONTACT_URL).toBe('https://socket.dev/contact')
92+
})
93+
94+
it('should export SOCKET_DASHBOARD_URL', () => {
95+
expect(SOCKET_DASHBOARD_URL).toBe('https://socket.dev/dashboard')
96+
})
97+
98+
it('should export SOCKET_API_TOKENS_URL', () => {
99+
expect(SOCKET_API_TOKENS_URL).toBe(
100+
'https://socket.dev/dashboard/settings/api-tokens',
101+
)
102+
})
103+
104+
it('should export SOCKET_PRICING_URL', () => {
105+
expect(SOCKET_PRICING_URL).toBe('https://socket.dev/pricing')
106+
})
107+
108+
it('should export SOCKET_STATUS_URL', () => {
109+
expect(SOCKET_STATUS_URL).toBe('https://status.socket.dev')
110+
})
111+
112+
it('should export SOCKET_DOCS_URL', () => {
113+
expect(SOCKET_DOCS_URL).toBe('https://docs.socket.dev')
114+
})
115+
116+
it('should all be valid HTTPS URLs', () => {
117+
const urls = [
118+
SOCKET_WEBSITE_URL,
119+
SOCKET_CONTACT_URL,
120+
SOCKET_DASHBOARD_URL,
121+
SOCKET_API_TOKENS_URL,
122+
SOCKET_PRICING_URL,
123+
SOCKET_STATUS_URL,
124+
SOCKET_DOCS_URL,
125+
]
126+
urls.forEach(url => {
127+
expect(url).toMatch(/^https:\/\//)
128+
expect(() => new URL(url)).not.toThrow()
129+
})
130+
})
131+
132+
it('should all contain socket.dev domain', () => {
133+
const urls = [
134+
SOCKET_WEBSITE_URL,
135+
SOCKET_CONTACT_URL,
136+
SOCKET_DASHBOARD_URL,
137+
SOCKET_API_TOKENS_URL,
138+
SOCKET_PRICING_URL,
139+
SOCKET_STATUS_URL,
140+
SOCKET_DOCS_URL,
141+
]
142+
urls.forEach(url => {
143+
expect(url).toContain('socket.dev')
144+
})
145+
})
146+
147+
it('should not have trailing slashes', () => {
148+
const urls = [
149+
SOCKET_WEBSITE_URL,
150+
SOCKET_CONTACT_URL,
151+
SOCKET_DASHBOARD_URL,
152+
SOCKET_API_TOKENS_URL,
153+
SOCKET_PRICING_URL,
154+
SOCKET_STATUS_URL,
155+
SOCKET_DOCS_URL,
156+
]
157+
urls.forEach(url => {
158+
expect(url.endsWith('/')).toBe(false)
159+
})
160+
})
161+
162+
it('should support URL path construction', () => {
163+
const orgDashboard = `${SOCKET_DASHBOARD_URL}/org/myorg`
164+
expect(orgDashboard).toBe('https://socket.dev/dashboard/org/myorg')
165+
})
166+
167+
it('should support documentation path construction', () => {
168+
const guidePath = `${SOCKET_DOCS_URL}/docs/getting-started`
169+
expect(guidePath).toBe('https://docs.socket.dev/docs/getting-started')
170+
})
171+
})
172+
78173
describe('Socket.dev scopes', () => {
79174
it('should export SOCKET_REGISTRY_SCOPE', () => {
80175
expect(SOCKET_REGISTRY_SCOPE).toBe('@socketregistry')

0 commit comments

Comments
 (0)