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

[BUGFIX LTS] Upgrade glimmer vm dependencies #20801

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
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
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,23 @@
"@babel/core": "^7.24.4",
"@ember/edition-utils": "^1.2.0",
"@embroider/addon-shim": "^1.9.0",
"@glimmer/compiler": "0.92.4",
"@glimmer/destroyable": "0.92.3",
"@glimmer/compiler": "0.93.0",
"@glimmer/destroyable": "0.93.0",
"@glimmer/env": "^0.1.7",
"@glimmer/global-context": "0.92.3",
"@glimmer/interfaces": "0.92.3",
"@glimmer/manager": "0.92.4",
"@glimmer/node": "0.92.4",
"@glimmer/opcode-compiler": "0.92.4",
"@glimmer/owner": "0.92.3",
"@glimmer/program": "0.92.4",
"@glimmer/reference": "0.92.3",
"@glimmer/runtime": "0.92.4",
"@glimmer/syntax": "0.92.3",
"@glimmer/util": "0.92.3",
"@glimmer/validator": "0.92.3",
"@glimmer/vm": "0.92.3",
"@glimmer/vm-babel-plugins": "0.92.3",
"@glimmer/global-context": "0.92.4",
"@glimmer/interfaces": "0.93.0",
"@glimmer/manager": "0.93.0",
"@glimmer/node": "0.93.0",
"@glimmer/opcode-compiler": "0.93.0",
"@glimmer/owner": "0.92.4",
"@glimmer/program": "0.93.0",
"@glimmer/reference": "0.93.0",
"@glimmer/runtime": "0.93.0",
"@glimmer/syntax": "0.93.0",
"@glimmer/util": "0.93.0",
"@glimmer/validator": "0.93.0",
"@glimmer/vm": "0.93.0",
"@glimmer/vm-babel-plugins": "0.92.4",
"@simple-dom/interface": "^1.4.0",
"backburner.js": "^2.8.0",
"broccoli-file-creator": "^2.1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
WithDynamicTagName,
} from '@glimmer/interfaces';
import type { Reference } from '@glimmer/reference';
import { childRefFor, createComputeRef, createPrimitiveRef, valueForRef } from '@glimmer/reference';

Check failure on line 29 in packages/@ember/-internals/glimmer/lib/component-managers/curly.ts

View workflow job for this annotation

GitHub Actions / Linting

Unable to resolve path to module '@glimmer/reference'
import { reifyPositional } from '@glimmer/runtime';

Check failure on line 30 in packages/@ember/-internals/glimmer/lib/component-managers/curly.ts

View workflow job for this annotation

GitHub Actions / Linting

Unable to resolve path to module '@glimmer/runtime'
import { EMPTY_ARRAY, unwrapTemplate } from '@glimmer/util';
import { EMPTY_ARRAY } from '@glimmer/util';

Check failure on line 31 in packages/@ember/-internals/glimmer/lib/component-managers/curly.ts

View workflow job for this annotation

GitHub Actions / Linting

Unable to resolve path to module '@glimmer/util'
import {
beginTrackFrame,
beginUntrackFrame,
Expand All @@ -37,7 +37,7 @@
endUntrackFrame,
validateTag,
valueForTag,
} from '@glimmer/validator';

Check failure on line 40 in packages/@ember/-internals/glimmer/lib/component-managers/curly.ts

View workflow job for this annotation

GitHub Actions / Linting

Unable to resolve path to module '@glimmer/validator'
import type Component from '../component';
import type { DynamicScope } from '../renderer';
import type RuntimeResolver from '../resolver';
Expand All @@ -51,6 +51,7 @@

import ComponentStateBucket from '../utils/curly-component-state-bucket';
import { processComponentArgs } from '../utils/process-args';
import { unwrapTemplate } from '../utils/template';

export const ARGS = enumerableSymbol('ARGS');
export const HAS_BLOCK = enumerableSymbol('HAS_BLOCK');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { generateControllerFactory } from '@ember/routing/-internals';
import { assert } from '@ember/debug';
import EngineInstance from '@ember/engine/instance';
import { associateDestroyableChild } from '@glimmer/destroyable';

Check failure on line 5 in packages/@ember/-internals/glimmer/lib/component-managers/mount.ts

View workflow job for this annotation

GitHub Actions / Linting

Unable to resolve path to module '@glimmer/destroyable'
import type {
CapturedArguments,
ComponentDefinition,
Expand All @@ -18,11 +18,11 @@
WithSubOwner,
} from '@glimmer/interfaces';
import type { Nullable } from '@ember/-internals/utility-types';
import { capabilityFlagsFrom } from '@glimmer/manager';

Check failure on line 21 in packages/@ember/-internals/glimmer/lib/component-managers/mount.ts

View workflow job for this annotation

GitHub Actions / Linting

Unable to resolve path to module '@glimmer/manager'
import type { Reference } from '@glimmer/reference';
import { createConstRef, valueForRef } from '@glimmer/reference';

Check failure on line 23 in packages/@ember/-internals/glimmer/lib/component-managers/mount.ts

View workflow job for this annotation

GitHub Actions / Linting

Unable to resolve path to module '@glimmer/reference'
import { unwrapTemplate } from '@glimmer/util';
import type RuntimeResolver from '../resolver';
import { unwrapTemplate } from '../utils/template';

interface EngineState {
engine: EngineInstance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import { capabilityFlagsFrom } from '@glimmer/manager';
import type { Reference } from '@glimmer/reference';
import { createConstRef, valueForRef } from '@glimmer/reference';
import { EMPTY_ARGS } from '@glimmer/runtime';
import { unwrapTemplate } from '@glimmer/util';

import type { DynamicScope } from '../renderer';
import type { OutletState } from '../utils/outlet';
import type OutletView from '../views/outlet';
import { unwrapTemplate } from '../utils/template';

function instrumentationPayload(def: OutletDefinitionState) {
// "main" used to be the outlet name, keeping it around for compatibility
Expand Down
6 changes: 3 additions & 3 deletions packages/@ember/-internals/glimmer/lib/helpers/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ export default internalHelper((args: CapturedArguments): Reference<Function> =>
let [context, action, ...restArgs] = positional;
assert('hash position arguments', context && action);

let debugKey: string = action.debugLabel!;
let debugKey = action.debugLabel!;

let target = 'target' in named ? named['target'] : context;
let processArgs = makeArgsProcessor(('value' in named && named['value']) || false, restArgs);
Expand Down Expand Up @@ -362,7 +362,7 @@ function makeDynamicClosureAction(
targetRef: Reference<unknown>,
actionRef: Reference<unknown>,
processArgs: (args: unknown[]) => unknown[],
debugKey: string
debugKey: string | false
) {
const action = valueForRef(actionRef);

Expand Down Expand Up @@ -391,7 +391,7 @@ function makeClosureAction(
target: unknown,
action: unknown | null | undefined | string | Function,
processArgs: (args: unknown[]) => unknown[],
debugKey: string
debugKey: string | false
) {
let self: object;
let fn: Function;
Expand Down
23 changes: 11 additions & 12 deletions packages/@ember/-internals/glimmer/lib/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,22 @@
import { _backburner, _getCurrentRunLoop } from '@ember/runloop';
import { destroy } from '@glimmer/destroyable';
import { DEBUG } from '@glimmer/env';
import type { CurriedComponent } from '@glimmer/interfaces';
import type {
Bounds,
CompileTimeCompilationContext,
Cursor,
DebugRenderTree,
DynamicScope as GlimmerDynamicScope,
ElementBuilder,
TreeBuilder,
Environment,
RenderResult,
RuntimeContext,
Template,
TemplateFactory,
EvaluationContext,
} from '@glimmer/interfaces';

import { CurriedType } from '@glimmer/vm';
import type { Nullable } from '@ember/-internals/utility-types';
import { programCompilationContext } from '@glimmer/opcode-compiler';

Check failure on line 26 in packages/@ember/-internals/glimmer/lib/renderer.ts

View workflow job for this annotation

GitHub Actions / Type Checking (current version)

Module '"@glimmer/opcode-compiler"' has no exported member 'programCompilationContext'.
import { artifacts, RuntimeOpImpl } from '@glimmer/program';
import type { Reference } from '@glimmer/reference';
import { createConstRef, UNDEFINED_REFERENCE, valueForRef } from '@glimmer/reference';
Expand All @@ -36,9 +35,8 @@
DOMTreeConstruction,
inTransaction,
renderMain,
runtimeContext,

Check failure on line 38 in packages/@ember/-internals/glimmer/lib/renderer.ts

View workflow job for this annotation

GitHub Actions / Type Checking (current version)

Module '"@glimmer/runtime"' has no exported member 'runtimeContext'.
} from '@glimmer/runtime';
import { unwrapTemplate } from '@glimmer/util';
import { CURRENT_TAG, validateTag, valueForTag } from '@glimmer/validator';
import type { SimpleDocument, SimpleElement, SimpleNode } from '@simple-dom/interface';
import RSVP from 'rsvp';
Expand All @@ -51,8 +49,9 @@
import ResolverImpl from './resolver';
import type { OutletState } from './utils/outlet';
import OutletView from './views/outlet';
import { unwrapTemplate } from './utils/template';

export type IBuilder = (env: Environment, cursor: Cursor) => ElementBuilder;
export type IBuilder = (env: Environment, cursor: Cursor) => TreeBuilder;

export interface View {
parentView: Nullable<View>;
Expand Down Expand Up @@ -128,8 +127,8 @@

constructor(
public root: Component | OutletView,
public runtime: RuntimeContext,
context: CompileTimeCompilationContext,
public runtime: Pick<EvaluationContext, 'env' | 'program' | 'resolver'>,
context: EvaluationContext,
owner: InternalOwner,
template: Template,
self: Reference<unknown>,
Expand All @@ -156,7 +155,7 @@
self,
builder(runtime.env, { element: parentElement, nextSibling: null }),
layout,
dynamicScope

Check failure on line 158 in packages/@ember/-internals/glimmer/lib/renderer.ts

View workflow job for this annotation

GitHub Actions / Type Checking (current version)

Expected 5-6 arguments, but got 7.
);

let result = (this.result = iterator.sync());
Expand Down Expand Up @@ -290,8 +289,8 @@
private _inRenderTransaction = false;

private _owner: InternalOwner;
private _context: CompileTimeCompilationContext;
private _runtime: RuntimeContext;
private _context: EvaluationContext;
private _runtime: Pick<EvaluationContext, 'env' | 'program' | 'resolver'>;

private _lastRevision = -1;
private _destroyed = false;
Expand Down Expand Up @@ -339,7 +338,7 @@
this._context = programCompilationContext(
sharedArtifacts,
resolver,
(heap) => new RuntimeOpImpl(heap)

Check failure on line 341 in packages/@ember/-internals/glimmer/lib/renderer.ts

View workflow job for this annotation

GitHub Actions / Type Checking (current version)

Parameter 'heap' implicitly has an 'any' type.
);

let runtimeEnvironmentDelegate = new EmberEnvironmentDelegate(owner, env.isInteractive);
Expand Down Expand Up @@ -373,7 +372,7 @@
let definition = createRootOutlet(view);
this._appendDefinition(
view,
curry(CurriedType.Component, definition, view.owner, null, true),
curry(0 as CurriedComponent, definition, view.owner, null, true),
target
);
}
Expand All @@ -382,7 +381,7 @@
let definition = new RootComponentDefinition(view);
this._appendDefinition(
view,
curry(CurriedType.Component, definition, this._owner, null, true),
curry(0 as CurriedComponent, definition, this._owner, null, true),
target
);
}
Expand Down
5 changes: 2 additions & 3 deletions packages/@ember/-internals/glimmer/lib/syntax/mount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ import type { InternalOwner } from '@ember/-internals/owner';
import { assert } from '@ember/debug';
import { DEBUG } from '@glimmer/env';
import type { Nullable } from '@ember/-internals/utility-types';
import type { CapturedArguments } from '@glimmer/interfaces';
import { CurriedType } from '@glimmer/vm';
import type { CapturedArguments, CurriedComponent } from '@glimmer/interfaces';
import type { Reference } from '@glimmer/reference';
import { createComputeRef, valueForRef } from '@glimmer/reference';
import type { CurriedValue } from '@glimmer/runtime';
Expand Down Expand Up @@ -95,7 +94,7 @@ export const mountHelper = internalHelper(
);

lastName = name;
lastDef = curry(CurriedType.Component, new MountDefinition(name), owner, captured, true);
lastDef = curry(0 as CurriedComponent, new MountDefinition(name), owner, captured, true);

return lastDef;
} else {
Expand Down
5 changes: 2 additions & 3 deletions packages/@ember/-internals/glimmer/lib/syntax/outlet.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { InternalOwner } from '@ember/-internals/owner';
import { assert } from '@ember/debug';
import { DEBUG } from '@glimmer/env';
import type { CapturedArguments, DynamicScope } from '@glimmer/interfaces';
import { CurriedType } from '@glimmer/vm';
import type { CapturedArguments, DynamicScope, CurriedComponent } from '@glimmer/interfaces';
import type { Reference } from '@glimmer/reference';
import {
childRefFromParts,
Expand Down Expand Up @@ -94,7 +93,7 @@ export const outletHelper = internalHelper(

let args = createCapturedArgs(named, EMPTY_POSITIONAL);
definition = curry(
CurriedType.Component,
0 as CurriedComponent,
new OutletComponentDefinition(state),
outletState?.render?.owner ?? owner,
args,
Expand Down
11 changes: 11 additions & 0 deletions packages/@ember/-internals/glimmer/lib/utils/template.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import type { Template, TemplateOk } from '@glimmer/interfaces';

export function unwrapTemplate(template: Template): TemplateOk {
if (template.result === 'error') {
throw new Error(
`Compile Error: ${template.problem} @ ${template.span.start}..${template.span.end}`
);
}

return template;
}
30 changes: 15 additions & 15 deletions packages/@ember/-internals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,23 @@
"@ember/service": "workspace:*",
"@ember/template-factory": "workspace:*",
"@ember/utils": "workspace:*",
"@glimmer/compiler": "0.92.4",
"@glimmer/compiler": "0.93.0",
"@glimmer/component": "workspace:^",
"@glimmer/destroyable": "0.92.3",
"@glimmer/destroyable": "0.93.0",
"@glimmer/env": "^0.1.7",
"@glimmer/global-context": "0.92.3",
"@glimmer/interfaces": "0.92.3",
"@glimmer/manager": "0.92.4",
"@glimmer/node": "0.92.4",
"@glimmer/opcode-compiler": "0.92.4",
"@glimmer/owner": "0.92.3",
"@glimmer/program": "0.92.4",
"@glimmer/reference": "0.92.3",
"@glimmer/runtime": "0.92.4",
"@glimmer/syntax": "0.92.3",
"@glimmer/util": "0.92.3",
"@glimmer/validator": "0.92.3",
"@glimmer/vm": "0.92.3",
"@glimmer/global-context": "0.92.4",
"@glimmer/interfaces": "0.93.0",
"@glimmer/manager": "0.93.0",
"@glimmer/node": "0.93.0",
"@glimmer/opcode-compiler": "0.93.0",
"@glimmer/owner": "0.92.4",
"@glimmer/program": "0.93.0",
"@glimmer/reference": "0.93.0",
"@glimmer/runtime": "0.93.0",
"@glimmer/syntax": "0.93.0",
"@glimmer/util": "0.93.0",
"@glimmer/validator": "0.93.0",
"@glimmer/vm": "0.93.0",
"@simple-dom/interface": "^1.4.0",
"backburner.js": "^2.7.0",
"dag-map": "^2.0.2",
Expand Down
8 changes: 4 additions & 4 deletions packages/@ember/application/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
"@ember/runloop": "workspace:*",
"@ember/service": "workspace:*",
"@ember/utils": "workspace:*",
"@glimmer/destroyable": "0.92.3",
"@glimmer/destroyable": "0.93.0",
"@glimmer/env": "^0.1.7",
"@glimmer/owner": "0.92.3",
"@glimmer/util": "0.92.3",
"@glimmer/validator": "0.92.3",
"@glimmer/owner": "0.92.4",
"@glimmer/util": "0.93.0",
"@glimmer/validator": "0.93.0",
"backburner.js": "^2.7.0",
"dag-map": "^2.0.2",
"ember": "workspace:*",
Expand Down
10 changes: 5 additions & 5 deletions packages/@ember/array/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
"@ember/object": "workspace:*",
"@ember/runloop": "workspace:*",
"@ember/utils": "workspace:*",
"@glimmer/destroyable": "0.92.3",
"@glimmer/destroyable": "0.93.0",
"@glimmer/env": "^0.1.7",
"@glimmer/manager": "0.92.4",
"@glimmer/owner": "0.92.3",
"@glimmer/util": "0.92.3",
"@glimmer/validator": "0.92.3",
"@glimmer/manager": "0.93.0",
"@glimmer/owner": "0.92.4",
"@glimmer/util": "0.93.0",
"@glimmer/validator": "0.93.0",
"expect-type": "^0.15.0",
"internal-test-helpers": "workspace:*"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/@ember/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
},
"dependencies": {
"@ember/-internals": "workspace:*",
"@glimmer/manager": "0.92.4",
"@glimmer/runtime": "0.92.4",
"@glimmer/manager": "0.93.0",
"@glimmer/runtime": "0.93.0",
"expect-type": "^0.15.0"
}
}
8 changes: 4 additions & 4 deletions packages/@ember/controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"@ember/debug": "workspace:*",
"@ember/object": "workspace:*",
"@ember/service": "workspace:*",
"@glimmer/destroyable": "0.92.3",
"@glimmer/destroyable": "0.93.0",
"@glimmer/env": "^0.1.7",
"@glimmer/owner": "0.92.3",
"@glimmer/util": "0.92.3",
"@glimmer/validator": "0.92.3",
"@glimmer/owner": "0.92.4",
"@glimmer/util": "0.93.0",
"@glimmer/validator": "0.93.0",
"expect-type": "^0.15.0",
"internal-test-helpers": "workspace:*"
}
Expand Down
10 changes: 5 additions & 5 deletions packages/@ember/debug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
"@ember/routing": "workspace:*",
"@ember/runloop": "workspace:*",
"@ember/utils": "workspace:*",
"@glimmer/destroyable": "0.92.3",
"@glimmer/destroyable": "0.93.0",
"@glimmer/env": "^0.1.7",
"@glimmer/manager": "0.92.4",
"@glimmer/owner": "0.92.3",
"@glimmer/util": "0.92.3",
"@glimmer/validator": "0.92.3",
"@glimmer/manager": "0.93.0",
"@glimmer/owner": "0.92.4",
"@glimmer/util": "0.93.0",
"@glimmer/validator": "0.93.0",
"backburner.js": "^2.7.0",
"expect-type": "^0.15.0",
"internal-test-helpers": "workspace:*"
Expand Down
2 changes: 1 addition & 1 deletion packages/@ember/destroyable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
".": "./index.ts"
},
"dependencies": {
"@glimmer/destroyable": "0.92.3",
"@glimmer/destroyable": "0.93.0",
"expect-type": "^0.15.0"
}
}
8 changes: 4 additions & 4 deletions packages/@ember/engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
"@ember/runloop": "workspace:*",
"@ember/service": "workspace:*",
"@ember/utils": "workspace:*",
"@glimmer/destroyable": "0.92.3",
"@glimmer/destroyable": "0.93.0",
"@glimmer/env": "^0.1.7",
"@glimmer/owner": "0.92.3",
"@glimmer/util": "0.92.3",
"@glimmer/validator": "0.92.3",
"@glimmer/owner": "0.92.4",
"@glimmer/util": "0.93.0",
"@glimmer/validator": "0.93.0",
"dag-map": "^2.0.2",
"expect-type": "^0.15.0",
"internal-test-helpers": "workspace:*",
Expand Down
8 changes: 4 additions & 4 deletions packages/@ember/enumerable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"@ember/array": "workspace:*",
"@ember/debug": "workspace:*",
"@ember/object": "workspace:*",
"@glimmer/destroyable": "0.92.3",
"@glimmer/destroyable": "0.93.0",
"@glimmer/env": "^0.1.7",
"@glimmer/owner": "0.92.3",
"@glimmer/util": "0.92.3",
"@glimmer/validator": "0.92.3",
"@glimmer/owner": "0.92.4",
"@glimmer/util": "0.93.0",
"@glimmer/validator": "0.93.0",
"internal-test-helpers": "workspace:*"
}
}
Loading
Loading