Socket
Socket
Sign inDemoInstall

ts-node

Package Overview
Dependencies
Maintainers
2
Versions
128
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-node - npm Package Compare versions

Comparing version 8.10.2 to 9.0.0

dist-raw/node-cjs-loader-utils.js

32

dist-raw/node-esm-resolve-implementation.js

@@ -53,33 +53,3 @@ // Copied from https://raw.githubusercontent.com/nodejs/node/v13.12.0/lib/internal/modules/esm/resolve.js

// const { getOptionValue } = require('internal/options');
const { getOptionValue } = (() => {
let options;
function parseOptions() {
if (!options) {
options = {
'--preserve-symlinks': false,
'--preserve-symlinks-main': false,
'--input-type': undefined,
'--experimental-specifier-resolution': 'explicit',
...parseExecArgv()
}
}
};
function parseExecArgv () {
return require('arg')({
'--preserve-symlinks': Boolean,
'--preserve-symlinks-main': Boolean,
'--input-type': String,
'--experimental-specifier-resolution': String
}, {
argv: process.execArgv,
permissive: true
});
}
return {
getOptionValue: (opt) => {
parseOptions();
return options[opt];
}
};
})();
const { getOptionValue } = require('./node-options');
const { sep } = require('path');

@@ -86,0 +56,0 @@

#!/usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.main = void 0;
const path_1 = require("path");

@@ -83,3 +84,3 @@ const repl_1 = require("repl");

