Skip to content

Commit 0aae141

Browse files
committed
🎉 feat: use elysia namespace
1 parent 276ba8b commit 0aae141

5 files changed

Lines changed: 66 additions & 34 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Publish Legacy
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
defaults:
8+
run:
9+
shell: bash
10+
11+
permissions:
12+
id-token: write
13+
14+
env:
15+
# Enable debug logging for actions
16+
ACTIONS_RUNNER_DEBUG: true
17+
18+
jobs:
19+
publish-npm:
20+
name: 'Publish: npm Registry'
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: 'Checkout'
24+
uses: actions/checkout@v4
25+
26+
- name: 'Setup Bun'
27+
uses: oven-sh/setup-bun@v1
28+
with:
29+
bun-version: latest
30+
registry-url: "https://registry.npmjs.org"
31+
32+
- uses: actions/setup-node@v5
33+
with:
34+
node-version: '24.x'
35+
registry-url: 'https://registry.npmjs.org'
36+
37+
- name: replace @elysia to @elysiajs
38+
run: sed -i 's/@elysia/@elysiajs/g' package.json
39+
40+
- name: Install packages
41+
run: bun install
42+
43+
- name: Build code
44+
run: bun run build
45+
46+
- name: Test
47+
run: bun run test
48+
49+
- name: 'Publish'
50+
run: |
51+
NODE_AUTH_TOKEN="" npm publish --provenance --access=public

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 1.4.6 - 20 May 2026
2+
Bug fix:
3+
- use @elysia namespace
4+
15
# 1.4.5 - 17 Feb 2026
26
Bug fix:
37
- request.wsId is undefined when using WebSocket

example/index.ts

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,12 @@ import { fromTypes, openapi } from '@elysiajs/openapi'
44

55
import { node } from '../src'
66

7+
const subapp = new Elysia({ adapter: node() }).ws('/', {
8+
message: () => 'Hello WebSocket'
9+
})
10+
711
const app = new Elysia({
812
adapter: node()
913
})
10-
11-
app.use(cors())
12-
.use(openapi())
13-
.get('/redirect', ({ cookie, redirect }) => {
14-
cookie.a.value = 'cookie value'
15-
16-
return redirect('https://example.com')
17-
})
18-
.ws('/ws/:id', {
19-
open({ data, subscribe, isSubscribed }) {
20-
console.log(data)
21-
subscribe('welcome')
22-
},
23-
message(ws, message) {
24-
ws.send(message)
25-
}
26-
})
27-
.get('/image', async () => file('test/kyuukurarin.mp4'))
28-
.get('/generator', async function* () {
29-
for (let i = 0; i < 10000; i++) {
30-
await new Promise((resolve) => setTimeout(resolve, 10))
31-
yield 'A'
32-
}
33-
})
34-
.post('/', ({ body }) => body, {
35-
parse: 'json'
36-
})
37-
.get('/', () => 'ok')
14+
.use(subapp)
3815
.listen(3000)

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "@elysiajs/node",
3-
"version": "1.4.5",
2+
"name": "@elysia/node",
3+
"version": "1.4.6",
44
"description": "Elysia adapter to run Elysia on Node.js",
55
"license": "MIT",
66
"scripts": {
@@ -12,8 +12,8 @@
1212
"release": "npm run build && npm run test && npm publish --access public"
1313
},
1414
"dependencies": {
15-
"crossws": "^0.4.1",
16-
"srvx": "^0.11.2"
15+
"crossws": "^0.4.5",
16+
"srvx": "^0.11.5"
1717
},
1818
"peerDependencies": {
1919
"elysia": ">= 1.4.0"

test/cluster/cluster.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const cluster = require('node:cluster')
22
const { Elysia } = require('elysia')
33
const { exit, pid } = require('node:process')
4-
const { node } = require('@elysiajs/node')
4+
const { node } = require('@elysia/node')
55

66
const workersAmount = 5
77
const port = 3000
@@ -31,7 +31,7 @@ if (arg2 === 'port') {
3131
}
3232

3333
/**
34-
* Method to stop workers and then exit the current program
34+
* Method to stop workers and then exit the current program
3535
* @param {Worker[]} workers list of workers
3636
* @param {number} code exit code
3737
*/

0 commit comments

Comments
 (0)