Skip to content

Fix assert conditions and incorrect string replacements from import.meta.env?.DEV migration#21120

Merged
NullVoxPopuli merged 2 commits intonvp/no-more-macrosfrom
copilot/sub-pr-21115
Feb 26, 2026
Merged

Fix assert conditions and incorrect string replacements from import.meta.env?.DEV migration#21120
NullVoxPopuli merged 2 commits intonvp/no-more-macrosfrom
copilot/sub-pr-21115

Conversation

Copy link
Contributor

Copilot AI commented Feb 26, 2026

Removing babel-plugin-debug-macros changed how assert() calls with function-typed conditions behave. The plugin previously inlined/transformed such calls; without it, expectAssertion's checkTest helper calls any function it receives as a condition — causing the wrong assertion to be captured.

Root cause

// teardownMandatorySetter is a function
assert('[BUG] Expected teardownMandatorySetter to be set in DEV mode', teardownMandatorySetter);

expectAssertion's checkTest(test) does typeof test === 'function' ? test() : test. Calling teardownMandatorySetter() with no args returns undefined (falsy), so the helper captured this [BUG] assert instead of the expected backtracking assertion — failing the test.

Fixes

  • states.ts / -proxy.ts: Change assert('[BUG]...', teardownMandatorySetter) and assert('[BUG]...', setupMandatorySetter) to use explicit boolean conditions (!== undefined) so checkTest receives a plain boolean, not a callable.

  • String literal pollution: Several string literals incorrectly contained import.meta.env?.DEV (replaced with true at build time by the vite plugin):

    • console.debug prefix in @ember/debug/index.ts ("import.meta.env?.DEV: ...""Ember: ...")
    • Comments in resolver.ts, component.ts, expressions.ts
    • Test names in tracking-test.ts ("import.meta.env.DEV mode""DEV mode")

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

… incorrect string replacements

Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 26, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • accounts.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=4877 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,14303757971536025258,4118665200532649027,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5176 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1486135347545-nSP5wi --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,8754715619503575151,17640373077026329729,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • android.clients.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=4877 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,14303757971536025258,4118665200532649027,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5176 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1486135347545-nSP5wi --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,8754715619503575151,17640373077026329729,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • clients2.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=4877 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,14303757971536025258,4118665200532649027,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5176 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1486135347545-nSP5wi --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,8754715619503575151,17640373077026329729,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • clientservices.googleapis.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=4877 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,14303757971536025258,4118665200532649027,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5176 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1486135347545-nSP5wi --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,8754715619503575151,17640373077026329729,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • content-autofill.googleapis.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=4877 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,14303757971536025258,4118665200532649027,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5176 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1486135347545-nSP5wi --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,8754715619503575151,17640373077026329729,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • foo.bar
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=4877 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,14303757971536025258,4118665200532649027,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5176 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1486135347545-nSP5wi --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,8754715619503575151,17640373077026329729,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • optimizationguide-pa.googleapis.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=4877 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,14303757971536025258,4118665200532649027,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5176 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1486135347545-nSP5wi --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,8754715619503575151,17640373077026329729,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • redirector.gvt1.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=4877 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,14303757971536025258,4118665200532649027,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5176 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1486135347545-nSP5wi --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,8754715619503575151,17640373077026329729,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • safebrowsingohttpgateway.googleapis.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=4877 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,14303757971536025258,4118665200532649027,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5176 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1486135347545-nSP5wi --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,8754715619503575151,17640373077026329729,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • update.googleapis.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=4877 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,14303757971536025258,4118665200532649027,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5176 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1486135347545-nSP5wi --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,8754715619503575151,17640373077026329729,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
  • www.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=4877 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,14303757971536025258,4118665200532649027,262144 --disable-features=PaintHolding --variations-seed-version (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-1253468837638-qB1Jhk --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5176 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-1486135347545-nSP5wi --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,8754715619503575151,17640373077026329729,262144 --disable-features=PaintHolding --variations-seed-version (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Remove macros in favor of import.meta.env?.DEV Fix assert conditions and incorrect string replacements from import.meta.env?.DEV migration Feb 26, 2026
@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review February 26, 2026 06:22
@NullVoxPopuli NullVoxPopuli merged commit 5dbf9b1 into nvp/no-more-macros Feb 26, 2026
21 of 22 checks passed
@NullVoxPopuli NullVoxPopuli deleted the copilot/sub-pr-21115 branch February 26, 2026 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants