Skip to content

feat(monosize): create packageName within reports from package.json or project.json by default and add packageName,packageRoot global configuration options overrides. [BREAKING-CHANGE]#68

Merged
Hotell merged 10 commits intomicrosoft:mainfrom
Hotell:feat/package-name-config
May 16, 2024

Conversation

@Hotell
Copy link
Contributor

@Hotell Hotell commented May 15, 2024

Before

  • report package name used within compare-reports and upload-reports cli command is constructed via project folder name
  • no configuration options to tweak this behaviours

After

BREAKING CHANGES

  • report package name used within compare-reports and upload-reports cli command is constructed via name property from package.json or project.json

  • new configuration options to tweak behaviours

    • packageRoot?: async (filepath: string) => Promise<string>

      • defaults to (filepath) => findUp(['package.json', 'project.json'], { cwd: path.dirname(filepath) })
    • packageName?: async (packageRoot: string) => Promise<string>;

      • defaults to package.json#name ?? project.json#name

Closes #62

@Hotell Hotell marked this pull request as ready for review May 16, 2024 08:59
@Hotell Hotell requested review from a team and layershifter as code owners May 16, 2024 08:59
@Hotell Hotell added enhancement New feature or request BREAKING CHANGE labels May 16, 2024
@Hotell Hotell changed the title feat(monosize): add new packageName and pacakgePath configuation options feat(monosize): create packageName within reports from package.json or project.json by default and add packageName,packageRoot global configuration options overrides. [BREAKING-CHANGE] May 16, 2024
@tudorpopams tudorpopams self-requested a review May 16, 2024 12:03
@Hotell Hotell requested a review from layershifter May 16, 2024 14:12
@Hotell Hotell merged commit e037ff1 into microsoft:main May 16, 2024
@Hotell Hotell deleted the feat/package-name-config branch May 16, 2024 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BREAKING CHANGE enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature(monosize): make packageName configurale within compare-reports command

2 participants