bunchee 5.1.1 → 5.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -165,7 +165,7 @@ Assuming you have default export package as `"."` and subpath export `"./lite"`
165
165
  "build": "bunchee"
166
166
  },
167
167
  "exports": {
168
- "./lite": "./dist/lite.js"
168
+ "./lite": "./dist/lite.js",
169
169
  ".": {
170
170
  "import": "./dist/index.mjs",
171
171
  "require": "./dist/index.cjs"
package/dist/bin/cli.js CHANGED
@@ -474,7 +474,7 @@ function lint$1(pkg) {
474
474
  }
475
475
  }
476
476
 
477
- var version = "5.1.1";
477
+ var version = "5.1.2";
478
478
 
479
479
  function relativify(path) {
480
480
  return path.startsWith('.') ? path : `./${path}`;
package/dist/index.js CHANGED
@@ -125,6 +125,7 @@ const dtsExtensionsMap = {
125
125
  mjs: 'd.mts'
126
126
  };
127
127
  const disabledWarnings = new Set([
128
+ 'EMPTY_BUNDLE',
128
129
  'MIXED_EXPORTS',
129
130
  'PREFER_NAMED_EXPORTS',
130
131
  'UNRESOLVED_IMPORT',
@@ -550,7 +551,8 @@ function aliasEntries({ entry, entries, entriesAlias, format, dts, cwd }) {
550
551
  const typeCond = (_Object_entries_find = Object.entries(exportDistMaps).find(([composedKey, cond])=>{
551
552
  const typesSet = new Set(composedKey.split('.'));
552
553
  const formatCond = format === 'cjs' ? 'require' : 'import';
553
- return typesSet.has('types') && typesSet.has(formatCond) && cond != null;
554
+ const isMatchedCond = typesSet.has(formatCond) || !typesSet.has('import') && !typesSet.has('require');
555
+ return typesSet.has('types') && isMatchedCond && cond != null;
554
556
  })) == null ? void 0 : _Object_entries_find[1];
555
557
  if (typeCond) {
556
558
  pathToRelativeDistMap.set(exportCondition.source, typeCond);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunchee",
3
- "version": "5.1.1",
3
+ "version": "5.1.2",
4
4
  "description": "zero config bundler for js/ts/jsx libraries",
5
5
  "bin": "./dist/bin/cli.js",
6
6
  "main": "./dist/index.js",