refactor(ivy): use ɵɵ instead of Δ for now (#29850)

The `Δ` caused issue with other infrastructure, and we are temporarily
changing it to `ɵɵ`.

This commit also patches ts_api_guardian_test and AIO to understand `ɵɵ`.

PR Close #29850
This commit is contained in:
Alex Rickabaugh
2019-04-11 13:46:47 -07:00
parent 54058ba3a7
commit b0578061ce
146 changed files with 8037 additions and 8005 deletions

View File

@ -39,13 +39,13 @@ describe('compiler compliance: bindings', () => {
const template = `
template:function MyComponent_Template(rf, $ctx$){
if (rf & 1) {
$i0$.ΔelementStart(0, "div");
$i0$.Δtext(1);
$i0$.ΔelementEnd();
$i0$.ɵɵelementStart(0, "div");
$i0$.ɵɵtext(1);
$i0$.ɵɵelementEnd();
}
if (rf & 2) {
$r3$.Δselect(1);
$i0$.ΔtextBinding(1, $i0$.Δinterpolation1("Hello ", $ctx$.name, ""));
$r3$.ɵɵselect(1);
$i0$.ɵɵtextBinding(1, $i0$.ɵɵinterpolation1("Hello ", $ctx$.name, ""));
}
}`;
const result = compile(files, angularFiles);
@ -78,11 +78,11 @@ describe('compiler compliance: bindings', () => {
template:function MyComponent_Template(rf, $ctx$){
if (rf & 1) {
$i0$.Δelement(0, "a", $e0_attrs$);
$i0$.ɵɵelement(0, "a", $e0_attrs$);
}
if (rf & 2) {
$i0$.Δselect(0);
$i0$.ΔelementProperty(0, "title", $i0$.Δbind($ctx$.title));
$i0$.ɵɵselect(0);
$i0$.ɵɵelementProperty(0, "title", $i0$.ɵɵbind($ctx$.title));
}
}`;
const result = compile(files, angularFiles);
@ -113,11 +113,11 @@ describe('compiler compliance: bindings', () => {
template:function MyComponent_Template(rf, $ctx$){
if (rf & 1) {
$i0$.Δelement(0, "a", $e0_attrs$);
$i0$.ɵɵelement(0, "a", $e0_attrs$);
}
if (rf & 2) {
$i0$.Δselect(0);
$i0$.ΔelementProperty(0, "title", $i0$.Δinterpolation1("Hello ", $ctx$.name, ""));
$i0$.ɵɵselect(0);
$i0$.ɵɵelementProperty(0, "title", $i0$.ɵɵinterpolation1("Hello ", $ctx$.name, ""));
}
}`;
const result = compile(files, angularFiles);
@ -138,7 +138,7 @@ describe('compiler compliance: bindings', () => {
}
};
const result = compile(files, angularFiles);
expect(result.source).not.toContain('i0.ΔelementProperty');
expect(result.source).not.toContain('i0.ɵɵelementProperty');
});
it('should not remap property names whose names do not correspond to their attribute names',
@ -170,11 +170,11 @@ describe('compiler compliance: bindings', () => {
function MyComponent_Template(rf, ctx) {
if (rf & 1) {
$i0$.Δelement(0, "label", _c0);
$i0$.ɵɵelement(0, "label", _c0);
}
if (rf & 2) {
$i0$.Δselect(0);
$i0$.ΔelementProperty(0, "for", $i0$.Δbind(ctx.forValue));
$i0$.ɵɵselect(0);
$i0$.ɵɵelementProperty(0, "for", $i0$.ɵɵbind(ctx.forValue));
}
}`;
@ -204,16 +204,16 @@ describe('compiler compliance: bindings', () => {
};
const HostBindingDirDeclaration = `
HostBindingDir.ngDirectiveDef = $r3$.ΔdefineDirective({
HostBindingDir.ngDirectiveDef = $r3$.ɵɵdefineDirective({
type: HostBindingDir,
selectors: [["", "hostBindingDir", ""]],
factory: function HostBindingDir_Factory(t) { return new (t || HostBindingDir)(); },
hostBindings: function HostBindingDir_HostBindings(rf, ctx, elIndex) {
if (rf & 1) {
$r3$.ΔallocHostVars(1);
$r3$.ɵɵallocHostVars(1);
}
if (rf & 2) {
$r3$.ΔelementProperty(elIndex, "id", $r3$.Δbind(ctx.dirId), null, true);
$r3$.ɵɵelementProperty(elIndex, "id", $r3$.ɵɵbind(ctx.dirId), null, true);
}
}
});
@ -251,16 +251,16 @@ describe('compiler compliance: bindings', () => {
const HostBindingCompDeclaration = `
const $ff$ = function ($v$) { return ["red", $v$]; };
HostBindingComp.ngComponentDef = $r3$.ΔdefineComponent({
HostBindingComp.ngComponentDef = $r3$.ɵɵdefineComponent({
type: HostBindingComp,
selectors: [["host-binding-comp"]],
factory: function HostBindingComp_Factory(t) { return new (t || HostBindingComp)(); },
hostBindings: function HostBindingComp_HostBindings(rf, ctx, elIndex) {
if (rf & 1) {
$r3$.ΔallocHostVars(3);
$r3$.ɵɵallocHostVars(3);
}
if (rf & 2) {
$r3$.ΔelementProperty(elIndex, "id", $r3$.Δbind($r3$.ΔpureFunction1(1, $ff$, ctx.id)), null, true);
$r3$.ɵɵelementProperty(elIndex, "id", $r3$.ɵɵbind($r3$.ɵɵpureFunction1(1, $ff$, ctx.id)), null, true);
}
},
consts: 0,
@ -299,16 +299,16 @@ describe('compiler compliance: bindings', () => {
};
const HostAttributeDirDeclaration = `
HostAttributeDir.ngDirectiveDef = $r3$.ΔdefineDirective({
HostAttributeDir.ngDirectiveDef = $r3$.ɵɵdefineDirective({
type: HostAttributeDir,
selectors: [["", "hostAttributeDir", ""]],
factory: function HostAttributeDir_Factory(t) { return new (t || HostAttributeDir)(); },
hostBindings: function HostAttributeDir_HostBindings(rf, ctx, elIndex) {
if (rf & 1) {
$r3$.ΔallocHostVars(1);
$r3$.ɵɵallocHostVars(1);
}
if (rf & 2) {
$r3$.ΔelementAttribute(elIndex, "required", $r3$.Δbind(ctx.required));
$r3$.ɵɵelementAttribute(elIndex, "required", $r3$.ɵɵbind(ctx.required));
}
}
});
@ -344,13 +344,13 @@ describe('compiler compliance: bindings', () => {
const HostAttributeDirDeclaration = `
const $c0$ = ["aria-label", "label"];
HostAttributeDir.ngDirectiveDef = $r3$.ΔdefineDirective({
HostAttributeDir.ngDirectiveDef = $r3$.ɵɵdefineDirective({
type: HostAttributeDir,
selectors: [["", "hostAttributeDir", ""]],
factory: function HostAttributeDir_Factory(t) { return new (t || HostAttributeDir)(); },
hostBindings: function HostAttributeDir_HostBindings(rf, ctx, elIndex) {
if (rf & 1) {
$r3$.ΔelementHostAttrs($c0$);
$r3$.ɵɵelementHostAttrs($c0$);
}
}
});
@ -402,25 +402,25 @@ describe('compiler compliance: bindings', () => {
const $c0$ = ["title", "hello there from component", ${AttributeMarker.Styles}, "opacity", "1"];
const $c1$ = ["title", "hello there from directive", ${AttributeMarker.Classes}, "one", "two", ${AttributeMarker.Styles}, "width", "200px", "height", "500px"];
HostAttributeComp.ngComponentDef = $r3$.ΔdefineComponent({
HostAttributeComp.ngComponentDef = $r3$.ɵɵdefineComponent({
type: HostAttributeComp,
selectors: [["my-host-attribute-component"]],
factory: function HostAttributeComp_Factory(t) { return new (t || HostAttributeComp)(); },
hostBindings: function HostAttributeComp_HostBindings(rf, ctx, elIndex) {
if (rf & 1) {
$r3$.ΔelementHostAttrs($c0$);
$r3$.ɵɵelementHostAttrs($c0$);
}
}
HostAttributeDir.ngDirectiveDef = $r3$.ΔdefineDirective({
HostAttributeDir.ngDirectiveDef = $r3$.ɵɵdefineDirective({
type: HostAttributeDir,
selectors: [["", "hostAttributeDir", ""]],
factory: function HostAttributeDir_Factory(t) { return new (t || HostAttributeDir)(); },
hostBindings: function HostAttributeDir_HostBindings(rf, ctx, elIndex) {
if (rf & 1) {
$r3$.ΔelementHostAttrs($c1$);
$r3$.ɵɵelementHostAttrs($c1$);
}
@ -466,19 +466,19 @@ describe('compiler compliance: bindings', () => {
template:function MyComponent_Template(rf, $ctx$){
if (rf & 1) {
$i0$.ΔelementStart(0, "b", $_c0$, $_c1$);
$i0$.ΔdisableBindings();
$i0$.ΔelementStart(2, "i");
$i0$.Δtext(3, "Hello {{ name }}!");
$i0$.ΔelementEnd();
$i0$.ΔenableBindings();
$i0$.ΔelementEnd();
$i0$.Δtext(4);
$i0$.ɵɵelementStart(0, "b", $_c0$, $_c1$);
$i0$.ɵɵdisableBindings();
$i0$.ɵɵelementStart(2, "i");
$i0$.ɵɵtext(3, "Hello {{ name }}!");
$i0$.ɵɵelementEnd();
$i0$.ɵɵenableBindings();
$i0$.ɵɵelementEnd();
$i0$.ɵɵtext(4);
}
if (rf & 2) {
const $_r0$ = $i0$.Δreference(1);
$r3$.Δselect(4);
$i0$.ΔtextBinding(4, $i0$.Δinterpolation1(" ", $_r0$.id, " "));
const $_r0$ = $i0$.ɵɵreference(1);
$r3$.ɵɵselect(4);
$i0$.ɵɵtextBinding(4, $i0$.ɵɵinterpolation1(" ", $_r0$.id, " "));
}
}
`;
@ -498,12 +498,12 @@ describe('compiler compliance: bindings', () => {
template:function MyComponent_Template(rf, $ctx$){
if (rf & 1) {
$i0$.ΔelementStart(0, "div");
$i0$.ΔdisableBindings();
$i0$.Δelement(1, "input", $_c0$);
$i0$.Δtext(2, " {{ myInput.value }} ");
$i0$.ΔenableBindings();
$i0$.ΔelementEnd();
$i0$.ɵɵelementStart(0, "div");
$i0$.ɵɵdisableBindings();
$i0$.ɵɵelement(1, "input", $_c0$);
$i0$.ɵɵtext(2, " {{ myInput.value }} ");
$i0$.ɵɵenableBindings();
$i0$.ɵɵelementEnd();
}
`;
const result = compile(files, angularFiles);
@ -522,11 +522,11 @@ describe('compiler compliance: bindings', () => {
template:function MyComponent_Template(rf, $ctx$){
if (rf & 1) {
$i0$.ΔelementStart(0, "div");
$i0$.ΔdisableBindings();
$i0$.Δelement(1, "div", $_c0$);
$i0$.ΔenableBindings();
$i0$.ΔelementEnd();
$i0$.ɵɵelementStart(0, "div");
$i0$.ɵɵdisableBindings();
$i0$.ɵɵelement(1, "div", $_c0$);
$i0$.ɵɵenableBindings();
$i0$.ɵɵelementEnd();
}
`;
const result = compile(files, angularFiles);
@ -541,7 +541,7 @@ describe('compiler compliance: bindings', () => {
const template = `
template:function MyComponent_Template(rf, $ctx$){
if (rf & 1) {
$i0$.Δelement(0, "div");
$i0$.ɵɵelement(0, "div");
}
}
`;