tildeio / ember-element-helper Goto Github PK
View Code? Open in Web Editor NEWDynamic element helper for Glimmer templates.
License: MIT License
Dynamic element helper for Glimmer templates.
License: MIT License
My case:
This example does not work for me, it returns an exception
'The `element` helper polyfill encountered an unexpected error. ' +
'Please report the issue at http://github.com/tildeio/ember-element-helper ' +
'with the usage and conditions that caused this error.'
myComponent.hbs (glimmer)
result:
<div id="ember-#" ...>
I Want to be a span
</div>
Should be
<span id="ember-#" ....>
I Want to be a span
</span>
ember-cli 3.25.2
Seems to just not work. No errors or anything. In this case tagName
is a 'span'.
Full example is here knownasilya/ember-shadow-dom@429b881
Is this supposed to work as a polyfill for RFC389?
AFAICT it already follows the same semantics, right? So what's just needed to make it a "real" polyfill would be to make it a "no-op" when a (future) Ember version with direct support is detected, so is that planned?
Mainly asking to make sure it is safe to add as another dependency to an addon. ๐
Seems like canary ember-try is broken since May 3, haven't had a chance to investigate what's up just yet
I wanted to yield
a span
from a general component and set some classes and maybe other attributes on the span for consumers of the general component. Something like this:
{{yield
(hash
Foo=(element "span" class="truncate")
)
}}
But its explicitly not allowed. How come? And could it be changed to be allowed?
I'm trying to use {{#let (ember-element-helper$element this.tag) as |Tag|}}
but got error due to https://github.com/tildeio/ember-element-helper/blob/main/addon/helpers/element.js implementation
when i try to use {{#let (ember-element-helper$-element this.tag) as |Tag|}}
the result does not return. the same.
is this component support namespace? if i need to use namespace, what should be the correct syntax for it?
As of 0.5.5 (haven't tested against earlier 0.5.x releases), this is once again throwing during build:
[broccoli-persistent-filter:Babel > [Babel: @embroider/macros]: Babel: @embroider/macros] was configured to
throwUnlessParallelizable
and was unable to parallelize a plugin.
Same issue as #33, but apparently now for @embroider/macros
instead. May be a broader issue with @embroider/macros
and not specific to this repo?
I get this warning when building our app:
broccoli-babel-transpiler is opting out of caching due to a plugin that does not provide a caching strategy: `(env) => {
let b = env.syntax.builders;
let locals = [];
return {
name: 'ember-element-helper',
visitor: {
BlockStatement: {
enter(node) {
locals.push(node.program.blockParams);
},
exit() {
locals.pop();
}
},
ElementNode: {
enter(node) {
locals.push(node.blockParams);
},
exit() {
locals.pop();
}
},
MustacheStatement(node) {
if (isElementHelper(node, locals)) {
let { path, params, hash } = transformParts(node, b);
return b.mustache(path, params, hash, false, node.loc);
}
},
SubExpression(node) {
if (isElementHelper(node, locals)) {
let { path, params, hash } = transformParts(node, b);
return b.sexpr(path, params, hash, node.loc);
}
}
}
}
}`.
I forget if this has been implemented yet
We have an application that uses this helper. After getting past some other issues, we were able to build the app with Embroider. Then we turned on staticHelpers
, and builds were failing until we removed references to (element ...)
. One was a reference to (element this.tag)
and the other was (element '')
.
Is this known? Is Embroider support on the roadmap?
I think everything would be fine if just these /// reference
lines weren't present:
[types] ../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected]/node_modules/ember-element-helper/declarations/helpers/element.d.ts:1:23 - error TS2688: Cannot find type definition file for 'ember-source/types/preview/@ember/object/core'.
[types]
[types] 1 /// <reference types="ember-source/types/preview/@ember/object/core" />
[types] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[types]
[types] ../node_modules/.pnpm/[email protected]_@[email protected]_@[email protected][email protected]/node_modules/ember-element-helper/declarations/helpers/element.d.ts:2:23 - error TS2688: Cannot find type definition file for 'ember-source/types/preview/@ember/object/mixin'.
[types]
[types] 2 /// <reference types="ember-source/types/preview/@ember/object/mixin" />
[types]
Not really sure why ts or glint would do this, as ember-source is marked as a peerDependency
When I use the following code directly in application.hbs
it works:
Scenario with error:
This component comes from an addon
throws the following error:
Uncaught (in promise) Error: Assertion Failed: The `element` helper polyfill encountered an unexpected error. Please report the issue at http://github.com/tildeio/ember-element-helper with the usage and conditions that caused this error.
Ember 3
deprecateMutationsInTrackingTransaction validator.js:180
Ember 2
cache manager.js:949
tag reference.js:161
track validator.js:820
valueForRef reference.js:160
<anonymous> runtime.js:2479
evaluate runtime.js:1284
evaluateSyscall runtime.js:5179
evaluateInner runtime.js:5135
evaluateOuter runtime.js:5127
next runtime.js:6259
_execute runtime.js:6243
execute runtime.js:6213
sync runtime.js:6316
runInTrackingTransaction validator.js:154
sync runtime.js:6316
Ember 3
inTransaction runtime.js:5021
Ember 5
invoke backburner.js:340
flush backburner.js:229
flush backburner.js:426
_end backburner.js:960
_boundAutorunEnd backburner.js:629
promise callback*buildNext/< backburner.js:28
flush Ember
_scheduleAutorun backburner.js:1179
_end backburner.js:970
_boundAutorunEnd backburner.js:629
promise callback*buildNext/< backburner.js:28
flush Ember
_scheduleAutorun backburner.js:1179
_end backburner.js:970
_boundAutorunEnd backburner.js:629
promise callback*buildNext/< backburner.js:28
flush Ember
_scheduleAutorun backburner.js:1179
_ensureInstance backburner.js:1167
schedule backburner.js:776
<anonymous> Ember
fulfill rsvp.js:428
resolve$1 rsvp.js:403
initializePromise rsvp.js:526
Ember 2
initializePromise rsvp.js:520
Promise rsvp.js:1021
Ember 5
invokeCallback rsvp.js:493
publish rsvp.js:476
<anonymous> Ember
invoke backburner.js:338
flush backburner.js:229
flush backburner.js:426
_end backburner.js:960
_boundAutorunEnd backburner.js:629
promise callback*buildNext/< backburner.js:28
flush Ember
_scheduleAutorun backburner.js:1179
_ensureInstance backburner.js:1167
index.js:172
โ
What do I miss here?
Using this in an addon and as I was porting it to Typescript and using Glint, it's reporting the following error:
error TS2769: The given value does not appear to be usable as a component, modifier or helper.
No overload matches this call.
The last overload gave the following error.
Argument of type 'HTMLElement' is not assignable to parameter of type '(...positional: unknown[]) => unknown'.
16 <Tag
Are there types available for this? How do I backfill this or resolve this complaint for Glint?
I got this error [broccoli-persistent-filter:Babel > [Babel: ember-element-helper]: Babel: ember-element-helper] was configured to
throwUnlessParallelizable and was unable to parallelize a plugin
while trying to build with the set. up
'ember-cli-babel': {
includeExternalHelpers: true,
throwUnlessParallelizable: true,
},
Are there any performance optimisations that can be made?
Asking because, I'd like the ability to be able to chose a tag, but not at the expense of a slower component if I decide not to chose a tag.
I'm trying to avoid something like:
Given
Although the above looks fine, one has to duplicate actions and attributes etc placed on <Tag>
, and <div>
.
Thanks for any insight.
I'm seeing a decrease in speed from ~400ms to render to ~700ms
In 0.5.0, ember-element-helper
depends on 0.39.x of the @embroider/util
:
https://github.com/tildeio/ember-element-helper/blob/v0.5.0/package.json#L24
This version has a dependency on broccoli-funnel
that points to a github.com address:
https://github.com/embroider-build/embroider/blob/v0.39.1/packages/util/package.json#L32
Some enterprise systems don't allow accessing github.com from inside a firewall, which means that [email protected]
is not installable in these environments.
Also, since this is a pre-1.0 dependency , npm treats the 0.41.0 as similar to a post-1.0 major version, so it will not automatically be installed even though ^0.40.0
is specified.
See a similar issue in cibernox/ember-basic-dropdown#616 and fix in cibernox/ember-basic-dropdown@6e9245f
<3
Hi, I bumped 1 addon's dependency on ember-element-helper from 0.5.5 to 0.6.1
I also added a resolution in the addon to "ember-element-helper": "^0.6.1".
Once the PR merged, 2 other downstream addons had many test failures:
Each Test failure had the same error:
global failure: Error: Assertion Failed: The `element` helper polyfill encountered an unexpected error. Please report the issue at http://github.com/tildeio/ember-element-helper with the usage and conditions that caused this error."Source:
Error: Assertion Failed: The `element` helper polyfill encountered an unexpected error. Please report the issue at http://github.com/tildeio/ember-element-helper with the usage and conditions that caused this error.
at Object.assert (http://localhost:7357/assets/vendor.js:41738:15)
at http://localhost:7357/assets/vendor.js:344134:32
at http://localhost:7357/assets/vendor.js:14440:27
at deprecateMutationsInTrackingTransaction (http://localhost:7357/assets/vendor.js:63413:9)
at http://localhost:7357/assets/vendor.js:14439:66
at SimpleClassicHelperManager.getValue (http://localhost:7357/assets/vendor.js:14450:14)
at http://localhost:7357/assets/vendor.js:49844:70
at http://localhost:7357/assets/vendor.js:54144:37
at track (http://localhost:7357/assets/vendor.js:64057:7)
at valueForRef (http://localhost:7357/assets/vendor.js:54143:44)"
on ember 3.26
Getting this error
templateCompiler.registerPlugin is not a function
Can see error here https://github.com/knownasilya/ember-shadow-dom/runs/4822101357?check_suite_focus=true#step:6:171
I'm not sure this is the right repo to file a bug, but I think this addon is broken when used in an engine. I've got an unusual setup though, so it might be something else.
Basically when the dynamic element is invoked (it's being called from ember-basic-dropdown) I get Error: Could not find module '<my engine name>/components/-dynamic-element' imported from '(require)'
.
Following the stack trace up, it looks like the engine file has the line define.alias("@ember/component", "<my engine name>/components/-dynamic-element");
. When findModule
runs, it tried to resolve @ember/component
, but that isn't in the registry.
This is using ember and ember-cli 3.11.
https://github.com/tildeio/ember-element-helper/blob/v0.6.1/package.json#L76
it says || 4
, which works under yarn, but we found in other packages that it needs to be || ^4.0.0
-- which allows pnpm to do the right thing
I don't understand why this addon uses an AST transform to rewrite element
to -element
.
If it's an attempt at future-compatibility with a glimmer-native implementation, that seems defeated by the fact that this addon already ships a helper named element
anyway. So why not use that helper and eliminate the need for a custom transform?
The motivation for eliminating the transform is that we do not intend to let v2 addons automatically install AST transforms, so if this is kept it's going to become an extra manual step that users of the addon will need to deal with.
Hi! Please can someone help me with this error?
I can't solve it and I'm thinking it's a bug.
Error:
Uncaught Error: Assertion Failed: The `element` helper polyfill encountered an unexpected error. Please report the issue at http://github.com/tildeio/ember-element-helper with the usage and conditions that caused this error.
at assert (index.js:181:1)
at element.js:14:1
at index.js:5258:1
at deprecateMutationsInTrackingTransaction (validator.js:191:1)
at index.js:5257:1
at SimpleClassicHelperManager.getValue (index.js:5268:1)
at manager.js:971:1
at reference.js:170:1
at track (validator.js:835:1)
at valueForRef (reference.js:169:1)
package.json
shell>cat package.json | grep leaflet
"ember-leaflet": "^5.0.1",
"leaflet": "^1.8.0",
Environment:
shell>ember -v
ember-cli: 3.28.5
node: 14.15.5
os: linux x64
npm ERR! Could not resolve dependency:
npm ERR! peer ember-source@"^3.8 || 4" from [email protected]
npm ERR! node_modules/ember-element-helper
npm ERR! dev ember-element-helper@"^0.6.1" from the root project
"@ember/test-helpers": "3.2.0",
"@embroider/addon-shim": "1.8.6",
"@embroider/compat": "2.0.2",
"@embroider/core": "2.0.2",
"@embroider/macros": "1.13.2",
"@embroider/router": "2.1.4",
"@embroider/util": "1.12.0",
"@embroider/webpack": "2.1.1",
.....
"ember-cli": "5.3.0",
"ember-cli-app-version": "^6.0.1",
"ember-cli-babel": "^7.26.11",
ERROR in ./node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@glint+te_cnni3bizkjkkf4pqlx3iihtj5m/node_modules/ember-animated/dist/components/animated-container.js
Module build failed (from ../../../../../../../../Users/villander/Projects/michael/mano-ui/node_modules/.pnpm/[email protected][email protected]/node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 2)
$TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@glint+te_cnni3bizkjkkf4pqlx3iihtj5m/node_modules/ember-animated/dist/components/animated-container.js: Missing helper: -element in node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@glint+te_cnni3bizkjkkf4pqlx3iihtj5m/node_modules/ember-animated/dist/components/animated-container.js
at CompatResolver.reportError (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected]_patch_hash=xfwpwlobabhwhrnzagwhtrsove_@[email protected]/node_modules/@embroider/compat/src/resolver.js:219:21)
at emit (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected]_patch_hash=xfwpwlobabhwhrnzagwhtrsove_@[email protected]/node_modules/@embroider/compat/src/resolver-transform.js:27:30)
at SubExpression (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected]_patch_hash=xfwpwlobabhwhrnzagwhtrsove_@[email protected]/node_modules/@embroider/compat/src/resolver-transform.js:151:21)
at visitNode ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9201:16)
at visitArray ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9277:20)
at visitKey ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9256:7)
at visitNode ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9219:9)
at visitArray ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9277:20)
at visitKey ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9256:7)
at visitNode ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9219:9)
at visitArray ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9277:20)
at visitKey ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9256:7)
at visitNode ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9219:9)
at visitArray ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9277:20)
at visitKey ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9256:7)
at visitNode ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9219:9)
at visitKey ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9259:20)
at visitNode ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9219:9)
at visitArray ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9277:20)
at visitKey ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9256:7)
at visitNode ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9219:9)
at traverse ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9314:5)
at preprocess ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:10640:9)
at normalize ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:11180:15)
at precompileJSON ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:4981:47)
at precompile ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:5014:31)
at Object.precompile ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:16274:37)
at insertCompiledTemplate (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/[email protected]/node_modules/babel-plugin-ember-template-compilation/src/plugin.js:197:64)
at PluginPass.CallExpression (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/[email protected]/node_modules/babel-plugin-ember-template-compilation/src/plugin.js:129:25)
at PluginPass.<anonymous> (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected]/node_modules/@embroider/core/src/portable-babel-launcher.js:37:29)
at newFn (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/visitors.js:159:14)
at NodePath._call (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/path/context.js:46:20)
at NodePath.call (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/path/context.js:36:17)
at NodePath.visit (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/path/context.js:82:31)
at TraversalContext.visitQueue (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/context.js:86:16)
at TraversalContext.visitSingle (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/context.js:65:19)
at TraversalContext.visit (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/context.js:109:19)
at traverseNode (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/traverse-node.js:22:17)
at NodePath.visit (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/path/context.js:88:52)
at TraversalContext.visitQueue (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/context.js:86:16)
at TraversalContext.visitMultiple (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/context.js:61:17)
at TraversalContext.visit (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/context.js:107:19)
at traverseNode (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/traverse-node.js:22:17)
at NodePath.visit (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/path/context.js:88:52)
at TraversalContext.visitQueue (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/context.js:86:16)
at TraversalContext.visitMultiple (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/context.js:61:17)
at TraversalContext.visit (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/context.js:107:19)
at traverseNode (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/traverse-node.js:22:17)
at NodePath.visit (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/path/context.js:88:52)
at TraversalContext.visitQueue (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/context.js:86:16)
@ ./components/animated-container.js 1:0-74 1:0-74
@ ./components/notes/note-board/index.hbs 5:0-60 120:64-81
@ ./components/notes/note-board/index.ts 7:0-35 39:21-29
@ ./tests/integration/components/notes/note-board/component-test.ts 2:0-81 35:22-36 58:22-36 91:22-36 119:22-36 159:22-36 191:24-38 215:24-38 240:24-38
@ ./assets/test.js 191:13-90
webpack 5.88.2 compiled with 1 error in 18522 ms
Build Error (PackagerRunner) in node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@glint+te_cnni3bizkjkkf4pqlx3iihtj5m/node_modules/ember-animated/dist/components/animated-container.js
Module build failed (from ../../../../../../../../Users/villander/Projects/michael/app-ui/node_modules/.pnpm/[email protected][email protected]/node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 2)
$TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@glint+te_cnni3bizkjkkf4pqlx3iihtj5m/node_modules/ember-animated/dist/components/animated-container.js/animated-container.js: Missing helper: -element in node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@glint+te_cnni3bizkjkkf4pqlx3iihtj5m/node_modules/ember-animated/dist/components/animated-container.js
at CompatResolver.reportError (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected]_patch_hash=xfwpwlobabhwhrnzagwhtrsove_@[email protected]/node_modules/@embroider/compat/src/resolver.js:219:21)
at emit (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected]_patch_hash=xfwpwlobabhwhrnzagwhtrsove_@[email protected]/node_modules/@embroider/compat/src/resolver-transform.js:27:30)
at SubExpression (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected]_patch_hash=xfwpwlobabhwhrnzagwhtrsove_@[email protected]/node_modules/@embroider/compat/src/resolver-transform.js:151:21)
at visitNode ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9201:16)
at visitArray ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9277:20)
at visitKey ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9256:7)
at visitNode ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9219:9)
at visitArray ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9277:20)
at visitKey ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9256:7)
at visitNode ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9219:9)
at visitArray ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9277:20)
at visitKey ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9256:7)
at visitNode ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9219:9)
at visitArray ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9277:20)
at visitKey ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9256:7)
at visitNode ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9219:9)
at visitKey ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9259:20)
at visitNode ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9219:9)
at visitArray ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9277:20)
at visitKey ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9256:7)
at visitNode ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9219:9)
at traverse ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:9314:5)
at preprocess ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:10640:9)
at normalize ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:11180:15)
at precompileJSON ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:4981:47)
at precompile ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:5014:31)
at Object.precompile ($TMPDIR/embroider/2012c7/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected][email protected][email protected]/node_modules/ember-source/vendor/ember/ember-template-compiler.js:16274:37)
at insertCompiledTemplate (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/[email protected]/node_modules/babel-plugin-ember-template-compilation/src/plugin.js:197:64)
at PluginPass.CallExpression (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/[email protected]/node_modules/babel-plugin-ember-template-compilation/src/plugin.js:129:25)
at PluginPass.<anonymous> (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected]/node_modules/@embroider/core/src/portable-babel-launcher.js:37:29)
at newFn (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/visitors.js:159:14)
at NodePath._call (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/path/context.js:46:20)
at NodePath.call (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/path/context.js:36:17)
at NodePath.visit (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/path/context.js:82:31)
at TraversalContext.visitQueue (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/context.js:86:16)
at TraversalContext.visitSingle (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/context.js:65:19)
at TraversalContext.visit (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/context.js:109:19)
at traverseNode (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/traverse-node.js:22:17)
at NodePath.visit (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/path/context.js:88:52)
at TraversalContext.visitQueue (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/context.js:86:16)
at TraversalContext.visitMultiple (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/context.js:61:17)
at TraversalContext.visit (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/context.js:107:19)
at traverseNode (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/traverse-node.js:22:17)
at NodePath.visit (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/path/context.js:88:52)
at TraversalContext.visitQueue (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/context.js:86:16)
at TraversalContext.visitMultiple (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/context.js:61:17)
at TraversalContext.visit (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/context.js:107:19)
at traverseNode (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/traverse-node.js:22:17)
at NodePath.visit (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/path/context.js:88:52)
at TraversalContext.visitQueue (/Users/villander/Projects/michael/app-ui/node_modules/.pnpm/@[email protected][email protected]/node_modules/@babel/traverse/lib/context.js:86:16)
Stack Trace and Error Report: /var/folders/0v/jpdg1flj3qscvbvt728pgt8c0000gn/T/error.dump.1f9810e88f55a4e3fa5a36a5dce6bd1c.log
It looks like the v0.4.0 has no release notes describing what was changed in this release. v0.3.2 had such notes though which is quite helpful in knowing what the breaking changes are.
Presentnly getting this error:
Uncaught (in promise) Error: Expected a dynamic component definition,
but received an object or function that did not have a component manager associated with it.
The dynamic invocation was `<(result of a `(helper function findElement)` helper)>`
or `{{(result of a `(helper function findElement)` helper)}}`,
and the incorrect definition is the value at the path `(result of a `(helper function findElement)` helper)`,
which was: HTMLDivElement
<anonymous> runtime.js:3021
Has something gone wrong with a transform?
I'm using embroider.
โฏ pnpm why ember-element-helper
dependencies:
ember-container-query 2.1.0
โโโ ember-element-helper 0.6.1
ember-element-helper 0.6.1
ember-headlessui 0.13.0
โโโ ember-element-helper 0.6.1
Happens on ember-source 4.4 and 4.5
Helloo,
With only updating the dependencies, ember-element-helper
is not working properly anymore. When calling it this way:
Directing us to this assertion:
export default helper(function () {
// This helper (`element`, as opposed to `-element`) mostly exists to satisfy
// things like `owner.hasRegistration('helper:element')`. The AST transform
// replaces all usages of `(element ...)` into `(component (-element ...))`
// so if this helper is invoked directly, something is wrong.
assert('The `element` helper polyfill encountered an unexpected error. ' + 'Please report the issue at http://github.com/tildeio/ember-element-helper ' + 'with the usage and conditions that caused this error.');
return null;
});
Here's the main dependencies versions:
"@embroider/compat": "3.2.3",
"@embroider/core": "3.3.0",
"@embroider/router": "2.1.4",
"@embroider/webpack": "3.2.0",
"@ember/render-modifiers": "2.1.0",
"@glimmer/component": "1.1.2",
"@glimmer/tracking": "1.1.2",
"@glint/core": "^1.2.1",
"@glint/environment-ember-loose": "^1.2.1",
"@glint/environment-ember-template-imports": "1.2.1",
"@glint/template": "^1.2.1",
"ember-auto-import": "2.6.3",
"ember-cli-babel": "8.2.0",
"ember-modifier": "4.1.0",
"ember-source": "5.3.0",
"ember-element-helper": "0.8.5",
As reference to this issue: cibernox/ember-basic-dropdown#713 ; if we use -element
it works. What am I missing here? Is there a config I need to add?
For info, I use pnpm
and used pnpm dedupe
- doesn't change anything.
I thought I'd be clever and pass the {{element}}
as a primitive to my component, would look like this:
but got this message instead:
Error: the `element` helper cannot be appended to the DOM directly
which relates to these lines:
ember-element-helper/lib/element-helper-syntax-plugin.js
Lines 32 to 36 in 67c0780
I am now wondering if my idea is a valid use-case?
If I use this helper to dynamically create the dom tag, can I express that in the template somehow so that components nested inside can reference the parent's element ID?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.