Skip to content

Commit

Permalink
make new imports paths work in non-embroider world
Browse files Browse the repository at this point in the history
  • Loading branch information
ro0gr committed Jan 28, 2022
1 parent cd8fff7 commit e030384
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
16 changes: 14 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,27 @@ module.exports = {
//
// which is a default behavior in ember-cli
const reexportsTree = mergeTrees(
['index', 'extend', 'macros', 'adapter', 'adapters']
[
'index',
'extend',
'macros',
'adapters',
'-private/better-errors',
'-private/meta',
]
.map((publicModuleName) =>
writeFile(
`/${this.moduleName()}/${publicModuleName}.js`,
`export * from '${this.moduleName()}/test-support/${publicModuleName}';`
)
)
.concat(
['adapters/rfc268'].map((publicModuleName) =>
[
'adapter',
'adapters/rfc268',
'-private/action',
'-private/deprecate',
].map((publicModuleName) =>
writeFile(
`/${this.moduleName()}/${publicModuleName}.js`,
`export { default } from '${this.moduleName()}/test-support/${publicModuleName}';`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"test": "tests"
},
"exports": {
".": "./test-support/",
".": "./test-support",
"./adapter": "./test-support/adapter",
"./adapters": "./test-support/adapters",
"./adapters/rfc268": "./test-support/adapters/rfc268",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { test, module } from 'qunit';
import { create, collection } from 'ember-cli-page-object';
import { fullScope } from 'ember-cli-page-object/-private/helpers';
import { fullScope } from 'ember-cli-page-object/extend';

module('Unit | helpers | fullScope', function () {
let page = create({
Expand Down

0 comments on commit e030384

Please sign in to comment.