Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9d34a3511a | |||
| 300e03628c | |||
| 893d6e40dc | |||
| 8b16ba1d9a |
14
changelog.md
14
changelog.md
@@ -1,5 +1,19 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2026-03-09 - 3.3.2 - fix(deps)
|
||||||
|
bump dependency versions and reorder smartserve in package.json
|
||||||
|
|
||||||
|
- bump @push.rocks/smartbrowser from ^2.0.10 to ^2.0.11
|
||||||
|
- bump @push.rocks/smartfs from ^1.4.0 to ^1.5.0
|
||||||
|
- move @push.rocks/smartserve to later position in dependencies (version unchanged: ^2.0.1)
|
||||||
|
|
||||||
|
## 2026-03-09 - 3.3.1 - fix(serve)
|
||||||
|
migrate test HTTP server to @push.rocks/smartserve and update related dependencies
|
||||||
|
|
||||||
|
- Replace @api.global/typedserver with @push.rocks/smartserve and FileServer; use SmartServe.setHandler to serve static assets and a custom /test response.
|
||||||
|
- Export smartserve from ts/tstest.plugins.ts and remove typedserver import/export.
|
||||||
|
- Update package.json dependencies: add @push.rocks/smartserve@^2.0.1 and bump @push.rocks/smartbrowser to ^2.0.10.
|
||||||
|
|
||||||
## 2026-03-06 - 3.3.0 - feat(testfile-directives)
|
## 2026-03-06 - 3.3.0 - feat(testfile-directives)
|
||||||
Add per-test file directives to control runtime permissions and flags (Deno, Node, Bun, Chromium)
|
Add per-test file directives to control runtime permissions and flags (Deno, Node, Bun, Chromium)
|
||||||
|
|
||||||
|
|||||||
@@ -9,5 +9,5 @@
|
|||||||
"target": "ES2022"
|
"target": "ES2022"
|
||||||
},
|
},
|
||||||
"nodeModulesDir": true,
|
"nodeModulesDir": true,
|
||||||
"version": "3.3.0"
|
"version": "3.3.2"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@git.zone/tstest",
|
"name": "@git.zone/tstest",
|
||||||
"version": "3.3.0",
|
"version": "3.3.2",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "A powerful, modern test runner for TypeScript with multi-runtime support (Node.js, Deno, Bun, Chromium) and a batteries-included test framework.",
|
"description": "A powerful, modern test runner for TypeScript with multi-runtime support (Node.js, Deno, Bun, Chromium) and a batteries-included test framework.",
|
||||||
"exports": {
|
"exports": {
|
||||||
@@ -29,18 +29,17 @@
|
|||||||
"@types/node": "^25.3.5"
|
"@types/node": "^25.3.5"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@api.global/typedserver": "^8.4.2",
|
|
||||||
"@git.zone/tsbundle": "^2.9.1",
|
"@git.zone/tsbundle": "^2.9.1",
|
||||||
"@git.zone/tsrun": "^2.0.1",
|
"@git.zone/tsrun": "^2.0.1",
|
||||||
"@push.rocks/consolecolor": "^2.0.3",
|
"@push.rocks/consolecolor": "^2.0.3",
|
||||||
"@push.rocks/qenv": "^6.1.3",
|
"@push.rocks/qenv": "^6.1.3",
|
||||||
"@push.rocks/smartbrowser": "^2.0.8",
|
"@push.rocks/smartbrowser": "^2.0.11",
|
||||||
"@push.rocks/smartcrypto": "^2.0.4",
|
"@push.rocks/smartcrypto": "^2.0.4",
|
||||||
"@push.rocks/smartdelay": "^3.0.5",
|
"@push.rocks/smartdelay": "^3.0.5",
|
||||||
"@push.rocks/smartenv": "^6.0.0",
|
"@push.rocks/smartenv": "^6.0.0",
|
||||||
"@push.rocks/smartexpect": "^2.5.0",
|
"@push.rocks/smartexpect": "^2.5.0",
|
||||||
"@push.rocks/smartfile": "^13.1.2",
|
"@push.rocks/smartfile": "^13.1.2",
|
||||||
"@push.rocks/smartfs": "^1.4.0",
|
"@push.rocks/smartfs": "^1.5.0",
|
||||||
"@push.rocks/smartjson": "^6.0.0",
|
"@push.rocks/smartjson": "^6.0.0",
|
||||||
"@push.rocks/smartlog": "^3.2.1",
|
"@push.rocks/smartlog": "^3.2.1",
|
||||||
"@push.rocks/smartmongo": "^5.1.0",
|
"@push.rocks/smartmongo": "^5.1.0",
|
||||||
@@ -49,6 +48,7 @@
|
|||||||
"@push.rocks/smartpromise": "^4.2.3",
|
"@push.rocks/smartpromise": "^4.2.3",
|
||||||
"@push.rocks/smartrequest": "^5.0.1",
|
"@push.rocks/smartrequest": "^5.0.1",
|
||||||
"@push.rocks/smarts3": "^5.3.0",
|
"@push.rocks/smarts3": "^5.3.0",
|
||||||
|
"@push.rocks/smartserve": "^2.0.1",
|
||||||
"@push.rocks/smartshell": "^3.3.7",
|
"@push.rocks/smartshell": "^3.3.7",
|
||||||
"@push.rocks/smarttime": "^4.2.3",
|
"@push.rocks/smarttime": "^4.2.3",
|
||||||
"@push.rocks/smartwatch": "^6.3.0",
|
"@push.rocks/smartwatch": "^6.3.0",
|
||||||
|
|||||||
2757
pnpm-lock.yaml
generated
2757
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@git.zone/tstest',
|
name: '@git.zone/tstest',
|
||||||
version: '3.3.0',
|
version: '3.3.2',
|
||||||
description: 'A powerful, modern test runner for TypeScript with multi-runtime support (Node.js, Deno, Bun, Chromium) and a batteries-included test framework.'
|
description: 'A powerful, modern test runner for TypeScript with multi-runtime support (Node.js, Deno, Bun, Chromium) and a batteries-included test framework.'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,24 +116,27 @@ export class ChromiumRuntimeAdapter extends RuntimeAdapter {
|
|||||||
// Find free ports for HTTP and WebSocket
|
// Find free ports for HTTP and WebSocket
|
||||||
const { httpPort, wsPort } = await this.findFreePorts();
|
const { httpPort, wsPort } = await this.findFreePorts();
|
||||||
|
|
||||||
// lets create a server
|
// Use SmartServe with setHandler() to bypass global ControllerRegistry
|
||||||
const server = new plugins.typedserver.TypedServer({
|
const fileServer = new plugins.smartserve.FileServer({ root: tsbundleCacheDirPath });
|
||||||
cors: true,
|
const server = new plugins.smartserve.SmartServe({ port: httpPort });
|
||||||
port: httpPort,
|
server.setHandler(async (request: Request) => {
|
||||||
serveDir: tsbundleCacheDirPath,
|
const url = new URL(request.url);
|
||||||
});
|
if (url.pathname === '/test') {
|
||||||
server.addRoute('/test', 'GET', async () => {
|
return new Response(`
|
||||||
return new Response(`
|
<html>
|
||||||
<html>
|
<head>
|
||||||
<head>
|
<script>
|
||||||
<script>
|
globalThis.testdom = true;
|
||||||
globalThis.testdom = true;
|
globalThis.wsPort = ${wsPort};
|
||||||
globalThis.wsPort = ${wsPort};
|
</script>
|
||||||
</script>
|
</head>
|
||||||
</head>
|
<body></body>
|
||||||
<body></body>
|
</html>
|
||||||
</html>
|
`, { headers: { 'Content-Type': 'text/html' } });
|
||||||
`, { headers: { 'Content-Type': 'text/html' } });
|
}
|
||||||
|
const staticResponse = await fileServer.serve(request);
|
||||||
|
if (staticResponse) return staticResponse;
|
||||||
|
return new Response('Not Found', { status: 404 });
|
||||||
});
|
});
|
||||||
await server.start();
|
await server.start();
|
||||||
|
|
||||||
|
|||||||
@@ -476,24 +476,27 @@ import '${absoluteTestFile.replace(/\\/g, '/')}';
|
|||||||
// Find free ports for HTTP and WebSocket
|
// Find free ports for HTTP and WebSocket
|
||||||
const { httpPort, wsPort } = await this.findFreePorts();
|
const { httpPort, wsPort } = await this.findFreePorts();
|
||||||
|
|
||||||
// lets create a server
|
// Use SmartServe with setHandler() to bypass global ControllerRegistry
|
||||||
const server = new plugins.typedserver.TypedServer({
|
const fileServer = new plugins.smartserve.FileServer({ root: tsbundleCacheDirPath });
|
||||||
cors: true,
|
const server = new plugins.smartserve.SmartServe({ port: httpPort });
|
||||||
port: httpPort,
|
server.setHandler(async (request: Request) => {
|
||||||
serveDir: tsbundleCacheDirPath,
|
const url = new URL(request.url);
|
||||||
});
|
if (url.pathname === '/test') {
|
||||||
server.addRoute('/test', 'GET', async () => {
|
return new Response(`
|
||||||
return new Response(`
|
<html>
|
||||||
<html>
|
<head>
|
||||||
<head>
|
<script>
|
||||||
<script>
|
globalThis.testdom = true;
|
||||||
globalThis.testdom = true;
|
globalThis.wsPort = ${wsPort};
|
||||||
globalThis.wsPort = ${wsPort};
|
</script>
|
||||||
</script>
|
</head>
|
||||||
</head>
|
<body></body>
|
||||||
<body></body>
|
</html>
|
||||||
</html>
|
`, { headers: { 'Content-Type': 'text/html' } });
|
||||||
`, { headers: { 'Content-Type': 'text/html' } });
|
}
|
||||||
|
const staticResponse = await fileServer.serve(request);
|
||||||
|
if (staticResponse) return staticResponse;
|
||||||
|
return new Response('Not Found', { status: 404 });
|
||||||
});
|
});
|
||||||
await server.start();
|
await server.start();
|
||||||
|
|
||||||
|
|||||||
@@ -4,16 +4,10 @@ import * as path from 'path';
|
|||||||
|
|
||||||
export { fs, path };
|
export { fs, path };
|
||||||
|
|
||||||
// @apiglobal scope
|
|
||||||
import * as typedserver from '@api.global/typedserver';
|
|
||||||
|
|
||||||
export {
|
|
||||||
typedserver
|
|
||||||
}
|
|
||||||
|
|
||||||
// @push.rocks scope
|
// @push.rocks scope
|
||||||
import * as consolecolor from '@push.rocks/consolecolor';
|
import * as consolecolor from '@push.rocks/consolecolor';
|
||||||
import * as smartbrowser from '@push.rocks/smartbrowser';
|
import * as smartbrowser from '@push.rocks/smartbrowser';
|
||||||
|
import * as smartserve from '@push.rocks/smartserve';
|
||||||
import * as smartdelay from '@push.rocks/smartdelay';
|
import * as smartdelay from '@push.rocks/smartdelay';
|
||||||
import * as smartfile from '@push.rocks/smartfile';
|
import * as smartfile from '@push.rocks/smartfile';
|
||||||
import * as smartfs from '@push.rocks/smartfs';
|
import * as smartfs from '@push.rocks/smartfs';
|
||||||
@@ -28,6 +22,7 @@ import * as tapbundle from '../dist_ts_tapbundle/index.js';
|
|||||||
export {
|
export {
|
||||||
consolecolor,
|
consolecolor,
|
||||||
smartbrowser,
|
smartbrowser,
|
||||||
|
smartserve,
|
||||||
smartdelay,
|
smartdelay,
|
||||||
smartfile,
|
smartfile,
|
||||||
smartfs,
|
smartfs,
|
||||||
|
|||||||
Reference in New Issue
Block a user