History log of /unit/test/test_node_es_modules.py (Results 1 – 6 of 6)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 2066:242192963d93 31-Jan-2022 Andrei Zeliankou

Tests: removed TestApplicationTLS.get_server_certificate().

distutils.version is replaced by packaging.version. Also minor style fixes.


Revision tags: 1.26.1-1, 1.26.1, 1.26.0-1, 1.26.0
# 1984:06514cd08a35 02-Nov-2021 Andrei Zeliankou

Tests: removed unused imports.


# 1971:3410f9d2a662 18-Oct-2021 Andrei Zeliankou

Tests: style.


Revision tags: 1.25.0-1, 1.25.0
# 1902:17547cf0ed39 28-Jun-2021 Andrei Zeliankou

Tests: renamed share to static.

Also minor style changes.


Revision tags: 1.24.0-1, 1.24.0
# 1876:f85b85094541 24-May-2021 Oisin Canty

Node.js: renamed "require_shim" to "loader".


# 1865:3c551b9721df 12-May-2021 Oisin Canty

Node.js: a shim for overriding "http" and "websocket" modules.

Also added stubs for Server.address()
This was done to prevent crashes in some popular frameworks like express

Supports both CommonJS

Node.js: a shim for overriding "http" and "websocket" modules.

Also added stubs for Server.address()
This was done to prevent crashes in some popular frameworks like express

Supports both CommonJS and the new ES Modules system syntax e.g:

app.js:
const http = require('http')

app.mjs:
import http from "http"

Usage on Node 14.16.x and higher:
{
"type": "external",
"processes": {"spare": 0},
"working_directory": '/project',
"executable": "/usr/bin/env",
"arguments": [
"node",
"--loader",
"unit-http/require_shim.mjs"
"--require",
"unit-http/require_shim",
"app.js"
]
}

Usage on Node 14.15.x and lower:
{
"type": "external",
"processes": {"spare": 0},
"working_directory": '/project',
"executable": "/usr/bin/env",
"arguments": [
"node",
"--require",
"unit-http/require_shim",
"app.js"
]
}

show more ...