Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/utils/parse-package-json/get-export-entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
}

if (typeof exportMap === 'object') {
return Object.entries(exportMap).flatMap(([key, value]) => {

Check warning on line 67 in src/utils/parse-package-json/get-export-entries.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

Arrow function has a complexity of 12. Maximum allowed is 10
if (typeof value === 'string') {
const newProperty = propertyNeedsQuotes(key) ? `["${key}"]` : `.${key}`;
const baseEntry = {
Expand Down Expand Up @@ -142,7 +142,11 @@
}
};

export const getExportEntries = (packageJson: PackageJson) => {

Check warning on line 145 in src/utils/parse-package-json/get-export-entries.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

Arrow function has a complexity of 15. Maximum allowed is 10
// Prefer publishConfig when defined
// https://pnpm.io/package_json#publishconfig
packageJson = Object.assign(packageJson, packageJson.publishConfig ?? {});
Comment thread
kwaa marked this conversation as resolved.
Outdated

Check failure on line 149 in src/utils/parse-package-json/get-export-entries.ts

View workflow job for this annotation

GitHub Actions / Test (ubuntu-latest)

Trailing spaces not allowed
const exportEntriesMap: Record<string, ExportEntry> = {};
const packageType = packageJson.type ?? 'commonjs';

Expand Down
Loading