diff --git a/.gitattributes b/.gitattributes
index d40d981a..c16bc3f0 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,3 +1,4 @@
website/** linguist-documentation
test/docker/** linguist-vendored
+fixtures/** linguist-vendored
src/bin/** linguist-language=TypeScript
diff --git a/.github/workflows/ci_compatibility-deno.yml b/.github/workflows/ci_compatibility-deno.yml
index 4cf447c4..a3df55ae 100644
--- a/.github/workflows/ci_compatibility-deno.yml
+++ b/.github/workflows/ci_compatibility-deno.yml
@@ -32,6 +32,9 @@ jobs:
- name: ๐ฆ Installing Dependencies
run: npm ci
+ - name: ๐คน๐ปโโ๏ธ Building the Project
+ run: npm run build
+
# Testing via Docker Official Images
- name: ๐ฌ Deno ${{ matrix.deno-version }}
run: FILTER=deno-${{ matrix.deno-version }} npm run test:ci
diff --git a/README.md b/README.md
index 7310b96b..5bad144f 100644
--- a/README.md
+++ b/README.md
@@ -3,19 +3,19 @@
[deno-version-url]: https://github.com/denoland/deno
[typescript-url]: https://github.com/microsoft/TypeScript
[ci-linux-url]: https://github.com/wellwelwel/poku/actions/workflows/ci_coverage-linux.yml?query=branch%3Amain
-[ci-linux-image]: https://img.shields.io/github/actions/workflow/status/wellwelwel/poku/ci_coverage-linux.yml?event=push&style=flat&label=&branch=main&logo=ubuntu&logoColor=white
+[ci-linux-image]: https://img.shields.io/github/actions/workflow/status/wellwelwel/poku/ci_coverage-linux.yml?event=push&style=flat-square&label=&branch=main&logo=ubuntu&logoColor=white
[ci-osx-url]: https://github.com/wellwelwel/poku/actions/workflows/ci_coverage-osx.yml?query=branch%3Amain
-[ci-osx-image]: https://img.shields.io/github/actions/workflow/status/wellwelwel/poku/ci_coverage-osx.yml?event=push&style=flat&label=&branch=main&logo=apple&logoColor=white
+[ci-osx-image]: https://img.shields.io/github/actions/workflow/status/wellwelwel/poku/ci_coverage-osx.yml?event=push&style=flat-square&label=&branch=main&logo=apple&logoColor=white
[ci-windows-url]: https://github.com/wellwelwel/poku/actions/workflows/ci_coverage-windows.yml?query=branch%3Amain
-[ci-windows-image]: https://img.shields.io/github/actions/workflow/status/wellwelwel/poku/ci_coverage-windows.yml?event=push&style=flat&label=&branch=main&logo=windows&logoColor=white
+[ci-windows-image]: https://img.shields.io/github/actions/workflow/status/wellwelwel/poku/ci_coverage-windows.yml?event=push&style=flat-square&label=&branch=main&logo=windows&logoColor=white
[ql-url]: https://github.com/wellwelwel/poku/actions/workflows/ci_codeql.yml?query=branch%3Amain
-[ql-image]: https://img.shields.io/github/actions/workflow/status/wellwelwel/poku/ci_codeql.yml?event=push&style=flat&label=&branch=main&logo=github&logoColor=white
-[coverage-image]: https://img.shields.io/codecov/c/github/wellwelwel/poku?label=Coverage
+[ql-image]: https://img.shields.io/github/actions/workflow/status/wellwelwel/poku/ci_codeql.yml?event=push&style=flat-square&label=&branch=main&logo=github&logoColor=white
+[coverage-image]: https://img.shields.io/codecov/c/github/wellwelwel/poku?style=flat-square&label=Coverage
[coverage-url]: https://app.codecov.io/github/wellwelwel/poku
-[downloads-image]: https://img.shields.io/npm/dt/poku.svg?&label=Downloads&logo=npm&logoColor=white&color=1e90ff
+[downloads-image]: https://img.shields.io/npm/dt/poku.svg?style=flat-square&label=Downloads&logo=npm&logoColor=white&color=1e90ff
[downloads-url]: https://www.npmjs.com/package/poku
[license-url]: https://github.com/wellwelwel/poku/blob/main/LICENSE
-[license-image]: https://img.shields.io/npm/l/poku.svg?maxAge=2592000&color=9c88ff&label=License
+[license-image]: https://img.shields.io/npm/l/poku.svg?maxAge=2592000&color=9c88ff&style=flat-square&label=License
@@ -24,67 +24,51 @@
**Poku** can show you _how simple testing can be_ ๐ฑ
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Coverage][coverage-image]][coverage-url]
+[![License][license-image]][license-url]
[![GitHub Workflow Status (with event)][ci-linux-image]][ci-linux-url]
[![GitHub Workflow Status (with event)][ci-osx-image]][ci-osx-url]
[![GitHub Workflow Status (with event)][ci-windows-image]][ci-windows-url]
-[![GitHub Workflow Status (with event)][ql-image]][ql-url]
-[![NPM Downloads][downloads-image]][downloads-url]
-[![Coverage][coverage-image]][coverage-url]
-[![License][license-image]][license-url]
-Enjoying **Poku**? Consider giving him a star โญ๏ธ
+Enjoying **Poku**? Give him a star to show your support โญ๏ธ
---
-
-
-๐ท [**Documentation**](https://poku.io) โข ๐งช [**Examples**](https://poku.io/docs/category/examples) โข ๐ฌ [**Compare the Most Popular Test Runners**](https://poku.io/docs/comparing)
-
-
-
----
+## Why does Poku exist?
-## Reasons to Adopt a Poku โ
+> **Poku** takes on the testers' difficulties by itself and lets you focus on the tests.
No configurations
Auto detect **ESM** and **CJS**
Auto detect **Typescript** files
Don't export your **server** (_just run it_) ๐
+ Run the same test suite for [**Node.js**][node-version-url], [**Bun**][bun-version-url] and [**Deno**][deno-version-url].
- Less verbose
- High **isolation** level per file
- No eval needed ๐
- No global state
- **Parallel** and **Sequential** runs ๐๐ฝ๐๐ป
- Easily handle **Background Services** and **Servers**, **Processes** and **Ports**
-
- **Poku** is [**100%** documented](https://poku.io/docs)
- Designed to be human-friendly
- Compatible with **Coverage** tools
- [**Node.js**][node-version-url], [**Bun**][bun-version-url] and [**Deno**][deno-version-url] compatibility ๐ฉต
-
-โจ You are free to work with the packages you desire
-๐ง๐ปโ๐ You don't need to learn it all at once to get started
-๐ง๐ปโ๐ฌ **Poku** adapts to your test, not the other way around
-โ Zero external dependencies (_that means **lightweight**_)
-๐ด๐ผ **Poku** doesn't restrict you from testing in legacy environments
+ Safety and Reliability
+ High **isolation** level per file
+ Compatible with **Coverage** tools
+ Run **CJS** (**CommonJS**) files directly with [**Deno**][deno-version-url]
+ Easily handle **services**, **servers**, **processes** and **ports**
+ **Poku** doesn't use `eval` nor global state ๐
+ _In other words, you can run your tests directly, without relying on **Poku**_
---
## Quickstart
-### Install ๐ฆ
+### Install
[![Install Size](https://packagephobia.com/badge?p=poku)](https://packagephobia.com/result?p=poku)
- |
- |
- |
- |
+Node.js |
+TypeScript + Node.js |
+Bun |
+Deno |
@@ -118,12 +102,12 @@ deno add npm:poku
|
-### Test it ๐ฌ
+### Test
-test/file.test.mjs
+test/file.test.mjs
|
@@ -139,16 +123,13 @@ assert(true, 'Poku will describe it ๐ท');
-- Change from `.mjs` to `.js` by defining `"type": "module"` in your _package.json_.
-- Note that these examples use [**ESM**](https://poku.io/docs/examples/cjs-esm), but you can use [**CJS**](https://poku.io/docs/examples/cjs-esm) as well.
-
-### Run it ๐
+### Run
- |
- |
- |
+Node.js (and TypeScript) |
+Bun |
+Deno |
@@ -161,7 +142,7 @@ npx poku
|
```bash
-bun poku
+bunx poku
```
|
@@ -175,10 +156,11 @@ deno run npm:poku
-### That's it ๐
+That's it ๐
-- [**See the complete `assert`'s documentation**](https://poku.io/docs/documentation/assert).
-- [**See the complete `poku`'s documentation**](https://poku.io/docs/category/poku).
+---
+
+๐ท [**Documentation**](https://poku.io) โข ๐งช [**Examples**](https://poku.io/docs/category/examples) โข ๐ฌ [**Compare the Most Popular Test Runners**](https://poku.io/docs/comparing)
---
@@ -203,33 +185,6 @@ deno run npm:poku
- [**describe**](https://poku.io/docs/documentation/helpers/describe)
- _and much more_ โจ
-[**See the complete documentation**](https://poku.io/docs).
-
----
-
-## Overview
-
-### `poku`
-
-| Sequential | Concurrent |
-| --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
-| | |
-
-> [**See the complete `poku`'s documentation**](https://poku.io/docs/category/poku).
-
----
-
-### `assert`
-
-- ๐ Use it exactly as it's for **Node.js**
-- ๐ท **Node.js**, **Bun** and **Deno** compatibility
-
-| Using `poku` | Using `node` |
-| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
-| | |
-
-> [**See the complete `assert`'s documentation**](https://poku.io/docs/documentation/assert).
-
---
## Documentation and Examples
@@ -264,6 +219,8 @@ Poku is under the [**MIT License**](./LICENSE).
## Security Policy
+[![GitHub Workflow Status (with event)][ql-image]][ql-url]
+
Please check the [**SECURITY.md**](./SECURITY.md) and the section [**Is Poku Safe?**](https://poku.io/docs/security) from Documentation.
---
@@ -275,9 +232,17 @@ Please check the [**SECURITY.md**](./SECURITY.md) and the section [**Is Poku Saf
---
+## Overview
+
+| Sequential | Concurrent |
+| --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
+| | |
+
+---
+
## Acknowledgements
-[![Contributors](https://img.shields.io/github/contributors/wellwelwel/poku)](https://github.com/wellwelwel/poku/graphs/contributors)
+[![Contributors](https://img.shields.io/github/contributors/wellwelwel/poku?style=flat-square)](https://github.com/wellwelwel/poku/graphs/contributors)
[![Contributors](https://opencollective.com/poku/contributors.svg?width=890&button=false)](https://github.com/wellwelwel/poku/graphs/contributors)
diff --git a/fixtures/deno/exports.cjs b/fixtures/deno/exports.cjs
new file mode 100644
index 00000000..ac4bff24
--- /dev/null
+++ b/fixtures/deno/exports.cjs
@@ -0,0 +1,2 @@
+const message = 'Hello from exports';
+exports.message = message;
diff --git a/fixtures/deno/module.cjs b/fixtures/deno/module.cjs
new file mode 100644
index 00000000..1d74f3d2
--- /dev/null
+++ b/fixtures/deno/module.cjs
@@ -0,0 +1,2 @@
+const message = 'Hello from module.exports';
+module.exports = message;
diff --git a/fixtures/deno/require.cjs b/fixtures/deno/require.cjs
new file mode 100644
index 00000000..827720a0
--- /dev/null
+++ b/fixtures/deno/require.cjs
@@ -0,0 +1,7 @@
+// eslint-disable-next-line @typescript-eslint/no-var-requires
+const asModule = require('./module.cjs');
+// eslint-disable-next-line @typescript-eslint/no-var-requires
+const { message: asExports } = require('./exports.cjs');
+
+console.log(asModule);
+console.log(asExports);
diff --git a/package-lock.json b/package-lock.json
index e1948768..f3b8008b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -16,6 +16,7 @@
"@typescript-eslint/eslint-plugin": "^7.11.0",
"@typescript-eslint/parser": "^7.11.0",
"c8": "^9.1.0",
+ "esbuild": "^0.21.4",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
@@ -41,13 +42,14 @@
"dev": true
},
"node_modules/@esbuild/aix-ppc64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz",
- "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.4.tgz",
+ "integrity": "sha512-Zrm+B33R4LWPLjDEVnEqt2+SLTATlru1q/xYKVn8oVTbiRBGmK2VIMoIYGJDGyftnGaC788IuzGFAlb7IQ0Y8A==",
"cpu": [
"ppc64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"aix"
@@ -57,13 +59,14 @@
}
},
"node_modules/@esbuild/android-arm": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz",
- "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.4.tgz",
+ "integrity": "sha512-E7H/yTd8kGQfY4z9t3nRPk/hrhaCajfA3YSQSBrst8B+3uTcgsi8N+ZWYCaeIDsiVs6m65JPCaQN/DxBRclF3A==",
"cpu": [
"arm"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"android"
@@ -73,13 +76,14 @@
}
},
"node_modules/@esbuild/android-arm64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz",
- "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.4.tgz",
+ "integrity": "sha512-fYFnz+ObClJ3dNiITySBUx+oNalYUT18/AryMxfovLkYWbutXsct3Wz2ZWAcGGppp+RVVX5FiXeLYGi97umisA==",
"cpu": [
"arm64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"android"
@@ -89,13 +93,14 @@
}
},
"node_modules/@esbuild/android-x64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz",
- "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.4.tgz",
+ "integrity": "sha512-mDqmlge3hFbEPbCWxp4fM6hqq7aZfLEHZAKGP9viq9wMUBVQx202aDIfc3l+d2cKhUJM741VrCXEzRFhPDKH3Q==",
"cpu": [
"x64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"android"
@@ -105,13 +110,14 @@
}
},
"node_modules/@esbuild/darwin-arm64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz",
- "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.4.tgz",
+ "integrity": "sha512-72eaIrDZDSiWqpmCzVaBD58c8ea8cw/U0fq/PPOTqE3c53D0xVMRt2ooIABZ6/wj99Y+h4ksT/+I+srCDLU9TA==",
"cpu": [
"arm64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"darwin"
@@ -121,13 +127,14 @@
}
},
"node_modules/@esbuild/darwin-x64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz",
- "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.4.tgz",
+ "integrity": "sha512-uBsuwRMehGmw1JC7Vecu/upOjTsMhgahmDkWhGLWxIgUn2x/Y4tIwUZngsmVb6XyPSTXJYS4YiASKPcm9Zitag==",
"cpu": [
"x64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"darwin"
@@ -137,13 +144,14 @@
}
},
"node_modules/@esbuild/freebsd-arm64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz",
- "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.4.tgz",
+ "integrity": "sha512-8JfuSC6YMSAEIZIWNL3GtdUT5NhUA/CMUCpZdDRolUXNAXEE/Vbpe6qlGLpfThtY5NwXq8Hi4nJy4YfPh+TwAg==",
"cpu": [
"arm64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"freebsd"
@@ -153,13 +161,14 @@
}
},
"node_modules/@esbuild/freebsd-x64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz",
- "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.4.tgz",
+ "integrity": "sha512-8d9y9eQhxv4ef7JmXny7591P/PYsDFc4+STaxC1GBv0tMyCdyWfXu2jBuqRsyhY8uL2HU8uPyscgE2KxCY9imQ==",
"cpu": [
"x64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"freebsd"
@@ -169,13 +178,14 @@
}
},
"node_modules/@esbuild/linux-arm": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz",
- "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.4.tgz",
+ "integrity": "sha512-2rqFFefpYmpMs+FWjkzSgXg5vViocqpq5a1PSRgT0AvSgxoXmGF17qfGAzKedg6wAwyM7UltrKVo9kxaJLMF/g==",
"cpu": [
"arm"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"linux"
@@ -185,13 +195,14 @@
}
},
"node_modules/@esbuild/linux-arm64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz",
- "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.4.tgz",
+ "integrity": "sha512-/GLD2orjNU50v9PcxNpYZi+y8dJ7e7/LhQukN3S4jNDXCKkyyiyAz9zDw3siZ7Eh1tRcnCHAo/WcqKMzmi4eMQ==",
"cpu": [
"arm64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"linux"
@@ -201,13 +212,14 @@
}
},
"node_modules/@esbuild/linux-ia32": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz",
- "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.4.tgz",
+ "integrity": "sha512-pNftBl7m/tFG3t2m/tSjuYeWIffzwAZT9m08+9DPLizxVOsUl8DdFzn9HvJrTQwe3wvJnwTdl92AonY36w/25g==",
"cpu": [
"ia32"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"linux"
@@ -217,13 +229,14 @@
}
},
"node_modules/@esbuild/linux-loong64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz",
- "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.4.tgz",
+ "integrity": "sha512-cSD2gzCK5LuVX+hszzXQzlWya6c7hilO71L9h4KHwqI4qeqZ57bAtkgcC2YioXjsbfAv4lPn3qe3b00Zt+jIfQ==",
"cpu": [
"loong64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"linux"
@@ -233,13 +246,14 @@
}
},
"node_modules/@esbuild/linux-mips64el": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz",
- "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.4.tgz",
+ "integrity": "sha512-qtzAd3BJh7UdbiXCrg6npWLYU0YpufsV9XlufKhMhYMJGJCdfX/G6+PNd0+v877X1JG5VmjBLUiFB0o8EUSicA==",
"cpu": [
"mips64el"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"linux"
@@ -249,13 +263,14 @@
}
},
"node_modules/@esbuild/linux-ppc64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz",
- "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.4.tgz",
+ "integrity": "sha512-yB8AYzOTaL0D5+2a4xEy7OVvbcypvDR05MsB/VVPVA7nL4hc5w5Dyd/ddnayStDgJE59fAgNEOdLhBxjfx5+dg==",
"cpu": [
"ppc64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"linux"
@@ -265,13 +280,14 @@
}
},
"node_modules/@esbuild/linux-riscv64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz",
- "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.4.tgz",
+ "integrity": "sha512-Y5AgOuVzPjQdgU59ramLoqSSiXddu7F3F+LI5hYy/d1UHN7K5oLzYBDZe23QmQJ9PIVUXwOdKJ/jZahPdxzm9w==",
"cpu": [
"riscv64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"linux"
@@ -281,13 +297,14 @@
}
},
"node_modules/@esbuild/linux-s390x": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz",
- "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.4.tgz",
+ "integrity": "sha512-Iqc/l/FFwtt8FoTK9riYv9zQNms7B8u+vAI/rxKuN10HgQIXaPzKZc479lZ0x6+vKVQbu55GdpYpeNWzjOhgbA==",
"cpu": [
"s390x"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"linux"
@@ -297,13 +314,14 @@
}
},
"node_modules/@esbuild/linux-x64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz",
- "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.4.tgz",
+ "integrity": "sha512-Td9jv782UMAFsuLZINfUpoF5mZIbAj+jv1YVtE58rFtfvoKRiKSkRGQfHTgKamLVT/fO7203bHa3wU122V/Bdg==",
"cpu": [
"x64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"linux"
@@ -313,13 +331,14 @@
}
},
"node_modules/@esbuild/netbsd-x64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz",
- "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.4.tgz",
+ "integrity": "sha512-Awn38oSXxsPMQxaV0Ipb7W/gxZtk5Tx3+W+rAPdZkyEhQ6968r9NvtkjhnhbEgWXYbgV+JEONJ6PcdBS+nlcpA==",
"cpu": [
"x64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"netbsd"
@@ -329,13 +348,14 @@
}
},
"node_modules/@esbuild/openbsd-x64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz",
- "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.4.tgz",
+ "integrity": "sha512-IsUmQeCY0aU374R82fxIPu6vkOybWIMc3hVGZ3ChRwL9hA1TwY+tS0lgFWV5+F1+1ssuvvXt3HFqe8roCip8Hg==",
"cpu": [
"x64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"openbsd"
@@ -345,13 +365,14 @@
}
},
"node_modules/@esbuild/sunos-x64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz",
- "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.4.tgz",
+ "integrity": "sha512-hsKhgZ4teLUaDA6FG/QIu2q0rI6I36tZVfM4DBZv3BG0mkMIdEnMbhc4xwLvLJSS22uWmaVkFkqWgIS0gPIm+A==",
"cpu": [
"x64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"sunos"
@@ -361,13 +382,14 @@
}
},
"node_modules/@esbuild/win32-arm64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz",
- "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.4.tgz",
+ "integrity": "sha512-UUfMgMoXPoA/bvGUNfUBFLCh0gt9dxZYIx9W4rfJr7+hKe5jxxHmfOK8YSH4qsHLLN4Ck8JZ+v7Q5fIm1huErg==",
"cpu": [
"arm64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"win32"
@@ -377,13 +399,14 @@
}
},
"node_modules/@esbuild/win32-ia32": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz",
- "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.4.tgz",
+ "integrity": "sha512-yIxbspZb5kGCAHWm8dexALQ9en1IYDfErzjSEq1KzXFniHv019VT3mNtTK7t8qdy4TwT6QYHI9sEZabONHg+aw==",
"cpu": [
"ia32"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"win32"
@@ -393,13 +416,14 @@
}
},
"node_modules/@esbuild/win32-x64": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz",
- "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.4.tgz",
+ "integrity": "sha512-sywLRD3UK/qRJt0oBwdpYLBibk7KiRfbswmWRDabuncQYSlf8aLEEUor/oP6KRz8KEG+HoiVLBhPRD5JWjS8Sg==",
"cpu": [
"x64"
],
"dev": true,
+ "license": "MIT",
"optional": true,
"os": [
"win32"
@@ -1478,11 +1502,12 @@
}
},
"node_modules/esbuild": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz",
- "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==",
+ "version": "0.21.4",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.4.tgz",
+ "integrity": "sha512-sFMcNNrj+Q0ZDolrp5pDhH0nRPN9hLIM3fRPwgbLYJeSHHgnXSnbV3xYgSVuOeLWH9c73VwmEverVzupIv5xuA==",
"dev": true,
"hasInstallScript": true,
+ "license": "MIT",
"bin": {
"esbuild": "bin/esbuild"
},
@@ -1490,29 +1515,29 @@
"node": ">=12"
},
"optionalDependencies": {
- "@esbuild/aix-ppc64": "0.20.2",
- "@esbuild/android-arm": "0.20.2",
- "@esbuild/android-arm64": "0.20.2",
- "@esbuild/android-x64": "0.20.2",
- "@esbuild/darwin-arm64": "0.20.2",
- "@esbuild/darwin-x64": "0.20.2",
- "@esbuild/freebsd-arm64": "0.20.2",
- "@esbuild/freebsd-x64": "0.20.2",
- "@esbuild/linux-arm": "0.20.2",
- "@esbuild/linux-arm64": "0.20.2",
- "@esbuild/linux-ia32": "0.20.2",
- "@esbuild/linux-loong64": "0.20.2",
- "@esbuild/linux-mips64el": "0.20.2",
- "@esbuild/linux-ppc64": "0.20.2",
- "@esbuild/linux-riscv64": "0.20.2",
- "@esbuild/linux-s390x": "0.20.2",
- "@esbuild/linux-x64": "0.20.2",
- "@esbuild/netbsd-x64": "0.20.2",
- "@esbuild/openbsd-x64": "0.20.2",
- "@esbuild/sunos-x64": "0.20.2",
- "@esbuild/win32-arm64": "0.20.2",
- "@esbuild/win32-ia32": "0.20.2",
- "@esbuild/win32-x64": "0.20.2"
+ "@esbuild/aix-ppc64": "0.21.4",
+ "@esbuild/android-arm": "0.21.4",
+ "@esbuild/android-arm64": "0.21.4",
+ "@esbuild/android-x64": "0.21.4",
+ "@esbuild/darwin-arm64": "0.21.4",
+ "@esbuild/darwin-x64": "0.21.4",
+ "@esbuild/freebsd-arm64": "0.21.4",
+ "@esbuild/freebsd-x64": "0.21.4",
+ "@esbuild/linux-arm": "0.21.4",
+ "@esbuild/linux-arm64": "0.21.4",
+ "@esbuild/linux-ia32": "0.21.4",
+ "@esbuild/linux-loong64": "0.21.4",
+ "@esbuild/linux-mips64el": "0.21.4",
+ "@esbuild/linux-ppc64": "0.21.4",
+ "@esbuild/linux-riscv64": "0.21.4",
+ "@esbuild/linux-s390x": "0.21.4",
+ "@esbuild/linux-x64": "0.21.4",
+ "@esbuild/netbsd-x64": "0.21.4",
+ "@esbuild/openbsd-x64": "0.21.4",
+ "@esbuild/sunos-x64": "0.21.4",
+ "@esbuild/win32-arm64": "0.21.4",
+ "@esbuild/win32-ia32": "0.21.4",
+ "@esbuild/win32-x64": "0.21.4"
}
},
"node_modules/escalade": {
@@ -3727,7 +3752,8 @@
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
- "dev": true
+ "dev": true,
+ "license": "0BSD"
},
"node_modules/tsx": {
"version": "4.11.0",
@@ -3748,6 +3774,436 @@
"fsevents": "~2.3.3"
}
},
+ "node_modules/tsx/node_modules/@esbuild/aix-ppc64": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz",
+ "integrity": "sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "aix"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/android-arm": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.2.tgz",
+ "integrity": "sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/android-arm64": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz",
+ "integrity": "sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/android-x64": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.2.tgz",
+ "integrity": "sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/darwin-arm64": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz",
+ "integrity": "sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/darwin-x64": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz",
+ "integrity": "sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz",
+ "integrity": "sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/freebsd-x64": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz",
+ "integrity": "sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-arm": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz",
+ "integrity": "sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-arm64": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz",
+ "integrity": "sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-ia32": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz",
+ "integrity": "sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-loong64": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz",
+ "integrity": "sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-mips64el": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz",
+ "integrity": "sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-ppc64": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz",
+ "integrity": "sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-riscv64": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz",
+ "integrity": "sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-s390x": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz",
+ "integrity": "sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/linux-x64": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz",
+ "integrity": "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/netbsd-x64": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz",
+ "integrity": "sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/openbsd-x64": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz",
+ "integrity": "sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/sunos-x64": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz",
+ "integrity": "sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/win32-arm64": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz",
+ "integrity": "sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/win32-ia32": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz",
+ "integrity": "sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/@esbuild/win32-x64": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz",
+ "integrity": "sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/tsx/node_modules/esbuild": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.2.tgz",
+ "integrity": "sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.20.2",
+ "@esbuild/android-arm": "0.20.2",
+ "@esbuild/android-arm64": "0.20.2",
+ "@esbuild/android-x64": "0.20.2",
+ "@esbuild/darwin-arm64": "0.20.2",
+ "@esbuild/darwin-x64": "0.20.2",
+ "@esbuild/freebsd-arm64": "0.20.2",
+ "@esbuild/freebsd-x64": "0.20.2",
+ "@esbuild/linux-arm": "0.20.2",
+ "@esbuild/linux-arm64": "0.20.2",
+ "@esbuild/linux-ia32": "0.20.2",
+ "@esbuild/linux-loong64": "0.20.2",
+ "@esbuild/linux-mips64el": "0.20.2",
+ "@esbuild/linux-ppc64": "0.20.2",
+ "@esbuild/linux-riscv64": "0.20.2",
+ "@esbuild/linux-s390x": "0.20.2",
+ "@esbuild/linux-x64": "0.20.2",
+ "@esbuild/netbsd-x64": "0.20.2",
+ "@esbuild/openbsd-x64": "0.20.2",
+ "@esbuild/sunos-x64": "0.20.2",
+ "@esbuild/win32-arm64": "0.20.2",
+ "@esbuild/win32-ia32": "0.20.2",
+ "@esbuild/win32-x64": "0.20.2"
+ }
+ },
"node_modules/type-check": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
diff --git a/package.json b/package.json
index 37899965..5db23619 100644
--- a/package.json
+++ b/package.json
@@ -10,6 +10,8 @@
"test:parallel": "npm run test:sequential -- --parallel",
"test:bun:sequential": "bun src/bin/index.ts --platform=\"bun\" --include=\"test/unit,test/integration,test/e2e\"",
"test:bun:parallel": "npm run test:bun:sequential -- --parallel",
+ "test:deno:sequential": "tsx src/bin/index.ts --platform=\"deno\" --deno-allow=\"all\" --deno-cjs --include=\"ci/test/unit,ci/test/integration,ci/test/e2e\"",
+ "test:deno:parallel": "npm run test:deno:sequential -- --parallel",
"test:c8:sequential": "c8 tsx src/bin/index.ts --include=\"test/unit,test/integration,test/e2e\"",
"test:c8:parallel": "c8 tsx src/bin/index.ts --parallel --include=\"test/unit,test/integration,test/e2e\"",
"test:c8:sequential:options": "c8 tsx src/bin/index.ts --fast-fail --debug --exclude=\".bak\" --kill-port=\"4000\" --kill-range=\"4000-4001\" --include=\"test/unit,test/integration,test/e2e\"",
@@ -23,7 +25,8 @@
"clear": "shx rm -rf ./lib ./ci ./coverage",
"prebuild": "npm run clear",
"build": "tsc && tsc -p tsconfig.test.json",
- "postbuild": "tsx ./tools/compatibility/node.ts && shx cp fixtures/server/package.json ci/fixtures/server/package.json && shx chmod +x lib/bin/index.js",
+ "postbuild": "tsx ./tools/compatibility/node.ts && shx cp fixtures/server/package.json ci/fixtures/server/package.json && npm run build:deno && shx chmod +x lib/bin/index.js",
+ "build:deno": "esbuild src/polyfills/deno.mts --outfile=lib/polyfills/deno.mjs --format=esm && esbuild src/polyfills/deno.mts --outfile=node_modules/poku/lib/polyfills/deno.mjs --format=esm",
"eslint:checker": "eslint . --ext .js,.ts",
"eslint:fix": "eslint . --fix --config ./.eslintrc.json",
"lint:checker": "npm run eslint:checker && npm run prettier:checker",
@@ -94,6 +97,10 @@
"process",
"port",
"cross-platform",
+ "commonjs",
+ "cjs",
+ "esm",
+ "runtime",
"poku",
"pokujs"
],
@@ -116,6 +123,7 @@
"@typescript-eslint/eslint-plugin": "^7.11.0",
"@typescript-eslint/parser": "^7.11.0",
"c8": "^9.1.0",
+ "esbuild": "^0.21.4",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
diff --git a/src/@types/poku.ts b/src/@types/poku.ts
index 3bc16021..2d2b6d6d 100644
--- a/src/@types/poku.ts
+++ b/src/@types/poku.ts
@@ -5,6 +5,7 @@ import type { Configs as ListFilesConfigs } from './list-files.js';
export type DenoOptions = {
allow?: string[];
deny?: string[];
+ cjs?: boolean | string[];
};
export type Configs = {
diff --git a/src/bin/index.ts b/src/bin/index.ts
index fba6abb2..8a4cdca0 100644
--- a/src/bin/index.ts
+++ b/src/bin/index.ts
@@ -28,6 +28,7 @@ const killPID = getArg('kill-pid');
const concurrency = Number(getArg('concurrency')) || undefined;
const denoAllow = getSubArg('deno-allow');
const denoDeny = getSubArg('deno-deny');
+const denoCJS = getArg('deno-cjs')?.split(',') || hasArg('deno-cjs');
// Multiple arguments with values or not
// TODO (Custom Args)
@@ -84,6 +85,7 @@ if (hasArg('log-success'))
deno: {
allow: denoAllow,
deny: denoDeny,
+ cjs: denoCJS,
},
});
})();
diff --git a/src/configs/files.ts b/src/configs/files.ts
index 5c9fd0ce..0ecc3474 100644
--- a/src/configs/files.ts
+++ b/src/configs/files.ts
@@ -1,6 +1,6 @@
/* c8 ignore start */
-import { FileResults } from '../@types/list-files.js';
+import type { FileResults } from '../@types/list-files.js';
export const fileResults: FileResults = {
success: [],
diff --git a/src/helpers/logs.ts b/src/helpers/logs.ts
index 2154b5d7..3ddbf45f 100644
--- a/src/helpers/logs.ts
+++ b/src/helpers/logs.ts
@@ -1,5 +1,5 @@
/* c8 ignore start */
-import { Configs } from '../@types/poku.js';
+import type { Configs } from '../@types/poku.js';
export const isQuiet = (configs?: Configs): boolean =>
typeof configs?.quiet === 'boolean' && Boolean(configs?.quiet);
diff --git a/src/helpers/parse-assertion.ts b/src/helpers/parse-assertion.ts
index fc1a34dd..9629f5cd 100644
--- a/src/helpers/parse-assertion.ts
+++ b/src/helpers/parse-assertion.ts
@@ -7,9 +7,9 @@ import { hr } from './hr.js';
import { findFile } from './find-file.js';
import { each } from '../configs/each.js';
import { fromEntries, entries } from '../polyfills/object.js';
-/* c8 ignore next */
-import { ParseAssertionOptions } from '../@types/assert.js';
import { nodeVersion } from './get-runtime.js';
+/* c8 ignore next */
+import type { ParseAssertionOptions } from '../@types/assert.js';
export const parseResultType = (type?: unknown): string => {
const recurse = (value: unknown): unknown => {
diff --git a/src/helpers/runner.ts b/src/helpers/runner.ts
index 2d52a2c8..f96446c5 100644
--- a/src/helpers/runner.ts
+++ b/src/helpers/runner.ts
@@ -3,8 +3,8 @@
import process from 'node:process';
import path from 'node:path';
import { getRuntime } from './get-runtime.js';
-import { Configs } from '../@types/poku.js';
-import { Runner } from '../@types/runner.js';
+import type { Configs } from '../@types/poku.js';
+import type { Runner } from '../@types/runner.js';
export const isWindows = process.platform === 'win32';
diff --git a/src/modules/assert-promise.ts b/src/modules/assert-promise.ts
index 21b95fdd..3566447c 100644
--- a/src/modules/assert-promise.ts
+++ b/src/modules/assert-promise.ts
@@ -2,7 +2,7 @@ import * as nodeAssert from 'node:assert';
import { parseAssertion } from '../helpers/parse-assertion.js';
import { nodeVersion } from '../helpers/get-runtime.js';
/* c8 ignore next */
-import { ParseAssertionOptions } from '../@types/assert.js';
+import type { ParseAssertionOptions } from '../@types/assert.js';
const ok = async (
value: unknown,
diff --git a/src/modules/assert.ts b/src/modules/assert.ts
index a356cfc9..8d9f4674 100644
--- a/src/modules/assert.ts
+++ b/src/modules/assert.ts
@@ -2,7 +2,7 @@ import * as nodeAssert from 'node:assert';
import { parseAssertion } from '../helpers/parse-assertion.js';
import { nodeVersion } from '../helpers/get-runtime.js';
/* c8 ignore next */
-import { ParseAssertionOptions } from '../@types/assert.js';
+import type { ParseAssertionOptions } from '../@types/assert.js';
const ok = (
value: unknown,
diff --git a/src/modules/create-service.ts b/src/modules/create-service.ts
index 847dddb7..89b6e529 100644
--- a/src/modules/create-service.ts
+++ b/src/modules/create-service.ts
@@ -2,13 +2,14 @@ import process from 'node:process';
import { spawn } from 'node:child_process';
import { isWindows, runner, scriptRunner } from '../helpers/runner.js';
import path from 'node:path';
-import {
+import { sanitizePath } from './list-files.js';
+import { kill } from './processes.js';
+/* c8 ignore next */
+import type {
End,
StartScriptOptions,
StartServiceOptions,
} from '../@types/background-process.js';
-import { sanitizePath } from './list-files.js';
-import { kill } from './processes.js';
const runningProcesses: Map =
new Map();
diff --git a/src/modules/exit.ts b/src/modules/exit.ts
index fb7caa22..9b9c8e9f 100644
--- a/src/modules/exit.ts
+++ b/src/modules/exit.ts
@@ -2,9 +2,9 @@
import process from 'node:process';
import { hr } from '../helpers/hr.js';
-import { Code } from '../@types/code.js';
import { results } from '../services/run-tests.js';
import { format } from '../helpers/format.js';
+import type { Code } from '../@types/code.js';
export const exit = (code: Code, quiet?: boolean) => {
const isPoku = results.success > 0 || results.fail > 0;
diff --git a/src/modules/list-files.ts b/src/modules/list-files.ts
index 6b8864fc..958f2353 100644
--- a/src/modules/list-files.ts
+++ b/src/modules/list-files.ts
@@ -1,6 +1,7 @@
import process from 'node:process';
import fs from 'node:fs';
import path from 'node:path';
+/* c8 ignore next */
import type { Configs } from '../@types/list-files.js';
export const sanitizePath = (input: string, ensureTarget?: boolean): string => {
diff --git a/src/modules/poku.ts b/src/modules/poku.ts
index 13eca18b..58a4779d 100644
--- a/src/modules/poku.ts
+++ b/src/modules/poku.ts
@@ -4,9 +4,8 @@
* Both CLI, API, noExit, sequential and parallel runs are strictly tested, but these tests use deep child process for it
*/
+import process, { stdout } from 'node:process';
import { EOL } from 'node:os';
-import { Code } from '../@types/code.js';
-import { Configs } from '../@types/poku.js';
import { forceArray } from '../helpers/force-array.js';
import { runTests, runTestsParallel } from '../services/run-tests.js';
import { exit } from './exit.js';
@@ -15,6 +14,12 @@ import { isQuiet } from '../helpers/logs.js';
import { hr } from '../helpers/hr.js';
import { fileResults } from '../configs/files.js';
import { indentation } from '../configs/indentation.js';
+import type { Code } from '../@types/code.js';
+import type { Configs } from '../@types/poku.js';
+
+process.once('SIGINT', () => {
+ stdout.write('\u001B[?25h');
+});
export async function poku(
targetPaths: string | string[],
@@ -94,4 +99,5 @@ export async function poku(
exit(code, configs?.quiet);
}
+
/* c8 ignore stop */
diff --git a/src/polyfills/deno.mts b/src/polyfills/deno.mts
new file mode 100644
index 00000000..ee427248
--- /dev/null
+++ b/src/polyfills/deno.mts
@@ -0,0 +1,23 @@
+/* c8 ignore start */
+
+/**
+ * Allows testing CJS files with `require` and `exports` in Deno.
+ */
+
+import { createRequire } from 'node:module';
+import process from 'node:process';
+import { resolve, normalize } from 'node:path';
+
+const file = process.env?.FILE;
+if (!file) process.exit(1);
+
+const cwd = process.cwd();
+const targetPath = resolve(cwd, '');
+const filePath = resolve(targetPath, file!);
+
+globalThis.require = createRequire(targetPath);
+globalThis.exports = {};
+
+require(normalize(filePath));
+
+/* c8 ignore stop */
diff --git a/src/services/each.ts b/src/services/each.ts
index e60398e4..d824addf 100644
--- a/src/services/each.ts
+++ b/src/services/each.ts
@@ -1,6 +1,7 @@
import { EOL } from 'node:os';
-import { Configs } from '../@types/poku.js';
import { format } from '../helpers/format.js';
+/* c8 ignore next */
+import type { Configs } from '../@types/poku.js';
const eachCore = async (
type: keyof Required>,
diff --git a/src/services/run-test-file.ts b/src/services/run-test-file.ts
index 445a879f..e333cc6f 100644
--- a/src/services/run-test-file.ts
+++ b/src/services/run-test-file.ts
@@ -2,23 +2,33 @@ import process from 'node:process';
import path from 'node:path';
import { EOL } from 'node:os';
import { spawn } from 'node:child_process';
-import { isWindows, runner } from '../helpers/runner.js';
import { indentation } from '../configs/indentation.js';
+import { fileResults } from '../configs/files.js';
+import { isWindows, runner } from '../helpers/runner.js';
import { format } from '../helpers/format.js';
-import { Configs } from '../@types/poku.js';
import { isDebug, isQuiet } from '../helpers/logs.js';
import { removeConsecutiveRepeats } from '../helpers/remove-repeats.js';
import { beforeEach, afterEach } from './each.js';
-import { fileResults } from '../configs/files.js';
+/* c8 ignore next */
+import type { Configs } from '../@types/poku.js';
export const runTestFile = (
filePath: string,
configs?: Configs
): Promise =>
new Promise(async (resolve) => {
+ /* c8 ignore start */
const runtimeOptions = runner(filePath, configs);
const runtime = runtimeOptions.shift()!;
- const runtimeArguments = [...runtimeOptions, filePath];
+ const runtimeArguments = [
+ ...runtimeOptions,
+ configs?.deno?.cjs === true ||
+ (Array.isArray(configs?.deno?.cjs) &&
+ configs.deno.cjs.some((ext) => filePath.includes(ext)))
+ ? 'https://cdn.jsdelivr.net/npm/poku/lib/polyfills/deno.mjs'
+ : filePath,
+ ];
+ /* c8 ignore stop */
const fileRelative = path.relative(process.cwd(), filePath);
const showLogs = !isQuiet(configs);
@@ -27,6 +37,7 @@ export const runTestFile = (
let output = '';
+ /* c8 ignore start */
const log = () => {
const outputs = removeConsecutiveRepeats(
showSuccess
@@ -63,6 +74,7 @@ export const runTestFile = (
`${runtime === 'tsx' ? 'npx tsx' : runtime}${runtimeArguments.slice(0, -1).join(' ')} ${fileRelative}`
)}`,
]);
+ /* c8 ignore start */
const mappedOutputs = outputs.map((current) => `${pad}${current}`);
@@ -93,7 +105,7 @@ export const runTestFile = (
shell: isWindows,
env: {
...process.env,
- FILE: configs?.parallel ? fileRelative : '',
+ FILE: configs?.parallel || configs?.deno?.cjs ? fileRelative : '',
},
});
diff --git a/src/services/run-tests.ts b/src/services/run-tests.ts
index c003bfdd..c3976ba0 100644
--- a/src/services/run-tests.ts
+++ b/src/services/run-tests.ts
@@ -11,8 +11,9 @@ import {
import { hr } from '../helpers/hr.js';
import { format } from '../helpers/format.js';
import { runTestFile } from './run-test-file.js';
-import { Configs } from '../@types/poku.js';
import { isQuiet } from '../helpers/logs.js';
+/* c8 ignore next */
+import type { Configs } from '../@types/poku.js';
/* c8 ignore start */
export const results = {
diff --git a/test/docker/deno/latest.Dockerfile b/test/docker/deno/latest.Dockerfile
index 8e9a5a6c..4e56d965 100644
--- a/test/docker/deno/latest.Dockerfile
+++ b/test/docker/deno/latest.Dockerfile
@@ -2,6 +2,7 @@ FROM denoland/deno:alpine
WORKDIR /usr/app
+COPY ./lib ./lib
COPY ./src ./src
COPY ./test ./test
COPY ./tools ./tools
diff --git a/test/e2e/cli.test.ts b/test/e2e/cli.test.ts
index e70da365..6f042636 100644
--- a/test/e2e/cli.test.ts
+++ b/test/e2e/cli.test.ts
@@ -1,5 +1,10 @@
import { assert, describe, test } from '../../src/index.js';
import { executeCLI, ext, isProduction } from '../helpers/capture-cli.test.js';
+import { getRuntime } from '../../src/helpers/get-runtime.js';
+
+const runtime = getRuntime();
+
+if (runtime === 'deno' && !isProduction) process.exit(0);
test(async () => {
describe('Poku Test Runner: CLI', { background: false, icon: '๐ท' });
diff --git a/test/unit/deno/cjs.test.ts b/test/unit/deno/cjs.test.ts
new file mode 100644
index 00000000..4dcceffa
--- /dev/null
+++ b/test/unit/deno/cjs.test.ts
@@ -0,0 +1,44 @@
+import process from 'node:process';
+import { spawn } from 'node:child_process';
+import { getRuntime } from '../../../src/helpers/get-runtime.js';
+import { describe } from '../../../src/modules/describe.js';
+import { assert } from '../../../src/modules/assert.js';
+
+const runtime = getRuntime();
+
+if (runtime !== 'deno') process.exit(0);
+
+describe('Deno Compatibility', { background: false, icon: '๐ฆ' });
+
+const FILE = './fixtures/deno/require.cjs';
+const polyfillPath = './lib/polyfills/deno.mjs';
+
+const command = 'deno';
+const args = ['run', '--allow-env', '--allow-read', polyfillPath];
+const env = { ...process.env, FILE };
+
+const denoProcess = spawn(command, args, { env });
+
+let output: string = '';
+
+denoProcess.stdout.on('data', (data) => {
+ output += String(data);
+});
+
+denoProcess.stderr.on('data', (data) => {
+ output += String(data);
+});
+
+denoProcess.on('error', (err) => {
+ console.log(err);
+});
+
+denoProcess.on('close', (code) => {
+ assert.strictEqual(
+ output.trim(),
+ 'Hello from module.exports\nHello from exports'.trim(),
+ 'Testing CJS polyfill'
+ );
+
+ if (code !== 0) process.exit(code);
+});
diff --git a/tsconfig.json b/tsconfig.json
index de4b3d01..529f7955 100755
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -20,6 +20,7 @@
"esModuleInterop": true,
"noEmitOnError": true,
"declaration": true,
- "declarationDir": "lib"
+ "declarationDir": "lib",
+ "allowSyntheticDefaultImports": true
}
}
diff --git a/website/docs/documentation/poku/options/deno.mdx b/website/docs/documentation/poku/options/deno.mdx
index eeaf43bd..5a8058ea 100644
--- a/website/docs/documentation/poku/options/deno.mdx
+++ b/website/docs/documentation/poku/options/deno.mdx
@@ -45,19 +45,21 @@ poku(['...'], {
### CLI
```bash
-npx poku --deno-allow='read, run' ./test
+npx poku --deno-allow='read, run'
```
```bash
-npx poku --deno-allow='read=file.js, run' ./test
+npx poku --deno-allow='read=file.js, run'
```
Clear all permissions:
```bash
-npx poku --deno-allow='' ./test
+npx poku --deno-allow=''
```
+
+
## `deny`
> `poku(targetPaths: string | string[], configs?: Configs)`
@@ -87,9 +89,51 @@ poku(['...'], {
### CLI
```bash
-npx poku --deno-deny='write, sys' ./test
+npx poku --deno-deny='write, sys'
+```
+
+```bash
+npx poku --deno-deny='env=HOME, write'
+```
+
+
+
+## `cjs`
+
+> `poku(targetPaths: string | string[], configs?: Configs)`
+>
+> `cjs: boolean | string[]`
+
+Now, it's possible to run tests that use `require`, `module.exports` and `module` directly with **Deno** ๐
+
+It's a great feature to test if a project created primarily in **Node.js** or **Bun** is also compatible with **Deno** without the need to transpile the code or use workarounds.
+
+To run **CommonJS** with **Deno**, you can use:
+
+### API (_in-code_)
+
+```ts
+poku(['...'], {
+ deno: {
+ cjs: true,
+ },
+});
+```
+
+```ts
+poku(['...'], {
+ deno: {
+ cjs: ['.js', '.cjs' /* ... */],
+ },
+});
+```
+
+### CLI
+
+```bash
+npx poku --deno-cjs
```
```bash
-npx poku --deno-deny='env=HOME, write' ./test
+npx poku --deno-cjs='.js,.cjs'
```