Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Begin moving towards invokable wire format #1690

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"[javascript][typescript]": {
"editor.codeActionsOnSave": {
"source.fixAll": "always",
"source.fixAll.eslint": "always",
"source.formatDocument": "always"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
Expand Down Expand Up @@ -38,13 +38,10 @@
"eslint.codeAction.showDocumentation": {
"enable": true
},
"eslint.codeActionsOnSave.mode": "all",
"eslint.codeActionsOnSave.mode": "problems",
"eslint.enable": true,
"eslint.lintTask.enable": true,
"eslint.onIgnoredFiles": "warn",
"eslint.options": {
"overrideConfigFile": "./eslint.config.js"
},
"eslint.problems.shortenToSingleLine": true,
"eslint.runtime": "node",
"eslint.useFlatConfig": true,
Expand All @@ -56,7 +53,7 @@
],
"eslint.workingDirectories": [
{
"pattern": "."
"mode": "auto"
}
],
"explorer.excludeGitIgnore": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ class DebugRenderTreeTest extends RenderTest {
const HelloWorld = defComponent('<p ...attributes>{{@arg}}</p>');
const noopFn = () => {};
const noop = defineSimpleModifier(noopFn);

const Root = defComponent(
`<HelloWorld {{noop}} @arg="first"/>{{#if state.showSecond}}<HelloWorld @arg="second"/>{{/if}}`,
{ scope: { HelloWorld, state, noop }, emit: { moduleName: 'root.hbs' } }
Expand Down Expand Up @@ -144,7 +145,7 @@ class DebugRenderTreeTest extends RenderTest {
children: [
{
type: 'modifier',
name: 'noop',
name: 'noopFn',
args: { positional: [], named: {} },
instance: (modifier: unknown) => modifier && Reflect.get(modifier, 'fn') === noopFn,
template: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ class CurlyScopeTest extends CurlyTest {
this.registerComponent(
'Curly',
'foo-bar',
`[Layout: {{this.zomg}}][Layout: {{this.lol}}][Layout: {{this.foo}}]{{yield}}`,
`[Layout-1: {{this.zomg}}][Layout-2: {{this.lol}}][Layout-3: {{this.foo}}]{{yield}}`,
FooBar
);

Expand All @@ -432,9 +432,9 @@ class CurlyScopeTest extends CurlyTest {
[Outside: zomg]
[Inside: zomg]
[Inside: zomg]
[Layout: ]
[Layout: ]
[Layout: zomg]
[Layout-1: ]
[Layout-2: ]
[Layout-3: zomg]
[Block: zomg]
[Block: zomg]
</div>
Expand Down Expand Up @@ -2160,7 +2160,6 @@ class CurlyBoundsTrackingTest extends CurlyTest {

assert.ok(instance, 'instance is created');


this.assertEmberishElement('span', {}, 'foo bar');

const { bounds, element } = instance.captured;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
test,
TestHelper,
trackedObj,
} from "@glimmer-workspace/integration-tests";
} from '@glimmer-workspace/integration-tests';

class GeneralStrictModeTest extends RenderTest {
static suiteName = 'strict mode: general properties';
Expand Down Expand Up @@ -576,7 +576,7 @@ class StaticStrictModeTest extends RenderTest {

this.assert.throws(() => {
this.renderComponent(Bar);
}, /Attempted to load a helper, but there wasn't a helper manager associated with the definition. The definition was:/u);
}, /Expected a dynamic helper definition, but received an object or function that did not have a helper manager associated with it. The dynamic invocation was `\{\{false\}\}` or `\(false\)`/u);
}

@test
Expand All @@ -586,7 +586,7 @@ class StaticStrictModeTest extends RenderTest {

this.assert.throws(() => {
this.renderComponent(Bar);
}, /Attempted to load a modifier, but there wasn't a modifier manager associated with the definition. The definition was:/u);
}, /Expected a dynamic modifier definition, but received an object or function that did not have a modifier manager associated with it. The dynamic invocation was `\{\{false\}\}`/u);
}
}

Expand Down
Loading