@preconstruct/cli
Advanced tools
Comparing version 0.0.0-test-20240115012511 to 0.0.0-test-20240708054446
{ | ||
"name": "@preconstruct/cli", | ||
"version": "0.0.0-test-20240115012511", | ||
"version": "0.0.0-test-20240708054446", | ||
"description": "Dev and build your code painlessly in monorepos", | ||
@@ -5,0 +5,0 @@ "exports": { |
@@ -8,3 +8,2 @@ 'use strict'; | ||
// @ts-ignore | ||
function importHelperPlugin(babel) { | ||
@@ -20,11 +19,8 @@ return { | ||
} | ||
if (!file.availableHelper(name)) { | ||
return null; | ||
} | ||
if (cachedHelpers[name]) { | ||
return babel.types.identifier(cachedHelpers[name].name); | ||
} | ||
return cachedHelpers[name] = helperModuleImports.addDefault(file.path, `\0rollupPluginBabelHelpers/${name}`, { | ||
@@ -35,9 +31,6 @@ nameHint: name | ||
} | ||
}; | ||
} | ||
async function transformBabel(code, cwd, filename) { | ||
const babel = _lazyRequireBabelCore(); | ||
return babel.transformAsync(code, { | ||
@@ -64,24 +57,17 @@ caller: { | ||
} = _lazyRequireTerser(); | ||
const options = JSON.parse(optionsString); | ||
return minify(code, options); | ||
} | ||
function _lazyRequireBabelCore() { | ||
var mod = require("@babel/core"); | ||
_lazyRequireBabelCore = function () { | ||
return mod; | ||
}; | ||
return mod; | ||
} | ||
function _lazyRequireTerser() { | ||
var mod = require("terser"); | ||
_lazyRequireTerser = function () { | ||
return mod; | ||
}; | ||
return mod; | ||
@@ -88,0 +74,0 @@ } |
import { addDefault } from '@babel/helper-module-imports'; | ||
// @ts-ignore | ||
function importHelperPlugin(babel) { | ||
@@ -15,11 +14,8 @@ return { | ||
} | ||
if (!file.availableHelper(name)) { | ||
return null; | ||
} | ||
if (cachedHelpers[name]) { | ||
return babel.types.identifier(cachedHelpers[name].name); | ||
} | ||
return cachedHelpers[name] = addDefault(file.path, `\0rollupPluginBabelHelpers/${name}`, { | ||
@@ -30,9 +26,6 @@ nameHint: name | ||
} | ||
}; | ||
} | ||
async function transformBabel(code, cwd, filename) { | ||
const babel = _lazyRequireBabelCore(); | ||
return babel.transformAsync(code, { | ||
@@ -59,24 +52,17 @@ caller: { | ||
} = _lazyRequireTerser(); | ||
const options = JSON.parse(optionsString); | ||
return minify(code, options); | ||
} | ||
function _lazyRequireBabelCore() { | ||
var mod = require("@babel/core"); | ||
_lazyRequireBabelCore = function () { | ||
return mod; | ||
}; | ||
return mod; | ||
} | ||
function _lazyRequireTerser() { | ||
var mod = require("terser"); | ||
_lazyRequireTerser = function () { | ||
return mod; | ||
}; | ||
return mod; | ||
@@ -83,0 +69,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
280578
6418
15