@git.zone/tsbundle 2.13.0 → 2.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.smartconfig.json +2 -2
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/package.json +7 -7
- package/ts/00_commitinfo_data.ts +1 -1
- package/readme.hints.md +0 -58
- package/readme.plan.md +0 -124
package/.smartconfig.json
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"schemaVersion": 2,
|
|
4
4
|
"projectType": "npm",
|
|
5
5
|
"module": {
|
|
6
|
-
"githost": "
|
|
7
|
-
"gitscope": "
|
|
6
|
+
"githost": "code.foss.global",
|
|
7
|
+
"gitscope": "git.zone",
|
|
8
8
|
"gitrepo": "tsbundle",
|
|
9
9
|
"description": "a multi-bundler tool supporting esbuild, rolldown, and rspack for painless bundling of web projects",
|
|
10
10
|
"npmPackagename": "@git.zone/tsbundle",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@git.zone/tsbundle',
|
|
6
|
-
version: '2.13.
|
|
6
|
+
version: '2.13.1',
|
|
7
7
|
description: 'a multi-bundler tool supporting esbuild, rolldown, and rspack for painless bundling of web projects'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSxvQkFBb0I7SUFDMUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHFHQUFxRztDQUNuSCxDQUFBIn0=
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@git.zone/tsbundle",
|
|
3
|
-
"version": "2.13.
|
|
3
|
+
"version": "2.13.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "a multi-bundler tool supporting esbuild, rolldown, and rspack for painless bundling of web projects",
|
|
6
6
|
"main": "dist_ts/index.js",
|
|
@@ -12,20 +12,20 @@
|
|
|
12
12
|
"tsbundle": "./cli.js"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@git.zone/tsbuild": "^4.
|
|
15
|
+
"@git.zone/tsbuild": "^4.5.0",
|
|
16
16
|
"@git.zone/tsrun": "^2.0.6",
|
|
17
|
-
"@git.zone/tstest": "^
|
|
18
|
-
"@types/node": "^26.
|
|
17
|
+
"@git.zone/tstest": "^6.1.1",
|
|
18
|
+
"@types/node": "^26.5.1",
|
|
19
19
|
"lit": "^3.3.3"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@push.rocks/early": "^4.0.4",
|
|
23
|
-
"@push.rocks/smartcli": "^4.3.
|
|
24
|
-
"@push.rocks/smartconfig": "^6.2.
|
|
23
|
+
"@push.rocks/smartcli": "^4.3.1",
|
|
24
|
+
"@push.rocks/smartconfig": "^6.2.4",
|
|
25
25
|
"@push.rocks/smartdelay": "^3.1.0",
|
|
26
26
|
"@push.rocks/smartfs": "^1.6.0",
|
|
27
27
|
"@push.rocks/smartinteract": "^2.0.17",
|
|
28
|
-
"@push.rocks/smartlog": "^3.2.
|
|
28
|
+
"@push.rocks/smartlog": "^3.2.1 || ^4.0.0",
|
|
29
29
|
"@push.rocks/smartlog-destination-local": "^9.0.2",
|
|
30
30
|
"@push.rocks/smartpath": "^6.0.0",
|
|
31
31
|
"@push.rocks/smartpromise": "^4.2.4",
|
package/ts/00_commitinfo_data.ts
CHANGED
package/readme.hints.md
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# tsbundle Hints and Findings
|
|
2
|
-
|
|
3
|
-
## Recent Updates (2026-08-23)
|
|
4
|
-
|
|
5
|
-
- Esbuild module workers are transformed by the internal MIT-derived plugin in `ts/mod_esbuild/workerplugin.ts`; there is no runtime dependency on the Chialab package.
|
|
6
|
-
- Every direct backend output is generated in a same-filesystem staging directory. Direct and custom outputs acquire both output-directory and destination locks so generated and included files cannot interleave.
|
|
7
|
-
- Worker chunks use a namespace derived from the final logical output name. `chunks/<namespace>/.tsbundle-artifacts.json` tracks ownership so successful rebuilds can remove stale artifacts without touching neighboring bundles.
|
|
8
|
-
- Rejected generation or publication before the main-file commit restores mutable output and preserves the last successful main bundle. `base64ts` embeds generated chunks and source maps but excludes tsbundle ownership metadata.
|
|
9
|
-
- Each custom bundle uses a unique project-local `.nogit/tsbundle-temp-*` workspace. Active concurrent workspaces are retained; abandoned marked workspaces older than 24 hours and legacy marked workspaces are pruned.
|
|
10
|
-
|
|
11
|
-
## Recent Updates (2026-03-24)
|
|
12
|
-
|
|
13
|
-
- Upgraded all dependencies to latest versions
|
|
14
|
-
- Migrated from npmextra.json to `.smartconfig.json` (renamed file, updated all references)
|
|
15
|
-
- Renamed `npmextra` import to `smartconfig` in plugins.ts
|
|
16
|
-
- Fixed rolldown deprecation: `inlineDynamicImports` replaced with `codeSplitting: false`
|
|
17
|
-
- Major version bumps: tsbuild ^3.1.2 -> ^4.3.0, TypeScript 5.9.3 -> 6.0.2
|
|
18
|
-
- Rolldown upgraded from 1.0.0-beta.52 to 1.0.0-rc.11
|
|
19
|
-
- @rspack/core upgraded from ^1.6.5 to ^1.7.10
|
|
20
|
-
- @types/node upgraded from ^24.10.1 to ^25.5.0
|
|
21
|
-
|
|
22
|
-
## Bundler Architecture
|
|
23
|
-
|
|
24
|
-
- tsbundle uses a child process architecture where each bundler runs in a separate process
|
|
25
|
-
- Configuration is passed via environment variables as JSON (IEnvTransportOptions)
|
|
26
|
-
- The main class `TsBundle` spawns child processes using `smartspawn.ThreadSimple`
|
|
27
|
-
|
|
28
|
-
## Bundler Implementations
|
|
29
|
-
|
|
30
|
-
- **esbuild** (default): Fully implemented, production ready
|
|
31
|
-
- **rolldown**: Implemented and working (1.2.1), produces smallest bundles
|
|
32
|
-
- **rspack**: Implemented and working (v2.1.2), webpack-compatible API
|
|
33
|
-
|
|
34
|
-
## Configuration
|
|
35
|
-
|
|
36
|
-
- Config file: `.smartconfig.json` (previously `npmextra.json`)
|
|
37
|
-
- Config key: `@git.zone/tsbundle` with `bundles` array
|
|
38
|
-
- Supports `bundle` and `base64ts` output modes
|
|
39
|
-
- Interactive init wizard via `tsbundle init`
|
|
40
|
-
|
|
41
|
-
## CLI Usage
|
|
42
|
-
|
|
43
|
-
- Default bundler: `tsbundle` (uses esbuild)
|
|
44
|
-
- Specify bundler: `tsbundle --bundler=rolldown` or `tsbundle --bundler=rspack`
|
|
45
|
-
- Production mode: `tsbundle --production`
|
|
46
|
-
- Combined: `tsbundle --bundler=rolldown --production`
|
|
47
|
-
|
|
48
|
-
## Known Issues
|
|
49
|
-
|
|
50
|
-
- Rolldown emits a warning about `preserveValueImports` in tsconfig - this is informational only
|
|
51
|
-
|
|
52
|
-
## Esbuild Worker Artifacts
|
|
53
|
-
|
|
54
|
-
- Standard module workers use `new Worker(new URL('./worker.js', import.meta.url), { type: 'module' })` and are emitted through tsbundle's internal worker plugin.
|
|
55
|
-
- Direct `.ts` references and NodeNext-style `.js` references are supported. Acyclic nested workers are emitted recursively; cycles reject the build, and shared workers are built once with URLs relative to each emitter.
|
|
56
|
-
- Test-mode builds need an explicit collision-safe `chunkNames` pattern because the main entry name is derived from the requested destination filename.
|
|
57
|
-
- Custom bundle handling must publish every generated artifact from its unique `.nogit/tsbundle-temp-*` workspace before cleanup; this includes worker chunks and source maps. `base64ts` must embed the same complete artifact set.
|
|
58
|
-
- TypeScript remains on 6.0.3 because 7.0.2 no longer exports the stable compiler API used by the worker transformer.
|
package/readme.plan.md
DELETED
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
# tsbundle Rolldown Integration Plan
|
|
2
|
-
|
|
3
|
-
## Objective
|
|
4
|
-
|
|
5
|
-
Add Rolldown as an optional bundler to tsbundle while keeping esbuild as the default bundler. This allows users to experiment with Rolldown using `--bundler=rolldown` flag.
|
|
6
|
-
|
|
7
|
-
## Current State
|
|
8
|
-
|
|
9
|
-
- tsbundle currently only uses esbuild despite having interfaces for multiple bundlers
|
|
10
|
-
- The bundler selection logic exists but always returns esbuild
|
|
11
|
-
- mod_rollup and mod_parcel directories exist but are empty
|
|
12
|
-
- Recent commits disabled splitting and tree-shaking in esbuild due to issues
|
|
13
|
-
|
|
14
|
-
## Implementation Tasks
|
|
15
|
-
|
|
16
|
-
### Phase 1: Core Infrastructure
|
|
17
|
-
|
|
18
|
-
- [x] Update `ts/interfaces/index.ts` to include 'rolldown' in bundler union type
|
|
19
|
-
- [x] Fix `getBundlerPath()` in `ts/tsbundle.class.tsbundle.ts` to properly route bundlers
|
|
20
|
-
- [x] Remove hardcoded `bundler: 'esbuild'` from transportOptions (line 26)
|
|
21
|
-
- [x] Add rolldown dependency to package.json: `"rolldown": "^1.0.0-beta.18"`
|
|
22
|
-
|
|
23
|
-
### Phase 2: CLI Support
|
|
24
|
-
|
|
25
|
-
- [x] Check if `ts/tsbundle.cli.ts` already parses --bundler option
|
|
26
|
-
- [x] Ensure default bundler is 'esbuild' when not specified
|
|
27
|
-
- [x] Verify CLI passes bundler option correctly to TsBundle class
|
|
28
|
-
|
|
29
|
-
### Phase 3: Rolldown Module Implementation
|
|
30
|
-
|
|
31
|
-
- [x] Create `ts/mod_rolldown/` directory
|
|
32
|
-
- [x] Create `ts/mod_rolldown/plugins.ts`:
|
|
33
|
-
```typescript
|
|
34
|
-
export * from '../plugins.js';
|
|
35
|
-
import { rolldown } from 'rolldown';
|
|
36
|
-
export { rolldown };
|
|
37
|
-
```
|
|
38
|
-
- [x] Create `ts/mod_rolldown/index.child.ts` with:
|
|
39
|
-
- TsBundleProcess class
|
|
40
|
-
- getAliases() method for tsconfig path resolution
|
|
41
|
-
- buildTest() method (sourcemaps, no minification)
|
|
42
|
-
- buildProduction() method (minified output)
|
|
43
|
-
- run() function to read transportOptions and execute
|
|
44
|
-
|
|
45
|
-
### Phase 4: Feature Parity
|
|
46
|
-
|
|
47
|
-
- [x] Implement TypeScript compilation via rolldown
|
|
48
|
-
- [x] Ensure source map generation works
|
|
49
|
-
- [x] Support tsconfig path aliases
|
|
50
|
-
- [x] Match esbuild's ESM output format
|
|
51
|
-
- [x] Implement minification for production builds
|
|
52
|
-
- [x] Handle bundle: true behavior
|
|
53
|
-
|
|
54
|
-
### Phase 5: Testing
|
|
55
|
-
|
|
56
|
-
- [x] Test default behavior (should use esbuild)
|
|
57
|
-
- [x] Test `--bundler=esbuild` explicit selection
|
|
58
|
-
- [x] Test `--bundler=rolldown` selection
|
|
59
|
-
- [x] Compare output between esbuild and rolldown
|
|
60
|
-
- [ ] Verify all existing tests pass with both bundlers
|
|
61
|
-
|
|
62
|
-
## Technical Specifications
|
|
63
|
-
|
|
64
|
-
### Rolldown Configuration Mapping
|
|
65
|
-
|
|
66
|
-
| esbuild option | rolldown equivalent |
|
|
67
|
-
| ---------------- | ----------------------------------- |
|
|
68
|
-
| bundle: true | bundle: true |
|
|
69
|
-
| sourcemap: true | sourcemap: true |
|
|
70
|
-
| format: 'esm' | format: 'es' |
|
|
71
|
-
| target: 'es2022' | (use default, no direct equivalent) |
|
|
72
|
-
| minify: true | minify: true |
|
|
73
|
-
| entryPoints | input |
|
|
74
|
-
| outfile | output.file |
|
|
75
|
-
| tsconfig | resolve.tsconfigFilename |
|
|
76
|
-
| alias | resolve.alias |
|
|
77
|
-
|
|
78
|
-
### CLI Usage
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
# Default (uses esbuild)
|
|
82
|
-
tsbundle
|
|
83
|
-
|
|
84
|
-
# Use rolldown
|
|
85
|
-
tsbundle --bundler=rolldown
|
|
86
|
-
|
|
87
|
-
# Production build with rolldown
|
|
88
|
-
tsbundle --production --bundler=rolldown
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## Risks and Mitigation
|
|
92
|
-
|
|
93
|
-
1. **Rolldown is beta** - Keep esbuild as default, mark rolldown as experimental
|
|
94
|
-
2. **API differences** - Abstract common interface, handle bundler-specific logic
|
|
95
|
-
3. **Missing features** - Document any limitations in README
|
|
96
|
-
4. **Breaking changes** - None, as esbuild remains default
|
|
97
|
-
|
|
98
|
-
## Success Criteria
|
|
99
|
-
|
|
100
|
-
- [x] Can build with esbuild (default behavior unchanged)
|
|
101
|
-
- [x] Can build with rolldown via --bundler flag
|
|
102
|
-
- [x] Both bundlers produce working ESM output
|
|
103
|
-
- [x] Source maps work with both bundlers
|
|
104
|
-
- [x] TypeScript compilation works with both
|
|
105
|
-
- [ ] All existing tests pass
|
|
106
|
-
|
|
107
|
-
## Implementation Status
|
|
108
|
-
|
|
109
|
-
✅ **COMPLETED** - Rolldown has been successfully integrated as an optional bundler.
|
|
110
|
-
|
|
111
|
-
### Test Results:
|
|
112
|
-
|
|
113
|
-
- esbuild (default): Working correctly, 2.2K minified
|
|
114
|
-
- rolldown: Working correctly, 1.5K minified (better compression!)
|
|
115
|
-
- Both bundlers support all required features
|
|
116
|
-
- CLI properly routes to selected bundler
|
|
117
|
-
- Production and test modes work for both
|
|
118
|
-
|
|
119
|
-
## Future Considerations
|
|
120
|
-
|
|
121
|
-
- Once Rolldown reaches v1.0.0 stable, consider making it default
|
|
122
|
-
- Implement rollup and parcel modules using same pattern
|
|
123
|
-
- Add performance benchmarks comparing bundlers
|
|
124
|
-
- Consider adding --watch mode support
|