Skip to content

Commit

Permalink
[BUGFIX beta] Fix {{#-in-element}} double-clearing issue
Browse files Browse the repository at this point in the history
Closes #18696

(cherry picked from commit 4c5fad3)
  • Loading branch information
chancancode committed Feb 7, 2020
1 parent 975bbb9 commit dcce000
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 103 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@
},
"devDependencies": {
"@babel/preset-env": "^7.7.7",
"@glimmer/compiler": "0.47.4",
"@glimmer/compiler": "0.47.5",
"@glimmer/env": "^0.1.7",
"@glimmer/interfaces": "0.47.4",
"@glimmer/node": "0.47.4",
"@glimmer/opcode-compiler": "0.47.4",
"@glimmer/program": "0.47.4",
"@glimmer/reference": "0.47.4",
"@glimmer/runtime": "0.47.4",
"@glimmer/validator": "0.47.4",
"@glimmer/interfaces": "0.47.5",
"@glimmer/node": "0.47.5",
"@glimmer/opcode-compiler": "0.47.5",
"@glimmer/program": "0.47.5",
"@glimmer/reference": "0.47.5",
"@glimmer/runtime": "0.47.5",
"@glimmer/validator": "0.47.5",
"@simple-dom/document": "^1.4.0",
"@types/qunit": "^2.5.4",
"@types/rsvp": "^4.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,5 +228,31 @@ moduleFor(

assert.deepEqual(hooks, ['didInsertElement', 'willDestroyElement']);
}

['@test appending to the root element should not cause double clearing are cleaned up properly']() {
this.render(
strip`
Before
{{#-in-element this.rootElement insertBefore=null}}
{{this.text}}
{{/-in-element}}
After
`,
{
rootElement: this.element,
text: 'Whoop!',
}
);

equalTokens(this.element, 'BeforeWhoop!<!---->After');

this.assertStableRerender();

runTask(() => set(this.context, 'text', 'Huzzah!'));

equalTokens(this.element, 'BeforeHuzzah!<!---->After');

// teardown happens in afterEach and should not cause double-clearing error
}
}
);
190 changes: 95 additions & 95 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -801,138 +801,138 @@
resolved "https://registry.yarnpkg.com/@ember/edition-utils/-/edition-utils-1.2.0.tgz#a039f542dc14c8e8299c81cd5abba95e2459cfa6"
integrity sha512-VmVq/8saCaPdesQmftPqbFtxJWrzxNGSQ+e8x8LLe3Hjm36pJ04Q8LeORGZkAeOhldoUX9seLGmSaHeXkIqoog==

"@glimmer/[email protected].4":
version "0.47.4"
resolved "https://registry.yarnpkg.com/@glimmer/compiler/-/compiler-0.47.4.tgz#53c024ea66457be20f80b2c95845ec9ae838f4ee"
integrity sha512-YuNJR22gN7TYevenRlQIRLxys7d3i2hHX/qZdhy/VDCgXacf0AMm87LQAKM4k1sjHG8NtveSUEzAughLOBm7GQ==
dependencies:
"@glimmer/interfaces" "^0.47.4"
"@glimmer/syntax" "^0.47.4"
"@glimmer/util" "^0.47.4"
"@glimmer/wire-format" "^0.47.4"
"@glimmer/[email protected].5":
version "0.47.5"
resolved "https://registry.yarnpkg.com/@glimmer/compiler/-/compiler-0.47.5.tgz#b41dedca886c0591c1acbed4d9ccd50b79487c75"
integrity sha512-iaRjtlMSnMjnKh8wGENfh+tT1cvlf+/KhpY8Q8/HWpzvB7jex3z/j26nkMryLVjzOtw0zRxybFatN4jqOOdF3g==
dependencies:
"@glimmer/interfaces" "^0.47.5"
"@glimmer/syntax" "^0.47.5"
"@glimmer/util" "^0.47.5"
"@glimmer/wire-format" "^0.47.5"
"@simple-dom/interface" "^1.4.0"

"@glimmer/encoder@^0.47.4":
version "0.47.4"
resolved "https://registry.yarnpkg.com/@glimmer/encoder/-/encoder-0.47.4.tgz#c52c46d587152d0af1c3e866a4062d0665a8cc4a"
integrity sha512-tYZdIKssBTCogsUbjqhnbP27W9ZiefTYGebNH7O7V+/4ZeitiRhVzy+ELDSB0vKyvlfYWxyecjcckvxVTJBaNQ==
"@glimmer/encoder@^0.47.5":
version "0.47.5"
resolved "https://registry.yarnpkg.com/@glimmer/encoder/-/encoder-0.47.5.tgz#9ec13aaa87ce3edac84286ad2e5301fe4fd2f8e0"
integrity sha512-SScSjBRuvgeNqaIFaGZ6rZJt4Avlz2VZ7TLfNm+snOg/juFNhoAfevDECizzm0dzof4YE7tKoDruM+Dg0SINBA==
dependencies:
"@glimmer/interfaces" "^0.47.4"
"@glimmer/vm" "^0.47.4"
"@glimmer/interfaces" "^0.47.5"
"@glimmer/vm" "^0.47.5"

"@glimmer/[email protected]", "@glimmer/env@^0.1.7":
version "0.1.7"
resolved "https://registry.yarnpkg.com/@glimmer/env/-/env-0.1.7.tgz#fd2d2b55a9029c6b37a6c935e8c8871ae70dfa07"
integrity sha1-/S0rVakCnGs3psk16MiHGucN+gc=

"@glimmer/[email protected].4", "@glimmer/interfaces@^0.47.4":
version "0.47.4"
resolved "https://registry.yarnpkg.com/@glimmer/interfaces/-/interfaces-0.47.4.tgz#17772fae66571b606f9fa26d733d7211960a2560"
integrity sha512-Wbv6954fIOy1aWHh2IdneBmIGrGysyu+ZWrmAiuMQC92uf57a9AXFJW0DFY+X6gd8Biaw/Nx8EHE0bNeMYCp9Q==
"@glimmer/[email protected].5", "@glimmer/interfaces@^0.47.5":
version "0.47.5"
resolved "https://registry.yarnpkg.com/@glimmer/interfaces/-/interfaces-0.47.5.tgz#8200459b2f54eadfedc4906e7cd0937421c03deb"
integrity sha512-sM6rQO5tEqcascwdMvlt8x03AaAILH//7jmF/Gq4HgL7dSfsflmvQV3YukevzEhZSgZfbUZIiOnSKgRYyMHifA==
dependencies:
"@simple-dom/interface" "^1.4.0"

"@glimmer/low-level@^0.47.4":
version "0.47.4"
resolved "https://registry.yarnpkg.com/@glimmer/low-level/-/low-level-0.47.4.tgz#04684558499f5a5dbeec6ab440f97c3889156e20"
integrity sha512-brjZnS2XjKJFtG7XsjiL/D+CgLAi2uFcuDQAMcUEATsjTdW/XWspnBrUaX2s5SmaFwf843pZi61oKr0EgLmQKw==
"@glimmer/low-level@^0.47.5":
version "0.47.5"
resolved "https://registry.yarnpkg.com/@glimmer/low-level/-/low-level-0.47.5.tgz#e81f7f8fc2ff582adedd4fe4443b9a83c1b851bc"
integrity sha512-DTpWeHn7SuYz2DTPs0eW396Tvw9/VbqT0kke84WyW7yeA6abykiDxHl05v0+WyBRwoPMu4wbs0O8I5iXHySFlw==

"@glimmer/[email protected].4":
version "0.47.4"
resolved "https://registry.yarnpkg.com/@glimmer/node/-/node-0.47.4.tgz#a19ed1afb2ebac656d98a35acb4931a8a987fd23"
integrity sha512-UP86z6x2Bh7Q4jWbPxAvuWsfCqsbM8lROSiNx5ReA+K8iUgTT3PT6c2ea7TUSVmHnsx0Xzbs6UgINGMSROIaCg==
"@glimmer/[email protected].5":
version "0.47.5"
resolved "https://registry.yarnpkg.com/@glimmer/node/-/node-0.47.5.tgz#e86943b01fe27a26c0aa2e1b29522c4aaefd88db"
integrity sha512-3EN3EBY56ayparChyFbd6c68fRQcnAVPRD3LBCwqA4Lf/cnGJ4YxowjkM9nW+DF/KBR6+BzYZ4Mw8kC2KqaFdA==
dependencies:
"@glimmer/interfaces" "^0.47.4"
"@glimmer/runtime" "^0.47.4"
"@glimmer/interfaces" "^0.47.5"
"@glimmer/runtime" "^0.47.5"
"@simple-dom/document" "^1.4.0"
"@simple-dom/interface" "^1.4.0"

"@glimmer/[email protected].4":
version "0.47.4"
resolved "https://registry.yarnpkg.com/@glimmer/opcode-compiler/-/opcode-compiler-0.47.4.tgz#71decdfa7cac9ceef18e415ab349288e83768e53"
integrity sha512-uNY88oFZT6vwE5T+Cq74mJEkr8fwZ+nfIqRXtZNAIl8gNxfZDv0Q6nSDK+U2WNz6s4edomzxRUL67wpREfzwGw==
dependencies:
"@glimmer/encoder" "^0.47.4"
"@glimmer/interfaces" "^0.47.4"
"@glimmer/program" "^0.47.4"
"@glimmer/reference" "^0.47.4"
"@glimmer/util" "^0.47.4"
"@glimmer/vm" "^0.47.4"
"@glimmer/wire-format" "^0.47.4"

"@glimmer/[email protected].4", "@glimmer/program@^0.47.4":
version "0.47.4"
resolved "https://registry.yarnpkg.com/@glimmer/program/-/program-0.47.4.tgz#b0105b28e332b458839b6c2e50c99f349198033b"
integrity sha512-jI3FbnE96HasdkYwqPNcOG/pwiIyfN7M3hrpKP1WCvtrDTp6MeikKSdiEafZefNlOk/zr1OqnG9RNMzjl7N3+w==
dependencies:
"@glimmer/encoder" "^0.47.4"
"@glimmer/interfaces" "^0.47.4"
"@glimmer/util" "^0.47.4"

"@glimmer/[email protected].4", "@glimmer/reference@^0.47.4":
version "0.47.4"
resolved "https://registry.yarnpkg.com/@glimmer/reference/-/reference-0.47.4.tgz#972e24313ce2552e24ebbaf1ce7691d7c4c1f7e9"
integrity sha512-A7ruDxaa/jFSoAWv0yeGRGgtEevaP1XAhamJ4CMGAXAwE2PiODo5TZRNiTsgKnoZytsokcvfXOJZIHHQ/VHdTg==
"@glimmer/[email protected].5":
version "0.47.5"
resolved "https://registry.yarnpkg.com/@glimmer/opcode-compiler/-/opcode-compiler-0.47.5.tgz#b07d6cc849c8ce012abaf906359cbf22eaa4dbcd"
integrity sha512-jD0exb7phakF4/g44b0Cgc0sHciCNZd6nlFfVoebCkrWBk69PTgBjWsi8AnGZRK0Sqj95K9aI8hHse6d8d0uXQ==
dependencies:
"@glimmer/encoder" "^0.47.5"
"@glimmer/interfaces" "^0.47.5"
"@glimmer/program" "^0.47.5"
"@glimmer/reference" "^0.47.5"
"@glimmer/util" "^0.47.5"
"@glimmer/vm" "^0.47.5"
"@glimmer/wire-format" "^0.47.5"

"@glimmer/[email protected].5", "@glimmer/program@^0.47.5":
version "0.47.5"
resolved "https://registry.yarnpkg.com/@glimmer/program/-/program-0.47.5.tgz#51439854edbea7ddba3c9db537d75ee8a6649ff1"
integrity sha512-Q1hEGUQ27O6DdV8tQUFQ5V9i2BAZ9E8C9sayfi8uw3Ostct3M5zeapXkpwnUIQvlznh5MrmBx123qsnfS7GJDg==
dependencies:
"@glimmer/encoder" "^0.47.5"
"@glimmer/interfaces" "^0.47.5"
"@glimmer/util" "^0.47.5"

"@glimmer/[email protected].5", "@glimmer/reference@^0.47.5":
version "0.47.5"
resolved "https://registry.yarnpkg.com/@glimmer/reference/-/reference-0.47.5.tgz#db1e6f21dc141cb41d3ae4ba975654b1536364a1"
integrity sha512-ATHsAYurdCdsxyyfj6OlM4RwrdamJQHzW6sgvHz8fHsSG15RU43Gala7PAdgkgHVnbyfW/MsiYXhLsPzSnRqYQ==
dependencies:
"@glimmer/env" "^0.1.7"
"@glimmer/util" "^0.47.4"
"@glimmer/validator" "^0.47.4"
"@glimmer/util" "^0.47.5"
"@glimmer/validator" "^0.47.5"

"@glimmer/[email protected].4", "@glimmer/runtime@^0.47.4":
version "0.47.4"
resolved "https://registry.yarnpkg.com/@glimmer/runtime/-/runtime-0.47.4.tgz#ebeb396f5b4a1dea28b9865f8c7990b445474343"
integrity sha512-41eyqls4TpWk1tNVZHG0v2O2ynIpJr/vkCn3fPCajYM96KTV0dAXThJWwRm04O6nSzMaGmSpFawDjCe0A1FZtw==
"@glimmer/[email protected].5", "@glimmer/runtime@^0.47.5":
version "0.47.5"
resolved "https://registry.yarnpkg.com/@glimmer/runtime/-/runtime-0.47.5.tgz#32b9c198ad6d5485768a6b8be140663cb75da00e"
integrity sha512-2qVZko4rQM6lFfygq/pzBAD1pz4VGZLYlpmBDrSa/TwlQ+kVF9Pqe5p9+AyZ7Qv0R3hEp6GQjH/3hnGcpsLidA==
dependencies:
"@glimmer/env" "0.1.7"
"@glimmer/interfaces" "^0.47.4"
"@glimmer/low-level" "^0.47.4"
"@glimmer/program" "^0.47.4"
"@glimmer/reference" "^0.47.4"
"@glimmer/util" "^0.47.4"
"@glimmer/validator" "^0.47.4"
"@glimmer/vm" "^0.47.4"
"@glimmer/wire-format" "^0.47.4"
"@glimmer/interfaces" "^0.47.5"
"@glimmer/low-level" "^0.47.5"
"@glimmer/program" "^0.47.5"
"@glimmer/reference" "^0.47.5"
"@glimmer/util" "^0.47.5"
"@glimmer/validator" "^0.47.5"
"@glimmer/vm" "^0.47.5"
"@glimmer/wire-format" "^0.47.5"
"@simple-dom/interface" "^1.4.0"

"@glimmer/syntax@^0.47.4":
version "0.47.4"
resolved "https://registry.yarnpkg.com/@glimmer/syntax/-/syntax-0.47.4.tgz#827f63a9c5f14a8329ff26c1e1f6ad211683690d"
integrity sha512-GCqoKyU11+cD9jL1J6AlSgKn1/rFUt/Wc3pgf/AE7uxza00OOYDEbqfpzOdv9sF727aqKdy9qp3a9O54IcevuA==
"@glimmer/syntax@^0.47.5":
version "0.47.5"
resolved "https://registry.yarnpkg.com/@glimmer/syntax/-/syntax-0.47.5.tgz#a9ed42009350ffe400f3b27f7ca5c8f804cd1574"
integrity sha512-pwjkhvYQM9NIwh1LVW64QKITzxbsmLVUhD4GVUN8JxeTAASy/YGywSz0vvFV3r+uM1LXP5QFiHLJPZBHv6g3uw==
dependencies:
"@glimmer/interfaces" "^0.47.4"
"@glimmer/util" "^0.47.4"
"@glimmer/interfaces" "^0.47.5"
"@glimmer/util" "^0.47.5"
handlebars "^4.5.1"
simple-html-tokenizer "^0.5.9"

"@glimmer/util@^0.47.4":
version "0.47.4"
resolved "https://registry.yarnpkg.com/@glimmer/util/-/util-0.47.4.tgz#de6061d30f03ca09950208f6de7b529efc8fb539"
integrity sha512-uGcUjDtcy/CTSKMYuIpmvZfv4busDcPbx6X+AnWkaTIonvp0z8HKpZ5QYrulR9Gcbbtb+noCTmMr2qa7AEyA4Q==
"@glimmer/util@^0.47.5":
version "0.47.5"
resolved "https://registry.yarnpkg.com/@glimmer/util/-/util-0.47.5.tgz#34c7741e335af0f232a70652d1b6603e532d8894"
integrity sha512-NIwVlUd7KjnR0A0KO3+IHA11gZRQ1xSRQdDKJISib2i+qVspeQSWWNu+vm2ITTXiQzZBBGfSJTFyh23NZolufQ==
dependencies:
"@simple-dom/interface" "^1.4.0"

"@glimmer/[email protected].4", "@glimmer/validator@^0.47.4":
version "0.47.4"
resolved "https://registry.yarnpkg.com/@glimmer/validator/-/validator-0.47.4.tgz#8ba22ccdf5adbf57fd175cbe77f447e43cabd092"
integrity sha512-u7jFJRBtz3i5/XWRlfCjSUsp6/NEA4J0/ildurvfdWDZusLZ0qAu995H1C12WtpIvvbY4rA/ELHnt5sNMldHDQ==
"@glimmer/[email protected].5", "@glimmer/validator@^0.47.5":
version "0.47.5"
resolved "https://registry.yarnpkg.com/@glimmer/validator/-/validator-0.47.5.tgz#a2b7cce6d5c23ab1e88a75c8d383815b1d802fb1"
integrity sha512-KI0bop9xlwS23eSy69H4RsgdhrOi7LN30EfL5UO09aoUPc6Y7U8Y/Vs3wVksn6MsrOuAauHN9iuLcYdekPMz0Q==
dependencies:
"@glimmer/env" "^0.1.7"

"@glimmer/vm@^0.47.4":
version "0.47.4"
resolved "https://registry.yarnpkg.com/@glimmer/vm/-/vm-0.47.4.tgz#13cab445e5e8dccb556150dacbfa2f9d3384a6e0"
integrity sha512-pZHbgfNG24WYO/nYldBOQMuasau3sgxTc9F10Pk1mAUKoCSSct2z04MoJrrvOh1ItpppIxLS5OHsLkBBNtbEDg==
"@glimmer/vm@^0.47.5":
version "0.47.5"
resolved "https://registry.yarnpkg.com/@glimmer/vm/-/vm-0.47.5.tgz#c289775c02c0a02fa1678754c5d577e2799dac71"
integrity sha512-HHhJkvCzxvgTLgz4zpqaLnzRbP7S44uboKrg48oQd/cQDr/b2F4NWbzdie4puIGnPqt3Tm5weE0gfGx5xolBjw==
dependencies:
"@glimmer/interfaces" "^0.47.4"
"@glimmer/util" "^0.47.4"
"@glimmer/interfaces" "^0.47.5"
"@glimmer/util" "^0.47.5"

"@glimmer/wire-format@^0.47.4":
version "0.47.4"
resolved "https://registry.yarnpkg.com/@glimmer/wire-format/-/wire-format-0.47.4.tgz#9e05a9f9eb48a8494b37b2c90f89ac03f048925d"
integrity sha512-DMrx8sC6cOR4+5dDq/i8FzqJFGB6LTEcBjDyjLKqP9O9I0FY1ktjn4mcuFAm2KB7LLMbYa1u3iLHRaEs4k3deg==
"@glimmer/wire-format@^0.47.5":
version "0.47.5"
resolved "https://registry.yarnpkg.com/@glimmer/wire-format/-/wire-format-0.47.5.tgz#52128415c06ed22ac88b61978f135faa34cc4330"
integrity sha512-HU/q8+P0oLlXtLeRueWm5RpZICGhB2Eiv5w+h9itCagPpX7QbRSVbiEFRwC3OMhgZHwZEGBIPWGa0kxQu3eruQ==
dependencies:
"@glimmer/interfaces" "^0.47.4"
"@glimmer/util" "^0.47.4"
"@glimmer/interfaces" "^0.47.5"
"@glimmer/util" "^0.47.5"

"@simple-dom/document@^1.4.0":
version "1.4.0"
Expand Down

0 comments on commit dcce000

Please sign in to comment.