Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: privatenumber/tsx
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.10.4
Choose a base ref
...
head repository: privatenumber/tsx
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on May 18, 2024

  1. fix: handle parsing variable of

    closes #556
    privatenumber committed May 18, 2024
    Copy the full SHA
    86cf87c View commit details
  2. Copy the full SHA
    a71c437 View commit details
  3. Copy the full SHA
    9cf2115 View commit details

Commits on May 21, 2024

  1. Copy the full SHA
    eeaefd6 View commit details
  2. Copy the full SHA
    b54131c View commit details
  3. Copy the full SHA
    52d696c View commit details

Commits on May 23, 2024

  1. Copy the full SHA
    3f42ae3 View commit details
  2. Copy the full SHA
    b6bf39b View commit details

Commits on May 24, 2024

  1. chore(deps): update dependency node to v20.13.1 (#547)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored May 24, 2024
    Copy the full SHA
    e7dae3b View commit details

Commits on May 28, 2024

  1. Copy the full SHA
    3d7bce7 View commit details
  2. test: external source maps

    closes #340
    privatenumber committed May 28, 2024
    Copy the full SHA
    f30b296 View commit details

Commits on May 29, 2024

  1. Copy the full SHA
    39507b8 View commit details

Commits on Jun 2, 2024

  1. test: log util

    privatenumber committed Jun 2, 2024
    Copy the full SHA
    59bb4ed View commit details

Commits on Jun 3, 2024

  1. Copy the full SHA
    5e70105 View commit details
  2. Copy the full SHA
    aa2b639 View commit details

Commits on Jun 4, 2024

  1. Copy the full SHA
    42e2745 View commit details
  2. Copy the full SHA
    e8bb062 View commit details
  3. Copy the full SHA
    4ef6632 View commit details
  4. Copy the full SHA
    a33c96a View commit details
  5. Copy the full SHA
    72d0896 View commit details

Commits on Jun 5, 2024

  1. Copy the full SHA
    a150ac1 View commit details
  2. Copy the full SHA
    48dd7ab View commit details
  3. Copy the full SHA
    585f117 View commit details
  4. Copy the full SHA
    e1464cf View commit details

Commits on Jun 6, 2024

  1. Copy the full SHA
    7c85303 View commit details
  2. Copy the full SHA
    9f04dae View commit details
  3. Copy the full SHA
    bd56e84 View commit details

Commits on Jun 7, 2024

  1. Copy the full SHA
    de900a1 View commit details
  2. Copy the full SHA
    4be7c7e View commit details
  3. Copy the full SHA
    c703300 View commit details
  4. Copy the full SHA
    0eb4e91 View commit details
  5. Copy the full SHA
    0a78bfd View commit details
  6. Copy the full SHA
    87a7683 View commit details

Commits on Jun 8, 2024

  1. Copy the full SHA
    89621bf View commit details
  2. Copy the full SHA
    02d3856 View commit details
  3. Copy the full SHA
    807f467 View commit details
  4. Copy the full SHA
    c35dbaa View commit details
  5. Copy the full SHA
    4503421 View commit details
  6. Copy the full SHA
    9e647a5 View commit details

Commits on Jun 9, 2024

  1. Copy the full SHA
    bbbf1a7 View commit details
  2. Copy the full SHA
    6f1d305 View commit details
  3. feat: esbuild 0.21.3

    privatenumber committed Jun 9, 2024
    Copy the full SHA
    edbdfdf View commit details
  4. feat: esbuild 0.21.4

    privatenumber committed Jun 9, 2024
    Copy the full SHA
    c67d746 View commit details
  5. Copy the full SHA
    fb247eb View commit details

Commits on Jun 10, 2024

  1. Copy the full SHA
    7e1fe22 View commit details
  2. Copy the full SHA
    817d6b2 View commit details

Commits on Jun 13, 2024

  1. fix(cjs): load json with namespace

    fixes #587
    privatenumber committed Jun 13, 2024
    Copy the full SHA
    6b03a38 View commit details
  2. Copy the full SHA
    2a7deea View commit details
  3. Copy the full SHA
    531fafa View commit details
  4. Copy the full SHA
    5166122 View commit details
Showing with 6,151 additions and 2,740 deletions.
  1. +5 −5 .github/ISSUE_TEMPLATE/bug-report.yml
  2. +12 −0 .github/logo-dark.svg
  3. +12 −0 .github/logo-light.svg
  4. +11 −0 .github/logo-mini.svg
  5. +1 −1 .github/workflows/test.yml
  6. +1 −1 .nvmrc
  7. +6 −12 README.md
  8. +198 −71 docs/.vitepress/config.ts
  9. +46 −0 docs/.vitepress/theme/components/AsideSponsors.vue
  10. +155 −0 docs/.vitepress/theme/components/ContactForm.vue
  11. +34 −0 docs/.vitepress/theme/components/ImageLink.vue
  12. +122 −0 docs/.vitepress/theme/components/Marquee.vue
  13. +12 −1 docs/.vitepress/theme/index.ts
  14. +22 −0 docs/.vitepress/theme/styles.css
  15. +97 −0 docs/compilation.md
  16. +7 −0 docs/contact.md
  17. +43 −0 docs/dev-api/entry-point.md
  18. +22 −0 docs/dev-api/index.md
  19. +50 −0 docs/dev-api/node-cli.md
  20. +41 −0 docs/dev-api/register-cjs.md
  21. +52 −0 docs/dev-api/register-esm.md
  22. +24 −8 docs/{node → dev-api}/ts-import.md
  23. +7 −4 docs/{node → dev-api}/tsx-require.md
  24. +246 −48 docs/faq.md
  25. +34 −26 docs/getting-started.md
  26. +149 −27 docs/index.md
  27. +18 −0 docs/learn.md
  28. +58 −0 docs/node-enhancement.md
  29. +0 −47 docs/node/cjs.md
  30. +0 −94 docs/node/esm.md
  31. +0 −37 docs/node/index.md
  32. +12 −0 docs/public/logo-dark.svg
  33. +12 −0 docs/public/logo-light.svg
  34. +11 −0 docs/public/logo-mini.svg
  35. +1 −0 docs/public/logos/11ty.svg
  36. +1 −0 docs/public/logos/alibaba.svg
  37. +1 −0 docs/public/logos/arktype.svg
  38. +1 −0 docs/public/logos/astro.svg
  39. +1 −0 docs/public/logos/aws.svg
  40. +1 −0 docs/public/logos/cheerio.svg
  41. +1 −0 docs/public/logos/cloudflare.svg
  42. +1 −0 docs/public/logos/codecov.svg
  43. +1 −0 docs/public/logos/date-fns.svg
  44. +1 −0 docs/public/logos/electron.svg
  45. +1 −0 docs/public/logos/figma.svg
  46. +1 −0 docs/public/logos/github.svg
  47. +1 −0 docs/public/logos/google.svg
  48. +1 −0 docs/public/logos/ibm.svg
  49. +1 −0 docs/public/logos/knip.svg
  50. +1 −0 docs/public/logos/mermaid.svg
  51. +1 −0 docs/public/logos/meta.svg
  52. +1 −0 docs/public/logos/microsoft.svg
  53. +1 −0 docs/public/logos/mozilla.svg
  54. +1 −0 docs/public/logos/nodejs.svg
  55. +1 −0 docs/public/logos/openai.svg
  56. +3 −0 docs/public/logos/prisma.svg
  57. +1 −0 docs/public/logos/salesforce.svg
  58. +1 −0 docs/public/logos/sentry.svg
  59. +17 −0 docs/public/logos/sevalla-full.svg
  60. +1 −0 docs/public/logos/square.svg
  61. +1 −0 docs/public/logos/supabase.svg
  62. +1 −0 docs/public/logos/vercel.svg
  63. +1 −0 docs/public/logos/vite.svg
  64. +1 −0 docs/public/logos/vitest.svg
  65. +1 −0 docs/public/logos/vue.svg
  66. +1 −0 docs/public/logos/webdriverio.svg
  67. +1 −0 docs/public/logos/zod.svg
  68. BIN docs/public/social.png
  69. +0 −43 docs/scripts.md
  70. +52 −0 docs/shell-scripts.md
  71. +6 −2 docs/tailwind.config.js
  72. +147 −0 docs/typescript.md
  73. +0 −61 docs/usage.md
  74. +31 −40 docs/vscode.md
  75. +37 −18 docs/watch-mode.md
  76. +23 −28 package.json
  77. +1,477 −994 pnpm-lock.yaml
  78. +2 −2 release.config.cjs
  79. +15 −3 src/@types/module.d.ts
  80. +0 −25 src/cjs/api/global-require-patch.ts
  81. +1 −1 src/cjs/api/index.ts
  82. +180 −82 src/cjs/api/module-extensions.ts
  83. +0 −113 src/cjs/api/module-resolve-filename.ts
  84. +98 −0 src/cjs/api/module-resolve-filename/index.ts
  85. +34 −0 src/cjs/api/module-resolve-filename/interop-cjs-exports.ts
  86. +11 −0 src/cjs/api/module-resolve-filename/is-from-cjs-lexer.ts
  87. +82 −0 src/cjs/api/module-resolve-filename/preserve-query.ts
  88. +58 −0 src/cjs/api/module-resolve-filename/resolve-implicit-extensions.ts
  89. +98 −0 src/cjs/api/module-resolve-filename/resolve-ts-extensions.ts
  90. +134 −0 src/cjs/api/register.ts
  91. +13 −31 src/cjs/api/require.ts
  92. +9 −0 src/cjs/api/types.ts
  93. +0 −16 src/cjs/api/utils.ts
  94. +1 −1 src/cjs/index.ts
  95. +17 −9 src/cli.ts
  96. +23 −4 src/esm/api/register.ts
  97. +16 −27 src/esm/api/scoped-import.ts
  98. +30 −4 src/esm/api/ts-import.ts
  99. +9 −1 src/esm/hook/initialize.ts
  100. +56 −11 src/esm/hook/load.ts
  101. +232 −150 src/esm/hook/resolve.ts
  102. +5 −31 src/esm/hook/utils.ts
  103. +6 −0 src/esm/types.ts
  104. +1 −3 src/loader.ts
  105. +1 −1 src/preflight.cts
  106. +11 −0 src/run.ts
  107. +4 −0 src/types.ts
  108. +12 −0 src/utils/debug.ts
  109. +36 −0 src/utils/es-module-lexer.ts
  110. +0 −37 src/utils/esm-pattern.ts
  111. +0 −1 src/utils/file-url.ts
  112. +70 −0 src/utils/map-ts-extensions.ts
  113. +6 −0 src/utils/node-features.ts
  114. +18 −2 src/utils/path-utils.ts
  115. +1 −1 src/utils/read-json-file.ts
  116. +0 −26 src/utils/resolve-ts-path.ts
  117. +1 −1 src/utils/transform/apply-transformers.ts
  118. +2 −2 src/utils/transform/cache.ts
  119. +10 −2 src/utils/transform/get-esbuild-options.ts
  120. +8 −3 src/utils/transform/index.ts
  121. +1 −4 src/utils/transform/transform-dynamic-import.ts
  122. +55 −0 src/utils/tsconfig.ts
  123. +7 −0 src/utils/url-search-params-stringify.ts
  124. +19 −3 src/watch/index.ts
  125. +331 −0 tests/fixtures.ts
  126. +2 −1 tests/index.ts
  127. +522 −89 tests/specs/api.ts
  128. +1 −1 tests/specs/cli.ts
  129. +3 −2 tests/specs/loaders.ts
  130. +202 −416 tests/specs/smoke.ts
  131. +180 −0 tests/specs/tsconfig.ts
  132. +85 −29 tests/specs/watch.ts
  133. +0 −4 tests/tsconfig.json
  134. +1 −0 tests/utils/is-windows.ts
  135. +3 −3 tests/utils/node-versions.ts
  136. +4 −0 tests/utils/package-types.ts
  137. +64 −21 tests/utils/process-interact.ts
  138. +1 −1 tests/utils/pty-shell/index.ts
  139. +3 −0 tests/utils/tsx.ts
  140. +12 −8 tsconfig.json
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -14,13 +14,13 @@ body:
- label: I read the documentation and searched existing issues to avoid duplicates
required: true

- label: I am reporting a confirmed bug (not seek debugging help)
- label: I understand this is a **bug tracker** and anything other than a proven bug will be closed
required: true

- label: I understand this is a collaborative project and relies on my contributions
- label: I understand this is a free project and relies on community contributions
required: true

- label: I read and understood the [Contribution guide](https://github.com/privatenumber/tsx/blob/develop/CONTRIBUTING.md)
- label: I read and understood the [Contribution guide](https://github.com/privatenumber/tsx/blob/master/CONTRIBUTING.md)
required: true

- type: markdown
@@ -90,9 +90,9 @@ body:

- type: checkboxes
attributes:
label: Compensating engineering work financially will speed up resolution
label: Compensating engineering work will speed up resolution and support the project
options:
- label: I'm willing to offer financial support
- label: I'm willing to offer $10 for financial support

- type: markdown
attributes:
12 changes: 12 additions & 0 deletions .github/logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions .github/logo-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions .github/logo-mini.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
timeout-minutes: 5
timeout-minutes: 10

steps:
- name: Checkout
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.12.2
20.18.3
18 changes: 6 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<h1 align="center">
tsx
<br>
<picture>
<source media="(prefers-color-scheme: dark)" srcset=".github/logo-dark.svg">
<img width="160" alt="tsx" src=".github/logo-light.svg">
</picture>
<br><br>
<a href="https://npm.im/tsx"><img src="https://badgen.net/npm/v/tsx"></a> <a href="https://npm.im/tsx"><img src="https://badgen.net/npm/dm/tsx"></a>
</h1>

@@ -14,20 +18,10 @@ TypeScript Execute (tsx): The easiest way to run TypeScript in Node.js

<p align="center">
<a href="https://github.com/sponsors/privatenumber/sponsorships?tier_id=398771"><img width="412" src="https://raw.githubusercontent.com/privatenumber/sponsors/master/banners/assets/donate.webp"></a>
<a href="https://github.com/sponsors/privatenumber/sponsorships?tier_id=397608"><img width="412" src="https://raw.githubusercontent.com/privatenumber/sponsors/master/banners/assets/sponsor.webp"></a>
<a href="https://github.com/sponsors/privatenumber/sponsorships?tier_id=416984"><img width="412" src="https://raw.githubusercontent.com/privatenumber/sponsors/master/banners/assets/sponsor.webp"></a>
</p>
<p align="center"><sup><i>Already a sponsor?</i> Join the discussion in the <a href="https://github.com/pvtnbr/tsx">Development repo</a>!</sup></p>

> [!TIP]
> **Build your TypeScript projects?**
>
> Try [<img width="20" valign="middle" src="https://raw.githubusercontent.com/privatenumber/pkgroll/master/.github/logo.webp"> pkgroll](https://github.com/privatenumber/pkgroll)—the zero-config package bundler used by _tsx_!
>
> _pkgroll_ is a thin Rollup wrapper that makes it so simple for your package to support CommonJS, ESM, & TypeScript.
>
> If you love tsx, you'll love pkgroll too!

## Sponsors

<p align="center">
Loading