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

Sourcemaps from babel 7.21 and higher are considered invalid #17

Open
andreyfel opened this issue Mar 28, 2023 · 1 comment
Open

Sourcemaps from babel 7.21 and higher are considered invalid #17

andreyfel opened this issue Mar 28, 2023 · 1 comment

Comments

@andreyfel
Copy link

andreyfel commented Mar 28, 2023

I'm using this package in my ember app which is using ember-cli which is using fast-sourcemap-concat which depends on this package.

Recently, after updating @babel/* packages to the latest the source maps stopped working.

I was able to localize the issue to @babel/generator's update from 7.20.14 to 7.21.3. Probably after this commit it broke: babel/babel#15022.

When I run the ember-cli build with DEBUG='fast-sourcemap-concat:*' I see the following errors in the output:

Mapping: 30:8→29:6 "init" in @ember/engine/instance.js +0ms
  fast-sourcemap-concat: [ember.js#4665] generating new map: @ember/engine/instance.js +1ms
  fast-sourcemap-concat: [ember.js#4665]  invalid sourcemap for: @ember/engine/lib/engine-parent.js +1ms
  fast-sourcemap-concat: [ember.js#4665]    error:  Warning: mismatched names
Expected: getEngineParent || 'getEngineParent' || 'getEngineParent' || "getEngineParent" || "getEngineParent"
Got: (engine) { || (engine) { || (engine) { || (engine) { || (engine) {
Original Line: export function getEngineParent(engine) {
Mapping: 25:26→17:31 "getEngineParent" in @ember/engine/lib/engine-parent.js +0ms
@tdwesten
Copy link

I have the same problem, here same errorlogs;

 fast-sourcemap-concat: [Concat: App Tests#5135]    error:  Warning: mismatched names
Expected: _templateFactory || '_templateFactory' || '_templateFactory' || "_templateFactory" || "_templateFactory"
Got: (hbs`<Steps />`) || (hbs`<Steps />`); || (hbs`<Steps />`); || (hbs`<Steps />`); || (hbs`<Steps />`);
Original Line:     await render(hbs`<Steps />`);
Mapping: 11:41→13:16 "_templateFactory" in binder/tests/integration/components/steps/component-test.ts +0ms
  fast-sourcemap-concat: [Concat: App Tests#5135]  invalid sourcemap for: binder/tests/integration/components/button/component-test.js +1ms
  fast-sourcemap-concat: [Concat: App Tests#5135]

@andreyfel andreyfel changed the title Update to the latest source-map Sourcemaps from babel 7.21 and higher are considered invalid May 25, 2023
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

No branches or pull requests

2 participants