Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ts-patch

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-patch - npm Package Compare versions

Comparing version 1.3.2 to 1.3.3

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [1.3.3](https://github.com/nonara/ts-patch/compare/v1.3.2...v1.3.3) (2021-04-23)
### Bug Fixes
* **patch:** Patched emit does not pass all arguments (fixes [#36](https://github.com/nonara/ts-patch/issues/36)) ([9b130bc](https://github.com/nonara/ts-patch/commit/9b130bc8fd1a5bf3e7b33f796990ed7383aa5449))
### [1.3.2](https://github.com/nonara/ts-patch/compare/v1.3.1...v1.3.2) (2021-01-31)

@@ -7,0 +14,0 @@

2

lib/file-utils.d.ts

@@ -9,3 +9,3 @@ /**

export declare const getModuleAbsolutePath: (filename: string, libDir: string) => string;
export declare const mkdirIfNotExist: (dir: string) => string | false;
export declare const mkdirIfNotExist: (dir: string) => string | false | undefined;
export interface TSPackage {

@@ -12,0 +12,0 @@ version: string;

@@ -13,2 +13,4 @@ "use strict";

return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);

@@ -15,0 +17,0 @@ function __() { this.constructor = d; }

@@ -13,8 +13,6 @@ "use strict";

};
var __spreadArrays = (this && this.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};

@@ -53,3 +51,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

options.basedir = file_utils_1.getGlobalTSDir();
Object.assign(exports.appOptions, helpers_1.pick.apply(void 0, __spreadArrays([options], helpers_1.getKeys(exports.defaultOptions))));
Object.assign(exports.appOptions, helpers_1.pick.apply(void 0, __spreadArray([options], helpers_1.getKeys(exports.defaultOptions))));
exports.appOptions.logLevel =

@@ -56,0 +54,0 @@ (exports.appOptions.silent) ? logger_1.Log.system :

{
"name": "ts-patch",
"version": "1.3.2",
"version": "1.3.3",
"description": "Patch typescript to support custom transformers in tsconfig.json",

@@ -5,0 +5,0 @@ "main": "./index.js",

declare namespace ts {
const diagnosticMap: WeakMap<Program, Diagnostic[]>;
const diagnosticMap$1: WeakMap<ts.Program, ts.Diagnostic[]>;

@@ -112,3 +112,3 @@ interface PluginConfig {

const originalCreateProgram: typeof createProgram;
const diagnosticMap$1: typeof diagnosticMap;
const diagnosticMap: typeof diagnosticMap$1;

@@ -115,0 +115,0 @@

@@ -71,6 +71,6 @@ (function () {

function __spread() {
for (var ar = [], i = 0; i < arguments.length; i++)
ar = ar.concat(__read(arguments[i]));
return ar;
function __spreadArray(to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
}

@@ -94,14 +94,14 @@

var fs = require('fs');
var fs$1 = require('fs');
var _rollupPluginShim1 = /*#__PURE__*/Object.freeze({
__proto__: null,
'default': fs
'default': fs$1
});
var path = require('path');
var path$1 = require('path');
var _rollupPluginShim2 = /*#__PURE__*/Object.freeze({
__proto__: null,
'default': path
'default': path$1
});

@@ -220,8 +220,8 @@

});
var pathParse_1 = pathParse.posix;
var pathParse_2 = pathParse.win32;
pathParse.posix;
pathParse.win32;
var path$1 = getCjsExportFromNamespace(_rollupPluginShim2);
var path = getCjsExportFromNamespace(_rollupPluginShim2);
var parse = path$1.parse || pathParse;
var parse = path.parse || pathParse;

@@ -245,3 +245,3 @@ var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) {

return dirs.concat(modules.map(function (moduleDir) {
return path$1.resolve(prefix, aPath, moduleDir);
return path.resolve(prefix, aPath, moduleDir);
}));

@@ -335,3 +335,3 @@ }, []);

