jiti
Advanced tools
Comparing version 1.18.2 to 1.19.0
/// <reference types="node" /> | ||
import { Module } from "module"; | ||
import { TransformOptions, JITIOptions } from "./types"; | ||
export type { JITIOptions, TransformOptions } from "./types"; | ||
type Require = typeof require; | ||
type Module = typeof module; | ||
type ModuleCache = Record<string, Module>; | ||
export type EvalModuleOptions = Partial<{ | ||
id: string; | ||
filename: string; | ||
ext: string; | ||
cache: ModuleCache; | ||
}>; | ||
export interface JITI extends Require { | ||
transform: (opts: TransformOptions) => string; | ||
register: () => () => void; | ||
evalModule: (source: string, options?: EvalModuleOptions) => unknown; | ||
} | ||
export default function createJITI(_filename: string, opts?: JITIOptions, parentModule?: typeof module, requiredModules?: Record<string, typeof module>): JITI; | ||
export {}; | ||
export default function createJITI(_filename: string, opts?: JITIOptions, parentModule?: Module, parentCache?: ModuleCache): JITI; |
{ | ||
"name": "jiti", | ||
"version": "1.18.2", | ||
"version": "1.19.0", | ||
"description": "Runtime typescript and ESM support for Node.js", | ||
@@ -16,8 +16,9 @@ "repository": "unjs/jiti", | ||
"scripts": { | ||
"build": "pnpm clean && cross-env NODE_ENV=production pnpm webpack", | ||
"build": "pnpm clean && 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", | ||
"jiti": "JITI_DEBUG=1 JITI_CACHE=false JITI_REQUIRE_CACHE=false ./bin/jiti.js", | ||
"jiti:legacy": "JITI_DEBUG=1 npx node@12 ./bin/jiti.js", | ||
"lint": "eslint --ext .ts,.js . && prettier -c src lib test stubs", | ||
"lint:fix": "eslint --fix --ext .ts,.js . && prettier -w src lib test stubs", | ||
"release": "pnpm build && pnpm test && changelogen --release --push && npm publish", | ||
@@ -27,4 +28,4 @@ "test": "pnpm lint && vitest run --coverage" | ||
"devDependencies": { | ||
"@babel/core": "^7.21.3", | ||
"@babel/plugin-proposal-decorators": "^7.21.0", | ||
"@babel/core": "^7.22.6", | ||
"@babel/plugin-proposal-decorators": "^7.22.6", | ||
"@babel/plugin-proposal-export-namespace-from": "^7.18.9", | ||
@@ -34,50 +35,49 @@ "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", | ||
"@babel/plugin-syntax-class-properties": "^7.12.13", | ||
"@babel/plugin-syntax-import-assertions": "^7.20.0", | ||
"@babel/plugin-transform-modules-commonjs": "^7.21.2", | ||
"@babel/plugin-transform-typescript": "^7.21.3", | ||
"@babel/preset-typescript": "^7.21.0", | ||
"@babel/template": "^7.20.7", | ||
"@babel/types": "^7.21.3", | ||
"@types/babel__core": "^7.20.0", | ||
"@babel/plugin-syntax-import-assertions": "^7.22.5", | ||
"@babel/plugin-transform-modules-commonjs": "^7.22.5", | ||
"@babel/plugin-transform-typescript": "^7.22.5", | ||
"@babel/preset-typescript": "^7.22.5", | ||
"@babel/template": "^7.22.5", | ||
"@babel/types": "^7.22.5", | ||
"@types/babel__core": "^7.20.1", | ||
"@types/babel__template": "^7.4.1", | ||
"@types/node": "^18.15.3", | ||
"@types/node": "^20.3.3", | ||
"@types/object-hash": "^3.0.2", | ||
"@types/resolve": "^1.20.2", | ||
"@types/semver": "^7.3.13", | ||
"@vitest/coverage-c8": "^0.29.2", | ||
"acorn": "^8.8.2", | ||
"@types/semver": "^7.5.0", | ||
"@vitest/coverage-v8": "^0.32.4", | ||
"acorn": "^8.9.0", | ||
"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.1", | ||
"changelogen": "^0.5.4", | ||
"config": "^3.3.9", | ||
"create-require": "^1.1.1", | ||
"cross-env": "^7.0.3", | ||
"destr": "^1.2.2", | ||
"destr": "^2.0.0", | ||
"escape-string-regexp": "^5.0.0", | ||
"eslint": "^8.36.0", | ||
"eslint-config-unjs": "^0.1.0", | ||
"eslint": "^8.44.0", | ||
"eslint-config-unjs": "^0.2.1", | ||
"esm": "^3.2.25", | ||
"estree-walker": "^3.0.3", | ||
"execa": "^7.1.1", | ||
"fast-glob": "^3.2.12", | ||
"mlly": "^1.2.0", | ||
"fast-glob": "^3.3.0", | ||
"mlly": "^1.4.0", | ||
"object-hash": "^3.0.0", | ||
"pathe": "^1.1.0", | ||
"pirates": "^4.0.5", | ||
"pkg-types": "^1.0.2", | ||
"prettier": "^2.8.4", | ||
"pathe": "^1.1.1", | ||
"pirates": "^4.0.6", | ||
"pkg-types": "^1.0.3", | ||
"prettier": "^2.8.8", | ||
"reflect-metadata": "^0.1.13", | ||
"semver": "^7.3.8", | ||
"std-env": "^3.3.2", | ||
"terser-webpack-plugin": "^5.3.7", | ||
"ts-loader": "^9.4.2", | ||
"tslib": "^2.5.0", | ||
"typescript": "^4.9.5", | ||
"vite": "^4.1.4", | ||
"vitest": "^0.29.2", | ||
"webpack": "^5.76.1", | ||
"webpack-cli": "^5.0.1" | ||
"semver": "^7.5.3", | ||
"std-env": "^3.3.3", | ||
"terser-webpack-plugin": "^5.3.9", | ||
"ts-loader": "^9.4.4", | ||
"tslib": "^2.6.0", | ||
"typescript": "^5.1.6", | ||
"vite": "^4.3.9", | ||
"vitest": "^0.32.4", | ||
"webpack": "^5.88.1", | ||
"webpack-cli": "^5.1.4" | ||
}, | ||
"packageManager": "pnpm@7.29.3" | ||
} | ||
"packageManager": "pnpm@8.6.6" | ||
} |
# jiti | ||
> Runtime typescript and ESM support for Node.js | ||
[![npm version][npm-version-src]][npm-version-href] | ||
[![npm downloads][npm-downloads-src]][npm-downloads-href] | ||
[![bundle][bundle-src]][bundle-href] | ||
[![License][license-src]][license-href] | ||
[![version][npm-v-src]][npm-v-href] | ||
[![downloads][npm-d-src]][npm-d-href] | ||
[![size][size-src]][size-href] | ||
Runtime Typescript and ESM support for Node.js | ||
@@ -143,11 +144,11 @@ ## Features | ||
<!-- Refs --> | ||
<!-- Badged --> | ||
[npm-v-src]: https://img.shields.io/npm/v/jiti?style=flat-square | ||
[npm-v-href]: https://npmjs.com/package/jiti | ||
[npm-d-src]: https://img.shields.io/npm/dm/jiti?style=flat-square | ||
[npm-d-href]: https://npmjs.com/package/jiti | ||
[github-actions-src]: https://img.shields.io/github/workflow/status/unjs/jiti/ci/master?style=flat-square | ||
[github-actions-href]: https://github.com/unjs/jiti/actions?query=workflow%3Aci | ||
[size-src]: https://packagephobia.now.sh/badge?p=jiti | ||
[size-href]: https://packagephobia.now.sh/result?p=jiti | ||
[npm-version-src]: https://img.shields.io/npm/v/jiti?style=flat&colorA=18181B&colorB=F0DB4F | ||
[npm-version-href]: https://npmjs.com/package/jiti | ||
[npm-downloads-src]: https://img.shields.io/npm/dm/jiti?style=flat&colorA=18181B&colorB=F0DB4F | ||
[npm-downloads-href]: https://npmjs.com/package/jiti | ||
[bundle-src]: https://img.shields.io/bundlephobia/minzip/jiti?style=flat&colorA=18181B&colorB=F0DB4F | ||
[bundle-href]: https://bundlephobia.com/result?p=h3 | ||
[license-src]: https://img.shields.io/github/license/unjs/jiti.svg?style=flat&colorA=18181B&colorB=F0DB4F | ||
[license-href]: https://github.com/unjs/jiti/blob/main/LICENSE |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 11 instances in 1 package
51
154
1918881
5814
1
42