refactor(ivy): migrate ɵɵ prefix back to Δ (#30362)

Now that issues are resolved with Closure compiler, we can move back to our desired prefix of `Δ`.

PR Close #30362
This commit is contained in:
Ben Lesh
2019-05-09 11:47:25 -07:00
committed by Alex Rickabaugh
parent dbb150a9bd
commit cf86ed7b29
142 changed files with 6417 additions and 6453 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$.ɵɵproperty("title", $ctx$.title);
$i0$.Δselect(0);
$i0$.Δproperty("title", $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$.ɵɵpropertyInterpolate1("title", "Hello ", $ctx$.name, "");
$i0$.Δselect(0);
$i0$.ΔpropertyInterpolate1("title", "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$.ɵɵproperty("for", ctx.forValue);
$i0$.Δselect(0);
$i0$.Δproperty("for", 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$.ɵɵproperty("id", ctx.dirId, null, true);
$r3$.Δproperty("id", 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$.ɵɵproperty("id", $r3$.ɵɵpureFunction1(1, $ff$, ctx.id), null, true);
$r3$.Δproperty("id", $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$);
}
@ -469,26 +469,26 @@ describe('compiler compliance: bindings', () => {
const template = `
if (rf & 2) {
i0.ɵɵselect(0);
i0.ɵɵpropertyInterpolateV("title", ["a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h", ctx.eight, "i", ctx.nine, "j"]);
i0.ɵɵselect(1);
i0.ɵɵpropertyInterpolate8("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h", ctx.eight, "i");
i0.ɵɵselect(2);
i0.ɵɵpropertyInterpolate7("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h");
i0.ɵɵselect(3);
i0.ɵɵpropertyInterpolate6("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g");
i0.ɵɵselect(4);
i0.ɵɵpropertyInterpolate5("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f");
i0.ɵɵselect(5);
i0.ɵɵpropertyInterpolate4("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e");
i0.ɵɵselect(6);
i0.ɵɵpropertyInterpolate3("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d");
i0.ɵɵselect(7);
i0.ɵɵpropertyInterpolate2("title", "a", ctx.one, "b", ctx.two, "c");
i0.ɵɵselect(8);
i0.ɵɵpropertyInterpolate1("title", "a", ctx.one, "b");
i0.ɵɵselect(9);
i0.ɵɵpropertyInterpolate("title", ctx.one);
i0.Δselect(0);
i0.ΔpropertyInterpolateV("title", ["a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h", ctx.eight, "i", ctx.nine, "j"]);
i0.Δselect(1);
i0.ΔpropertyInterpolate8("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h", ctx.eight, "i");
i0.Δselect(2);
i0.ΔpropertyInterpolate7("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g", ctx.seven, "h");
i0.Δselect(3);
i0.ΔpropertyInterpolate6("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f", ctx.six, "g");
i0.Δselect(4);
i0.ΔpropertyInterpolate5("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e", ctx.five, "f");
i0.Δselect(5);
i0.ΔpropertyInterpolate4("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d", ctx.four, "e");
i0.Δselect(6);
i0.ΔpropertyInterpolate3("title", "a", ctx.one, "b", ctx.two, "c", ctx.three, "d");
i0.Δselect(7);
i0.ΔpropertyInterpolate2("title", "a", ctx.one, "b", ctx.two, "c");
i0.Δselect(8);
i0.ΔpropertyInterpolate1("title", "a", ctx.one, "b");
i0.Δselect(9);
i0.ΔpropertyInterpolate("title", ctx.one);
}
`;
@ -510,19 +510,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, " "));
}
}
`;
@ -542,12 +542,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);
@ -566,11 +566,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);
@ -585,7 +585,7 @@ describe('compiler compliance: bindings', () => {
const template = `
template:function MyComponent_Template(rf, $ctx$){
if (rf & 1) {
$i0$.ɵɵelement(0, "div");
$i0$.Δelement(0, "div");
}
}
`;