-
Notifications
You must be signed in to change notification settings - Fork 28
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
Fix all the things #100
base: master
Are you sure you want to change the base?
Fix all the things #100
Conversation
e6a84f7
to
bee43a9
Compare
export default function() { | ||
return flooring(); | ||
} | ||
export { default } from 'outdated/utils/floor-type'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is intentionally different than the addon module and should not re-export the module from the addon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please coordinate before doing work on this branch. I am in the process of fixing these issues.
…cting them itself.
This is to allow StubGenerator to rewrite app files which import npm modules. Allowing them to uniquely address Browserify modules.
* browserify_stubs needs to be provided to CachingBrowserify * everything else, is merged with the existing tree. This should only include the files that contain `npm:x` import statements.
1edc86e
to
e3c8b59
Compare
@nathanhammond the tests have been updated to work with some known add-on limitations. There still exist further issues, but this now works around a resolving bug in ember-cli. So it is at-least closing to possibly working. |
Im heading to a meeting, and wont be looking at this for the next hour or so. My latest changes have been updated. Please review the new lib structure, especially how in-repo modules dependencies are setup. Including that they declare their dependency on ember-browserify itself (this way ember browserify atleast runs for them). There are more issues yet, although this is getting closer... |
Exists in tests/dummy/app/routes/application.js This reverts commit d25ff36.
Rework tests, add reexports scenario.
The next step on this, which I've started, is to switch to pushing a preprocessor into the parent addon and away from |
"ember-addon": { | ||
"configPath": "tests/dummy/config", | ||
"paths": [ | ||
"node_modules/modern", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this not tests/dummy/lib/modern
and tests/dumy/lib/outdated
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because by the time we actually need them in test they're present in node_modules because of the link behavior we use. Probably results in duplication, I need to think about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we should be explicit, the indirection via symlink I think is unneeded.
Some notes:
We most likely need to address:
Something to consider:
|
|
||
Object.keys(imports).forEach(function(name) { | ||
needsImportsReWritten = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to try comparing the imports object across runs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ya, i'll fix in the work im about todo.
e4b6e7f
to
a70c006
Compare
toTree: function(tree) { | ||
var type = 'js'; | ||
var root = findRoot(instance); | ||
var target = findTarget(instance); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is already via the add-on API, we should use that reference to it instead.
ext: 'js', | ||
toTree: function(tree) { | ||
var type = 'js'; | ||
var root = findRoot(instance); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this is currently being used. We should remove it.
Order of execution:
Can use Looking into available workarounds for the |
TL;DR this opens support (improved support, not quite perfect) for add-on and nested add-on usage.
The aim is to mangle imports/exports such that, each browserify bundle will uniquely identify each module by version. The associated importing module will also refer to that version. This will in-theory allow duplicate versions to co-exist. We would prefer this not to work, but shrug.... 🔥
browserify/browserify.js
imports.