// defaults.
const { '--dir': dir, '--help': help = false, '--script-mode': scriptMode = false, '--version': version = 0, '--require': requires = [], '--eval': code = undefined, '--print': print = false, '--interactive': interactive = false, '--files': files, '--compiler': compiler, '--compiler-options': compilerOptions, '--project': project, '--ignore-diagnostics': ignoreDiagnostics, '--ignore': ignore, '--transpile-only': transpileOnly, '--type-check': typeCheck, '--compiler-host': compilerHost, '--pretty': pretty, '--skip-project': skipProject, '--skip-ignore': skipIgnore, '--prefer-ts-exts': preferTsExts, '--log-error': logError, '--emit': emit } = args;
const { '--dir': dir, '--help': help = false, '--script-mode': scriptMode = false, '--version': version = 0, '--require': argsRequire = [], '--eval': code = undefined, '--print': print = false, '--interactive': interactive = false, '--files': files, '--compiler': compiler, '--compiler-options': compilerOptions, '--project': project, '--ignore-diagnostics': ignoreDiagnostics, '--ignore': ignore, '--transpile-only': transpileOnly, '--type-check': typeCheck, '--compiler-host': compilerHost, '--pretty': pretty, '--skip-project': skipProject, '--skip-ignore': skipIgnore, '--prefer-ts-exts': preferTsExts, '--log-error': logError, '--emit': emit } = args;
if (help) {

@@ -146,2 +147,3 @@ console.log(`

compilerOptions,
require: argsRequire,
readFile: code !== undefined

@@ -182,3 +184,2 @@ ? (path) => {

module.paths = Module._nodeModulePaths(cwd);
Module._preloadModules(requires);
// Prepend `ts-node` arguments to CLI for child processes.

@@ -324,3 +325,4 @@ process.execArgv.unshift(__filename, ...process.argv.slice(2, process.argv.length - args._.length));

output: process.stdout,
terminal: process.stdout.isTTY,
// Mimicking node's REPL implementation: https://github.com/nodejs/node/blob/168b22ba073ee1cbf8d0bcb4ded7ff3099335d04/lib/internal/repl.js#L28-L30
terminal: process.stdout.isTTY && !parseInt(process.env.NODE_NO_READLINE, 10),
eval: replEval,

@@ -327,0 +329,0 @@ useGlobal: true

@@ -12,2 +12,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.registerAndCreateEsmHooks = void 0;
const index_1 = require("./index");

@@ -21,3 +22,3 @@ const url_1 = require("url");

// Automatically performs registration just like `-r ts-node/register`
const tsNodeInstance = index_1.register(opts);
const tsNodeInstance = index_1.register(Object.assign(Object.assign({}, opts), { experimentalEsmLoader: true }));
// Custom implementation that considers additional file extensions and automatically adds file extensions

@@ -66,3 +67,3 @@ const nodeResolveImplementation = createResolve(Object.assign(Object.assign({}, index_1.getExtensions(tsNodeInstance.config)), { preferTsExts: tsNodeInstance.options.preferTsExts }));

const ext = path_1.extname(nativePath);
if (ext === '.ts' || ext === '.tsx' || ext === '.jsx') {
if (ext !== '.js' && !tsNodeInstance.ignored(nativePath)) {
return defer(url_1.format(url_1.pathToFileURL(nativePath + '.js')));

@@ -69,0 +70,0 @@ }

import { BaseError } from 'make-error';
import * as _ts from 'typescript';
import type * as _ts from 'typescript';
/**

@@ -139,2 +139,11 @@ * Registered `ts-node` instance information.

ignoreDiagnostics?: Array<number | string>;
/**
* Modules to require, like node's `--require` flag.
*
* If specified in tsconfig.json, the modules will be resolved relative to the tsconfig.json file.
*
* If specified programmatically, each input string should be pre-resolved to an absolute path for
* best results.
*/
require?: Array<string>;
readFile?: (path: string) => string | undefined;

@@ -141,0 +150,0 @@ fileExists?: (path: string) => boolean;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.create = exports.register = exports.getExtensions = exports.TSError = exports.normalizeSlashes = exports.parse = exports.split = exports.DEFAULTS = exports.VERSION = exports.debug = exports.INSPECT_CUSTOM = exports.REGISTER_INSTANCE = void 0;
const path_1 = require("path");

@@ -8,3 +9,23 @@ const sourceMapSupport = require("source-map-support");

const util = require("util");
const url_1 = require("url");
const Module = require("module");
/**
* Does this version of node obey the package.json "type" field
* and throw ERR_REQUIRE_ESM when attempting to require() an ESM modules.
*/
const engineSupportsPackageTypeField = parseInt(process.versions.node.split('.')[0], 10) >= 12;
// Loaded conditionally so we don't need to support older node versions
let assertScriptCanLoadAsCJSImpl;
/**
* Assert that script can be loaded as CommonJS when we attempt to require it.
* If it should be loaded as ESM, throw ERR_REQUIRE_ESM like node does.
*/
function assertScriptCanLoadAsCJS(filename) {
if (!engineSupportsPackageTypeField)
return;
if (!assertScriptCanLoadAsCJSImpl)
assertScriptCanLoadAsCJSImpl = require('../dist-raw/node-cjs-loader-utils').assertScriptCanLoadAsCJSImpl;
assertScriptCanLoadAsCJSImpl(filename);
}
/**
* Registered `ts-node` instance information.

@@ -80,3 +101,4 @@ */

compilerHost: yn(process.env.TS_NODE_COMPILER_HOST),
logError: yn(process.env.TS_NODE_LOG_ERROR)
logError: yn(process.env.TS_NODE_LOG_ERROR),
experimentalEsmLoader: false
};

@@ -171,2 +193,3 @@ /**

registerExtensions(service.options.preferTsExts, extensions, service, originalJsHandler);
Module._preloadModules(service.options.require);
return service;

@@ -197,2 +220,6 @@ }

const options = assign({}, exports.DEFAULTS, tsconfigOptions || {}, rawOptions);
options.require = [
...tsconfigOptions.require || [],
...rawOptions.require || []
];
// If `compiler` option changed based on tsconfig, re-load the compiler.

@@ -224,5 +251,16 @@ if (options.compiler !== compilerName) {

environment: 'node',
retrieveFile(path) {
retrieveFile(pathOrUrl) {
var _a;
return ((_a = outputCache.get(normalizeSlashes(path))) === null || _a === void 0 ? void 0 : _a.content) || '';
let path = pathOrUrl;
// If it's a file URL, convert to local path
// Note: fileURLToPath does not exist on early node v10
// I could not find a way to handle non-URLs except to swallow an error
if (options.experimentalEsmLoader && path.startsWith('file://')) {
try {
path = url_1.fileURLToPath(path);
}
catch (e) { /* swallow error */ }
}
path = normalizeSlashes(path);
return ((_a = outputCache.get(path)) === null || _a === void 0 ? void 0 : _a.content) || '';
}

@@ -263,17 +301,91 @@ });

let getTypeInfo;
const getOutputTranspileOnly = (code, fileName, overrideCompilerOptions) => {
const result = ts.transpileModule(code, {
fileName,
compilerOptions: overrideCompilerOptions ? Object.assign(Object.assign({}, config.options), overrideCompilerOptions) : config.options,
reportDiagnostics: true
});
const diagnosticList = filterDiagnostics(result.diagnostics || [], ignoreDiagnostics);
if (diagnosticList.length)
reportTSError(diagnosticList);
return [result.outputText, result.sourceMapText];
};
const getCanonicalFileName = ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames);
// In a factory because these are shared across both CompilerHost and LanguageService codepaths
function createResolverFunctions(serviceHost) {
const moduleResolutionCache = ts.createModuleResolutionCache(cwd, getCanonicalFileName, config.options);
const knownInternalFilenames = new Set();
/** "Buckets" (module directories) whose contents should be marked "internal" */
const internalBuckets = new Set();
// Get bucket for a source filename. Bucket is the containing `./node_modules/*/` directory
// For '/project/node_modules/foo/node_modules/bar/lib/index.js' bucket is '/project/node_modules/foo/node_modules/bar/'
// For '/project/node_modules/foo/node_modules/@scope/bar/lib/index.js' bucket is '/project/node_modules/foo/node_modules/@scope/bar/'
const moduleBucketRe = /.*\/node_modules\/(?:@[^\/]+\/)?[^\/]+\//;
function getModuleBucket(filename) {
const find = moduleBucketRe.exec(filename);
if (find)
return find[0];
return '';
}
// Mark that this file and all siblings in its bucket should be "internal"
function markBucketOfFilenameInternal(filename) {
internalBuckets.add(getModuleBucket(filename));
}
function isFileInInternalBucket(filename) {
return internalBuckets.has(getModuleBucket(filename));
}
function isFileKnownToBeInternal(filename) {
return knownInternalFilenames.has(filename);
}
/**
* If we need to emit JS for a file, force TS to consider it non-external
*/
const fixupResolvedModule = (resolvedModule) => {
const { resolvedFileName } = resolvedModule;
if (resolvedFileName === undefined)
return;
// .ts is always switched to internal
// .js is switched on-demand
if (resolvedModule.isExternalLibraryImport && ((resolvedFileName.endsWith('.ts') && !resolvedFileName.endsWith('.d.ts')) ||
isFileKnownToBeInternal(resolvedFileName) ||
isFileInInternalBucket(resolvedFileName))) {
resolvedModule.isExternalLibraryImport = false;
}
if (!resolvedModule.isExternalLibraryImport) {
knownInternalFilenames.add(resolvedFileName);
}
};
/*
* NOTE:
* Older ts versions do not pass `redirectedReference` nor `options`.
* We must pass `redirectedReference` to newer ts versions, but cannot rely on `options`, hence the weird argument name
*/
const resolveModuleNames = (moduleNames, containingFile, reusedNames, redirectedReference, optionsOnlyWithNewerTsVersions) => {
return moduleNames.map(moduleName => {
const { resolvedModule } = ts.resolveModuleName(moduleName, containingFile, config.options, serviceHost, moduleResolutionCache, redirectedReference);
if (resolvedModule) {
fixupResolvedModule(resolvedModule);
}
return resolvedModule;
});
};
// language service never calls this, but TS docs recommend that we implement it
const getResolvedModuleWithFailedLookupLocationsFromCache = (moduleName, containingFile) => {
const ret = ts.resolveModuleNameFromCache(moduleName, containingFile, moduleResolutionCache);
if (ret && ret.resolvedModule) {
fixupResolvedModule(ret.resolvedModule);
}
return ret;
};
const resolveTypeReferenceDirectives = (typeDirectiveNames, containingFile, redirectedReference, options) => {
// Note: seems to be called with empty typeDirectiveNames array for all files.
return typeDirectiveNames.map(typeDirectiveName => {
const { resolvedTypeReferenceDirective } = ts.resolveTypeReferenceDirective(typeDirectiveName, containingFile, config.options, serviceHost, redirectedReference);
if (resolvedTypeReferenceDirective) {
fixupResolvedModule(resolvedTypeReferenceDirective);
}
return resolvedTypeReferenceDirective;
});
};
return {
resolveModuleNames,
getResolvedModuleWithFailedLookupLocationsFromCache,
resolveTypeReferenceDirectives,
isFileKnownToBeInternal,
markBucketOfFilenameInternal
};
}
// Use full language services when the fast option is disabled.
if (!transpileOnly) {
const fileContents = new Map();
const rootFileNames = config.fileNames.slice();
const rootFileNames = new Set(config.fileNames);
const cachedReadFile = cachedLookup(debugFn('readFile', readFile));

@@ -283,3 +395,3 @@ // Use language services by default (TODO: invert next major version).

let projectVersion = 1;
const fileVersions = new Map(rootFileNames.map(fileName => [fileName, 0]));
const fileVersions = new Map(Array.from(rootFileNames).map(fileName => [fileName, 0]));
const getCustomTransformers = () => {

@@ -295,3 +407,3 @@ if (typeof transformers === 'function') {

getProjectVersion: () => String(projectVersion),
getScriptFileNames: () => Array.from(fileVersions.keys()),
getScriptFileNames: () => Array.from(rootFileNames),
getScriptVersion: (fileName) => {

@@ -302,2 +414,3 @@ const version = fileVersions.get(fileName);

getScriptSnapshot(fileName) {
// TODO ordering of this with getScriptVersion? Should they sync up?
let contents = fileContents.get(fileName);

@@ -311,2 +424,3 @@ // Read contents into TypeScript memory cache.

fileContents.set(fileName, contents);
projectVersion++;
}

@@ -320,2 +434,3 @@ return ts.ScriptSnapshot.fromString(contents);

directoryExists: cachedLookup(debugFn('directoryExists', ts.sys.directoryExists)),
realpath: ts.sys.realpath ? cachedLookup(debugFn('realpath', ts.sys.realpath)) : undefined,
getNewLine: () => ts.sys.newLine,

@@ -328,8 +443,16 @@ useCaseSensitiveFileNames: () => ts.sys.useCaseSensitiveFileNames,

};
const { resolveModuleNames, getResolvedModuleWithFailedLookupLocationsFromCache, resolveTypeReferenceDirectives, isFileKnownToBeInternal, markBucketOfFilenameInternal } = createResolverFunctions(serviceHost);
serviceHost.resolveModuleNames = resolveModuleNames;
serviceHost.getResolvedModuleWithFailedLookupLocationsFromCache = getResolvedModuleWithFailedLookupLocationsFromCache;
serviceHost.resolveTypeReferenceDirectives = resolveTypeReferenceDirectives;
const registry = ts.createDocumentRegistry(ts.sys.useCaseSensitiveFileNames, cwd);
const service = ts.createLanguageService(serviceHost, registry);
const updateMemoryCache = (contents, fileName) => {
// Add to `rootFiles` when discovered for the first time.
if (!fileVersions.has(fileName)) {
rootFileNames.push(fileName);
// Add to `rootFiles` as necessary, either to make TS include a file it has not seen,
// or to trigger a re-classification of files from external to internal.
if (!rootFileNames.has(fileName) && !isFileKnownToBeInternal(fileName)) {
markBucketOfFilenameInternal(fileName);
rootFileNames.add(fileName);
// Increment project version for every change to rootFileNames.
projectVersion++;
}

@@ -388,3 +511,6 @@ const previousVersion = fileVersions.get(fileName) || 0;

return cacheContents;
return cachedReadFile(fileName);
const contents = cachedReadFile(fileName);
if (contents)
fileContents.set(fileName, contents);
return contents;
}, readDirectory: ts.sys.readDirectory, getDirectories: cachedLookup(debugFn('getDirectories', ts.sys.getDirectories)), fileExists: cachedLookup(debugFn('fileExists', fileExists)), directoryExists: cachedLookup(debugFn('directoryExists', ts.sys.directoryExists)), resolvePath: cachedLookup(debugFn('resolvePath', ts.sys.resolvePath)), realpath: ts.sys.realpath ? cachedLookup(debugFn('realpath', ts.sys.realpath)) : undefined });

@@ -399,6 +525,9 @@ const host = ts.createIncrementalCompilerHost

}, getDefaultLibLocation: () => normalizeSlashes(path_1.dirname(compiler)), getDefaultLibFileName: () => normalizeSlashes(path_1.join(path_1.dirname(compiler), ts.getDefaultLibFileName(config.options))), useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames });
const { resolveModuleNames, resolveTypeReferenceDirectives, isFileKnownToBeInternal, markBucketOfFilenameInternal } = createResolverFunctions(host);
host.resolveModuleNames = resolveModuleNames;
host.resolveTypeReferenceDirectives = resolveTypeReferenceDirectives;
// Fallback for older TypeScript releases without incremental API.
let builderProgram = ts.createIncrementalProgram
? ts.createIncrementalProgram({
rootNames: rootFileNames.slice(),
rootNames: Array.from(rootFileNames),
options: config.options,

@@ -409,3 +538,3 @@ host: host,

})
: ts.createEmitAndSemanticDiagnosticsBuilderProgram(rootFileNames.slice(), config.options, host, undefined, config.errors, config.projectReferences);
: ts.createEmitAndSemanticDiagnosticsBuilderProgram(Array.from(rootFileNames), config.options, host, undefined, config.errors, config.projectReferences);
// Read and cache custom transformers.

