feat(packaging): Rename package scope to @git.zone and migrate to ESM; rename CLI/config keys, update entrypoints and imports, bump Node requirement to 18, and adjust scripts/dependencies

This commit is contained in:
2026-01-19 22:08:59 +00:00
parent e0cbc9cfec
commit 6995010a2c
15 changed files with 450 additions and 122 deletions

View File

@@ -35,13 +35,13 @@ For reporting bugs, issues, or security vulnerabilities, please visit [community
- Full TypeScript support with excellent IntelliSense
- Type-safe configuration
- Modern async/await patterns throughout
- Modern ESM with async/await patterns throughout
## Installation
```bash
npm install --save-dev @git.zone/tsdocker
# or
npm install -g @git.zone/tsdocker
# or for project-local installation
pnpm install --save-dev @git.zone/tsdocker
```
@@ -53,9 +53,9 @@ Create an `npmextra.json` file in your project root:
```json
{
"npmdocker": {
"baseImage": "hosttoday/ht-docker-node:npmts",
"command": "npmci test stable",
"@git.zone/tsdocker": {
"baseImage": "node:20",
"command": "npm test",
"dockerSock": false
}
}
@@ -64,7 +64,7 @@ Create an `npmextra.json` file in your project root:
### 2. Run Your Tests
```bash
npx tsdocker
tsdocker
```
That's it! tsdocker will:
@@ -144,7 +144,7 @@ If you need to run Docker commands inside your test container (e.g., testing Doc
```json
{
"npmdocker": {
"@git.zone/tsdocker": {
"baseImage": "docker:latest",
"command": "docker run hello-world",
"dockerSock": true
@@ -160,7 +160,7 @@ You can use any Docker image as your base:
```json
{
"npmdocker": {
"@git.zone/tsdocker": {
"baseImage": "node:20-alpine",
"command": "npm test"
}
@@ -171,13 +171,13 @@ Popular choices:
- `node:20` — Official Node.js images
- `node:20-alpine` — Lightweight Alpine-based images
- `hosttoday/ht-docker-node:npmts`Pre-configured with npmts tooling
- `node:lts`Long-term support Node.js version
### CI Integration
tsdocker automatically detects CI environments (via `CI=true` env var) and adjusts behavior:
- Skips mounting project directory in CI (assumes code is already in container)
- Copies project files into container in CI (instead of mounting)
- Optimizes for CI execution patterns
## Why tsdocker?
@@ -207,7 +207,7 @@ tsdocker ensures every test run happens in a **clean, reproducible environment**
tsdocker is built with TypeScript and provides full type definitions:
```typescript
import { IConfig } from '@git.zone/tsdocker/dist/tsdocker.config';
import type { IConfig } from '@git.zone/tsdocker/dist_ts/tsdocker.config.js';
const config: IConfig = {
baseImage: 'node:20',
@@ -222,7 +222,7 @@ const config: IConfig = {
## Requirements
- **Docker**: Docker must be installed and accessible via CLI
- **Node.js**: Version 14 or higher recommended
- **Node.js**: Version 18 or higher (ESM support required)
## How It Works
@@ -271,20 +271,20 @@ sudo usermod -aG docker $USER
```json
{
"npmdocker": {
"@git.zone/tsdocker": {
"baseImage": "node:20",
"command": "npm test"
}
}
```
### Using npmci for multiple Node versions
### Running pnpm tests
```json
{
"npmdocker": {
"baseImage": "hosttoday/ht-docker-node:npmts",
"command": "npmci test stable"
"@git.zone/tsdocker": {
"baseImage": "node:20",
"command": "corepack enable && pnpm install && pnpm test"
}
}
```
@@ -293,7 +293,7 @@ sudo usermod -aG docker $USER
```json
{
"npmdocker": {
"@git.zone/tsdocker": {
"baseImage": "docker:latest",
"command": "sh -c 'docker version && docker ps'",
"dockerSock": true
@@ -307,25 +307,32 @@ sudo usermod -aG docker $USER
🚀 **Layer caching**: Docker caches image layers — your base image only downloads once
🚀 **Prune regularly**: Run `docker system prune` periodically to reclaim disk space
## Migration from legacy npmdocker scope
## Migration from legacy npmdocker
This package was previously published under the `npmdocker` name in the old scope. It is now available as `@git.zone/tsdocker` for better naming consistency. Functionality remains the same.
This package was previously published under the `npmdocker` name. It is now available as `@git.zone/tsdocker` with modernized ESM support and updated dependencies.
Key changes:
- Configuration key changed from `npmdocker` to `@git.zone/tsdocker` in `npmextra.json`
- CLI command is now `tsdocker` instead of `npmdocker`
- Full ESM support with `.js` extensions in imports
## License and Legal Information
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [LICENSE](./LICENSE) file.
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
### Trademarks
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.
Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.
### Company Information
Task Venture Capital GmbH
Registered at District court Bremen HRB 35230 HB, Germany
Registered at District Court Bremen HRB 35230 HB, Germany
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
For any legal inquiries or further information, please contact us via email at hello@task.vc.
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.