@d1g1tal/tsbuild 1.6.1 → 1.6.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,28 @@
1
+ ## [1.6.3](https://github.com/D1g1talEntr0py/tsbuild/compare/v1.6.2...v1.6.3) (2026-03-18)
2
+
3
+ ### Bug Fixes
4
+
5
+ * updated regex to allow minified output to have the proper extensions in the imports (23ab153ec4e1e07a10a4c21b692491031557f03b)
6
+
7
+ ## [1.6.2](https://github.com/D1g1talEntr0py/tsbuild/compare/v1.6.1...v1.6.2) (2026-03-18)
8
+
9
+ ### Bug Fixes
10
+
11
+ * **compiler:** rewrite relative specifiers to include .js extension (39bc1a19d6d79cebb298e7717435591099f47c11)
12
+ - Add relativeSpecifierPattern to detect bare relative imports
13
+ - Implement rewriteRelativeSpecifiers to append .js for ESM Node resolution
14
+ - Apply rewriteRelativeSpecifiers before writing files in FileManager
15
+ - Update fileMapper in output plugin to rewrite JS contents
16
+
17
+
18
+ ### Miscellaneous Chores
19
+
20
+ * **workspace:** update workspace configurations and metadata (af85d4d72aa726a9f1d2b5ef60dc2e3beae8318c)
21
+ - Remove FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 from github actions CI
22
+ - Add compiler, type-checking, and library keywords to package.json
23
+ - Format babel preset plugins array in vitest.config.ts
24
+ - Disable typecheck in vitest configuration explicitly
25
+
1
26
  ## [1.6.1](https://github.com/D1g1talEntr0py/tsbuild/compare/v1.6.0...v1.6.1) (2026-03-18)
2
27
 
3
28
  ### Bug Fixes
@@ -1391,9 +1391,18 @@ async function bundleDeclarations(options) {
1391
1391
  // src/plugins/output.ts
1392
1392
  import { extname } from "node:path";
1393
1393
  var FileMode = { READ_WRITE: 438, READ_WRITE_EXECUTE: 493 };
1394
+ var relativeSpecifierPattern = /(from\s*['"])(\.\.?\/[^'"]*?)(['"])/g;
1395
+ function rewriteRelativeSpecifiers(code) {
1396
+ return code.replace(relativeSpecifierPattern, (_, before, path, after) => {
1397
+ if (/\.[a-z]+$/i.test(path)) return before + path + after;
1398
+ return `${before}${path}.js${after}`;
1399
+ });
1400
+ }
1394
1401
  async function fileMapper({ path, contents }) {
1395
- const mode = extname(path) === FileExtension.JS && contents[0] === 35 && contents[1] === 33 ? FileMode.READ_WRITE_EXECUTE : FileMode.READ_WRITE;
1396
- return Files.write(path, contents, { mode });
1402
+ const isJs = extname(path) === FileExtension.JS;
1403
+ const mode = isJs && contents[0] === 35 && contents[1] === 33 ? FileMode.READ_WRITE_EXECUTE : FileMode.READ_WRITE;
1404
+ const finalContents = isJs ? new TextEncoder().encode(rewriteRelativeSpecifiers(new TextDecoder().decode(contents))) : contents;
1405
+ return Files.write(path, finalContents, { mode });
1397
1406
  }
1398
1407
  var outputPlugin = () => {
1399
1408
  return {
@@ -1822,8 +1831,9 @@ var FileManager = class {
1822
1831
  * @returns Metadata of the written file
1823
1832
  */
1824
1833
  async writeFile(projectDirectory, filePath, content) {
1825
- await Files.write(filePath, content);
1826
- return { path: Paths.relative(projectDirectory, filePath), size: content.length };
1834
+ const rewritten = rewriteRelativeSpecifiers(content);
1835
+ await Files.write(filePath, rewritten);
1836
+ return { path: Paths.relative(projectDirectory, filePath), size: rewritten.length };
1827
1837
  }
1828
1838
  /**
1829
1839
  * Function that intercepts file writes during TypeScript emit.
@@ -2105,7 +2115,7 @@ var _TypeScriptProject = class _TypeScriptProject {
2105
2115
  }
2106
2116
  async build() {
2107
2117
  const tsLogo = TextFormat.bgBlue(TextFormat.bold(TextFormat.whiteBright(" TS ")));
2108
- Logger.header(`${tsLogo} tsbuild v${"1.6.1"}${this.configuration.compilerOptions.incremental && this.configuration.buildCache?.isValid() ? " [incremental]" : ""}`);
2118
+ Logger.header(`${tsLogo} tsbuild v${"1.6.3"}${this.configuration.compilerOptions.incremental && this.configuration.buildCache?.isValid() ? " [incremental]" : ""}`);
2109
2119
  try {
2110
2120
  const processes = [];
2111
2121
  const filesWereEmitted = await this.typeCheck();
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TypeScriptProject
3
- } from "./W52DJ7GZ.js";
3
+ } from "./XQW6Y6DJ.js";
4
4
  import "./7FPDHUPW.js";
5
5
  export {
6
6
  TypeScriptProject
package/dist/tsbuild.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  BuildError,
4
4
  TypeScriptProject
5
- } from "./W52DJ7GZ.js";
5
+ } from "./XQW6Y6DJ.js";
6
6
  import "./7FPDHUPW.js";
7
7
 
8
8
  // src/tsbuild.ts
@@ -30,7 +30,7 @@ if (help) {
30
30
  process.exit(0);
31
31
  }
32
32
  if (version) {
33
- console.log("1.6.1");
33
+ console.log("1.6.3");
34
34
  process.exit(0);
35
35
  }
36
36
  var typeScriptOptions = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@d1g1tal/tsbuild",
3
3
  "author": "D1g1talEntr0py",
4
- "version": "1.6.1",
4
+ "version": "1.6.3",
5
5
  "license": "MIT",
6
6
  "description": "A fast, ESM-only TypeScript build tool combining the TypeScript API for type checking and declaration generation, esbuild for bundling, and SWC for decorator metadata.",
7
7
  "homepage": "https://github.com/D1g1talEntr0py/tsbuild#readme",
@@ -68,6 +68,9 @@
68
68
  "typescript",
69
69
  "build",
70
70
  "bundler",
71
+ "compiler",
72
+ "type-checking",
73
+ "library",
71
74
  "esbuild",
72
75
  "declarations",
73
76
  "dts",