@@ -417,11 +546,17 @@ const customTransformers = typeof transformers === 'function'

const updateMemoryCache = (contents, fileName) => {
const sourceFile = builderProgram.getSourceFile(fileName);
fileContents.set(fileName, contents);
const previousContents = fileContents.get(fileName);
const contentsChanged = previousContents !== contents;
if (contentsChanged) {
fileContents.set(fileName, contents);
}
// Add to `rootFiles` when discovered by compiler for the first time.
if (sourceFile === undefined) {
rootFileNames.push(fileName);
let addedToRootFileNames = false;
if (!rootFileNames.has(fileName) && !isFileKnownToBeInternal(fileName)) {
markBucketOfFilenameInternal(fileName);
rootFileNames.add(fileName);
addedToRootFileNames = true;
}
// Update program when file changes.
if (sourceFile === undefined || sourceFile.text !== contents) {
builderProgram = ts.createEmitAndSemanticDiagnosticsBuilderProgram(rootFileNames.slice(), config.options, host, builderProgram, config.errors, config.projectReferences);
if (addedToRootFileNames || contentsChanged) {
builderProgram = ts.createEmitAndSemanticDiagnosticsBuilderProgram(Array.from(rootFileNames), config.options, host, builderProgram, config.errors, config.projectReferences);
}

@@ -495,3 +630,14 @@ };

}
getOutput = getOutputTranspileOnly;
getOutput = (code, fileName) => {
const result = ts.transpileModule(code, {
fileName,
compilerOptions: config.options,
reportDiagnostics: true,
transformers: transformers
});
const diagnosticList = filterDiagnostics(result.diagnostics || [], ignoreDiagnostics);
if (diagnosticList.length)
reportTSError(diagnosticList);
return [result.outputText, result.sourceMapText];
};
getTypeInfo = () => {

@@ -501,5 +647,2 @@ throw new TypeError('Type information is unavailable in "--transpile-only"');

}
const cannotCompileViaBothCodepathsErrorMessage = 'Cannot compile the same file via both `require()` and ESM hooks codepaths. ' +
'This breaks source-map-support, which cannot tell the difference between the two sourcemaps. ' +
'To avoid this problem, load each .ts file as only ESM or only CommonJS.';
// Create a simple TypeScript compiler proxy.

@@ -515,12 +658,12 @@ function compile(code, fileName, lineOffset = 0) {

const enabled = (enabled) => enabled === undefined ? active : (active = !!enabled);
const extensions = getExtensions(config);
const ignored = (fileName) => {
if (!active)
return true;
const relname = path_1.relative(cwd, fileName);
if (!config.options.allowJs) {
const ext = path_1.extname(fileName);
if (ext === '.js' || ext === '.jsx')
return true;
const ext = path_1.extname(fileName);
if (extensions.tsExtensions.includes(ext) || extensions.jsExtensions.includes(ext)) {
const relname = path_1.relative(cwd, fileName);
return !isScoped(relname) || shouldIgnore(relname);
}
return !isScoped(relname) || shouldIgnore(relname);
return true;
};

@@ -572,2 +715,5 @@ return { ts, config, compile, getTypeInfo, ignored, enabled, options };

return old(m, filename);
if (register.options.experimentalEsmLoader) {
assertScriptCanLoadAsCJS(filename);
}
const _compile = m._compile;

@@ -646,2 +792,9 @@ m._compile = function (code, fileName) {

}, basePath, undefined, configFileName));
if (tsconfigOptions.require) {
// Modules are found relative to the tsconfig file, not the `dir` option
const tsconfigRelativeRequire = createRequire(configFileName);
tsconfigOptions.require = tsconfigOptions.require.map((path) => {
return tsconfigRelativeRequire.resolve(path);
});
}
return { config: fixedConfig, options: tsconfigOptions };

@@ -695,2 +848,10 @@ }

}
let nodeCreateRequire;
function createRequire(filename) {
if (!nodeCreateRequire) {
// tslint:disable-next-line
nodeCreateRequire = Module.createRequire || Module.createRequireFromPath || require('../dist-raw/node-createrequire').createRequireFromPath;
}
return nodeCreateRequire(filename);
}
//# sourceMappingURL=index.js.map

