BuilderIO / mitosis

Write components once, run everywhere. Compiles to React, Vue, Qwik, Solid, Angular, Svelte, and more.
https://mitosis.builder.io
MIT License
11.84k stars 512 forks source link

feat[Angular]: Allow passing explicit selectors #1443

Open seofernando25 opened 1 month ago

seofernando25 commented 1 month ago

Description

Adds an explicit, selector option, allowing to override the default,

selector: `'${kebabCase(json.name || 'my-component')}, ${json.name}'`

This doesn't quite work if you have more than one component per project since all of them would have the same name

selector: options.selector
        ? `'${options.selector}'`
       : `'${kebabCase(json.name || 'my-component')}, ${json.name}'`,

Another option could try is to keep as is and leave the warning there.

Closes #1442

Also see: angular's style guide Relevant PR that added it in the first place

EDIT: Ok I think I can see why it was added there in the first place... might be wise to allow overriding the selector

changeset-bot[bot] commented 1 month ago

⚠️ No Changeset found

Latest commit: 00b038dcacd708d660e2bebcddc47d68448ea0d1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

seofernando25 commented 1 month ago

~~I'm having some issues running the snapupdates. ~~ Is it suppose that take this long 10+ minutes?

So far I've changed the expected results manually.

SOLUTION: Manually ran vitest file.test.ts -u for each failing test

gitguardian[bot] commented 1 month ago

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | | | -------------- | ------------------ | ------------------------------ | ---------------- | --------------- | -------------------- | | [8531560](https://dashboard.gitguardian.com/workspace/81635/incidents/8531560) | Triggered | Generic High Entropy Secret | 00b038dcacd708d660e2bebcddc47d68448ea0d1 | nx.json | [View secret](https://github.com/BuilderIO/mitosis/commit/00b038dcacd708d660e2bebcddc47d68448ea0d1#diff-15552e50b1b7c05b05b7ffe08ee47b5ed62b8d2039229c58972a42fd22a7381cR7) |
🛠 Guidelines to remediate hardcoded secrets
1. Understand the implications of revoking this secret by investigating where it is used in your code. 2. Replace and store your secret safely. [Learn here](https://blog.gitguardian.com/secrets-api-management?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) the best practices. 3. Revoke and [rotate this secret](https://docs.gitguardian.com/secrets-detection/secrets-detection-engine/detectors/generics/generic_high_entropy_secret#revoke-the-secret?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment). 4. If possible, [rewrite git history](https://blog.gitguardian.com/rewriting-git-history-cheatsheet?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment). Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data. To avoid such incidents in the future consider - following these [best practices](https://blog.gitguardian.com/secrets-api-management/?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) for managing and storing secrets including API keys and other credentials - install [secret detection on pre-commit](https://docs.gitguardian.com/ggshield-docs/integrations/git-hooks/pre-commit?utm_source=product&utm_medium=GitHub_checks&utm_campaign=check_run_comment) to catch secret before it leaves your machine and ease remediation.

🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.