Comparing version 8.2.4 to 8.3.0
#!/usr/bin/env node | ||
"use strict"; | ||
var _chunkCDF4QN4Bjs = require('./chunk-CDF4QN4B.js'); | ||
require('./chunk-RQAMCB7Y.js'); | ||
var _chunkJNR3R42Tjs = require('./chunk-JNR3R42T.js'); | ||
require('./chunk-PEPKMCEI.js'); | ||
var _chunkLDLF4CLAjs = require('./chunk-LDLF4CLA.js'); | ||
require('./chunk-2UJCKEAF.js'); | ||
require('./chunk-G22UJFQC.js'); | ||
// src/cli-default.ts | ||
_chunkCDF4QN4Bjs.main.call(void 0, ).catch(_chunkLDLF4CLAjs.handleError); | ||
_chunkJNR3R42Tjs.main.call(void 0, ).catch(_chunkLDLF4CLAjs.handleError); |
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); | ||
var _chunkCDF4QN4Bjs = require('./chunk-CDF4QN4B.js'); | ||
require('./chunk-RQAMCB7Y.js'); | ||
require('./chunk-2UJCKEAF.js'); | ||
var _chunkJNR3R42Tjs = require('./chunk-JNR3R42T.js'); | ||
require('./chunk-PEPKMCEI.js'); | ||
require('./chunk-G22UJFQC.js'); | ||
exports.main = _chunkCDF4QN4Bjs.main; | ||
exports.main = _chunkJNR3R42Tjs.main; |
#!/usr/bin/env node | ||
"use strict"; | ||
var _chunkCDF4QN4Bjs = require('./chunk-CDF4QN4B.js'); | ||
require('./chunk-RQAMCB7Y.js'); | ||
var _chunkJNR3R42Tjs = require('./chunk-JNR3R42T.js'); | ||
require('./chunk-PEPKMCEI.js'); | ||
var _chunkLDLF4CLAjs = require('./chunk-LDLF4CLA.js'); | ||
require('./chunk-2UJCKEAF.js'); | ||
require('./chunk-G22UJFQC.js'); | ||
// src/cli-node.ts | ||
_chunkCDF4QN4Bjs.main.call(void 0, { | ||
_chunkJNR3R42Tjs.main.call(void 0, { | ||
skipNodeModulesBundle: true | ||
}).catch(_chunkLDLF4CLAjs.handleError); |
@@ -390,3 +390,3 @@ import { BuildOptions, Metafile, Plugin as Plugin$1, Loader } from 'esbuild'; | ||
type BrowserTargetWithVersion = `${BrowserTarget}${number}` | `${BrowserTarget}${number}.${number}` | `${BrowserTarget}${number}.${number}.${number}`; | ||
type EsTarget = 'es3' | 'es5' | 'es6' | 'es2015' | 'es2016' | 'es2017' | 'es2018' | 'es2019' | 'es2020' | 'es2021' | 'es2022' | 'esnext'; | ||
type EsTarget = 'es3' | 'es5' | 'es6' | 'es2015' | 'es2016' | 'es2017' | 'es2018' | 'es2019' | 'es2020' | 'es2021' | 'es2022' | 'es2023' | 'esnext'; | ||
type Target = BrowserTarget | BrowserTargetWithVersion | EsTarget; | ||
@@ -515,3 +515,3 @@ type Entry = string[] | Record<string, string>; | ||
*/ | ||
injectStyle?: boolean | ((css: string, fileId: string) => string); | ||
injectStyle?: boolean | ((css: string, fileId: string) => string | Promise<string>); | ||
/** | ||
@@ -518,0 +518,0 @@ * Inject cjs and esm shims if needed |
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; | ||
var _chunkRQAMCB7Yjs = require('./chunk-RQAMCB7Y.js'); | ||
var _chunkPEPKMCEIjs = require('./chunk-PEPKMCEI.js'); | ||
@@ -13,3 +13,3 @@ | ||
var _chunkJJFYP3U2js = require('./chunk-JJFYP3U2.js'); | ||
var _chunkIZXFC3VYjs = require('./chunk-IZXFC3VY.js'); | ||
@@ -34,3 +34,3 @@ | ||
var _chunk2UJCKEAFjs = require('./chunk-2UJCKEAF.js'); | ||
var _chunkG22UJFQCjs = require('./chunk-G22UJFQC.js'); | ||
@@ -41,5 +41,5 @@ // src/index.ts | ||
var _worker_threads = require('worker_threads'); | ||
var _globby = require('globby'); var _globby2 = _interopRequireDefault(_globby); | ||
var _bundlerequire = require('bundle-require'); | ||
var _execa = require('execa'); var _execa2 = _interopRequireDefault(_execa); | ||
var _tinyglobby = require('tinyglobby'); | ||
var _treekill = require('tree-kill'); var _treekill2 = _interopRequireDefault(_treekill); | ||
@@ -135,3 +135,3 @@ | ||
const getPostcssConfig = async () => { | ||
const loadConfig = _chunk2UJCKEAFjs.__require.call(void 0, "postcss-load-config"); | ||
const loadConfig = _chunkG22UJFQCjs.__require.call(void 0, "postcss-load-config"); | ||
if (configCache) { | ||
@@ -198,3 +198,3 @@ return configCache; | ||
if (plugins && plugins.length > 0) { | ||
const postcss = _chunk2UJCKEAFjs.getPostcss.call(void 0, ); | ||
const postcss = _chunkG22UJFQCjs.getPostcss.call(void 0, ); | ||
if (!postcss) { | ||
@@ -221,3 +221,3 @@ return { | ||
})).code; | ||
contents = typeof inject === "function" ? inject(JSON.stringify(contents), args.path) : `import styleInject from '#style-inject';styleInject(${JSON.stringify( | ||
contents = typeof inject === "function" ? await Promise.resolve(inject(JSON.stringify(contents), args.path)) : `import styleInject from '#style-inject';styleInject(${JSON.stringify( | ||
contents | ||
@@ -262,4 +262,4 @@ )})`; | ||
build2.onLoad({ filter: /\.svelte$/ }, async (args) => { | ||
svelte = svelte || _chunk2UJCKEAFjs.localRequire.call(void 0, "svelte/compiler"); | ||
sveltePreprocessor = sveltePreprocessor || _chunk2UJCKEAFjs.localRequire.call(void 0, "svelte-preprocess"); | ||
svelte = svelte || _chunkG22UJFQCjs.localRequire.call(void 0, "svelte/compiler"); | ||
sveltePreprocessor = sveltePreprocessor || _chunkG22UJFQCjs.localRequire.call(void 0, "svelte-preprocess"); | ||
if (!svelte) { | ||
@@ -346,3 +346,3 @@ return { | ||
setup(build2) { | ||
const swc = _chunk2UJCKEAFjs.localRequire.call(void 0, "@swc/core"); | ||
const swc = _chunkG22UJFQCjs.localRequire.call(void 0, "@swc/core"); | ||
if (!swc) { | ||
@@ -401,3 +401,3 @@ logger3.warn( | ||
build2.onResolve({ filter: /\.node$/, namespace: "file" }, (args) => { | ||
const resolvedId = _chunk2UJCKEAFjs.__require.resolve(args.path, { | ||
const resolvedId = _chunkG22UJFQCjs.__require.resolve(args.path, { | ||
paths: [args.resolveDir] | ||
@@ -441,4 +441,4 @@ }); | ||
var getOutputExtensionMap = (options, format, pkgType) => { | ||
const outExtension = options.outExtension || _chunk2UJCKEAFjs.defaultOutExtension; | ||
const defaultExtension = _chunk2UJCKEAFjs.defaultOutExtension.call(void 0, { format, pkgType }); | ||
const outExtension = options.outExtension || _chunkG22UJFQCjs.defaultOutExtension; | ||
const defaultExtension = _chunkG22UJFQCjs.defaultOutExtension.call(void 0, { format, pkgType }); | ||
const extension = outExtension({ options, format, pkgType }); | ||
@@ -457,3 +457,3 @@ return { | ||
const pkgPath = _path2.default.isAbsolute(item) ? _path2.default.dirname(item) : _path2.default.dirname(_path2.default.resolve(process.cwd(), item)); | ||
const deps = await _chunkJJFYP3U2js.getProductionDeps.call(void 0, pkgPath); | ||
const deps = await _chunkIZXFC3VYjs.getProductionDeps.call(void 0, pkgPath); | ||
result.push(...deps); | ||
@@ -470,4 +470,4 @@ } | ||
}) { | ||
const pkg = await _chunkJJFYP3U2js.loadPkg.call(void 0, process.cwd()); | ||
const deps = await _chunkJJFYP3U2js.getProductionDeps.call(void 0, process.cwd()); | ||
const pkg = await _chunkIZXFC3VYjs.loadPkg.call(void 0, process.cwd()); | ||
const deps = await _chunkIZXFC3VYjs.getProductionDeps.call(void 0, process.cwd()); | ||
const external = [ | ||
@@ -568,3 +568,3 @@ // Exclude dependencies, e.g. `lodash`, `lodash/get` | ||
mainFields: platform === "node" ? ["module", "main"] : ["browser", "module", "main"], | ||
plugins: esbuildPlugins.filter(_chunk2UJCKEAFjs.truthy), | ||
plugins: esbuildPlugins.filter(_chunkG22UJFQCjs.truthy), | ||
define: { | ||
@@ -607,3 +607,3 @@ TSUP_FORMAT: JSON.stringify(format), | ||
} | ||
if (result && result.warnings && !_chunkJJFYP3U2js.getSilent.call(void 0, )) { | ||
if (result && result.warnings && !_chunkIZXFC3VYjs.getSilent.call(void 0, )) { | ||
const messages = result.warnings.filter((warning) => { | ||
@@ -756,3 +756,3 @@ if (warning.text.includes( | ||
if (isJS(file.path) || isCSS(file.path)) { | ||
const relativePath = _chunk2UJCKEAFjs.slash.call(void 0, _path2.default.relative(process.cwd(), file.path)); | ||
const relativePath = _chunkG22UJFQCjs.slash.call(void 0, _path2.default.relative(process.cwd(), file.path)); | ||
const meta = _optionalChain([metafile, 'optionalAccess', _6 => _6.outputs, 'access', _7 => _7[relativePath]]); | ||
@@ -869,3 +869,3 @@ return { | ||
} | ||
const swc = _chunk2UJCKEAFjs.localRequire.call(void 0, "@swc/core"); | ||
const swc = _chunkG22UJFQCjs.localRequire.call(void 0, "@swc/core"); | ||
if (!swc) { | ||
@@ -909,3 +909,3 @@ throw new (0, _chunkLDLF4CLAjs.PrettyError)( | ||
buildEnd({ writtenFiles }) { | ||
_chunkJJFYP3U2js.reportSize.call(void 0, | ||
_chunkIZXFC3VYjs.reportSize.call(void 0, | ||
this.logger, | ||
@@ -983,6 +983,6 @@ this.format, | ||
if (!publicDir) return false; | ||
const publicPath = _chunk2UJCKEAFjs.slash.call(void 0, | ||
const publicPath = _chunkG22UJFQCjs.slash.call(void 0, | ||
_path2.default.resolve(publicDir === true ? "public" : publicDir) | ||
); | ||
return _chunk2UJCKEAFjs.slash.call(void 0, _path2.default.resolve(filePath)).startsWith(`${publicPath}/`); | ||
return _chunkG22UJFQCjs.slash.call(void 0, _path2.default.resolve(filePath)).startsWith(`${publicPath}/`); | ||
}; | ||
@@ -1003,3 +1003,3 @@ | ||
return; | ||
const terser = _chunk2UJCKEAFjs.localRequire.call(void 0, "terser"); | ||
const terser = _chunkG22UJFQCjs.localRequire.call(void 0, "terser"); | ||
if (!terser) { | ||
@@ -1041,3 +1041,3 @@ throw new (0, _chunkLDLF4CLAjs.PrettyError)( | ||
var _typescript = require('typescript'); var _typescript2 = _interopRequireDefault(_typescript); | ||
var logger = _chunkJJFYP3U2js.createLogger.call(void 0, ); | ||
var logger = _chunkIZXFC3VYjs.createLogger.call(void 0, ); | ||
var AliasPool = (_class = class {constructor() { _class.prototype.__init.call(this); } | ||
@@ -1066,3 +1066,3 @@ __init() {this.seen = /* @__PURE__ */ new Set()} | ||
const cwd = program.getCurrentDirectory(); | ||
sourceFileName = _chunk2UJCKEAFjs.toAbsolutePath.call(void 0, sourceFileName, cwd); | ||
sourceFileName = _chunkG22UJFQCjs.toAbsolutePath.call(void 0, sourceFileName, cwd); | ||
const sourceFile = program.getSourceFile(sourceFileName); | ||
@@ -1105,4 +1105,4 @@ if (!sourceFile) { | ||
fileMapping.set( | ||
_chunk2UJCKEAFjs.toAbsolutePath.call(void 0, sourceFileName, cwd), | ||
_chunk2UJCKEAFjs.toAbsolutePath.call(void 0, fileName, cwd) | ||
_chunkG22UJFQCjs.toAbsolutePath.call(void 0, sourceFileName, cwd), | ||
_chunkG22UJFQCjs.toAbsolutePath.call(void 0, fileName, cwd) | ||
); | ||
@@ -1161,3 +1161,3 @@ } | ||
} | ||
const declarationDir = _chunk2UJCKEAFjs.ensureTempDeclarationDir.call(void 0, ); | ||
const declarationDir = _chunkG22UJFQCjs.ensureTempDeclarationDir.call(void 0, ); | ||
const parsedTsconfig = _typescript2.default.parseJsonConfigFileContent( | ||
@@ -1214,3 +1214,3 @@ { | ||
(declaration) => formatAggregationExport(declaration, declarationDirPath) | ||
).filter(_chunk2UJCKEAFjs.truthy); | ||
).filter(_chunkG22UJFQCjs.truthy); | ||
if (lines.length === 0) { | ||
@@ -1223,5 +1223,5 @@ lines.push("export {};"); | ||
function formatAggregationExport(declaration, declarationDirPath) { | ||
const dest = _chunk2UJCKEAFjs.trimDtsExtension.call(void 0, | ||
const dest = _chunkG22UJFQCjs.trimDtsExtension.call(void 0, | ||
`./${_path2.default.posix.normalize( | ||
_chunk2UJCKEAFjs.slash.call(void 0, _path2.default.relative(declarationDirPath, declaration.destFileName)) | ||
_chunkG22UJFQCjs.slash.call(void 0, _path2.default.relative(declarationDirPath, declaration.destFileName)) | ||
)}` | ||
@@ -1240,3 +1240,3 @@ ); | ||
`'${dest}';` | ||
].filter(_chunk2UJCKEAFjs.truthy).join(" "); | ||
].filter(_chunkG22UJFQCjs.truthy).join(" "); | ||
} else { | ||
@@ -1247,6 +1247,6 @@ throw new Error("Unknown declaration"); | ||
function formatDistributionExports(exports, fromFilePath, toFilePath) { | ||
let importPath = _chunk2UJCKEAFjs.trimDtsExtension.call(void 0, | ||
let importPath = _chunkG22UJFQCjs.trimDtsExtension.call(void 0, | ||
_path2.default.posix.relative( | ||
_path2.default.posix.dirname(_path2.default.posix.normalize(_chunk2UJCKEAFjs.slash.call(void 0, fromFilePath))), | ||
_path2.default.posix.normalize(_chunk2UJCKEAFjs.slash.call(void 0, toFilePath)) | ||
_path2.default.posix.dirname(_path2.default.posix.normalize(_chunkG22UJFQCjs.slash.call(void 0, fromFilePath))), | ||
_path2.default.posix.normalize(_chunkG22UJFQCjs.slash.call(void 0, toFilePath)) | ||
) | ||
@@ -1277,3 +1277,3 @@ ); | ||
} | ||
}).map((declaration) => formatDistributionExport(declaration, importPath)).filter(_chunk2UJCKEAFjs.truthy); | ||
}).map((declaration) => formatDistributionExport(declaration, importPath)).filter(_chunkG22UJFQCjs.truthy); | ||
if (lines.length === 0) { | ||
@@ -1295,3 +1295,3 @@ lines.push("export {};"); | ||
`'${dest}';` | ||
].filter(_chunk2UJCKEAFjs.truthy).join(" "); | ||
].filter(_chunkG22UJFQCjs.truthy).join(" "); | ||
} else if (declaration.kind === "module") { | ||
@@ -1304,3 +1304,3 @@ return `export * from '${declaration.moduleName}';`; | ||
// src/api-extractor.ts | ||
var logger2 = _chunkJJFYP3U2js.createLogger.call(void 0, ); | ||
var logger2 = _chunkIZXFC3VYjs.createLogger.call(void 0, ); | ||
function rollupDtsFile(inputFilePath, outputFilePath, tsconfigFilePath) { | ||
@@ -1332,3 +1332,3 @@ const cwd = process.cwd(); | ||
}; | ||
const imported = _chunk2UJCKEAFjs.getApiExtractor.call(void 0, ); | ||
const imported = _chunkG22UJFQCjs.getApiExtractor.call(void 0, ); | ||
if (!imported) { | ||
@@ -1354,6 +1354,6 @@ throw new Error( | ||
async function rollupDtsFiles(options, exports, format) { | ||
const declarationDir = _chunk2UJCKEAFjs.ensureTempDeclarationDir.call(void 0, ); | ||
const declarationDir = _chunkG22UJFQCjs.ensureTempDeclarationDir.call(void 0, ); | ||
const outDir = options.outDir || "dist"; | ||
const pkg = await _chunkJJFYP3U2js.loadPkg.call(void 0, process.cwd()); | ||
const dtsExtension = _chunk2UJCKEAFjs.defaultOutExtension.call(void 0, { format, pkgType: pkg.type }).dts; | ||
const pkg = await _chunkIZXFC3VYjs.loadPkg.call(void 0, process.cwd()); | ||
const dtsExtension = _chunkG22UJFQCjs.defaultOutExtension.call(void 0, { format, pkgType: pkg.type }).dts; | ||
let dtsInputFilePath = _path2.default.join( | ||
@@ -1365,3 +1365,3 @@ declarationDir, | ||
const dtsOutputFilePath = _path2.default.join(outDir, `_tsup-dts-rollup${dtsExtension}`); | ||
_chunk2UJCKEAFjs.writeFileSync.call(void 0, | ||
_chunkG22UJFQCjs.writeFileSync.call(void 0, | ||
dtsInputFilePath, | ||
@@ -1378,3 +1378,3 @@ formatAggregationExports(exports, declarationDir) | ||
)) { | ||
sourceFileName = _chunk2UJCKEAFjs.toAbsolutePath.call(void 0, sourceFileName); | ||
sourceFileName = _chunkG22UJFQCjs.toAbsolutePath.call(void 0, sourceFileName); | ||
const outFileName = _path2.default.join(outDir, out + dtsExtension); | ||
@@ -1384,3 +1384,3 @@ const currentExports = exports.filter( | ||
); | ||
_chunk2UJCKEAFjs.writeFileSync.call(void 0, | ||
_chunkG22UJFQCjs.writeFileSync.call(void 0, | ||
outFileName, | ||
@@ -1391,5 +1391,5 @@ formatDistributionExports(currentExports, outFileName, dtsOutputFilePath) | ||
} | ||
function cleanDtsFiles(options) { | ||
async function cleanDtsFiles(options) { | ||
if (options.clean) { | ||
_chunk2UJCKEAFjs.removeFiles.call(void 0, ["**/*.d.{ts,mts,cts}"], options.outDir); | ||
await _chunkG22UJFQCjs.removeFiles.call(void 0, ["**/*.d.{ts,mts,cts}"], options.outDir); | ||
} | ||
@@ -1407,3 +1407,3 @@ } | ||
} | ||
cleanDtsFiles(options); | ||
await cleanDtsFiles(options); | ||
for (const format of options.format) { | ||
@@ -1460,9 +1460,9 @@ await rollupDtsFiles(options, exports, format); | ||
experimentalDts: _options.experimentalDts ? typeof _options.experimentalDts === "boolean" ? _options.experimentalDts ? { entry: {} } : void 0 : typeof _options.experimentalDts === "string" ? { | ||
entry: _chunk2UJCKEAFjs.toObjectEntry.call(void 0, _options.experimentalDts) | ||
entry: _chunkG22UJFQCjs.toObjectEntry.call(void 0, _options.experimentalDts) | ||
} : { | ||
..._options.experimentalDts, | ||
entry: _chunk2UJCKEAFjs.toObjectEntry.call(void 0, _options.experimentalDts.entry || {}) | ||
entry: _chunkG22UJFQCjs.toObjectEntry.call(void 0, _options.experimentalDts.entry || {}) | ||
} : void 0 | ||
}; | ||
_chunkJJFYP3U2js.setSilent.call(void 0, options.silent); | ||
_chunkIZXFC3VYjs.setSilent.call(void 0, options.silent); | ||
const entry = options.entry || options.entryPoints; | ||
@@ -1473,3 +1473,3 @@ if (!entry || Object.keys(entry).length === 0) { | ||
if (Array.isArray(entry)) { | ||
options.entry = await _globby2.default.call(void 0, entry); | ||
options.entry = await _tinyglobby.glob.call(void 0, entry); | ||
if (!options.entry || options.entry.length === 0) { | ||
@@ -1510,3 +1510,3 @@ throw new (0, _chunkLDLF4CLAjs.PrettyError)(`Cannot find ${entry}`); | ||
}; | ||
options.experimentalDts.entry = _chunk2UJCKEAFjs.toObjectEntry.call(void 0, | ||
options.experimentalDts.entry = _chunkG22UJFQCjs.toObjectEntry.call(void 0, | ||
Object.keys(options.experimentalDts.entry).length > 0 ? options.experimentalDts.entry : options.entry | ||
@@ -1527,3 +1527,3 @@ ); | ||
async function build(_options) { | ||
const config = _options.config === false ? {} : await _chunkJJFYP3U2js.loadTsupConfig.call(void 0, | ||
const config = _options.config === false ? {} : await _chunkIZXFC3VYjs.loadTsupConfig.call(void 0, | ||
process.cwd(), | ||
@@ -1536,5 +1536,5 @@ _options.config === true ? void 0 : _options.config | ||
async (item) => { | ||
const logger3 = _chunkJJFYP3U2js.createLogger.call(void 0, _optionalChain([item, 'optionalAccess', _31 => _31.name])); | ||
const logger3 = _chunkIZXFC3VYjs.createLogger.call(void 0, _optionalChain([item, 'optionalAccess', _31 => _31.name])); | ||
const options = await normalizeOptions(logger3, item, _options); | ||
logger3.info("CLI", `tsup v${_chunkRQAMCB7Yjs.version}`); | ||
logger3.info("CLI", `tsup v${_chunkPEPKMCEIjs.version}`); | ||
if (config.path) { | ||
@@ -1546,2 +1546,8 @@ logger3.info("CLI", `Using tsup config: ${config.path}`); | ||
} | ||
const experimentalDtsTask = async () => { | ||
if (!options.dts && options.experimentalDts) { | ||
const exports = runTypeScriptCompiler(options); | ||
await runDtsRollup(options, exports); | ||
} | ||
}; | ||
const dtsTask = async () => { | ||
@@ -1553,6 +1559,3 @@ if (options.dts && options.experimentalDts) { | ||
} | ||
if (options.experimentalDts) { | ||
const exports = runTypeScriptCompiler(options); | ||
await runDtsRollup(options, exports); | ||
} | ||
experimentalDtsTask(); | ||
if (options.dts) { | ||
@@ -1570,2 +1573,3 @@ await new Promise((resolve, reject) => { | ||
// functions cannot be cloned | ||
injectStyle: typeof options.injectStyle === "function" ? void 0 : options.injectStyle, | ||
banner: void 0, | ||
@@ -1605,3 +1609,3 @@ footer: void 0, | ||
const buildDependencies = /* @__PURE__ */ new Set(); | ||
let depsHash = await _chunkJJFYP3U2js.getAllDepsHash.call(void 0, process.cwd()); | ||
let depsHash = await _chunkIZXFC3VYjs.getAllDepsHash.call(void 0, process.cwd()); | ||
const doOnSuccessCleanup = async () => { | ||
@@ -1619,3 +1623,3 @@ if (onSuccessProcess) { | ||
}; | ||
const debouncedBuildAll = _chunk2UJCKEAFjs.debouncePromise.call(void 0, | ||
const debouncedBuildAll = _chunkG22UJFQCjs.debouncePromise.call(void 0, | ||
() => { | ||
@@ -1636,3 +1640,3 @@ return buildAll(); | ||
} | ||
await _chunk2UJCKEAFjs.removeFiles.call(void 0, ["**/*", ...extraPatterns], options.outDir); | ||
await _chunkG22UJFQCjs.removeFiles.call(void 0, ["**/*", ...extraPatterns], options.outDir); | ||
logger3.info("CLI", "Cleaning output folder"); | ||
@@ -1677,2 +1681,3 @@ } | ||
]); | ||
experimentalDtsTask(); | ||
if (options.onSuccess) { | ||
@@ -1720,3 +1725,3 @@ if (typeof options.onSuccess === "function") { | ||
watcher.on("all", async (type, file) => { | ||
file = _chunk2UJCKEAFjs.slash.call(void 0, file); | ||
file = _chunkG22UJFQCjs.slash.call(void 0, file); | ||
if (options.publicDir && isInPublicDir(options.publicDir, file)) { | ||
@@ -1730,3 +1735,3 @@ logger3.info("CLI", `Change in public dir: ${file}`); | ||
if (file === "package.json" && !buildDependencies.has(file)) { | ||
const currentHash = await _chunkJJFYP3U2js.getAllDepsHash.call(void 0, process.cwd()); | ||
const currentHash = await _chunkIZXFC3VYjs.getAllDepsHash.call(void 0, process.cwd()); | ||
shouldSkipChange = currentHash === depsHash; | ||
@@ -1733,0 +1738,0 @@ depsHash = currentHash; |
{ | ||
"name": "tsup", | ||
"version": "8.2.4", | ||
"version": "8.3.0", | ||
"packageManager": "pnpm@9.5.0", | ||
@@ -60,3 +60,2 @@ "description": "Bundle your TypeScript library with no config, powered by esbuild", | ||
"execa": "^5.1.1", | ||
"globby": "^11.1.0", | ||
"joycon": "^3.1.1", | ||
@@ -69,2 +68,3 @@ "picocolors": "^1.0.1", | ||
"sucrase": "^3.35.0", | ||
"tinyglobby": "^0.2.1", | ||
"tree-kill": "^1.2.2" | ||
@@ -71,0 +71,0 @@ }, |
Sorry, the diff of this file is too big to display
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
437302
11704
+ Addedtinyglobby@^0.2.1
+ Addedfdir@6.3.0(transitive)
+ Addedpicomatch@4.0.2(transitive)
+ Addedtinyglobby@0.2.6(transitive)
- Removedglobby@^11.1.0
- Removed@nodelib/fs.scandir@2.1.5(transitive)
- Removed@nodelib/fs.stat@2.0.5(transitive)
- Removed@nodelib/fs.walk@1.2.8(transitive)
- Removedarray-union@2.1.0(transitive)
- Removeddir-glob@3.0.1(transitive)
- Removedfast-glob@3.3.2(transitive)
- Removedfastq@1.17.1(transitive)
- Removedglobby@11.1.0(transitive)
- Removedignore@5.3.2(transitive)
- Removedmerge2@1.4.1(transitive)
- Removedmicromatch@4.0.8(transitive)
- Removedpath-type@4.0.0(transitive)
- Removedqueue-microtask@1.2.3(transitive)
- Removedreusify@1.0.4(transitive)
- Removedrun-parallel@1.2.0(transitive)
- Removedslash@3.0.0(transitive)