Skip to content

chore(deps-dev): bump the builder-io group with 2 updates #4286

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

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9,782 changes: 5,319 additions & 4,463 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@
"tsx": "^4.19.4",
"typescript": "^5.4.5",
"validate-branch-name": "^1.3.2",
"vite": "^6.3.5",
"vite": "6.3.5",
"vitest": "^3.1.4",
"xo": "^0.60.0",
"zone.js": "~0.15.1"
},
"overrides": {
"cross-spawn": "~7.0.5",
"vite": "$vite"
"vite": "6.3.5"
},
"validate-branch-name": {
"pattern": "((dbux-3)|(dependabot-)|^((test|feat|fix|chore|docs|refactor|style|ci|perf|[0-9]+)\\-[a-zA-Z0-9\\-]+)$)",
Expand Down
1 change: 1 addition & 0 deletions packages/components/configs/angular/index.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
typescript: true,
attributePassing: {
enabled: true,
customRef: '_ref'
},
api: 'signals'
Expand Down
4 changes: 2 additions & 2 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
},
"devDependencies": {
"@builder.io/eslint-plugin-mitosis": "0.0.17",
"@builder.io/mitosis": "0.10.0",
"@builder.io/mitosis-cli": "0.10.0",
"@builder.io/mitosis": "0.11.0",
"@builder.io/mitosis-cli": "0.11.0",
"@typescript-eslint/eslint-plugin": "8.33.0",
"cpr": "3.0.1",
"cssnano": "^7.0.7",
Expand Down
33 changes: 13 additions & 20 deletions packages/components/scripts/post-build/angular.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const setControlValueAccessorReplacements = (
replacements.push({
from: '} from "@angular/core";',
to:
`Renderer2, model } from "@angular/core";\n` +
`Renderer2 } from "@angular/core";\n` +
`import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n`
});

Expand Down Expand Up @@ -58,7 +58,7 @@ const setControlValueAccessorReplacements = (
// insert custom interface functions before ngOnInit
// TODO update attribute by config if necessary (e.g. for checked attribute?)
replacements.push({
from: 'ngOnInit()',
from: 'ngAfterViewInit()',
to: `
writeValue(value: any) {
${valueAccessorRequired ? 'if(value){' : ''}
Expand All @@ -85,7 +85,7 @@ const setControlValueAccessorReplacements = (
this.disabled.set(disabled);
}

ngOnInit()`
ngAfterViewInit()`
});
};

Expand Down Expand Up @@ -177,29 +177,22 @@ export default (tmp?: boolean) => {
});

const replacements: Overwrite[] = [
// TODO: We don't need this after Angular drops support for v17 in may 2025
// TODO: Below Should be fixed in https://github.com/BuilderIO/mitosis/pull/1750
{
from: /allowSignalWrites: true,/g,
to: ''
},
{
from: `export class ${upperComponentName} {\n`,
to: `export class ${upperComponentName} implements AfterViewInit {\n`
},
{
from: '} from "@angular/core";',
to: `AfterViewInit,
} from "@angular/core";`
}
];

if (
readFileSync(file)
.toString()
.includes('this.initialized.set(true);')
) {
// TODO: Solve this in mitosis by splitting onInit and onMount into ngOnInit and ngAfterViewInit
replacements.push({
from: 'this.initialized.set(true);',
to: ''
});
replacements.push({
from: 'ngAfterViewInit() {',
to: 'ngAfterViewInit() {\nthis.initialized.set(true);\n'
});
}

if (component.config?.angular?.controlValueAccessor) {
setControlValueAccessorReplacements(
replacements,
Expand Down
6 changes: 1 addition & 5 deletions packages/components/scripts/post-build/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,7 @@ export const getComponents = (): Component[] => [
{{label() ?? DEFAULT_LABEL}}
<select`,
to: `<label [attr.id]="_labelId()">{{label() ?? DEFAULT_LABEL}}<select`
},
// TODO: Move this to mitosis
{ from: 'trackByOption0', to: 'trackByOption0(i,option)' },
{ from: 'trackByOption1', to: 'trackByOption1(index,option)' },
{ from: 'trackByOption2', to: 'trackByOption2(i,option)' }
}
],
react: [
{ from: 'key={uuid()}', to: 'key={getOptionLabel(option)}' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ import {

useMetadata({
angular: {
nativeAttributes: ['disabled', 'required', 'checked', 'indeterminate']
nativeAttributes: ['disabled', 'required', 'checked', 'indeterminate'],
signals: {
writeable: ['disabled', 'checked']
}
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ import {

useMetadata({
angular: {
nativeAttributes: ['disabled', 'checked', 'value', 'name']
nativeAttributes: ['disabled', 'checked', 'value', 'name'],
signals: {
writeable: ['disabled', 'checked']
}
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ import { DocumentClickListener } from '../../utils/document-click-listener';

useMetadata({
angular: {
nativeAttributes: ['disabled']
nativeAttributes: ['disabled'],
signals: {
writeable: ['disabled', 'values']
}
}
});

Expand Down
5 changes: 4 additions & 1 deletion packages/components/src/components/input/input.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ import {

useMetadata({
angular: {
nativeAttributes: ['disabled', 'required']
nativeAttributes: ['disabled', 'required'],
signals: {
writeable: ['disabled', 'value']
}
}
});

Expand Down
5 changes: 4 additions & 1 deletion packages/components/src/components/radio/radio.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ import {

useMetadata({
angular: {
nativeAttributes: ['disabled', 'required', 'checked', 'indeterminate']
nativeAttributes: ['disabled', 'required', 'checked', 'indeterminate'],
signals: {
writeable: ['disabled', 'value']
}
}
});
useDefaultProps<DBRadioProps>({});
Expand Down
5 changes: 4 additions & 1 deletion packages/components/src/components/select/select.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ import {

useMetadata({
angular: {
nativeAttributes: ['disabled', 'required', 'value']
nativeAttributes: ['disabled', 'required', 'value'],
signals: {
writeable: ['disabled', 'value']
}
}
});
useDefaultProps<DBSelectProps>({});
Expand Down
5 changes: 4 additions & 1 deletion packages/components/src/components/switch/switch.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ import {

useMetadata({
angular: {
nativeAttributes: ['disabled', 'required', 'checked', 'indeterminate']
nativeAttributes: ['disabled', 'required', 'checked', 'indeterminate'],
signals: {
writeable: ['disabled', 'checked']
}
}
});
useDefaultProps<DBSwitchProps>({});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ import {

useMetadata({
angular: {
nativeAttributes: ['disabled']
nativeAttributes: ['disabled'],
signals: {
writeable: ['disabled', 'checked']
}
}
});
useDefaultProps<DBTabItemProps>({});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ import {

useMetadata({
angular: {
nativeAttributes: ['disabled', 'required']
nativeAttributes: ['disabled', 'required'],
signals: {
writeable: ['disabled', 'value']
}
}
});
useDefaultProps<DBTextareaProps>({});
Expand Down
Loading