Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

censorProjectWarnings in monorepo workspace spago.yaml #1316

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

noisyscanner
Copy link

Closes #1311

Description of the change

Allows censorProjectWarnings to be specified in a workspaces's spago.yaml and apply to all packages in a workspace.
Can override it in a package's own spago.yaml either to all or [] to censor no warnings for that particular workspace.

Checklist:

  • Added the change to the "Unreleased" section of the changelog
  • Added some example of the new feature to the README
  • Added a test for the contribution (if applicable)

@@ -975,13 +975,16 @@ $ node -e "import('./index.js').then(m => console.log(m.main))"
```

Spago does not wrap the entirety of the bundler's API (esbuild for JS builds), so it's possible to pass arguments through to it. E.g. to exclude an NPM package from the bundle you can pass the `--external` flag to esbuild:

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My editor auto-formatted this markdown on save - can revert if preferred.

}
, toPathDecision
{ pathIsFromPackage: (testPath `Path.isPrefixOf` _)
, pathType: IsSrc
, strict: fromMaybe false $ psaCliFlags.strict <|> (package.test >>= _.strict)
, censorWarnings: package.test >>= _.censorTestWarnings
, censorWarnings: (package.test >>= _.censorTestWarnings) <|> censorProjectWarnings
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to discuss I looked into pulling this out into a separate param like censorTestWarnings, but maybe it doesn't make sense having it under buildOpts as this is akin to build: in the package spago.yaml, maybe we'd need testOpts as censorTestWarnings is under test:.

If you get me

@noisyscanner noisyscanner marked this pull request as draft January 26, 2025 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: merge workspace build section to apply to all packages
1 participant