-
Notifications
You must be signed in to change notification settings - Fork 504
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
feat[Angular]: Allow passing explicit selectors #1443
base: main
Are you sure you want to change the base?
Conversation
|
~~I'm having some issues running the snapupdates. ~~
SOLUTION: Manually ran |
selector: `'${kebabCase(json.name || 'my-component')}, ${json.name}'`, | ||
selector: options.selector | ||
? `'${options.selector}'` | ||
: `'${kebabCase(json.name || 'my-component')}, ${json.name}'`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to remove the ${json.name}
as default.
If a users wants to overwrite the selector with non kebabCase
they may use options.selector
.
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
8531560 | Triggered | Generic High Entropy Secret | 00b038d | nx.json | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- 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
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a suggestion, if we are adding a specific selector can we explicitly mention by using useMetadata
instead?
useMetadata({
angular: { selector: 'some-name' },
})
inside the component where we want to swap it? because options
is for a full fledged project
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
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