Skip to content

build: the bundle folder public/ collides with Public/ of the module split #165

Closed

Description

@eizedev

The split in #163 puts exported functions into modules/<Module>/Public/. The webpack bundle already goes to modules/<Module>/public/. On macOS and Windows these are the same folder, and several places treat public without regard to case.

What breaks:

  • .gitignore line 2 ignores public/. With core.ignorecase=true (the default on macOS and Windows), git ignores Public/New-UDPivotReport.ps1 too. git check-ignore -v --no-index modules/PowerShellUniversal.Component.Pivot/Public/New-UDPivotReport.ps1 matches .gitignore:2.
  • build/webpack.base.cjs line 20 writes the bundle into that folder, next to the .ps1 files.
  • build/Build-Module.ps1 line 77 copies public/* into the module root. On macOS and Windows that copies the .ps1 files too.
  • The PSScriptAnalyzer step in ci.yml filters with -NotMatch '...public...'. -NotMatch ignores case, so findings in Public/ would be dropped on every platform.

Not affected yet: no module has a Public/ folder today. The growth guard (build/Measure-PowerShellSize.ps1) compares folder names case-sensitively and measures Public/.

Fix: rename the bundle folder (for example dist/) in webpack.base.cjs, Build-Module.ps1, .gitignore, the PSScriptAnalyzer filter and AGENTS.md before #163 adds Public/.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions