mitosis icon indicating copy to clipboard operation
mitosis copied to clipboard

feat[Angular]: Allow passing explicit selectors

Open seofernando25 opened this issue 9 months ago • 7 comments

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

seofernando25 avatar May 11 '24 10:05 seofernando25

⚠️ 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

changeset-bot[bot] avatar May 11 '24 10:05 changeset-bot[bot]

~~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

seofernando25 avatar May 11 '24 11:05 seofernando25

⚠️ 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 Triggered Generic High Entropy Secret 00b038dcacd708d660e2bebcddc47d68448ea0d1 nx.json View secret
🛠 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 the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. 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


🦉 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.

gitguardian[bot] avatar May 27 '24 21:05 gitguardian[bot]

can we explicitly mention by using useMetadata instead?

Sorry for taking so long to respond. ~~I can try pushing some changes this Sunday.~~ I'm getting quite busy in the past weeks, I wouldn't mind if someone took over my PR.

seofernando25 avatar Jul 20 '24 17:07 seofernando25

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 00b038dcacd708d660e2bebcddc47d68448ea0d1. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


🟥 Failed Commands
nx run-many --target test
✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

nx-cloud[bot] avatar Aug 01 '24 06:08 nx-cloud[bot]

@seofernando25 I can't select your fork as base: image

I add the selector option to useMetadata here. Would you like me to open up a new PR from my fork? It's wired because I see other forks as base branches as well

image

nmerget avatar Aug 01 '24 06:08 nmerget

I can't select your fork as base

Oh, how strange, I'll check my settings

Would you like me to open up a new PR from my fork?

@nmerget I wouldn't mind that, Thank you!


Feel free to close this PR

seofernando25 avatar Aug 09 '24 18:08 seofernando25