Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 31f7cb98ea | |||
| c66af4e66c | |||
| 070bc7891e | |||
| a01b3ee122 |
14
changelog.md
14
changelog.md
@@ -1,5 +1,19 @@
|
||||
# Changelog
|
||||
|
||||
## 2025-12-02 - 2.6.3 - fix(cli)
|
||||
Use basename when collecting HTML files for the website CLI command to ensure correct relative paths
|
||||
|
||||
- ts/tsbundle.cli.ts: use plugins.path.basename(entry.path) when building htmlFiles list instead of full entry.path
|
||||
- Prevents incorrect paths when calling HtmlHandler.processHtml with './html/<file>' and ensures HTML files are processed from the expected relative html directory
|
||||
|
||||
## 2025-11-30 - 2.6.2 - fix(deps)
|
||||
Bump dependencies and migrate test fixtures to ts_web
|
||||
|
||||
- Bumped devDependencies: @git.zone/tsbuild ^3.1.0 -> ^3.1.2, @types/node ^22.12.0 -> ^24.10.1
|
||||
- Bumped runtime dependencies: @push.rocks/smartfs ^1.1.0 -> ^1.1.3, @rspack/core ^1.6.4 -> ^1.6.5, rolldown 1.0.0-beta.51 -> 1.0.0-beta.52
|
||||
- Reworked tests: removed test/test-decorators.ts and test/ts_web/test-lit.ts; added test/ts_web/fixture-decorators.ts and test/ts_web/fixture-lit.ts (moved fixtures into ts_web)
|
||||
- Updated package.json to include the dependency version bumps
|
||||
|
||||
## 2025-11-23 - 2.6.1 - fix(license)
|
||||
Update copyright holder in license to Task Venture Capital GmbH
|
||||
|
||||
|
||||
12
package.json
12
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@git.zone/tsbundle",
|
||||
"version": "2.6.1",
|
||||
"version": "2.6.3",
|
||||
"private": false,
|
||||
"description": "a multi-bundler tool supporting esbuild, rolldown, and rspack for painless bundling of web projects",
|
||||
"main": "dist_ts/index.js",
|
||||
@@ -17,26 +17,26 @@
|
||||
"tsbundle": "cli.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@git.zone/tsbuild": "^3.1.0",
|
||||
"@git.zone/tsbuild": "^3.1.2",
|
||||
"@git.zone/tsrun": "^2.0.0",
|
||||
"@git.zone/tstest": "^3.1.3",
|
||||
"@types/node": "^22.12.0"
|
||||
"@types/node": "^24.10.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@push.rocks/early": "^4.0.4",
|
||||
"@push.rocks/smartcli": "^4.0.19",
|
||||
"@push.rocks/smartdelay": "^3.0.5",
|
||||
"@push.rocks/smartfs": "^1.1.0",
|
||||
"@push.rocks/smartfs": "^1.1.3",
|
||||
"@push.rocks/smartlog": "^3.1.8",
|
||||
"@push.rocks/smartlog-destination-local": "^9.0.2",
|
||||
"@push.rocks/smartpath": "^6.0.0",
|
||||
"@push.rocks/smartpromise": "^4.2.3",
|
||||
"@push.rocks/smartspawn": "^3.0.3",
|
||||
"@rspack/core": "^1.6.4",
|
||||
"@rspack/core": "^1.6.5",
|
||||
"@types/html-minifier": "^4.0.6",
|
||||
"esbuild": "^0.27.0",
|
||||
"html-minifier": "^4.0.0",
|
||||
"rolldown": "1.0.0-beta.51",
|
||||
"rolldown": "1.0.0-beta.52",
|
||||
"typescript": "5.9.3"
|
||||
},
|
||||
"files": [
|
||||
|
||||
767
pnpm-lock.yaml
generated
767
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,44 +0,0 @@
|
||||
// Test file to verify decorator functionality
|
||||
function sealed(constructor: Function) {
|
||||
Object.seal(constructor);
|
||||
Object.seal(constructor.prototype);
|
||||
}
|
||||
|
||||
@sealed
|
||||
class TestClass {
|
||||
name = 'test';
|
||||
|
||||
modify() {
|
||||
this.name = 'modified';
|
||||
}
|
||||
}
|
||||
|
||||
// Test that the class is sealed
|
||||
const instance = new TestClass();
|
||||
console.log('Initial name:', instance.name);
|
||||
|
||||
// This should work (modifying existing property)
|
||||
instance.modify();
|
||||
console.log('Modified name:', instance.name);
|
||||
|
||||
// This should fail silently in non-strict mode or throw in strict mode
|
||||
try {
|
||||
(instance as any).newProperty = 'should not work';
|
||||
console.log('Adding new property:', (instance as any).newProperty);
|
||||
} catch (e) {
|
||||
console.log('Error adding property (expected):', e.message);
|
||||
}
|
||||
|
||||
// Test that we can't add to prototype
|
||||
try {
|
||||
(TestClass.prototype as any).newMethod = function () {};
|
||||
console.log('Prototype is NOT sealed (unexpected)');
|
||||
} catch (e) {
|
||||
console.log('Prototype is sealed (expected)');
|
||||
}
|
||||
|
||||
console.log('Is TestClass sealed?', Object.isSealed(TestClass));
|
||||
console.log(
|
||||
'Is TestClass.prototype sealed?',
|
||||
Object.isSealed(TestClass.prototype),
|
||||
);
|
||||
36
test/ts_web/fixture-decorators.ts
Normal file
36
test/ts_web/fixture-decorators.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
// Test file to verify decorator functionality
|
||||
const decoratedClasses: Function[] = [];
|
||||
|
||||
function trackClass(constructor: Function) {
|
||||
decoratedClasses.push(constructor);
|
||||
return constructor;
|
||||
}
|
||||
|
||||
function logMethod(_target: any, context: ClassMethodDecoratorContext) {
|
||||
const methodName = String(context.name);
|
||||
return function (this: any, ...args: any[]) {
|
||||
console.log(`Calling method: ${methodName}`);
|
||||
return (_target as Function).apply(this, args);
|
||||
};
|
||||
}
|
||||
|
||||
@trackClass
|
||||
class TestClass {
|
||||
name = 'test';
|
||||
|
||||
@logMethod
|
||||
modify() {
|
||||
this.name = 'modified';
|
||||
}
|
||||
}
|
||||
|
||||
// Test that the class decorator worked
|
||||
const instance = new TestClass();
|
||||
console.log('Initial name:', instance.name);
|
||||
console.log('Class was decorated:', decoratedClasses.includes(TestClass));
|
||||
|
||||
// Test that the method decorator worked
|
||||
instance.modify();
|
||||
console.log('Modified name:', instance.name);
|
||||
|
||||
console.log('Decorator test completed successfully!');
|
||||
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@git.zone/tsbundle',
|
||||
version: '2.6.1',
|
||||
version: '2.6.3',
|
||||
description: 'a multi-bundler tool supporting esbuild, rolldown, and rspack for painless bundling of web projects'
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ export const runCli = async () => {
|
||||
.directory(htmlDirPath)
|
||||
.filter(/\.html$/)
|
||||
.list();
|
||||
htmlFiles = entries.map((entry) => entry.path);
|
||||
htmlFiles = entries.map((entry) => plugins.path.basename(entry.path));
|
||||
}
|
||||
for (const htmlFile of htmlFiles) {
|
||||
await htmlHandler.processHtml({
|
||||
|
||||
Reference in New Issue
Block a user