Socket
Socket
Sign inDemoInstall

bunchee

Package Overview
Dependencies
Maintainers
1
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bunchee - npm Package Compare versions

Comparing version 4.2.10 to 4.2.11

2

dist/bin/cli.js

@@ -118,3 +118,3 @@ #!/usr/bin/env node

var version = "4.2.10";
var version = "4.2.11";

@@ -121,0 +121,0 @@ const helpMessage = `

@@ -226,4 +226,4 @@ Object.defineProperty(exports, '__esModule', { value: true });

ts = m.require('typescript');
} catch (_) {
console.error(_);
} catch (e) {
console.error(e);
if (!hasLoggedTsWarning) {

@@ -731,7 +731,11 @@ hasLoggedTsWarning = true;

/**
* return { '<pkg>/<export>': '<absolute source path> }
*/ function getEntriesAlias(entries) {
* return { '<absolute source path>': '<pkg>/<export>' }
*/ function getReversedAlias(entries) {
const alias = {};
for (const [entryImportPath, exportCondition] of Object.entries(entries)){
alias[entryImportPath] = exportCondition.source;
const exportType = entryImportPath.split('.')[1] // e.g. index.react-server, pick react-server
;
if (!exportType) {
alias[exportCondition.source] = entryImportPath;
}
}

@@ -741,9 +745,2 @@ return alias;

async function buildInputConfig(entry, entries, pkg, options, cwd, { tsConfigPath, tsCompilerOptions }, pluginContext, dts) {
const entriesAlias = getEntriesAlias(entries);
const reversedAlias = {};
for (const [key, value] of Object.entries(entriesAlias)){
if (value !== entry) {
reversedAlias[value] = key;
}
}
const hasNoExternal = options.external === null;

@@ -756,3 +753,4 @@ var _options_external;

].filter((n)=>Boolean(n)).map((o)=>Object.keys(o)).reduce((a, b)=>a.concat(b), []).concat((_options_external = options.external) != null ? _options_external : []);
for (const [exportImportPath, entryFilePath] of Object.entries(entriesAlias)){
for (const [exportImportPath, exportCondition] of Object.entries(entries)){
const entryFilePath = exportCondition.source;
if (entryFilePath !== entry) {

@@ -794,3 +792,7 @@ externals.push(exportImportPath);

aliasEntries({
entries: reversedAlias
entries: {
...pluginContext.entriesAlias,
// Do not alias current alias of package
[entry]: null
}
})

@@ -1348,5 +1350,7 @@ ];

});
const entriesAlias = getReversedAlias(entries);
const pluginContext = {
sizeCollector,
moduleDirectiveLayerMap: new Map()
moduleDirectiveLayerMap: new Map(),
entriesAlias
};

@@ -1353,0 +1357,0 @@ const buildConfigs = await buildEntryConfig(entries, pkg, exportPaths, options, cwd, defaultTsOptions, pluginContext, false);

{
"name": "bunchee",
"version": "4.2.10",
"version": "4.2.11",
"description": "zero config bundler for js/ts/jsx libraries",

@@ -5,0 +5,0 @@ "bin": "./dist/bin/cli.js",

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