{"_id":"@dword-design/jiti","_rev":"1-d6ec370ce412d992e592e913e8ba2890","name":"@dword-design/jiti","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@dword-design/jiti","version":"0.0.1","description":"Runtime typescript and ESM support for Node.js (CommonJS)","repository":{"type":"git","url":"git+https://github.com/unjs/jiti.git"},"license":"MIT","main":"./lib/index.js","types":"dist/jiti.d.ts","bin":{"jiti":"bin/jiti.js"},"publishConfig":{"access":"public"},"scripts":{"build":"pnpm clean && cross-env NODE_ENV=production pnpm webpack","clean":"rm -rf dist","dev":"pnpm clean && pnpm webpack --watch","jiti":"cross-env JITI_DEBUG=1 JITI_CACHE=false ./bin/jiti.js","jiti:legacy":"cross-env JITI_DEBUG=1 npx node@12 ./bin/jiti.js","lint":"eslint --ext .ts,.js .","release":"pnpm build && pnpm test && pnpm standard-version && git push --follow-tags && pnpm publish","test":"pnpm lint && vitest run --coverage"},"devDependencies":{"@babel/core":"^7.20.2","@babel/plugin-proposal-decorators":"^7.20.2","@babel/plugin-proposal-export-namespace-from":"^7.18.9","@babel/plugin-proposal-nullish-coalescing-operator":"^7.18.6","@babel/plugin-proposal-optional-chaining":"^7.18.9","@babel/plugin-syntax-class-properties":"^7.12.13","@babel/plugin-transform-modules-commonjs":"^7.19.6","@babel/plugin-transform-typescript":"^7.20.2","@babel/preset-typescript":"^7.18.6","@babel/template":"^7.18.10","@babel/types":"^7.20.2","@nuxtjs/eslint-config-typescript":"^11.0.0","@types/babel__core":"^7.1.20","@types/babel__template":"^7.4.1","@types/mkdirp":"^1.0.2","@types/node":"^18.11.9","@types/object-hash":"^2.2.1","@types/resolve":"^1.20.2","@types/semver":"^7.3.13","@vitest/coverage-c8":"^0.25.1","acorn":"^8.8.1","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-parameter-decorator":"^1.0.16","config":"^3.3.8","create-require":"^1.1.1","cross-env":"^7.0.3","destr":"^1.2.0","escape-string-regexp":"^5.0.0","eslint":"^8.27.0","esm":"^3.2.25","estree-walker":"^3.0.1","execa":"^6.1.0","fast-glob":"^3.2.12","mkdirp":"^1.0.4","mlly":"^0.5.16","object-hash":"^3.0.0","pathe":"^0.3.9","pirates":"^4.0.5","pkg-types":"^0.3.6","semver":"^7.3.8","standard-version":"^9.5.0","terser-webpack-plugin":"^5.3.6","ts-loader":"^9.4.1","tslib":"^2.4.1","typescript":"^4.8.4","vitest":"^0.25.1","webpack":"^5.75.0","webpack-cli":"^4.10.0"},"packageManager":"pnpm@7.15.0","gitHead":"4144fa73b04ce58c592f47e346efd593ea54378f","bugs":{"url":"https://github.com/unjs/jiti/issues"},"homepage":"https://github.com/unjs/jiti#readme","_id":"@dword-design/jiti@0.0.1","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-+e7pjoR7qQl4JMVjk5IJZuELHfm2QhKrnr+cNCHX697I8CZcKcYP7NjzFZj+582Uj8gMj4JoueylykQ8u5cA8g==","shasum":"c67c1342a451d3a51bab26bc79d72a1f188d71ed","tarball":"https://registry.npmjs.org/@dword-design/jiti/-/jiti-0.0.1.tgz","fileCount":13,"unpackedSize":2240958,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGu3qoy5FtFBxezMsSiE7iY5I6DwqBAV1mWsA9UvCTfNAiEA9J9Zrl2IH6ieSxTbsYyWt5W0eLb8XryHcq7iTdrUmwc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjjKkKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoWeQ//evf4BRite9x3+IUvaDpBIDOaFEG6jMiK8Hh0GPNRicvVqcl9\r\n7C2zOH47wRg3SlKpl2QnQoTNxg+veaQiWtP7HMUFaHuM8xLe++sGeyUjFyLy\r\n6r4Cj88E0vnW6O7jbJHxpItL9fvAAF/qUPVLU8r7vDXP4UfFU7K9XZMgvnYI\r\nPO+DD4qzCMkDu6DnTtyvv9zaq4SQAGYr+mESw4z3WxEFJ+2g1+ARfbR2DE24\r\nnw1A/nc+8pz0v9FF0tyYHhKJjf4jH1H//BoobkHloPetbTLsE9dBf2UhONWC\r\n+vKTU7kYkk6ey7K7JVPvnlk8OoTfeDAIb887nib9fAbjvxmPf52sODADbvxD\r\n0vWtU4wltPN3qcgCYYElM/1ZwOEflx4sPGBwCcKb4CSiqHof8c1Yq7j111mO\r\nikF7EKiQ2v1FgsvLt6D/JubZi7kXQ7qzRUvzicxsCSsBArNQogSDD3gInnV0\r\n3XuuF1v+DvBJKZUNTkyw7IOIkUXvW6S1NA2qJYd40PMPu9lXwO8H4qjqpelL\r\nNC+mngOHJ+C61WtcFOGHQ+zdzDvNiNmBuqqOve7MUJgdcGbUzYf8EintqWLZ\r\neEUiU9hMCWo6Bx+bqWpv4gos6PvXcDASIN2U3ImTCUehEMZlO8vLd3GQpvw0\r\n+F5EXFMKa7ZzR5pfFin8RtAskvdpCsZgz1s=\r\n=Zseq\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"dword-design","email":"info@sebastianlandwehr.com"},"directories":{},"maintainers":[{"name":"dword-design","email":"info@sebastianlandwehr.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jiti_0.0.1_1670162698663_0.08518563673949298"},"_hasShrinkwrap":false},"0.0.2":{"name":"@dword-design/jiti","version":"0.0.2","description":"Runtime typescript and ESM support for Node.js","repository":{"type":"git","url":"git+https://github.com/unjs/jiti.git"},"license":"MIT","main":"./lib/index.js","types":"dist/jiti.d.ts","bin":{"jiti":"bin/jiti.js"},"publishConfig":{"access":"public"},"scripts":{"build":"pnpm clean && cross-env NODE_ENV=production pnpm webpack","clean":"rm -rf dist","dev":"pnpm clean && pnpm webpack --watch","jiti":"cross-env JITI_DEBUG=1 JITI_CACHE=false JITI_REQUIRE_CACHE=false ./bin/jiti.js","jiti:legacy":"cross-env JITI_DEBUG=1 npx node@12 ./bin/jiti.js","lint":"eslint --ext .ts,.js . && prettier -c src lib test stubs","release":"pnpm build && pnpm test && changelogen --release --push && npm publish","test":"pnpm lint && vitest run --coverage"},"devDependencies":{"@babel/core":"^7.21.8","@babel/plugin-proposal-decorators":"^7.21.0","@babel/plugin-proposal-export-namespace-from":"^7.18.9","@babel/plugin-proposal-nullish-coalescing-operator":"^7.18.6","@babel/plugin-proposal-optional-chaining":"^7.21.0","@babel/plugin-syntax-class-properties":"^7.12.13","@babel/plugin-syntax-import-assertions":"^7.20.0","@babel/plugin-transform-modules-commonjs":"^7.21.5","@babel/plugin-transform-typescript":"^7.21.3","@babel/preset-typescript":"^7.21.5","@babel/template":"^7.21.9","@babel/types":"^7.21.5","@types/babel__core":"^7.20.0","@types/babel__template":"^7.4.1","@types/node":"^20.2.3","@types/object-hash":"^3.0.2","@types/resolve":"^1.20.2","@types/semver":"^7.5.0","@vitest/coverage-c8":"^0.31.1","acorn":"^8.8.2","babel-plugin-dynamic-import-node":"^2.3.3","babel-plugin-parameter-decorator":"^1.0.16","babel-plugin-transform-typescript-metadata":"^0.3.2","changelogen":"^0.5.3","config":"^3.3.9","create-require":"^1.1.1","cross-env":"^7.0.3","destr":"^1.2.2","escape-string-regexp":"^5.0.0","eslint":"^8.41.0","eslint-config-unjs":"^0.2.0","esm":"^3.2.25","estree-walker":"^3.0.3","execa":"^7.1.1","fast-glob":"^3.2.12","mlly":"^1.3.0","object-hash":"^3.0.0","pathe":"^1.1.0","pirates":"^4.0.5","pkg-types":"^1.0.3","prettier":"^2.8.8","reflect-metadata":"^0.1.13","semver":"^7.5.1","std-env":"^3.3.3","terser-webpack-plugin":"^5.3.9","ts-loader":"^9.4.3","tslib":"^2.5.2","typescript":"^5.0.4","vite":"^4.3.8","vitest":"^0.31.1","webpack":"^5.83.1","webpack-cli":"^5.1.1"},"packageManager":"pnpm@8.5.1","dependencies":{"@babel/preset-env":"^7.22.4","babel-plugin-transform-import-meta":"^2.2.0","lodash":"^4.17.21"},"gitHead":"55ef28f503c4ee65e87752b1de1b8dac2d1e2222","bugs":{"url":"https://github.com/unjs/jiti/issues"},"homepage":"https://github.com/unjs/jiti#readme","_id":"@dword-design/jiti@0.0.2","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-VKJa6MDhu6Qk6Ke7OHtsFWXsPnTj0rjNxRSrBn+pFHonHSH9pr9/Zl8+h26ADPQKK2+JkpGgvqNE1ec+MwW6Tg==","shasum":"3e0efae629e7beabb82a8749da869aec35918e2d","tarball":"https://registry.npmjs.org/@dword-design/jiti/-/jiti-0.0.2.tgz","fileCount":14,"unpackedSize":1893677,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDNczVticK7OHBGkeXXDAbE62zpYOzJtnkp++pntyEdZAiBlRhW1ZsGWfi7ZPigKQKTS3TYvYkVUZlW+qhIkM0Hd8Q=="}]},"_npmUser":{"name":"dword-design","email":"info@sebastianlandwehr.com"},"directories":{},"maintainers":[{"name":"dword-design","email":"info@sebastianlandwehr.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jiti_0.0.2_1685395672634_0.19615751902391088"},"_hasShrinkwrap":false}},"time":{"created":"2022-12-04T14:04:58.600Z","0.0.1":"2022-12-04T14:04:58.879Z","modified":"2023-05-29T21:27:53.062Z","0.0.2":"2023-05-29T21:27:52.950Z"},"maintainers":[{"name":"dword-design","email":"info@sebastianlandwehr.com"}],"description":"Runtime typescript and ESM support for Node.js","homepage":"https://github.com/unjs/jiti#readme","repository":{"type":"git","url":"git+https://github.com/unjs/jiti.git"},"bugs":{"url":"https://github.com/unjs/jiti/issues"},"license":"MIT","readme":"# jiti\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![bundle][bundle-src]][bundle-href]\n[![License][license-src]][license-href]\n\nRuntime Typescript and ESM support for Node.js\n\n## Features\n\n- Seamless typescript and ESM syntax support\n- Seamless interoperability between ESM and CommonJS\n- Synchronous API to replace `require`\n- Super slim and zero dependency\n- Smart syntax detection to avoid extra transforms\n- CommonJS cache integration\n- Filesystem transpile hard cache\n- V8 compile cache\n- Custom resolve alias\n\n## Usage\n\n### Programmatic\n\n```js\nconst jiti = require(\"jiti\")(__filename);\n\njiti(\"./path/to/file.ts\");\n```\n\nYou can also pass options as second argument:\n\n```js\nconst jiti = require(\"jiti\")(__filename, { debug: true });\n```\n\n### CLI\n\n```bash\njiti index.ts\n# or npx jiti index.ts\n```\n\n### Register require hook\n\n```bash\nnode -r jiti/register index.ts\n```\n\nAlternatively, you can register `jiti` as a require hook programmatically:\n\n```js\nconst jiti = require(\"jiti\")();\nconst unregister = jiti.register();\n```\n\n## Options\n\n### `debug`\n\n- Type: Boolean\n- Default: `false`\n- Environment Variable: `JITI_DEBUG`\n\nEnable debug to see which files are transpiled\n\n### `cache`\n\n- Type: Boolean | String\n- Default: `true`\n- Environment Variable: `JITI_CACHE`\n\nUse transpile cache\n\nIf set to `true` will use `node_modules/.cache/jiti` (if exists) or `{TMP_DIR}/node-jiti`\n\n### `esmResolve`\n\n- Type: Boolean | String\n- Default: `false`\n- Environment Variable: `JITI_ESM_RESOLVE`\n\nUsing esm resolution algorithm to support `import` condition.\n\n### `transform`\n\n- Type: Function\n- Default: Babel (lazy loaded)\n\nTransform function. See [src/babel](./src/babel.ts) for more details\n\n### `sourceMaps`\n\n- Type: Boolean\n- Default `false`\n- Environment Variable: `JITI_SOURCE_MAPS`\n\nAdd inline source map to transformed source for better debugging.\n\n### `interopDefault`\n\n- Type: Boolean\n- Default: `false`\n\nReturn the `.default` export of a module at the top-level.\n\n### `alias`\n\n- Type: Object\n- Default: -\n- Environment Variable: `JITI_ALIAS`\n\nCustom alias map used to resolve ids.\n\n### `nativeModules`\n\n- Type: Array\n- Default: ['typescript`]\n- Environment Variable: `JITI_NATIVE_MODULES`\n\nList of modules (within `node_modules`) to always use native require for them.\n\n### `transformModules`\n\n- Type: Array\n- Default: []\n- Environment Variable: `JITI_TRANSFORM_MODULES`\n\nList of modules (within `node_modules`) to transform them regardless of syntax.\n\n## Development\n\n- Clone this repository\n- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`\n- Install dependencies using `pnpm install`\n- Run `pnpm dev`\n- Run `pnpm jiti ./test/path/to/file.ts`\n\n## License\n\nMIT. Made with 💖\n\n<!-- Badged -->\n\n[npm-version-src]: https://img.shields.io/npm/v/jiti?style=flat&colorA=18181B&colorB=F0DB4F\n[npm-version-href]: https://npmjs.com/package/jiti\n[npm-downloads-src]: https://img.shields.io/npm/dm/jiti?style=flat&colorA=18181B&colorB=F0DB4F\n[npm-downloads-href]: https://npmjs.com/package/jiti\n[bundle-src]: https://img.shields.io/bundlephobia/minzip/jiti?style=flat&colorA=18181B&colorB=F0DB4F\n[bundle-href]: https://bundlephobia.com/result?p=h3\n[license-src]: https://img.shields.io/github/license/unjs/jiti.svg?style=flat&colorA=18181B&colorB=F0DB4F\n[license-href]: https://github.com/unjs/jiti/blob/main/LICENSE\n","readmeFilename":"README.md"}