var core = {
var core$3 = {
assert: true,

@@ -379,2 +379,4 @@ "assert/strict": ">= 15",

path: true,
"path/posix": ">= 15.3",
"path/win32": ">= 15.3",
perf_hooks: ">= 8.5",

@@ -410,2 +412,3 @@ process: ">= 1",

util: true,
"util/types": ">= 15.3",
"v8/tools/arguments": ">= 10 && < 12",

@@ -443,10 +446,10 @@ "v8/tools/codemap": [

var core$1 = /*#__PURE__*/Object.freeze({
var core$4 = /*#__PURE__*/Object.freeze({
__proto__: null,
'default': core
'default': core$3
});
var data = getCjsExportFromNamespace(core$1);
var data$1 = getCjsExportFromNamespace(core$4);
function specifierIncluded(current, specifier) {
function specifierIncluded$1(current, specifier) {
var nodeParts = current.split('.');

@@ -474,3 +477,3 @@ var parts = specifier.split(' ');

function matchesRange(current, range) {
function matchesRange$1(current, range) {
var specifiers = range.split(/ ?&& ?/);

@@ -481,3 +484,3 @@ if (specifiers.length === 0) {

for (var i = 0; i < specifiers.length; ++i) {
if (!specifierIncluded(current, specifiers[i])) {
if (!specifierIncluded$1(current, specifiers[i])) {
return false;

@@ -489,3 +492,3 @@ }

function versionIncluded(nodeVersion, specifierValue) {
function versionIncluded$1(nodeVersion, specifierValue) {
if (typeof specifierValue === 'boolean') {

@@ -505,3 +508,3 @@ return specifierValue;

for (var i = 0; i < specifierValue.length; ++i) {
if (matchesRange(current, specifierValue[i])) {
if (matchesRange$1(current, specifierValue[i])) {
return true;

@@ -512,3 +515,3 @@ }

}
return matchesRange(current, specifierValue);
return matchesRange$1(current, specifierValue);
}

@@ -519,11 +522,11 @@

var isCoreModule = function isCore(x, nodeVersion) {
return src(data, x) && versionIncluded(nodeVersion, data[x]);
return src(data$1, x) && versionIncluded$1(nodeVersion, data$1[x]);
};
var fs$1 = getCjsExportFromNamespace(_rollupPluginShim1);
var fs = getCjsExportFromNamespace(_rollupPluginShim1);
var realpathFS = fs$1.realpath && typeof fs$1.realpath.native === 'function' ? fs$1.realpath.native : fs$1.realpath;
var realpathFS$1 = fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath;
var defaultIsFile = function isFile(file, cb) {
fs$1.stat(file, function (err, stat) {
var defaultIsFile$1 = function isFile(file, cb) {
fs.stat(file, function (err, stat) {
if (!err) {

@@ -537,4 +540,4 @@ return cb(null, stat.isFile() || stat.isFIFO());

var defaultIsDir = function isDirectory(dir, cb) {
fs$1.stat(dir, function (err, stat) {
var defaultIsDir$1 = function isDirectory(dir, cb) {
fs.stat(dir, function (err, stat) {
if (!err) {

@@ -549,3 +552,3 @@ return cb(null, stat.isDirectory());

var defaultRealpath = function realpath(x, cb) {
realpathFS(x, function (realpathErr, realPath) {
realpathFS$1(x, function (realpathErr, realPath) {
if (realpathErr && realpathErr.code !== 'ENOENT') cb(realpathErr);

@@ -564,6 +567,20 @@ else cb(null, realpathErr ? x : realPath);

var getPackageCandidates = function getPackageCandidates(x, start, opts) {
var defaultReadPackage = function defaultReadPackage(readFile, pkgfile, cb) {
readFile(pkgfile, function (readFileErr, body) {
if (readFileErr) cb(readFileErr);
else {
try {
var pkg = JSON.parse(body);
cb(null, pkg);
} catch (jsonErr) {
cb(null);
}
}
});
};
var getPackageCandidates$1 = function getPackageCandidates(x, start, opts) {
var dirs = nodeModulesPaths(start, opts, x);
for (var i = 0; i < dirs.length; i++) {
dirs[i] = path$1.join(dirs[i], x);
dirs[i] = path.join(dirs[i], x);
}

@@ -589,6 +606,13 @@ return dirs;

var isFile = opts.isFile || defaultIsFile;
var isDirectory = opts.isDirectory || defaultIsDir;
var readFile = opts.readFile || fs$1.readFile;
var isFile = opts.isFile || defaultIsFile$1;
var isDirectory = opts.isDirectory || defaultIsDir$1;
var readFile = opts.readFile || fs.readFile;
var realpath = opts.realpath || defaultRealpath;
var readPackage = opts.readPackage || defaultReadPackage;
if (opts.readFile && opts.readPackage) {
var conflictErr = new TypeError('`readFile` and `readPackage` are mutually exclusive.');
return process.nextTick(function () {
cb(conflictErr);
});
}
var packageIterator = opts.packageIterator;

@@ -598,3 +622,3 @@

var includeCoreModules = opts.includeCoreModules !== false;
var basedir = opts.basedir || path$1.dirname(caller());
var basedir = opts.basedir || path.dirname(caller());
var parent = opts.filename || basedir;

@@ -605,3 +629,3 @@

// ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
var absoluteStart = path$1.resolve(basedir);
var absoluteStart = path.resolve(basedir);

@@ -621,3 +645,3 @@ maybeRealpath(

if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) {
res = path$1.resolve(basedir, x);
res = path.resolve(basedir, x);
if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';

@@ -685,3 +709,3 @@ if ((/\/$/).test(x) && res === basedir) {

if (pkg) onpkg(null, pkg);
else loadpkg(path$1.dirname(file), onpkg);
else loadpkg(path.dirname(file), onpkg);

@@ -692,3 +716,3 @@ function onpkg(err, pkg_, dir) {

if (dir && pkg && opts.pathFilter) {
var rfile = path$1.relative(dir, file);
var rfile = path.relative(dir, file);
var rel = rfile.slice(0, rfile.length - exts[0].length);

@@ -698,3 +722,3 @@ var r = opts.pathFilter(pkg, x, rel);

[''].concat(extensions.slice()),
path$1.resolve(dir, r),
path.resolve(dir, r),
pkg

@@ -721,12 +745,13 @@ );

maybeRealpath(realpath, dir, opts, function (unwrapErr, pkgdir) {
if (unwrapErr) return loadpkg(path$1.dirname(dir), cb);
var pkgfile = path$1.join(pkgdir, 'package.json');
if (unwrapErr) return loadpkg(path.dirname(dir), cb);
var pkgfile = path.join(pkgdir, 'package.json');
isFile(pkgfile, function (err, ex) {
// on err, ex is false
if (!ex) return loadpkg(path$1.dirname(dir), cb);
if (!ex) return loadpkg(path.dirname(dir), cb);
readFile(pkgfile, function (err, body) {
readPackage(readFile, pkgfile, function (err, pkgParam) {
if (err) cb(err);
try { var pkg = JSON.parse(body); } catch (jsonErr) {}
var pkg = pkgParam;
if (pkg && opts.packageFilter) {

@@ -751,13 +776,12 @@ pkg = opts.packageFilter(pkg, pkgfile);

if (unwrapErr) return cb(unwrapErr);
var pkgfile = path$1.join(pkgdir, 'package.json');
var pkgfile = path.join(pkgdir, 'package.json');
isFile(pkgfile, function (err, ex) {
if (err) return cb(err);
if (!ex) return loadAsFile(path$1.join(x, 'index'), fpkg, cb);
if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb);
readFile(pkgfile, function (err, body) {
readPackage(readFile, pkgfile, function (err, pkgParam) {
if (err) return cb(err);
try {
var pkg = JSON.parse(body);
} catch (jsonErr) {}
var pkg = pkgParam;
if (pkg && opts.packageFilter) {

@@ -776,12 +800,12 @@ pkg = opts.packageFilter(pkg, pkgfile);

}
loadAsFile(path$1.resolve(x, pkg.main), pkg, function (err, m, pkg) {
loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) {
if (err) return cb(err);
if (m) return cb(null, m, pkg);
if (!pkg) return loadAsFile(path$1.join(x, 'index'), pkg, cb);
if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb);
var dir = path$1.resolve(x, pkg.main);
var dir = path.resolve(x, pkg.main);
loadAsDirectory(dir, pkg, function (err, n, pkg) {
if (err) return cb(err);
if (n) return cb(null, n, pkg);
loadAsFile(path$1.join(x, 'index'), pkg, cb);
loadAsFile(path.join(x, 'index'), pkg, cb);
});

@@ -792,3 +816,3 @@ });

loadAsFile(path$1.join(x, '/index'), pkg, cb);
loadAsFile(path.join(x, '/index'), pkg, cb);
});

@@ -803,3 +827,3 @@ });

isDirectory(path$1.dirname(dir), isdir);
isDirectory(path.dirname(dir), isdir);

@@ -825,3 +849,3 @@ function isdir(err, isdir) {

function loadNodeModules(x, start, cb) {
var thunk = function () { return getPackageCandidates(x, start, opts); };
var thunk = function () { return getPackageCandidates$1(x, start, opts); };
processDirs(

@@ -834,3 +858,3 @@ cb,

var core$2 = {
var core$1 = {
assert: true,

@@ -878,2 +902,4 @@ "assert/strict": ">= 15",

path: true,
"path/posix": ">= 15.3",
"path/win32": ">= 15.3",
perf_hooks: ">= 8.5",

@@ -909,2 +935,3 @@ process: ">= 1",

util: true,
"util/types": ">= 15.3",
"v8/tools/arguments": ">= 10 && < 12",

@@ -942,12 +969,12 @@ "v8/tools/codemap": [

var core$3 = /*#__PURE__*/Object.freeze({
var core$2 = /*#__PURE__*/Object.freeze({
__proto__: null,
'default': core$2
'default': core$1
});
var data$1 = getCjsExportFromNamespace(core$3);
var data = getCjsExportFromNamespace(core$2);
var current = (process.versions && process.versions.node && process.versions.node.split('.')) || [];
function specifierIncluded$1(specifier) {
function specifierIncluded(specifier) {
var parts = specifier.split(' ');

@@ -974,7 +1001,7 @@ var op = parts.length > 1 ? parts[0] : '=';

function matchesRange$1(range) {
function matchesRange(range) {
var specifiers = range.split(/ ?&& ?/);
if (specifiers.length === 0) { return false; }
for (var i = 0; i < specifiers.length; ++i) {
if (!specifierIncluded$1(specifiers[i])) { return false; }
if (!specifierIncluded(specifiers[i])) { return false; }
}

@@ -984,11 +1011,11 @@ return true;

function versionIncluded$1(specifierValue) {
function versionIncluded(specifierValue) {
if (typeof specifierValue === 'boolean') { return specifierValue; }
if (specifierValue && typeof specifierValue === 'object') {
for (var i = 0; i < specifierValue.length; ++i) {
if (matchesRange$1(specifierValue[i])) { return true; }
if (matchesRange(specifierValue[i])) { return true; }
}
return false;
}
return matchesRange$1(specifierValue);
return matchesRange(specifierValue);
}

@@ -998,9 +1025,9 @@

var core$4 = {};
for (var mod in data$1) { // eslint-disable-line no-restricted-syntax
if (Object.prototype.hasOwnProperty.call(data$1, mod)) {
core$4[mod] = versionIncluded$1(data$1[mod]);
var core = {};
for (var mod in data) { // eslint-disable-line no-restricted-syntax
if (Object.prototype.hasOwnProperty.call(data, mod)) {
core[mod] = versionIncluded(data[mod]);
}
}
var core_1 = core$4;
var core_1 = core;

@@ -1011,7 +1038,7 @@ var isCore = function isCore(x) {

var realpathFS$1 = fs$1.realpathSync && typeof fs$1.realpathSync.native === 'function' ? fs$1.realpathSync.native : fs$1.realpathSync;
var realpathFS = fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync;
var defaultIsFile$1 = function isFile(file) {
var defaultIsFile = function isFile(file) {
try {
var stat = fs$1.statSync(file);
var stat = fs.statSync(file);
} catch (e) {

@@ -1024,5 +1051,5 @@ if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;

var defaultIsDir$1 = function isDirectory(dir) {
var defaultIsDir = function isDirectory(dir) {
try {
var stat = fs$1.statSync(dir);
var stat = fs.statSync(dir);
} catch (e) {

@@ -1037,3 +1064,3 @@ if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;

try {
return realpathFS$1(x);
return realpathFS(x);
} catch (realpathErr) {

@@ -1054,6 +1081,14 @@ if (realpathErr.code !== 'ENOENT') {

var getPackageCandidates$1 = function getPackageCandidates(x, start, opts) {
var defaultReadPackageSync = function defaultReadPackageSync(readFileSync, pkgfile) {
var body = readFileSync(pkgfile);
try {
var pkg = JSON.parse(body);
return pkg;
} catch (jsonErr) {}
};
var getPackageCandidates = function getPackageCandidates(x, start, opts) {
var dirs = nodeModulesPaths(start, opts, x);
for (var i = 0; i < dirs.length; i++) {
dirs[i] = path$1.join(dirs[i], x);
dirs[i] = path.join(dirs[i], x);
}

@@ -1069,6 +1104,10 @@ return dirs;

var isFile = opts.isFile || defaultIsFile$1;
var readFileSync = opts.readFileSync || fs$1.readFileSync;
var isDirectory = opts.isDirectory || defaultIsDir$1;
var isFile = opts.isFile || defaultIsFile;
var readFileSync = opts.readFileSync || fs.readFileSync;
var isDirectory = opts.isDirectory || defaultIsDir;
var realpathSync = opts.realpathSync || defaultRealpathSync;
var readPackageSync = opts.readPackageSync || defaultReadPackageSync;
if (opts.readFileSync && opts.readPackageSync) {
throw new TypeError('`readFileSync` and `readPackageSync` are mutually exclusive.');
}
var packageIterator = opts.packageIterator;

@@ -1078,3 +1117,3 @@

var includeCoreModules = opts.includeCoreModules !== false;
var basedir = opts.basedir || path$1.dirname(caller());
var basedir = opts.basedir || path.dirname(caller());
var parent = opts.filename || basedir;

@@ -1085,6 +1124,6 @@

// ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
var absoluteStart = maybeRealpathSync(realpathSync, path$1.resolve(basedir), opts);
var absoluteStart = maybeRealpathSync(realpathSync, path.resolve(basedir), opts);
if ((/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/).test(x)) {
var res = path$1.resolve(absoluteStart, x);
var res = path.resolve(absoluteStart, x);
if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';

@@ -1105,9 +1144,9 @@ var m = loadAsFileSync(res) || loadAsDirectorySync(res);

function loadAsFileSync(x) {
var pkg = loadpkg(path$1.dirname(x));
var pkg = loadpkg(path.dirname(x));
if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {
var rfile = path$1.relative(pkg.dir, x);
var rfile = path.relative(pkg.dir, x);
var r = opts.pathFilter(pkg.pkg, x, rfile);
if (r) {
x = path$1.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign
x = path.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign
}

@@ -1135,14 +1174,10 @@ }

var pkgfile = path$1.join(maybeRealpathSync(realpathSync, dir, opts), 'package.json');
var pkgfile = path.join(maybeRealpathSync(realpathSync, dir, opts), 'package.json');
if (!isFile(pkgfile)) {
return loadpkg(path$1.dirname(dir));
return loadpkg(path.dirname(dir));
}
var body = readFileSync(pkgfile);
var pkg = readPackageSync(readFileSync, pkgfile);
try {
var pkg = JSON.parse(body);
} catch (jsonErr) {}
if (pkg && opts.packageFilter) {

@@ -1157,7 +1192,6 @@ // v2 will pass pkgfile

function loadAsDirectorySync(x) {
var pkgfile = path$1.join(maybeRealpathSync(realpathSync, x, opts), '/package.json');
var pkgfile = path.join(maybeRealpathSync(realpathSync, x, opts), '/package.json');
if (isFile(pkgfile)) {
try {
var body = readFileSync(pkgfile, 'UTF8');
var pkg = JSON.parse(body);
var pkg = readPackageSync(readFileSync, pkgfile);
} catch (e) {}

@@ -1180,5 +1214,5 @@

try {
var m = loadAsFileSync(path$1.resolve(x, pkg.main));
var m = loadAsFileSync(path.resolve(x, pkg.main));
if (m) return m;
var n = loadAsDirectorySync(path$1.resolve(x, pkg.main));
var n = loadAsDirectorySync(path.resolve(x, pkg.main));
if (n) return n;

@@ -1189,7 +1223,7 @@ } catch (e) {}

return loadAsFileSync(path$1.join(x, '/index'));
return loadAsFileSync(path.join(x, '/index'));
}
function loadNodeModulesSync(x, start) {
var thunk = function () { return getPackageCandidates$1(x, start, opts); };
var thunk = function () { return getPackageCandidates(x, start, opts); };
var dirs = packageIterator ? packageIterator(x, start, thunk, opts) : thunk();

@@ -1199,3 +1233,3 @@

var dir = dirs[i];
if (isDirectory(path$1.dirname(dir))) {
if (isDirectory(path.dirname(dir))) {
var m = loadAsFileSync(dir);

@@ -1261,7 +1295,7 @@ if (m) return m;

if (source.before)
(_a = into.before).push.apply(_a, __spread(slice(source.before)));
(_a = into.before).push.apply(_a, __spreadArray([], __read(slice(source.before))));
if (source.after)
(_b = into.after).push.apply(_b, __spread(slice(source.after)));
(_b = into.after).push.apply(_b, __spreadArray([], __read(slice(source.after))));
if (source.afterDeclarations)
(_c = into.afterDeclarations).push.apply(_c, __spread(slice(source.afterDeclarations)));
(_c = into.afterDeclarations).push.apply(_c, __spreadArray([], __read(slice(source.afterDeclarations))));
return this;

@@ -1334,3 +1368,3 @@ };

if (tsConfig)
tsConfig = path.resolve(this.resolveBaseDir, tsConfig);
tsConfig = path$1.resolve(this.resolveBaseDir, tsConfig);
this.currentProject = tsConfig;

@@ -1341,3 +1375,3 @@ if (!tsNodeIncluded) {

try {
tsConfigData = tsConfig && JSON.parse(fs.readFileSync(tsConfig, 'utf8'));
tsConfigData = tsConfig && JSON.parse(fs$1.readFileSync(tsConfig, 'utf8'));
}

@@ -1412,3 +1446,3 @@ catch (_b) { }

var factory = _a.factory, config = _a.config, program = _a.program, ls = _a.ls;
var transform = config.transform, after = config.after, afterDeclarations = config.afterDeclarations, name = config.name, type = config.type, transformProgram = config.transformProgram, cleanConfig = __rest(config, ["transform", "after", "afterDeclarations", "name", "type", "transformProgram"]);
var transform = config.transform, after = config.after, afterDeclarations = config.afterDeclarations; config.name; config.type; config.transformProgram; var cleanConfig = __rest(config, ["transform", "after", "afterDeclarations", "name", "type", "transformProgram"]);
if (!transform)

@@ -1497,3 +1531,3 @@ throw new Error('Not a valid config entry: "transform" key not found');

var _a = plugins[0].customTransformers, _b = _a.before, before = _b === void 0 ? [] : _b, _c = _a.after, after = _c === void 0 ? [] : _c;
return __spread(before.map(function (item) { return ({ transform: item }); }), after.map(function (item) { return ({ transform: item, after: true }); }));
return __spreadArray(__spreadArray([], __read(before.map(function (item) { return ({ transform: item }); }))), __read(after.map(function (item) { return ({ transform: item, after: true }); })));
}

@@ -1581,6 +1615,14 @@ return plugins;

var e_3, _a;
var additionalArgs = [];
for (var _i = 5; _i < arguments.length; _i++) {
additionalArgs[_i - 5] = arguments[_i];
}
/* Merge in our transformers */
var transformers = pluginCreator.createTransformers({ program: program }, customTransformers);
/* Invoke TS emit */
var result = program.originalEmit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, transformers);
var result = program.originalEmit.apply(program, __spreadArray([targetSourceFile,
writeFile,
cancellationToken,
emitOnlyDtsFiles,
transformers], __read(additionalArgs)));
try {

@@ -1587,0 +1629,0 @@ /* Merge in transformer diagnostics */

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