@@ -18,5 +18,7 @@ "use strict";

const proxyquire = require("proxyquire");
const index_1 = require("./index");
const fs_1 = require("fs");
const promisify = require("util.promisify");
const rimraf_1 = require("rimraf");
const module_1 = require("module");
const url_1 = require("url");
const execP = promisify(child_process_1.exec);

@@ -28,9 +30,15 @@ const TEST_DIR = path_1.join(__dirname, '../tests');

const SOURCE_MAP_REGEXP = /\/\/# sourceMappingURL=data:application\/json;charset=utf\-8;base64,[\w\+]+=*$/;
// `createRequire` does not exist on older node versions
const testsDirRequire = (module_1.createRequire || module_1.createRequireFromPath)(path_1.join(TEST_DIR, 'index.js')); // tslint:disable-line
// Set after ts-node is installed locally
let { register, create, VERSION } = {};
// Pack and install ts-node locally, necessary to test package "exports"
before(function () {
return __awaiter(this, void 0, void 0, function* () {
this.timeout(30000);
this.timeout(5 * 60e3);
rimraf_1.sync(path_1.join(TEST_DIR, 'node_modules'));
yield execP(`npm install`, { cwd: TEST_DIR });
const packageLockPath = path_1.join(TEST_DIR, 'package-lock.json');
fs_1.existsSync(packageLockPath) && fs_1.unlinkSync(packageLockPath);
({ register, create, VERSION } = testsDirRequire('ts-node'));
});

@@ -40,6 +48,32 @@ });

