Skip to content

Handle missing absolutePaths for ember-source v7+#708

Merged
NullVoxPopuli merged 2 commits intoembroider-build:mainfrom
NullVoxPopuli-ai-agent:handle-missing-absolutePaths
Mar 29, 2026
Merged

Handle missing absolutePaths for ember-source v7+#708
NullVoxPopuli merged 2 commits intoembroider-build:mainfrom
NullVoxPopuli-ai-agent:handle-missing-absolutePaths

Conversation

@NullVoxPopuli-ai-agent
Copy link
Copy Markdown

Summary

ember-source v7 no longer exports absolutePaths from its addon entry point. This causes a crash in cleanBabelConfig() when building classic apps with v7.

Fix: Check if absolutePaths exists before accessing it, and fall back to resolving the template compiler through the package exports map (require.resolve('ember-source/ember-template-compiler/index.js')).

Context: emberjs/ember.js#21240

Test plan

  • Existing tests pass
  • Works with ember-source v5/v6 (uses absolutePaths as before)
  • Works with ember-source v7 (uses require.resolve fallback)

🤖 Generated with Claude Code

@NullVoxPopuli-ai-agent NullVoxPopuli-ai-agent force-pushed the handle-missing-absolutePaths branch 6 times, most recently from 6d70335 to 5059609 Compare March 29, 2026 13:02
The patch targeted the legacy AMD bundles (dist/ember.debug.js,
dist/ember.prod.js) which are being removed in ember-source v7.
The underlying issue (associateDestroyableChild) was fixed in
ember-source itself.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ember-source v7 no longer exports `absolutePaths` from its addon entry
point. Fall back to resolving the template compiler through the package
exports map when `absolutePaths` is absent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@NullVoxPopuli-ai-agent NullVoxPopuli-ai-agent force-pushed the handle-missing-absolutePaths branch from 5059609 to c961d74 Compare March 29, 2026 13:38
@NullVoxPopuli NullVoxPopuli added the bug Something isn't working label Mar 29, 2026
@NullVoxPopuli NullVoxPopuli merged commit dcf8c2e into embroider-build:main Mar 29, 2026
181 checks passed
@github-actions github-actions Bot mentioned this pull request Mar 29, 2026
NullVoxPopuli-ai-agent pushed a commit to NullVoxPopuli-ai-agent/ember.js that referenced this pull request Mar 29, 2026
…ider/compat

These patches were temporary shims for v7 compatibility. The upstream
PRs have landed:
- ember-cli-htmlbars: ember-cli/ember-cli-htmlbars#793
- ember-auto-import: embroider-build/ember-auto-import#708
- @embroider/compat: embroider-build/embroider#2695

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NullVoxPopuli-ai-agent pushed a commit to NullVoxPopuli-ai-agent/ember.js that referenced this pull request Mar 29, 2026
…ider/compat

These patches were temporary shims for v7 compatibility. The upstream
PRs have landed:
- ember-cli-htmlbars: ember-cli/ember-cli-htmlbars#793
- ember-auto-import: embroider-build/ember-auto-import#708
- @embroider/compat: embroider-build/embroider#2695

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NullVoxPopuli-ai-agent pushed a commit to NullVoxPopuli-ai-agent/ember.js that referenced this pull request Mar 29, 2026
…ider/compat

These patches were temporary shims for v7 compatibility. The upstream
PRs have landed:
- ember-cli-htmlbars: ember-cli/ember-cli-htmlbars#793
- ember-auto-import: embroider-build/ember-auto-import#708
- @embroider/compat: embroider-build/embroider#2695

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NullVoxPopuli-ai-agent pushed a commit to NullVoxPopuli-ai-agent/ember.js that referenced this pull request Mar 29, 2026
…ider/compat

These patches were temporary shims for v7 compatibility. The upstream
PRs have landed:
- ember-cli-htmlbars: ember-cli/ember-cli-htmlbars#793
- ember-auto-import: embroider-build/ember-auto-import#708
- @embroider/compat: embroider-build/embroider#2695

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NullVoxPopuli added a commit to emberjs/ember.js that referenced this pull request Mar 29, 2026
…ider/compat

These patches were temporary shims for v7 compatibility. The upstream
PRs have landed:
- ember-cli-htmlbars: ember-cli/ember-cli-htmlbars#793
- ember-auto-import: embroider-build/ember-auto-import#708
- @embroider/compat: embroider-build/embroider#2695

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NullVoxPopuli added a commit to emberjs/ember.js that referenced this pull request Mar 29, 2026
Add pnpm patches for ember-cli and @embroider/compat paths fix

Patches ember-cli@6.11.0 (ember-cli/ember-cli#10971) and
@embroider/compat@4.1.16 (embroider-build/embroider#2695) to handle
ember-source no longer exporting `paths` in v7.

- ember-cli: guard `_initVendorFiles` against missing `paths`
- @embroider/compat: skip legacy vendor file creation when `paths` absent

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Add ember-cli-htmlbars patch, fix sourcemap test

- Patch ember-cli-htmlbars@7.0.0 to handle missing absolutePaths in
  v7 ember-source, falling back to the ESM template compiler path.
- Update sourcemap-test.js for v7's ESM-only dist structure
  (dist/ember.debug.js no longer exists).
- Include template-compiler-test.js fix for ESM imports.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Fix ember-cli-htmlbars patch: use dist/dev/ path for v7

The v7 build outputs to dist/dev/packages/ and dist/prod/packages/,
not dist/packages/. The template compiler fallback path must use the
dev directory.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Patch ember-auto-import to handle missing absolutePaths

ember-auto-import also accesses emberSource.absolutePaths.templateCompiler
for babel template compilation config. Add the same fallback to the
dist/dev/ ESM template compiler path for v7.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Use require.resolve instead of hardcoded dist path in patches

Replace hardcoded `dist/dev/packages/ember-template-compiler/index.js`
with `require.resolve('ember-source/ember-template-compiler/index.js')`
which resolves through the package exports map, making the patches
resilient to dist layout changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Remove pnpm patches for ember-cli-htmlbars, ember-auto-import, @embroider/compat

These patches were temporary shims for v7 compatibility. The upstream
PRs have landed:
- ember-cli-htmlbars: ember-cli/ember-cli-htmlbars#793
- ember-auto-import: embroider-build/ember-auto-import#708
- @embroider/compat: embroider-build/embroider#2695

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
NullVoxPopuli added a commit to emberjs/ember.js that referenced this pull request Mar 29, 2026
Add pnpm patches for ember-cli and @embroider/compat paths fix

Patches ember-cli@6.11.0 (ember-cli/ember-cli#10971) and
@embroider/compat@4.1.16 (embroider-build/embroider#2695) to handle
ember-source no longer exporting `paths` in v7.

- ember-cli: guard `_initVendorFiles` against missing `paths`
- @embroider/compat: skip legacy vendor file creation when `paths` absent

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Add ember-cli-htmlbars patch, fix sourcemap test

- Patch ember-cli-htmlbars@7.0.0 to handle missing absolutePaths in
  v7 ember-source, falling back to the ESM template compiler path.
- Update sourcemap-test.js for v7's ESM-only dist structure
  (dist/ember.debug.js no longer exists).
- Include template-compiler-test.js fix for ESM imports.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Fix ember-cli-htmlbars patch: use dist/dev/ path for v7

The v7 build outputs to dist/dev/packages/ and dist/prod/packages/,
not dist/packages/. The template compiler fallback path must use the
dev directory.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Patch ember-auto-import to handle missing absolutePaths

ember-auto-import also accesses emberSource.absolutePaths.templateCompiler
for babel template compilation config. Add the same fallback to the
dist/dev/ ESM template compiler path for v7.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Use require.resolve instead of hardcoded dist path in patches

Replace hardcoded `dist/dev/packages/ember-template-compiler/index.js`
with `require.resolve('ember-source/ember-template-compiler/index.js')`
which resolves through the package exports map, making the patches
resilient to dist layout changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Remove pnpm patches for ember-cli-htmlbars, ember-auto-import, @embroider/compat

These patches were temporary shims for v7 compatibility. The upstream
PRs have landed:
- ember-cli-htmlbars: ember-cli/ember-cli-htmlbars#793
- ember-auto-import: embroider-build/ember-auto-import#708
- @embroider/compat: embroider-build/embroider#2695

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Lockfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants