Vue SDK: stop passing down unused props#3891
Conversation
🦋 Changeset detectedLatest commit: b333015 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
View your CI Pipeline Execution ↗ for commit b333015.
☁️ Nx Cloud last updated this comment at |
packages/sdks/mitosis.config.cjs
Outdated
| 'attributes: this.attributes,', | ||
| '...(this.hasAttributesInput(this.Wrapper) ? { attributes: this.attributes } : {})' | ||
| 'attributes: this.wrappedPropsWithAttributes.attributes,', | ||
| '...(this.hasAttributesInput(this.Wrapper) ? { attributes: this.wrappedPropsWithAttributes.attributes } : {})' |
There was a problem hiding this comment.
@sidmohanty11 I think I'm breaking this code with this PR. My change here is fine but the ngOnChanges overrides below in this same plugin will stop working:
ngOnChanges(changes: SimpleChanges) { if (changes["attributes"] && !this.hasAttributesInput(this.Wrapper)) { this.ngAfterViewInit(); }what do you suggest we do about this? Also, is there anything else that will start to break with this approach?
if it's too hard to make the angular SDK happy with not having an attributes prop, i can look into bringing it back in this plugin instead
There was a problem hiding this comment.
@samijaber breaking up attributes will mean that we'll lose access to builder-id, style etc so now we'll have to attach all props as HTML attributes and not pass them to be reactive (as inputs). Is it possible to keep the attributes key? because here:
builder/packages/sdks/mitosis.config.cjs
Lines 723 to 731 in f9b8552
we check if that element doesn't have
attributes as an input then we spread it out in the element
There was a problem hiding this comment.
else we can look for only these four: id, style, href and className as attributes and send everything else as inputs
157e72f to
4740de2
Compare
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 9071768 | Triggered | Generic High Entropy Secret | 4740de2 | packages/sdks-tests/src/specs/video-lazy-load.ts | View secret |
| 2708648 | Triggered | Generic High Entropy Secret | 4740de2 | examples/angular-gen2/src/environments/environment.ts | View secret |
| 9071769 | Triggered | Generic High Entropy Secret | 4740de2 | packages/sdks-tests/src/specs/video-lazy-load.ts | View secret |
| 314150 | Triggered | Generic High Entropy Secret | 4740de2 | packages/sdks/src/functions/get-content/snapshots/generate-content-url.test.ts.snap | View secret |
| 11707119 | Triggered | Generic High Entropy Secret | 4740de2 | packages/sdks/snippets/sveltekit/src/routes/editable-region/+page.svelte | 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 secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- 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.
sidmohanty11
left a comment
There was a problem hiding this comment.
@samijaber this needs a changeset
as the accordion VE is actually failing: https://www.loom.com/share/036fda4959c9473aa0604299097b7a64 we can skip it for now
The student has become the master |
Description
https://builder-io.atlassian.net/browse/ENG-7615