const cmd = `"${BIN_PATH}" --project "${PROJECT}"`;
const cmdNoProject = `"${BIN_PATH}"`;
this.timeout(10000);
it('should export the correct version', function () {
chai_1.expect(index_1.VERSION).to.equal(require('../package.json').version);
chai_1.expect(VERSION).to.equal(require('../package.json').version);
});
it('should export all CJS entrypoints', function () {
// Ensure our package.json "exports" declaration allows `require()`ing all our entrypoints
// https://github.com/TypeStrong/ts-node/pull/1026
testsDirRequire.resolve('ts-node');
// only reliably way to ask node for the root path of a dependency is Path.resolve(require.resolve('ts-node/package'), '..')
testsDirRequire.resolve('ts-node/package');
testsDirRequire.resolve('ts-node/package.json');
// All bin entrypoints for people who need to augment our CLI: `node -r otherstuff ./node_modules/ts-node/dist/bin`
testsDirRequire.resolve('ts-node/dist/bin');
testsDirRequire.resolve('ts-node/dist/bin.js');
testsDirRequire.resolve('ts-node/dist/bin-transpile');
testsDirRequire.resolve('ts-node/dist/bin-transpile.js');
testsDirRequire.resolve('ts-node/dist/bin-script');
testsDirRequire.resolve('ts-node/dist/bin-script.js');
// Must be `require()`able obviously
testsDirRequire.resolve('ts-node/register');
testsDirRequire.resolve('ts-node/register/files');
testsDirRequire.resolve('ts-node/register/transpile-only');
testsDirRequire.resolve('ts-node/register/type-check');
// `node --loader ts-node/esm`
testsDirRequire.resolve('ts-node/esm');
testsDirRequire.resolve('ts-node/esm.mjs');
testsDirRequire.resolve('ts-node/esm/transpile-only');
testsDirRequire.resolve('ts-node/esm/transpile-only.mjs');
});
describe('cli', function () {

@@ -54,2 +88,25 @@ this.slow(1000);

});
it('shows usage via --help', function (done) {
child_process_1.exec(`${cmdNoProject} --help`, function (err, stdout) {
chai_1.expect(err).to.equal(null);
chai_1.expect(stdout).to.match(/Usage: ts-node /);
return done();
});
});
it('shows version via -v', function (done) {
child_process_1.exec(`${cmdNoProject} -v`, function (err, stdout) {
chai_1.expect(err).to.equal(null);
chai_1.expect(stdout.trim()).to.equal('v' + testsDirRequire('ts-node/package').version);
return done();
});
});
it('shows version of compiler via -vv', function (done) {
child_process_1.exec(`${cmdNoProject} -vv`, function (err, stdout) {
chai_1.expect(err).to.equal(null);
chai_1.expect(stdout.trim()).to.equal(`ts-node v${testsDirRequire('ts-node/package').version}\n` +
`node ${process.version}\n` +
`compiler v${testsDirRequire('typescript/package').version}`);
return done();
});
});
it('should register via cli', function (done) {

@@ -230,2 +287,13 @@ child_process_1.exec(`node -r ts-node/register hello-world.ts`, {

});
it('REPL has command to get type information', function (done) {
const cp = child_process_1.exec(`${cmd} --interactive`, function (err, stdout) {
chai_1.expect(err).to.equal(null);
chai_1.expect(stdout).to.equal('> undefined\n' +
'> undefined\n' +
'> const a: 123\n' +
'> ');
return done();
});
cp.stdin.end('\nconst a = 123\n.type a');
});
it('should support require flags', function (done) {

@@ -245,6 +313,11 @@ child_process_1.exec(`${cmd} -r ./tests/hello-world -pe "console.log('success')"`, function (err, stdout) {

});
it.skip('should use source maps with react tsx', function (done) {
child_process_1.exec(`${cmd} -r ./tests/emit-compiled.ts tests/jsx-react.tsx`, function (err, stdout) {
chai_1.expect(err).to.equal(null);
chai_1.expect(stdout).to.equal('todo');
it('should use source maps with react tsx', function (done) {
child_process_1.exec(`${cmd} tests/throw-react-tsx.tsx`, function (err, stdout) {
chai_1.expect(err).not.to.equal(null);
chai_1.expect(err.message).to.contain([
`${path_1.join(__dirname, '../tests/throw-react-tsx.tsx')}:100`,
' bar () { throw new Error(\'this is a demo\') }',
' ^',
'Error: this is a demo'
].join('\n'));
return done();

@@ -336,3 +409,3 @@ });

it('should read tsconfig relative to realpath, not symlink, in scriptMode', function (done) {
if (fs_1.statSync(path_1.join(TEST_DIR, 'main-realpath/symlink/symlink.tsx')).isSymbolicLink()) {
if (fs_1.lstatSync(path_1.join(TEST_DIR, 'main-realpath/symlink/symlink.tsx')).isSymbolicLink()) {
child_process_1.exec(`${BIN_SCRIPT_PATH} tests/main-realpath/symlink/symlink.tsx`, function (err, stdout) {

@@ -352,3 +425,3 @@ chai_1.expect(err).to.equal(null);

it('should override compiler options from env', function (done) {
child_process_1.exec(`${BIN_EXEC} tests/tsconfig-options/log-options.js`, {
child_process_1.exec(`${BIN_EXEC} tests/tsconfig-options/log-options1.js`, {
env: Object.assign(Object.assign({}, process.env), { TS_NODE_COMPILER_OPTIONS: '{"typeRoots": ["env-typeroots"]}' })

@@ -363,3 +436,3 @@ }, function (err, stdout) {

it('should use options from `tsconfig.json`', function (done) {
child_process_1.exec(`${BIN_EXEC} tests/tsconfig-options/log-options.js`, function (err, stdout) {
child_process_1.exec(`${BIN_EXEC} tests/tsconfig-options/log-options1.js`, function (err, stdout) {
chai_1.expect(err).to.equal(null);

@@ -372,7 +445,8 @@ const { options, config } = JSON.parse(stdout);

chai_1.expect(options.transpileOnly).to.equal(true);
chai_1.expect(options.require).to.deep.equal([path_1.join(__dirname, '../tests/tsconfig-options/required1.js')]);
return done();
});
});
it('should have flags override `tsconfig.json`', function (done) {
child_process_1.exec(`${BIN_EXEC} --skip-ignore --compiler-options "{\\"types\\":[\\"flags-types\\"]}" tests/tsconfig-options/log-options.js`, function (err, stdout) {
it('should have flags override / merge with `tsconfig.json`', function (done) {
child_process_1.exec(`${BIN_EXEC} --skip-ignore --compiler-options "{\\"types\\":[\\"flags-types\\"]}" --require ./tests/tsconfig-options/required2.js tests/tsconfig-options/log-options2.js`, function (err, stdout) {
chai_1.expect(err).to.equal(null);

@@ -385,2 +459,6 @@ const { options, config } = JSON.parse(stdout);

chai_1.expect(options.transpileOnly).to.equal(true);
chai_1.expect(options.require).to.deep.equal([
path_1.join(__dirname, '../tests/tsconfig-options/required1.js'),
'./tests/tsconfig-options/required2.js'
]);
return done();

@@ -390,3 +468,3 @@ });

it('should have `tsconfig.json` override environment', function (done) {
child_process_1.exec(`${BIN_EXEC} tests/tsconfig-options/log-options.js`, {
child_process_1.exec(`${BIN_EXEC} tests/tsconfig-options/log-options1.js`, {
env: Object.assign(Object.assign({}, process.env), { TS_NODE_PRETTY: 'true', TS_NODE_SKIP_IGNORE: 'true' })

@@ -401,2 +479,3 @@ }, function (err, stdout) {

chai_1.expect(options.transpileOnly).to.equal(true);
chai_1.expect(options.require).to.deep.equal([path_1.join(__dirname, '../tests/tsconfig-options/required1.js')]);
return done();

@@ -414,20 +493,55 @@ });

});
it('should give ts error for invalid node_modules', function (done) {
child_process_1.exec(`${cmd} --compiler-host --skip-ignore tests/from-node-modules/from-node-modules`, function (err, stdout) {
if (err === null)
return done('Expected an error');
chai_1.expect(err.message).to.contain('Unable to compile file from external library');
return done();
});
it('should transpile files inside a node_modules directory when not ignored', function (done) {
child_process_1.exec(`${cmdNoProject} --script-mode tests/from-node-modules/from-node-modules`, function (err, stdout, stderr) {
if (err)
return done(`Unexpected error: ${err}\nstdout:\n${stdout}\nstderr:\n${stderr}`);
chai_1.expect(JSON.parse(stdout)).to.deep.equal({
external: {
tsmri: { name: 'typescript-module-required-internally' },
jsmri: { name: 'javascript-module-required-internally' },
tsmii: { name: 'typescript-module-imported-internally' },
jsmii: { name: 'javascript-module-imported-internally' }
},
tsmie: { name: 'typescript-module-imported-externally' },
jsmie: { name: 'javascript-module-imported-externally' },
tsmre: { name: 'typescript-module-required-externally' },
jsmre: { name: 'javascript-module-required-externally' }
});
done();
});
});
describe('should respect maxNodeModulesJsDepth', function () {
it('for unscoped modules', function (done) {
child_process_1.exec(`${cmdNoProject} --script-mode tests/maxnodemodulesjsdepth`, function (err, stdout, stderr) {
chai_1.expect(err).to.not.equal(null);
chai_1.expect(stderr.replace(/\r\n/g, '\n')).to.contain('TSError: ⨯ Unable to compile TypeScript:\n' +
"other.ts(4,7): error TS2322: Type 'string' is not assignable to type 'boolean'.\n" +
'\n');
done();
});
});
it('for @scoped modules', function (done) {
child_process_1.exec(`${cmdNoProject} --script-mode tests/maxnodemodulesjsdepth-scoped`, function (err, stdout, stderr) {
chai_1.expect(err).to.not.equal(null);
chai_1.expect(stderr.replace(/\r\n/g, '\n')).to.contain('TSError: ⨯ Unable to compile TypeScript:\n' +
"other.ts(7,7): error TS2322: Type 'string' is not assignable to type 'boolean'.\n" +
'\n');
done();
});
});
});
});
describe('register', function () {
const registered = index_1.register({
project: PROJECT,
compilerOptions: {
jsx: 'preserve'
}
let registered;
let moduleTestPath;
before(() => {
registered = register({
project: PROJECT,
compilerOptions: {
jsx: 'preserve'
}
});
moduleTestPath = require.resolve('../tests/module');
});
const moduleTestPath = require.resolve('../tests/module');
afterEach(() => {

@@ -460,4 +574,4 @@ // Re-enable project after every test.

const compilers = [
index_1.register({ dir: path_1.join(TEST_DIR, 'scope/a'), scope: true }),
index_1.register({ dir: path_1.join(TEST_DIR, 'scope/b'), scope: true })
register({ dir: path_1.join(TEST_DIR, 'scope/a'), scope: true }),
register({ dir: path_1.join(TEST_DIR, 'scope/b'), scope: true })
];

@@ -513,5 +627,6 @@ compilers.forEach(c => {

describe('JSX preserve', () => {
let old = require.extensions['.tsx']; // tslint:disable-line
let old;
let compiled;
before(function () {
old = require.extensions['.tsx']; // tslint:disable-line
require.extensions['.tsx'] = (m, fileName) => {

@@ -542,12 +657,55 @@ const _compile = m._compile;

describe('create', () => {
let service;
before(() => {
service = create({ compilerOptions: { target: 'es5' }, skipProject: true });
});
it('should create generic compiler instances', () => {
const service = index_1.create({ compilerOptions: { target: 'es5' }, skipProject: true });
const output = service.compile('const x = 10', 'test.ts');
chai_1.expect(output).to.contain('var x = 10;');
});
describe('should get type information', () => {
it('given position of identifier', () => {
chai_1.expect(service.getTypeInfo('/**jsdoc here*/const x = 10', 'test.ts', 21)).to.deep.equal({
comment: 'jsdoc here',
name: 'const x: 10'
});
});
it('given position that does not point to an identifier', () => {
chai_1.expect(service.getTypeInfo('/**jsdoc here*/const x = 10', 'test.ts', 0)).to.deep.equal({
comment: '',
name: ''
});
});
});
});
if (semver.gte(process.version, '13.0.0')) {
describe('esm', () => {
this.slow(1000);
const cmd = `node --loader ../../esm.mjs`;
describe('issue #1098', () => {
function testIgnored(ignored, allowed, disallowed) {
for (const ext of allowed) {
chai_1.expect(ignored(path_1.join(__dirname, `index${ext}`))).equal(false, `should accept ${ext} files`);
}
for (const ext of disallowed) {
chai_1.expect(ignored(path_1.join(__dirname, `index${ext}`))).equal(true, `should ignore ${ext} files`);
}
}
it('correctly filters file extensions from the compiler when allowJs=false and jsx=false', () => {
const { ignored } = create({ compilerOptions: {}, skipProject: true });
testIgnored(ignored, ['.ts', '.d.ts'], ['.js', '.tsx', '.jsx', '.mjs', '.cjs', '.xyz', '']);
});
it('correctly filters file extensions from the compiler when allowJs=true and jsx=false', () => {
const { ignored } = create({ compilerOptions: { allowJs: true }, skipProject: true });
testIgnored(ignored, ['.ts', '.js', '.d.ts'], ['.tsx', '.jsx', '.mjs', '.cjs', '.xyz', '']);
});
it('correctly filters file extensions from the compiler when allowJs=false and jsx=true', () => {
const { ignored } = create({ compilerOptions: { allowJs: false, jsx: 'preserve' }, skipProject: true });
testIgnored(ignored, ['.ts', '.tsx', '.d.ts'], ['.js', '.jsx', '.mjs', '.cjs', '.xyz', '']);
});
it('correctly filters file extensions from the compiler when allowJs=true and jsx=true', () => {
const { ignored } = create({ compilerOptions: { allowJs: true, jsx: 'preserve' }, skipProject: true });
testIgnored(ignored, ['.ts', '.tsx', '.js', '.jsx', '.d.ts'], ['.mjs', '.cjs', '.xyz', '']);
});
});
describe('esm', () => {
this.slow(1000);
const cmd = `node --loader ts-node/esm`;
if (semver.gte(process.version, '13.0.0')) {
it('should compile and execute as ESM', (done) => {

@@ -560,12 +718,79 @@ child_process_1.exec(`${cmd} index.ts`, { cwd: path_1.join(__dirname, '../tests/esm') }, function (err, stdout) {

});
it('supports --experimental-specifier-resolution=node', (done) => {
child_process_1.exec(`${cmd} --experimental-specifier-resolution=node index.ts`, { cwd: path_1.join(__dirname, '../tests/esm-node-resolver') }, function (err, stdout) {
it('should use source maps', function (done) {
child_process_1.exec(`${cmd} throw.ts`, { cwd: path_1.join(__dirname, '../tests/esm') }, function (err, stdout) {
chai_1.expect(err).not.to.equal(null);
chai_1.expect(err.message).to.contain([
`${url_1.pathToFileURL(path_1.join(__dirname, '../tests/esm/throw.ts'))}:100`,
' bar () { throw new Error(\'this is a demo\') }',
' ^',
'Error: this is a demo'
].join('\n'));
return done();
});
});
describe('supports experimental-specifier-resolution=node', () => {
it('via --experimental-specifier-resolution', (done) => {
child_process_1.exec(`${cmd} --experimental-specifier-resolution=node index.ts`, { cwd: path_1.join(__dirname, '../tests/esm-node-resolver') }, function (err, stdout) {
chai_1.expect(err).to.equal(null);
chai_1.expect(stdout).to.equal('foo bar baz biff\n');
return done();
});
});
it('via NODE_OPTIONS', (done) => {
child_process_1.exec(`${cmd} index.ts`, {
cwd: path_1.join(__dirname, '../tests/esm-node-resolver'),
env: Object.assign(Object.assign({}, process.env), { NODE_OPTIONS: '--experimental-specifier-resolution=node' })
}, function (err, stdout) {
chai_1.expect(err).to.equal(null);
chai_1.expect(stdout).to.equal('foo bar baz biff\n');
return done();
});
});
});
it('throws ERR_REQUIRE_ESM when attempting to require() an ESM script while ESM loader is enabled', function (done) {
child_process_1.exec(`${cmd} ./index.js`, { cwd: path_1.join(__dirname, '../tests/esm-err-require-esm') }, function (err, stdout, stderr) {
chai_1.expect(err).to.not.equal(null);
chai_1.expect(stderr).to.contain('Error [ERR_REQUIRE_ESM]: Must use import to load ES Module:');
return done();
});
});
it('defers to fallback loaders when URL should not be handled by ts-node', function (done) {
child_process_1.exec(`${cmd} index.mjs`, {
cwd: path_1.join(__dirname, '../tests/esm-import-http-url')
}, function (err, stdout, stderr) {
chai_1.expect(err).to.not.equal(null);
// expect error from node's default resolver
chai_1.expect(stderr).to.match(/Error \[ERR_UNSUPPORTED_ESM_URL_SCHEME\]:.*\n *at defaultResolve/);
return done();
});
});
it('should support transpile only mode via dedicated loader entrypoint', (done) => {
child_process_1.exec(`${cmd}/transpile-only index.ts`, { cwd: path_1.join(__dirname, '../tests/esm-transpile-only') }, function (err, stdout) {
chai_1.expect(err).to.equal(null);
chai_1.expect(stdout).to.equal('foo bar baz biff\n');
chai_1.expect(stdout).to.equal('');
return done();
});
});
it('should throw type errors without transpile-only enabled', (done) => {
child_process_1.exec(`${cmd} index.ts`, { cwd: path_1.join(__dirname, '../tests/esm-transpile-only') }, function (err, stdout) {
if (err === null) {
return done('Command was expected to fail, but it succeeded.');
}
chai_1.expect(err.message).to.contain('Unable to compile TypeScript');
chai_1.expect(err.message).to.match(new RegExp('TS2345: Argument of type \'(?:number|1101)\' is not assignable to parameter of type \'string\'\\.'));
chai_1.expect(err.message).to.match(new RegExp('TS2322: Type \'(?:"hello world"|string)\' is not assignable to type \'number\'\\.'));
chai_1.expect(stdout).to.equal('');
return done();
});
});
}
it('executes ESM as CJS, ignoring package.json "types" field (for backwards compatibility; should be changed in next major release to throw ERR_REQUIRE_ESM)', function (done) {
child_process_1.exec(`${BIN_PATH} ./tests/esm-err-require-esm/index.js`, function (err, stdout) {
chai_1.expect(err).to.equal(null);
chai_1.expect(stdout).to.equal('CommonJS\n');
return done();
});
});
}
});
});
//# sourceMappingURL=index.spec.js.map
{
"name": "ts-node",
"version": "8.10.2",
"version": "9.0.0",
"description": "TypeScript execution environment and REPL for node.js, with source map support",
"main": "dist/index.js",
"exports": {
".": "./dist/index.js",
"./package": "./package.json",
"./package.json": "./package.json",
"./dist/bin": "./dist/bin.js",
"./dist/bin.js": "./dist/bin.js",
"./dist/bin-transpile": "./dist/bin-transpile.js",
"./dist/bin-transpile.js": "./dist/bin-transpile.js",
"./dist/bin-script": "./dist/bin-script.js",
"./dist/bin-script.js": "./dist/bin-script.js",
"./register": "./register/index.js",
"./register/files": "./register/files.js",
"./register/transpile-only": "./register/transpile-only.js",
"./register/type-check": "./register/type-check.js",
"./esm": "./esm.mjs",
"./esm.mjs": "./esm.mjs",
"./esm/transpile-only": "./esm/transpile-only.mjs",
"./esm/transpile-only.mjs": "./esm/transpile-only.mjs"
},
"types": "dist/index.d.ts",

@@ -17,2 +36,3 @@ "bin": {

"register/",
"esm/",
"esm.mjs",

@@ -33,8 +53,10 @@ "LICENSE",

"test-spec": "mocha dist/**/*.spec.js -R spec --bail",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- \"dist/**/*.spec.js\" -R spec --bail",
"test-cov": "nyc mocha -- \"dist/**/*.spec.js\" -R spec --bail",
"test": "npm run build && npm run lint && npm run test-cov",
"coverage-fix-paths": "node ./scripts/rewrite-coverage-paths.js",
"coverage-report": "nyc report --reporter=lcov",
"prepare": "npm run build-nopack"
},
"engines": {
"node": ">=6.0.0"
"node": ">=10.0.0"
},

@@ -66,2 +88,3 @@ "repository": {

"@types/diff": "^4.0.2",
"@types/lodash": "^4.14.151",
"@types/mocha": "^5.2.7",

@@ -71,2 +94,3 @@ "@types/node": "13.13.5",

"@types/react": "^16.0.2",
"@types/rimraf": "^3.0.0",
"@types/semver": "^7.1.0",

@@ -76,5 +100,6 @@ "@types/source-map-support": "^0.5.0",

"chai": "^4.0.1",
"istanbul": "^0.4.0",
"lodash": "^4.17.15",
"mocha": "^6.2.2",
"ntypescript": "^1.201507091536.1",
"nyc": "^15.0.1",
"proxyquire": "^2.0.0",

@@ -86,3 +111,3 @@ "react": "^16.0.0",

"tslint-config-standard": "^9.0.0",
"typescript": "3.8.3",
"typescript": "4.0.2",
"typescript-json-schema": "^0.42.0",

@@ -89,0 +114,0 @@ "util.promisify": "^1.0.1"

@@ -5,4 +5,4 @@ # ![TypeScript Node](logo.svg?sanitize=true)

[![NPM downloads][downloads-image]][downloads-url]
[![Build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![Build status][github-actions-image]][github-actions-url]
[![Test coverage][codecov-image]][codecov-url]

@@ -228,4 +228,8 @@ > TypeScript execution and REPL for node.js, with source map support. **Works with `typescript@>=2.7`**.

Current node.js stable releases do not support ES modules. Additionally, `ts-node` does not have the required hooks into node.js to support ES modules. You will need to set `"module": "commonjs"` in your `tsconfig.json` for your code to work.
There are two options when using `import` statements: compile them to CommonJS or use node's native ESM support.
To compile to CommonJS, you must set `"module": "CommonJS"` in your `tsconfig.json` or compiler options.
Node's native ESM support is currently experimental and so is `ts-node`'s ESM loader hook. For usage, limitations, and to provide feedback, see [#1007](https://github.com/TypeStrong/ts-node/issues/1007).
## Help! My Types Are Missing!

@@ -301,5 +305,5 @@

[downloads-url]: https://npmjs.org/package/ts-node
[travis-image]: https://img.shields.io/travis/TypeStrong/ts-node.svg?style=flat
[travis-url]: https://travis-ci.org/TypeStrong/ts-node
[coveralls-image]: https://img.shields.io/coveralls/TypeStrong/ts-node.svg?style=flat
[coveralls-url]: https://coveralls.io/r/TypeStrong/ts-node?branch=master
[github-actions-image]: https://img.shields.io/github/workflow/status/TypeStrong/ts-node/Continuous%20Integration
[github-actions-url]: https://github.com/TypeStrong/ts-node/actions?query=workflow%3A%22Continuous+Integration%22
[codecov-image]: https://codecov.io/gh/TypeStrong/ts-node/branch/master/graph/badge.svg
[codecov-url]: https://codecov.io/gh/TypeStrong/ts-node

@@ -35,2 +35,6 @@ {

},
"experimentalEsmLoader": {
"description": "True if require() hooks should interop with experimental ESM loader.\nEnabled explicitly via a flag since it is a breaking change.",
"type": "boolean"
},
"files": {

@@ -74,2 +78,9 @@ "default": false,

},
"require": {
"description": "Modules to require, like node's `--require` flag.\n\nIf specified in tsconfig.json, the modules will be resolved relative to the tsconfig.json file.\n\nIf specified programmatically, each input string should be pre-resolved to an absolute path for\nbest results.",
"items": {
"type": "string"
},
"type": "array"
},
"scope": {

@@ -76,0 +87,0 @@ "default": false,

@@ -427,3 +427,2 @@ {

"ES6",
"ES7",
"ES2015",

@@ -448,2 +447,3 @@ "ES2015.Collection",

"ES2018",
"ES2018.AsyncGenerator",
"ES2018.AsyncIterable",

@@ -468,2 +468,4 @@ "ES2018.Intl",

"ESNext.Intl",
"ESNext.Promise",
"ESNext.String",
"ESNext.Symbol",

@@ -541,2 +543,7 @@ "DOM",

},
"jsxFragmentFactory": {
"description": "Specify the JSX Fragment reference to use for fragements when targeting react JSX emit, e.g. 'React.Fragment' or 'Fragment'. Requires TypeScript version 4.0 or later.",
"type": "string",
"default": "React.Fragment"
},
"alwaysStrict": {

@@ -597,2 +604,18 @@ "description": "Parse in strict mode and emit 'use strict' for each source file. Requires TypeScript version 2.1 or later.",

"type": "boolean"
},
"extendedDiagnostics": {
"description": "Show verbose diagnostic information.",
"type": "boolean"
},
"listFilesOnly": {
"description": "Print names of files that are part of the compilation and then stop processing.",
"type": "boolean"
},
"disableSourceOfProjectReferenceRedirect": {
"description": "Disable use of source files instead of declaration files from referenced projects.",
"type": "boolean"
},
"disableSolutionSearching": {
"description": "Disable solution searching for this project.",
"type": "boolean"
}

@@ -681,2 +704,6 @@ }

},
"experimentalEsmLoader": {
"description": "True if require() hooks should interop with experimental ESM loader.\nEnabled explicitly via a flag since it is a breaking change.",
"type": "boolean"
},
"files": {

@@ -720,2 +747,9 @@ "default": false,

},
"require": {
"description": "Modules to require, like node's `--require` flag.\n\nIf specified in tsconfig.json, the modules will be resolved relative to the tsconfig.json file.\n\nIf specified programmatically, each input string should be pre-resolved to an absolute path for\nbest results.",
"items": {
"type": "string"
},
"type": "array"
},
"scope": {

@@ -722,0 +756,0 @@ "default": false,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc