diff --git a/package.json b/package.json index 5983092e280..2ae50eeea04 100644 --- a/package.json +++ b/package.json @@ -74,15 +74,15 @@ }, "devDependencies": { "@babel/preset-env": "^7.7.7", - "@glimmer/compiler": "0.47.5", + "@glimmer/compiler": "0.47.9", "@glimmer/env": "^0.1.7", - "@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", + "@glimmer/interfaces": "0.47.9", + "@glimmer/node": "0.47.9", + "@glimmer/opcode-compiler": "0.47.9", + "@glimmer/program": "0.47.9", + "@glimmer/reference": "0.47.9", + "@glimmer/runtime": "0.47.9", + "@glimmer/validator": "0.47.9", "@simple-dom/document": "^1.4.0", "@types/qunit": "^2.5.4", "@types/rsvp": "^4.0.3", diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/contextual-components-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/contextual-components-test.js index e44812e0b85..8f31f59cd7c 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/components/contextual-components-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/components/contextual-components-test.js @@ -1360,6 +1360,72 @@ moduleFor( this.assertStableRerender(); } + + ['@test GH#18732 hasBlock works within a yielded curried component invoked within mustaches']() { + this.registerComponent('component-with-has-block', { + ComponentClass: Component.extend(), + template: '
{{hasBlock}}
', + }); + + this.registerComponent('yielding-component', { + ComponentClass: Component.extend(), + template: '{{yield (component "component-with-has-block")}}', + }); + + this.registerComponent('test-component', { + ComponentClass: Component.extend(), + template: + '{{#yielding-component as |componentWithHasBlock|}}{{componentWithHasBlock}}{{/yielding-component}}', + }); + + this.render('{{test-component}}'); + + this.assertText('false'); + } + + ['@test GH#18732 has-block works within a yielded curried component invoked with angle bracket invocation (falsy)']() { + this.registerComponent('component-with-has-block', { + ComponentClass: Component.extend(), + template: '
{{hasBlock}}
', + }); + + this.registerComponent('yielding-component', { + ComponentClass: Component.extend(), + template: '{{yield (component "component-with-has-block")}}', + }); + + this.registerComponent('test-component', { + ComponentClass: Component.extend(), + template: + '{{#yielding-component as |componentWithHasBlock|}}{{/yielding-component}}', + }); + + this.render('{{test-component}}'); + + this.assertText('false'); + } + + ['@test GH#18732 has-block works within a yielded curried component invoked with angle bracket invocation (truthy)']() { + this.registerComponent('component-with-has-block', { + ComponentClass: Component.extend(), + template: '
{{hasBlock}}
', + }); + + this.registerComponent('yielding-component', { + ComponentClass: Component.extend(), + template: '{{yield (component "component-with-has-block")}}', + }); + + this.registerComponent('test-component', { + ComponentClass: Component.extend(), + template: + '{{#yielding-component as |componentWithHasBlock|}}{{/yielding-component}}', + }); + + this.render('{{test-component}}'); + + this.assertText('true'); + } } ); diff --git a/packages/@ember/-internals/glimmer/tests/integration/helpers/array-test.js b/packages/@ember/-internals/glimmer/tests/integration/helpers/array-test.js index e30ea6725ee..ee8982f6400 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/helpers/array-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/helpers/array-test.js @@ -285,5 +285,14 @@ moduleFor( this.assert.deepEqual(captured, ['Tom', 'Godfrey']); } + + ['@test GH18693 properties in hash can be accessed from the array']() { + this.render(strip` + {{#each (array (hash some="thing")) as |item|}} + {{item.some}} + {{/each}}`); + + this.assertText('thing'); + } } ); diff --git a/yarn.lock b/yarn.lock index 7377d677d2c..8249143688e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -801,138 +801,139 @@ resolved "https://registry.yarnpkg.com/@ember/edition-utils/-/edition-utils-1.2.0.tgz#a039f542dc14c8e8299c81cd5abba95e2459cfa6" integrity sha512-VmVq/8saCaPdesQmftPqbFtxJWrzxNGSQ+e8x8LLe3Hjm36pJ04Q8LeORGZkAeOhldoUX9seLGmSaHeXkIqoog== -"@glimmer/compiler@0.47.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" +"@glimmer/compiler@0.47.9": + version "0.47.9" + resolved "https://registry.yarnpkg.com/@glimmer/compiler/-/compiler-0.47.9.tgz#7048fe0c4e9040dadf8352ed7e854c730805ff14" + integrity sha512-95B4bZ/48FWJdpuoy1JBgB3n0gpbAaMK3kkcrgcBv8/MkYzyraZuP/qAqtkXBF/+rAlczMBe5ODUhBOIzre4Gw== + dependencies: + "@glimmer/interfaces" "^0.47.9" + "@glimmer/syntax" "^0.47.9" + "@glimmer/util" "^0.47.9" + "@glimmer/wire-format" "^0.47.9" "@simple-dom/interface" "^1.4.0" -"@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== +"@glimmer/encoder@^0.47.9": + version "0.47.9" + resolved "https://registry.yarnpkg.com/@glimmer/encoder/-/encoder-0.47.9.tgz#76b8844b70aa2948a14306edfd189ab9c3c49ac1" + integrity sha512-A3ldCfWzXVuU4vF2R0nFKppBZ90zgjsC8DS41Z5O4tdL1aJZ1WhyF/DaJI7YNqnh2gn+1pFAUTkZgMgEADV59w== dependencies: - "@glimmer/interfaces" "^0.47.5" - "@glimmer/vm" "^0.47.5" + "@glimmer/interfaces" "^0.47.9" + "@glimmer/vm" "^0.47.9" "@glimmer/env@0.1.7", "@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/interfaces@0.47.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== +"@glimmer/interfaces@0.47.9", "@glimmer/interfaces@^0.47.9": + version "0.47.9" + resolved "https://registry.yarnpkg.com/@glimmer/interfaces/-/interfaces-0.47.9.tgz#4c50b5343815045318bba38915f780ae39f14590" + integrity sha512-xne80DHkPC70u08LKV9g0+PboAmIw0A+vDXjJXMrDoRcNzCR4dXR6nvKD/Een+wbwwBaRawCIn45Rnk5+Dyvrg== dependencies: "@simple-dom/interface" "^1.4.0" -"@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/low-level@^0.47.9": + version "0.47.9" + resolved "https://registry.yarnpkg.com/@glimmer/low-level/-/low-level-0.47.9.tgz#ef5e3aaaa659e3d94fa452688f869a2a38524285" + integrity sha512-BUQeUxx8mDlNNwVFz3SFIOs0eysl9OX89suUrZROZ/emg37RZFbo/6cRi7v5ZCEknX2vCBJ0tzEbWXGEiPoysQ== -"@glimmer/node@0.47.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== +"@glimmer/node@0.47.9": + version "0.47.9" + resolved "https://registry.yarnpkg.com/@glimmer/node/-/node-0.47.9.tgz#91677f8c61c3ed1003f962466eeab3cd03bc132f" + integrity sha512-txe2pDVKczw1dx+Z48BwzU4n8SSTlsZ4n/rylmxw2Vc5fSUivLz9rVf34n40cD13v0Bz5keEKitYtG6LFDA8BA== dependencies: - "@glimmer/interfaces" "^0.47.5" - "@glimmer/runtime" "^0.47.5" + "@glimmer/interfaces" "^0.47.9" + "@glimmer/runtime" "^0.47.9" "@simple-dom/document" "^1.4.0" "@simple-dom/interface" "^1.4.0" -"@glimmer/opcode-compiler@0.47.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/program@0.47.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/reference@0.47.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== +"@glimmer/opcode-compiler@0.47.9": + version "0.47.9" + resolved "https://registry.yarnpkg.com/@glimmer/opcode-compiler/-/opcode-compiler-0.47.9.tgz#732d33355385de1bc9c27f76203f30e22088525f" + integrity sha512-JMBatBMmC/AJKerlKB6cx33Knm3UGtdDdBLklQZoJOC7q0WUL/S7zZ5uCrpaP3sxBa9PP7HNYRdyK2tsbgYnWg== + dependencies: + "@glimmer/encoder" "^0.47.9" + "@glimmer/interfaces" "^0.47.9" + "@glimmer/program" "^0.47.9" + "@glimmer/reference" "^0.47.9" + "@glimmer/util" "^0.47.9" + "@glimmer/vm" "^0.47.9" + "@glimmer/wire-format" "^0.47.9" + +"@glimmer/program@0.47.9", "@glimmer/program@^0.47.9": + version "0.47.9" + resolved "https://registry.yarnpkg.com/@glimmer/program/-/program-0.47.9.tgz#8ffa8a43c36d985d5d6949672b69bee1f3d6e9a6" + integrity sha512-y3aShRCnVDhdq8I/uNokQ00QNn89hRSKLjhnh8s0stk7sGBJrzuas2DTSQOVkKEuz96SAIqBQD+xpMJjf3mF4A== + dependencies: + "@glimmer/encoder" "^0.47.9" + "@glimmer/interfaces" "^0.47.9" + "@glimmer/util" "^0.47.9" + +"@glimmer/reference@0.47.9", "@glimmer/reference@^0.47.9": + version "0.47.9" + resolved "https://registry.yarnpkg.com/@glimmer/reference/-/reference-0.47.9.tgz#f95c06a8dd08eddc16f1f5ccc9071ecb544be37b" + integrity sha512-IXn995T0maaKKSEcTTnRhEvjV24nnf2FG1cEKw0V2/tjvef+pn3zJqgUACqUF0c1BMDWTepw4ES70TEVq9F4jQ== dependencies: "@glimmer/env" "^0.1.7" - "@glimmer/util" "^0.47.5" - "@glimmer/validator" "^0.47.5" + "@glimmer/util" "^0.47.9" + "@glimmer/validator" "^0.47.9" -"@glimmer/runtime@0.47.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== +"@glimmer/runtime@0.47.9", "@glimmer/runtime@^0.47.9": + version "0.47.9" + resolved "https://registry.yarnpkg.com/@glimmer/runtime/-/runtime-0.47.9.tgz#35c9d6820086d4fe9e2e810553b103d7c70d55e5" + integrity sha512-j6jecBLhVEwEtlU44WqC7GeNUU5sfLGJHK0CYhlYa+kd4BUOphWRrQ+NCKOjkehgbYlXA0PGuGVPZ9mB0ACbJg== dependencies: "@glimmer/env" "0.1.7" - "@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" + "@glimmer/interfaces" "^0.47.9" + "@glimmer/low-level" "^0.47.9" + "@glimmer/program" "^0.47.9" + "@glimmer/reference" "^0.47.9" + "@glimmer/util" "^0.47.9" + "@glimmer/validator" "^0.47.9" + "@glimmer/vm" "^0.47.9" + "@glimmer/wire-format" "^0.47.9" "@simple-dom/interface" "^1.4.0" -"@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== +"@glimmer/syntax@^0.47.9": + version "0.47.9" + resolved "https://registry.yarnpkg.com/@glimmer/syntax/-/syntax-0.47.9.tgz#f3d141efc97f601928335771721d1f27eb1ed7d2" + integrity sha512-ld3x2bTkAr/BXOkI1b3cDVBwMl0BTYtBNKODks0Fi/1DLx+F1jl4abpKJ5cww1k2iQ75jgG31IhBwb7YC2PmFA== dependencies: - "@glimmer/interfaces" "^0.47.5" - "@glimmer/util" "^0.47.5" + "@glimmer/interfaces" "^0.47.9" + "@glimmer/util" "^0.47.9" handlebars "^4.5.1" simple-html-tokenizer "^0.5.9" -"@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== +"@glimmer/util@^0.47.9": + version "0.47.9" + resolved "https://registry.yarnpkg.com/@glimmer/util/-/util-0.47.9.tgz#ad3085eba3975bcbc74d28aefc871becbe800417" + integrity sha512-MJEumozi3TKmx+kzTpqPdC0jLEIuWSS3JNdBXceqTGRZQGmE5Zxqd8ydH5KOYpsKSfURHGCi2vU6+X/Q4z2b6g== dependencies: + "@glimmer/env" "0.1.7" "@simple-dom/interface" "^1.4.0" -"@glimmer/validator@0.47.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== +"@glimmer/validator@0.47.9", "@glimmer/validator@^0.47.9": + version "0.47.9" + resolved "https://registry.yarnpkg.com/@glimmer/validator/-/validator-0.47.9.tgz#bed80157b9fd800c03f654616921b41dbfa14b9d" + integrity sha512-AW7Nud5AQd6bM0c+qzyT4slovHTE+evysS9znsfYCkhTyHqbjTipBviif9czPovTV5A5Xjv5gvy62iyPxl2/Rw== dependencies: "@glimmer/env" "^0.1.7" -"@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== +"@glimmer/vm@^0.47.9": + version "0.47.9" + resolved "https://registry.yarnpkg.com/@glimmer/vm/-/vm-0.47.9.tgz#05029b7ef31104bf32cfc5cb53ae1f0d5d8c7ea6" + integrity sha512-VGfSSDjAx7Thsz1HTTUs3eNS/l9Xiaqhq3Z4rxui8a9GeUf2eOkpS1eUTWt9vjNTHJM+pNt1EohAvuaPWd/AGw== dependencies: - "@glimmer/interfaces" "^0.47.5" - "@glimmer/util" "^0.47.5" + "@glimmer/interfaces" "^0.47.9" + "@glimmer/util" "^0.47.9" -"@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== +"@glimmer/wire-format@^0.47.9": + version "0.47.9" + resolved "https://registry.yarnpkg.com/@glimmer/wire-format/-/wire-format-0.47.9.tgz#93f685bb6ce43af888ec85fd473880532a677983" + integrity sha512-zO5cFxPb8+kYdkDzKp4q7dOghWnQKR/K67TQuJmPDE0MJh22HJSclWqgDH3FiSYz7O4IQ3GMVOxsvKAuIDOXBA== dependencies: - "@glimmer/interfaces" "^0.47.5" - "@glimmer/util" "^0.47.5" + "@glimmer/interfaces" "^0.47.9" + "@glimmer/util" "^0.47.9" "@simple-dom/document@^1.4.0": version "1.4.0"