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

Add CI check for forbidden texts #157

Merged
merged 8 commits into from
May 8, 2024

Conversation

NullVoxPopuli
Copy link
Contributor

@NullVoxPopuli NullVoxPopuli commented Feb 22, 2024

This will help keep us from accidentally build code in production that shouldn't be there.

(the production assets being what we expect the output to be when someone using starbeam builds for production with the appropriate minifier settings)

Resolves: #153

Package Graph

Whole Repo
Just @starbeam (without integration libraries)

Can this be the published set of packages: https://studio.commonality.co/starbeamjs/starbeam?packages=NoIgAgzgLghgTgIwKYwLYHoDGB7ANrpTKAS2wDsIQAacaeZNdVbAE2IDNik5rbZEUGOCiLEAbkl6R%2BDIUjItu3KXQGNhEbAFc4mSTWn1B6OFrIlU%2BvkcYRuY4npUzjEABbwkLZzYxnx3BAwuCAAukA

on disk task graph
pnpm turbo run build --filter "@starbeam/*" --graph=graph.svg

graph

Copy link

stackblitz bot commented Feb 22, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@patricklx
Copy link
Contributor

image

@patricklx
Copy link
Contributor

how about adding mangle: false as well?

@patricklx
Copy link
Contributor

patricklx commented Apr 29, 2024

this things are preventing terser to drop those:

expected.associate(isPresent, expected.toBe("present"));

@NullVoxPopuli
Copy link
Contributor Author

hmm, all these expectations may be causing problems.

@patricklx
Copy link
Contributor

patricklx commented Apr 29, 2024

I would also suggest to change the validation script to parse the source map instead.
Then you can look at the files list and check if a relative path lands in one of the debug packages.
Edit: actually yoi might need both tests.

  • check in js if the package imports are gone -> inlined
  • check in source map relativ paths

@NullVoxPopuli
Copy link
Contributor Author

so far, I haven't even gotten checking source to do what I want, so it doesn't make sense to check sourcemaps yet

* improve verify

* fix preact

* fix collections

* dont check debug & verify packages

* wip

* fix reactive

* fix lint

* improve build

* fix type & lint

* more lint fixes

* fix lint

* update @starbeam-dev/eslint-plugin
Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] environment, filesystem Transitive: eval, shell, unsafe +71 9.85 MB eslintbot

🚮 Removed packages: npm/@starbeam-dev/[email protected], npm/[email protected]

View full report↗︎

@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review May 8, 2024 13:45
@NullVoxPopuli NullVoxPopuli added bug Something isn't working internal labels May 8, 2024
@NullVoxPopuli NullVoxPopuli merged commit 3b6efdd into main May 8, 2024
10 checks passed
@NullVoxPopuli NullVoxPopuli deleted the add-ci-check-for-fobidden-texts branch May 8, 2024 20:51
@github-actions github-actions bot mentioned this pull request May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working internal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix the build, dev dependencies are included in production assets, module cycles, side-effects, etc
2 participants