Skip to content

Commit 0b2af66

Browse files
committed
chore: change package name
1 parent d9d47d9 commit 0b2af66

File tree

21 files changed

+182
-180
lines changed

21 files changed

+182
-180
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: CI
22
env:
33
DEBUG: napi:*
4-
APP_NAME: unix-socket
4+
APP_NAME: unode-unix-socket
55
MACOSX_DEPLOYMENT_TARGET: '10.13'
66
'on':
77
push:

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
edition = "2021"
3-
name = "nix-socket"
3+
name = "node-unix-socket"
44
version = "0.0.0"
55

66
[lib]

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# nix-socket
1+
# node-unix-socket
22

3-
`nix-socket` allows you to use some nonblocking sockets that are not supported by Node.js native modules, including:
3+
`node-unix-socket` allows you to use some nonblocking sockets that are not supported by Node.js native modules, including:
44

55
- Using `SO_REUSEPORT` enabled TCP [net.Server](https://nodejs.org/dist/latest-v16.x/docs/api/net.html#class-netserver)
66
- unix seqpacket(`SOCK_SEQPACKET`) sockets
77
- unix datagram(`SOCK_DGRAM`) sockets
88

9-
`nix-socket` is a [napi-rs](https://napi.rs/) based [Node.js addons](https://nodejs.org/docs/latest-v16.x/api/addons.html). This lib uses [libuv](https://libuv.org/) inside Node.js so that it won't introduce any other asynchronous runtimes.
9+
`node-unix-socket` is a [napi-rs](https://napi.rs/) based [Node.js addons](https://nodejs.org/docs/latest-v16.x/api/addons.html). This lib uses [libuv](https://libuv.org/) inside Node.js so that it won't introduce any other asynchronous runtimes.
1010

1111
## API Documents
1212

@@ -27,7 +27,7 @@ Note that `SO_REUSEPORT` might behave much differently across operating systems.
2727
### Example
2828

2929
```js
30-
const { createReuseportFd } = require('nix-socket');
30+
const { createReuseportFd } = require('node-unix-socket');
3131
const { Server, Socket } = require('net');
3232

3333
const port = 8080;
@@ -75,7 +75,7 @@ Note that `SOCK_SEQPACKET` sockets don't work on MacOS.
7575
### Example
7676

7777
```js
78-
const { SeqpacketServer, SeqpacketSocket } = require('nix-socket');
78+
const { SeqpacketServer, SeqpacketSocket } = require('node-unix-socket');
7979
const os = require('os');
8080
const path = require('path');
8181
const fs = require('fs');
@@ -110,7 +110,7 @@ client.connect(bindPath, () => {
110110
### Example
111111

112112
```js
113-
const { DgramSocket } = require('nix-socket');
113+
const { DgramSocket } = require('node-unix-socket');
114114
const os = require('os');
115115
const path = require('path');
116116
const fs = require('fs');

docs/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
nix-socket / [Exports](modules.md)
1+
node-unix-socket / [Exports](modules.md)
22

3-
# nix-socket
3+
# node-unix-socket
44

5-
`nix-socket` allows you to use some nonblocking sockets that are not supported by Node.js native modules, including:
5+
`node-unix-socket` allows you to use some nonblocking sockets that are not supported by Node.js native modules, including:
66

77
- Using `SO_REUSEPORT` enabled TCP [net.Server](https://nodejs.org/dist/latest-v16.x/docs/api/net.html#class-netserver)
88
- unix seqpacket(`SOCK_SEQPACKET`) sockets
99
- unix datagram(`SOCK_DGRAM`) sockets
1010

11-
`nix-socket` is a [napi-rs](https://napi.rs/) based [Node.js addons](https://nodejs.org/docs/latest-v16.x/api/addons.html). This lib uses [libuv](https://libuv.org/) inside Node.js so that it won't introduce any other asynchronous runtimes.
11+
`node-unix-socket` is a [napi-rs](https://napi.rs/) based [Node.js addons](https://nodejs.org/docs/latest-v16.x/api/addons.html). This lib uses [libuv](https://libuv.org/) inside Node.js so that it won't introduce any other asynchronous runtimes.
1212

1313
## API Documents
1414

@@ -29,7 +29,7 @@ Note that `SO_REUSEPORT` might behave much differently across operating systems.
2929
### Example
3030

3131
```js
32-
const { createReuseportFd } = require('nix-socket');
32+
const { createReuseportFd } = require('node-unix-socket');
3333
const { Server, Socket } = require('net');
3434

3535
const port = 8080;
@@ -77,7 +77,7 @@ Note that `SOCK_SEQPACKET` sockets don't work on MacOS.
7777
### Example
7878

7979
```js
80-
const { SeqpacketServer, SeqpacketSocket } = require('nix-socket');
80+
const { SeqpacketServer, SeqpacketSocket } = require('node-unix-socket');
8181
const os = require('os');
8282
const path = require('path');
8383
const fs = require('fs');
@@ -112,7 +112,7 @@ client.connect(bindPath, () => {
112112
### Example
113113

114114
```js
115-
const { DgramSocket } = require('nix-socket');
115+
const { DgramSocket } = require('node-unix-socket');
116116
const os = require('os');
117117
const path = require('path');
118118
const fs = require('fs');

docs/classes/DgramSocket.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[nix-socket](../README.md) / [Exports](../modules.md) / DgramSocket
1+
[node-unix-socket](../README.md) / [Exports](../modules.md) / DgramSocket
22

33
# Class: DgramSocket
44

docs/classes/SeqpacketServer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[nix-socket](../README.md) / [Exports](../modules.md) / SeqpacketServer
1+
[node-unix-socket](../README.md) / [Exports](../modules.md) / SeqpacketServer
22

33
# Class: SeqpacketServer
44

docs/classes/SeqpacketSocket.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[nix-socket](../README.md) / [Exports](../modules.md) / SeqpacketSocket
1+
[node-unix-socket](../README.md) / [Exports](../modules.md) / SeqpacketSocket
22

33
# Class: SeqpacketSocket
44

docs/modules.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
[nix-socket](README.md) / Exports
1+
[node-unix-socket](README.md) / Exports
22

3-
# nix-socket
3+
# node-unix-socket
44

55
## Table of contents
66

js/addon.js

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,24 @@ switch (platform) {
2525
case 'android':
2626
switch (arch) {
2727
case 'arm64':
28-
localFileExisted = existsSync(join(__dirname, '../nix-socket.android-arm64.node'))
28+
localFileExisted = existsSync(join(__dirname, '../node-unix-socket.android-arm64.node'))
2929
try {
3030
if (localFileExisted) {
31-
nativeBinding = require('../nix-socket.android-arm64.node')
31+
nativeBinding = require('../node-unix-socket.android-arm64.node')
3232
} else {
33-
nativeBinding = require('nix-socket-android-arm64')
33+
nativeBinding = require('node-unix-socket-android-arm64')
3434
}
3535
} catch (e) {
3636
loadError = e
3737
}
3838
break
3939
case 'arm':
40-
localFileExisted = existsSync(join(__dirname, '../nix-socket.android-arm-eabi.node'))
40+
localFileExisted = existsSync(join(__dirname, '../node-unix-socket.android-arm-eabi.node'))
4141
try {
4242
if (localFileExisted) {
43-
nativeBinding = require('../nix-socket.android-arm-eabi.node')
43+
nativeBinding = require('../node-unix-socket.android-arm-eabi.node')
4444
} else {
45-
nativeBinding = require('nix-socket-android-arm-eabi')
45+
nativeBinding = require('node-unix-socket-android-arm-eabi')
4646
}
4747
} catch (e) {
4848
loadError = e
@@ -56,41 +56,41 @@ switch (platform) {
5656
switch (arch) {
5757
case 'x64':
5858
localFileExisted = existsSync(
59-
join(__dirname, '../nix-socket.win32-x64-msvc.node')
59+
join(__dirname, '../node-unix-socket.win32-x64-msvc.node')
6060
)
6161
try {
6262
if (localFileExisted) {
63-
nativeBinding = require('../nix-socket.win32-x64-msvc.node')
63+
nativeBinding = require('../node-unix-socket.win32-x64-msvc.node')
6464
} else {
65-
nativeBinding = require('nix-socket-win32-x64-msvc')
65+
nativeBinding = require('node-unix-socket-win32-x64-msvc')
6666
}
6767
} catch (e) {
6868
loadError = e
6969
}
7070
break
7171
case 'ia32':
7272
localFileExisted = existsSync(
73-
join(__dirname, '../nix-socket.win32-ia32-msvc.node')
73+
join(__dirname, '../node-unix-socket.win32-ia32-msvc.node')
7474
)
7575
try {
7676
if (localFileExisted) {
77-
nativeBinding = require('../nix-socket.win32-ia32-msvc.node')
77+
nativeBinding = require('../node-unix-socket.win32-ia32-msvc.node')
7878
} else {
79-
nativeBinding = require('nix-socket-win32-ia32-msvc')
79+
nativeBinding = require('node-unix-socket-win32-ia32-msvc')
8080
}
8181
} catch (e) {
8282
loadError = e
8383
}
8484
break
8585
case 'arm64':
8686
localFileExisted = existsSync(
87-
join(__dirname, '../nix-socket.win32-arm64-msvc.node')
87+
join(__dirname, '../node-unix-socket.win32-arm64-msvc.node')
8888
)
8989
try {
9090
if (localFileExisted) {
91-
nativeBinding = require('../nix-socket.win32-arm64-msvc.node')
91+
nativeBinding = require('../node-unix-socket.win32-arm64-msvc.node')
9292
} else {
93-
nativeBinding = require('nix-socket-win32-arm64-msvc')
93+
nativeBinding = require('node-unix-socket-win32-arm64-msvc')
9494
}
9595
} catch (e) {
9696
loadError = e
@@ -103,26 +103,26 @@ switch (platform) {
103103
case 'darwin':
104104
switch (arch) {
105105
case 'x64':
106-
localFileExisted = existsSync(join(__dirname, '../nix-socket.darwin-x64.node'))
106+
localFileExisted = existsSync(join(__dirname, '../node-unix-socket.darwin-x64.node'))
107107
try {
108108
if (localFileExisted) {
109-
nativeBinding = require('../nix-socket.darwin-x64.node')
109+
nativeBinding = require('../node-unix-socket.darwin-x64.node')
110110
} else {
111-
nativeBinding = require('nix-socket-darwin-x64')
111+
nativeBinding = require('node-unix-socket-darwin-x64')
112112
}
113113
} catch (e) {
114114
loadError = e
115115
}
116116
break
117117
case 'arm64':
118118
localFileExisted = existsSync(
119-
join(__dirname, '../nix-socket.darwin-arm64.node')
119+
join(__dirname, '../node-unix-socket.darwin-arm64.node')
120120
)
121121
try {
122122
if (localFileExisted) {
123-
nativeBinding = require('../nix-socket.darwin-arm64.node')
123+
nativeBinding = require('../node-unix-socket.darwin-arm64.node')
124124
} else {
125-
nativeBinding = require('nix-socket-darwin-arm64')
125+
nativeBinding = require('node-unix-socket-darwin-arm64')
126126
}
127127
} catch (e) {
128128
loadError = e
@@ -136,12 +136,12 @@ switch (platform) {
136136
if (arch !== 'x64') {
137137
throw new Error(`Unsupported architecture on FreeBSD: ${arch}`)
138138
}
139-
localFileExisted = existsSync(join(__dirname, '../nix-socket.freebsd-x64.node'))
139+
localFileExisted = existsSync(join(__dirname, '../node-unix-socket.freebsd-x64.node'))
140140
try {
141141
if (localFileExisted) {
142-
nativeBinding = require('../nix-socket.freebsd-x64.node')
142+
nativeBinding = require('../node-unix-socket.freebsd-x64.node')
143143
} else {
144-
nativeBinding = require('nix-socket-freebsd-x64')
144+
nativeBinding = require('node-unix-socket-freebsd-x64')
145145
}
146146
} catch (e) {
147147
loadError = e
@@ -152,26 +152,26 @@ switch (platform) {
152152
case 'x64':
153153
if (isMusl()) {
154154
localFileExisted = existsSync(
155-
join(__dirname, '../nix-socket.linux-x64-musl.node')
155+
join(__dirname, '../node-unix-socket.linux-x64-musl.node')
156156
)
157157
try {
158158
if (localFileExisted) {
159-
nativeBinding = require('../nix-socket.linux-x64-musl.node')
159+
nativeBinding = require('../node-unix-socket.linux-x64-musl.node')
160160
} else {
161-
nativeBinding = require('nix-socket-linux-x64-musl')
161+
nativeBinding = require('node-unix-socket-linux-x64-musl')
162162
}
163163
} catch (e) {
164164
loadError = e
165165
}
166166
} else {
167167
localFileExisted = existsSync(
168-
join(__dirname, '../nix-socket.linux-x64-gnu.node')
168+
join(__dirname, '../node-unix-socket.linux-x64-gnu.node')
169169
)
170170
try {
171171
if (localFileExisted) {
172-
nativeBinding = require('../nix-socket.linux-x64-gnu.node')
172+
nativeBinding = require('../node-unix-socket.linux-x64-gnu.node')
173173
} else {
174-
nativeBinding = require('nix-socket-linux-x64-gnu')
174+
nativeBinding = require('node-unix-socket-linux-x64-gnu')
175175
}
176176
} catch (e) {
177177
loadError = e
@@ -181,26 +181,26 @@ switch (platform) {
181181
case 'arm64':
182182
if (isMusl()) {
183183
localFileExisted = existsSync(
184-
join(__dirname, '../nix-socket.linux-arm64-musl.node')
184+
join(__dirname, '../node-unix-socket.linux-arm64-musl.node')
185185
)
186186
try {
187187
if (localFileExisted) {
188-
nativeBinding = require('../nix-socket.linux-arm64-musl.node')
188+
nativeBinding = require('../node-unix-socket.linux-arm64-musl.node')
189189
} else {
190-
nativeBinding = require('nix-socket-linux-arm64-musl')
190+
nativeBinding = require('node-unix-socket-linux-arm64-musl')
191191
}
192192
} catch (e) {
193193
loadError = e
194194
}
195195
} else {
196196
localFileExisted = existsSync(
197-
join(__dirname, '../nix-socket.linux-arm64-gnu.node')
197+
join(__dirname, '../node-unix-socket.linux-arm64-gnu.node')
198198
)
199199
try {
200200
if (localFileExisted) {
201-
nativeBinding = require('../nix-socket.linux-arm64-gnu.node')
201+
nativeBinding = require('../node-unix-socket.linux-arm64-gnu.node')
202202
} else {
203-
nativeBinding = require('nix-socket-linux-arm64-gnu')
203+
nativeBinding = require('node-unix-socket-linux-arm64-gnu')
204204
}
205205
} catch (e) {
206206
loadError = e
@@ -209,13 +209,13 @@ switch (platform) {
209209
break
210210
case 'arm':
211211
localFileExisted = existsSync(
212-
join(__dirname, '../nix-socket.linux-arm-gnueabihf.node')
212+
join(__dirname, '../node-unix-socket.linux-arm-gnueabihf.node')
213213
)
214214
try {
215215
if (localFileExisted) {
216-
nativeBinding = require('../nix-socket.linux-arm-gnueabihf.node')
216+
nativeBinding = require('../node-unix-socket.linux-arm-gnueabihf.node')
217217
} else {
218-
nativeBinding = require('nix-socket-linux-arm-gnueabihf')
218+
nativeBinding = require('node-unix-socket-linux-arm-gnueabihf')
219219
}
220220
} catch (e) {
221221
loadError = e

0 commit comments

Comments
 (0)