Skip to content

Commit 3076cf8

Browse files
committed
find and replace
1 parent bfa0476 commit 3076cf8

File tree

143 files changed

+373
-369
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+373
-369
lines changed

broccoli/build-debug-macro-plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = function buildDebugMacrosPlugin(isDebug) {
1010
externalizeHelpers: {
1111
module: true,
1212
},
13-
flags: [{ source: '@glimmer/env', flags: { DEBUG: isDebug } }],
13+
flags: [{ source: '@glimmer/env', flags: { import.meta.env?.DEV: isDebug } }],
1414
},
1515
];
1616
};

packages/@ember/-internals/container/lib/container.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ declare const gc: undefined | (() => void);
2424

2525
let leakTracking: LeakTracking;
2626
let containers: WeakSet<Container>;
27-
if (import.meta.env?.DEV ?? true) {
27+
if (import.meta.env?.DEV) {
2828
// requires v8
2929
// chrome --js-flags="--allow-natives-syntax --expose-gc"
3030
// node --allow-natives-syntax --expose-gc
@@ -92,7 +92,7 @@ export default class Container {
9292
this.isDestroyed = false;
9393
this.isDestroying = false;
9494

95-
if (import.meta.env?.DEV ?? true) {
95+
if (import.meta.env?.DEV) {
9696
this.validationCache = dictionary(options.validationCache || null);
9797
if (containers !== undefined) {
9898
containers.add(this);
@@ -232,7 +232,7 @@ export default class Container {
232232
}
233233
}
234234

235-
if (import.meta.env?.DEV ?? true) {
235+
if (import.meta.env?.DEV) {
236236
Container._leakTracking = leakTracking!;
237237
}
238238

@@ -312,13 +312,13 @@ function factoryFor(
312312
return;
313313
}
314314

315-
if (DEBUG && factory && typeof factory._onLookup === 'function') {
315+
if (import.meta.env?.DEV && factory && typeof factory._onLookup === 'function') {
316316
factory._onLookup(fullName);
317317
}
318318

319319
let manager = new InternalFactoryManager(container, factory, fullName, normalizedName);
320320

321-
if (import.meta.env?.DEV ?? true) {
321+
if (import.meta.env?.DEV) {
322322
manager = wrapManagerInDeprecationProxy(manager);
323323
}
324324

@@ -541,7 +541,7 @@ export class InternalFactoryManager<
541541
setOwner(props, container.owner!);
542542
setFactoryFor(props, this);
543543

544-
if (import.meta.env?.DEV ?? true) {
544+
if (import.meta.env?.DEV) {
545545
let lazyInjections;
546546
let validationCache = this.container.validationCache;
547547
// Ensure that all lazy injections are valid at instantiation time

packages/@ember/-internals/container/lib/registry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ export declare class DebugRegistry extends Registry {
468468
validateInjections(injections: Injection[]): void;
469469
}
470470

471-
if (import.meta.env?.DEV ?? true) {
471+
if (import.meta.env?.DEV) {
472472
const proto = Registry.prototype as DebugRegistry;
473473
proto.normalizeInjectionsHash = function (hash: { [key: string]: LazyInjection }) {
474474
let injections: Injection[] = [];

packages/@ember/-internals/container/tests/container_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ moduleFor(
447447
}
448448

449449
['@test Lazy injection validations are cached'](assert) {
450-
if (!DEBUG) {
450+
if (!import.meta.env?.DEV) {
451451
assert.expect(0);
452452
return;
453453
}

packages/@ember/-internals/environment/lib/env.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const ENV = {
9191
@default false
9292
@private
9393
*/
94-
_DEBUG_RENDER_TREE: DEBUG,
94+
_DEBUG_RENDER_TREE: import.meta.env?.DEV,
9595

9696
/**
9797
Whether to force all deprecations to be enabled. This is used internally by
@@ -200,7 +200,7 @@ export const ENV = {
200200
}
201201
}
202202

203-
if (import.meta.env?.DEV ?? true) {
203+
if (import.meta.env?.DEV) {
204204
ENV._DEBUG_RENDER_TREE = true;
205205
}
206206
})(global.EmberENV);

packages/@ember/-internals/glimmer/lib/component-managers/curly.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ export default class CurlyComponentManager
337337
bucket.classRef = args.named.get('class');
338338
}
339339

340-
if (import.meta.env?.DEV ?? true) {
340+
if (import.meta.env?.DEV) {
341341
processComponentInitializationAssertions(component, props);
342342
}
343343

packages/@ember/-internals/glimmer/lib/component-managers/root.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class RootComponentManager extends CurlyComponentManager {
5757
}
5858
}
5959

60-
if (import.meta.env?.DEV ?? true) {
60+
if (import.meta.env?.DEV) {
6161
processComponentInitializationAssertions(component, {});
6262
}
6363

packages/@ember/-internals/glimmer/lib/component-managers/route-template.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class RouteTemplateManager
6161
): RouteTemplateInstanceState {
6262
let self = args.named.get('controller');
6363

64-
if (import.meta.env?.DEV ?? true) {
64+
if (import.meta.env?.DEV) {
6565
self = createDebugAliasRef!('this', self);
6666
}
6767

packages/@ember/-internals/glimmer/lib/component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ class Component<S = unknown>
939939
}
940940
}
941941

942-
if (DEBUG && eventDispatcher && this.renderer._isInteractive && this.tagName === '') {
942+
if (import.meta.env?.DEV && eventDispatcher && this.renderer._isInteractive && this.tagName === '') {
943943
let eventNames = [];
944944
let events = eventDispatcher.finalEventNameMapping;
945945

packages/@ember/-internals/glimmer/lib/components/link-to.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ class _LinkTo extends InternalComponent {
344344
// TODO: can we narrow this down to QP changes only?
345345
consumeTag(tagFor(routing, 'currentState'));
346346

347-
if (import.meta.env?.DEV ?? true) {
347+
if (import.meta.env?.DEV) {
348348
try {
349349
return routing.generateURL(route, models, query);
350350
} catch (e) {

0 commit comments

Comments
 (0)