emberjs / babel-plugin-ember-template-compilation

Babel implementation of Ember's low-level template-compilation API
9 stars 11 forks source link

Potential issue with 2.0.1 #18

Closed runspired closed 1 year ago

runspired commented 1 year ago

EmberData's no-lockfile test scenario hits this issue when picking up the new release:

tests/request test:   - errorType: [undefined]
tests/request test:   - location:
tests/request test:     - column: [undefined]
tests/request test:     - file: [undefined]
tests/request test:     - line: [undefined]
tests/request test:   - message: Cannot find module 'babel-plugin-ember-template-compilation'
tests/request test: Require stack:
tests/request test: - /home/runner/work/data/data/node_modules/.pnpm/ember-auto-import@2.6.2_webpack@5.77.0/node_modules/ember-auto-import/js/package.js
tests/request test: - /home/runner/work/data/data/node_modules/.pnpm/ember-auto-import@2.6.2_webpack@5.77.0/node_modules/ember-auto-import/js/auto-import.js
tests/request test: - /home/runner/work/data/data/node_modules/.pnpm/ember-auto-import@2.6.2_webpack@5.77.0/node_modules/ember-auto-import/js/index.js
mansona commented 1 year ago

That's actually an issue with ember-auto-import not having the correct dependencies declared. I don't know exactly why it wasn't caught in the ember-auto-import test suite but 🤷

There is already a fix for it https://github.com/ef4/ember-auto-import/pull/576 that we just need to merge and release 👍

runspired commented 1 year ago

@mansona I think this is because ember-auto-import is using npm and not pnpm (and does not use an npmrc to configure pnpm to be strict) and thus does not have isolated node_modules trees that catch mistakes that are papered over by auto-install of peers or auto-hoisting.

EmberData uses extremely strict settings in our npmrc file to go with pnpm to ensure we're testing against such scenarios, hence us hitting this immediately.