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(importer): support nodejs module default main file "index.js" when "main" is missing in package.json #842

Merged
merged 1 commit into from Apr 29, 2018

Conversation

Projects
None yet
2 participants
@huochunpeng
Contributor

huochunpeng commented Mar 10, 2018

When "main" is missing in package.json, nodejs uses
default main file "index.js", it will complain when
default main file is missing.
This fix supports nodejs module with missing "main"
in package.json. It solves importing issue on nodejs
module "date-fns". #831 is related, that PR solves
tracing issue on "date-fns".

fix(importer): support nodejs module default main file "index.js" whe…
…n "main" is missing in package.json

When "main" is missing in package.json, nodejs uses
default main file "index.js", it will complain when
default main file is missing.
This fix supports nodejs module with missing "main"
in package.json. It solves importing issue on nodejs
module "date-fns". #831 is related, that PR solves
tracing issue on "date-fns".
@huochunpeng

This comment has been minimized.

Show comment
Hide comment
@huochunpeng

huochunpeng Mar 10, 2018

Contributor

This fix also means amodro strategy will import absolutely any nodejs module. There would not be any nodejs module in the field with missing default main file, because those malfunctioned modules would not reach your ears.

Whether we can trace what we imported, that is another problem.

Contributor

huochunpeng commented Mar 10, 2018

This fix also means amodro strategy will import absolutely any nodejs module. There would not be any nodejs module in the field with missing default main file, because those malfunctioned modules would not reach your ears.

Whether we can trace what we imported, that is another problem.

huochunpeng added a commit to huochunpeng/cli that referenced this pull request Mar 30, 2018

feat(bundler): auto tracing for requirejs/systemjs
remove all lib/importer files.
remove most of amodro-tracing.
manual efficient js and html tracing for aurelia.
cover all aurelia-webpack-plugin covers.
more permissive, usage of PLATFORM.moduleName is NOT required.
almost zero manual maintenance of aurelia.json dependencies.
solve node id compatibility issue aurelia#831 for both requirejs and systemjs.
simplify and reduce source code, but increase test coverge.
add "au run --watch --auto-install" for frictionless dev flow.
overtake webpack for simplicity and usability, with far less code/config.

Supersede aurelia#853, aurelia#842, aurelia#831
BREAKING CHANGE: require minor user code change to support non-js main, like "main": "font-awesome.css"
BREAKING CHANGE: remove support of undocumented "main": false, replace it with "lazyMain": true.

huochunpeng added a commit to huochunpeng/cli that referenced this pull request Mar 30, 2018

feat(bundler): auto tracing for requirejs/systemjs
remove all lib/importer files.
remove most of amodro-tracing.
manual efficient js and html tracing for aurelia.
cover all aurelia-webpack-plugin covers.
more permissive, usage of PLATFORM.moduleName is NOT required.
almost zero manual maintenance of aurelia.json dependencies.
solve node id compatibility issue aurelia#831 for both requirejs and systemjs.
simplify and reduce source code, but increase test coverge.
add "au run --watch --auto-install" for frictionless dev flow.
overtake webpack for simplicity and usability, with far less code/config.

Supersede aurelia#853, aurelia#842, aurelia#831
BREAKING CHANGE: require minor user code change to support non-js main, like "main": "font-awesome.css"
BREAKING CHANGE: remove support of undocumented "main": false, replace it with "lazyMain": true.

huochunpeng added a commit to huochunpeng/cli that referenced this pull request Mar 30, 2018

feat(bundler): auto tracing for requirejs/systemjs
remove all lib/importer files.
remove most of amodro-tracing.
manual efficient js and html tracing for aurelia.
remove irrelevant tracing cache.
cover all aurelia-webpack-plugin covers, plus more edge cases.
more permissive, usage of PLATFORM.moduleName is NOT required.
almost zero manual maintenance of aurelia.json dependencies.
fix node id compatibility issue aurelia#831 for both requirejs and systemjs.
fix bundles moduleIds format for modules need plugin.
simplify and reduce source code, but increase test coverge.
add "au run --watch --auto-install" for frictionless dev flow.
best guess on package manager 'yarn' to avoid 'npm i' error on yarn
controlled node_modules.
overtake webpack on simplicity, usability, compatibility and flexibility,
but probably not on performance.
perform slightly faster than existing amodro-trace + cache.

Supersede aurelia#853, aurelia#842, aurelia#831
BREAKING CHANGE: require minor user code change to support non-js main, like "main": "font-awesome.css"
BREAKING CHANGE: remove support of undocumented "main": false, replace with generic "lazyMain": true

huochunpeng added a commit to huochunpeng/cli that referenced this pull request Mar 30, 2018

feat(bundler): auto tracing for requirejs/systemjs
remove all lib/importer files.
remove most of amodro-tracing.
manual efficient js and html tracing for aurelia.
remove irrelevant tracing cache.
cover all aurelia-webpack-plugin covers, plus more edge cases.
more permissive, usage of PLATFORM.moduleName is NOT required.
almost zero manual maintenance of aurelia.json dependencies.
fix node id compatibility issue aurelia#831 for both requirejs and systemjs.
fix bundles moduleIds format for modules need plugin.
simplify and reduce source code, but increase test coverge.
add "au run --watch --auto-install" for frictionless dev flow.
best guess on package manager 'yarn' to avoid 'npm i' error on yarn
controlled node_modules.
overtake webpack on simplicity, usability, compatibility and flexibility,
but probably not on performance.
perform slightly faster than existing amodro-trace + cache.

Supersede aurelia#853, aurelia#842, aurelia#831
BREAKING CHANGE: require minor user code change to support non-js main, like "main": "font-awesome.css"
BREAKING CHANGE: remove support of undocumented "main": false, replace with generic "lazyMain": true

@JeroenVinke JeroenVinke merged commit 2801e1b into aurelia:master Apr 29, 2018

2 checks passed

WIP ready for review
Details
license/cla Contributor License Agreement is signed.
Details

huochunpeng added a commit to huochunpeng/cli that referenced this pull request May 18, 2018

feat(bundler): auto tracing for requirejs/systemjs
remove all lib/importer files.
remove most of amodro-tracing.
manual efficient js and html tracing for aurelia.
remove irrelevant tracing cache.
cover all aurelia-webpack-plugin covers, plus more edge cases.
more permissive, usage of PLATFORM.moduleName is NOT required.
almost zero manual maintenance of aurelia.json dependencies.
fix node id compatibility issue aurelia#831 for both requirejs and systemjs.
fix bundles moduleIds format for modules need plugin.
simplify and reduce source code, but increase test coverge.
add "au run --watch --auto-install" for frictionless dev flow.
best guess on package manager 'yarn' to avoid 'npm i' error on yarn
controlled node_modules.
overtake webpack on simplicity, usability, compatibility and flexibility,
but probably not on performance.
perform slightly faster than existing amodro-trace + cache.

Supersede aurelia#853, aurelia#842, aurelia#831
BREAKING CHANGE: require minor user code change to support non-js main, like "main": "font-awesome.css"
BREAKING CHANGE: remove support of undocumented "main": false, replace with generic "lazyMain": true

huochunpeng added a commit to huochunpeng/cli that referenced this pull request Jul 23, 2018

feat(bundler): auto tracing for requirejs/systemjs
remove all lib/importer files.
remove most of amodro-tracing.
manual efficient js and html tracing for aurelia.
remove irrelevant tracing cache.
cover all aurelia-webpack-plugin covers, plus more edge cases.
more permissive, usage of PLATFORM.moduleName is NOT required.
almost zero manual maintenance of aurelia.json dependencies.
fix node id compatibility issue aurelia#831 for both requirejs and systemjs.
fix bundles moduleIds format for modules need plugin.
simplify and reduce source code, but increase test coverge.
add "au run --watch --auto-install" for frictionless dev flow.
best guess on package manager 'yarn' to avoid 'npm i' error on yarn
controlled node_modules.
overtake webpack on simplicity, usability, compatibility and flexibility,
but probably not on performance.
perform slightly faster than existing amodro-trace + cache.

Supersede aurelia#853, aurelia#842, aurelia#831
BREAKING CHANGE: require minor user code change to support non-js main, like "main": "font-awesome.css"
BREAKING CHANGE: remove support of undocumented "main": false, replace with generic "lazyMain": true

huochunpeng added a commit to huochunpeng/cli that referenced this pull request Jul 24, 2018

feat(bundler): auto tracing for requirejs/systemjs
remove all lib/importer files.
remove most of amodro-tracing.
manual efficient js and html tracing for aurelia.
remove irrelevant tracing cache.
cover all aurelia-webpack-plugin covers, plus more edge cases.
more permissive, usage of PLATFORM.moduleName is NOT required.
almost zero manual maintenance of aurelia.json dependencies.
fix node id compatibility issue aurelia#831 for both requirejs and systemjs.
fix bundles moduleIds format for modules need plugin.
simplify and reduce source code, but increase test coverge.
add "au run --watch --auto-install" for frictionless dev flow.
best guess on package manager 'yarn' to avoid 'npm i' error on yarn
controlled node_modules.
overtake webpack on simplicity, usability, compatibility and flexibility,
but probably not on performance.
perform slightly faster than existing amodro-trace + cache.

Supersede aurelia#853, aurelia#842, aurelia#831
BREAKING CHANGE: require minor user code change to support non-js main, like "main": "font-awesome.css"
BREAKING CHANGE: remove support of undocumented "main": false, replace with generic "lazyMain": true

@huochunpeng huochunpeng deleted the huochunpeng:fix-missing-main-on-node-module branch Jul 26, 2018

huochunpeng added a commit to huochunpeng/cli that referenced this pull request Jul 26, 2018

feat(bundler): auto tracing for requirejs/systemjs
remove all lib/importer files.
remove most of amodro-tracing.
manual efficient js and html tracing for aurelia.
remove irrelevant tracing cache.
cover all aurelia-webpack-plugin covers, plus more edge cases.
more permissive, usage of PLATFORM.moduleName is NOT required.
almost zero manual maintenance of aurelia.json dependencies.
fix node id compatibility issue aurelia#831 for both requirejs and systemjs.
fix bundles moduleIds format for modules need plugin.
fix compatibility issue with yarn workspaces.
support npm package "main":"./lib" when main file is lib/index.js.
improve backwards compatibility by ignoring main:false.
simplify and reduce source code, but increase test coverge.
add "au run --watch --auto-install" for frictionless dev flow.
best guess on package manager 'yarn' to avoid 'npm i' error on yarn
controlled node_modules.
overtake webpack on simplicity, usability, compatibility and flexibility,
but probably not on performance.
perform slightly faster than existing amodro-trace + cache.

Supersede aurelia#853, aurelia#842, aurelia#831
BREAKING CHANGE: require minor user code change to support non-js main, like "main": "font-awesome.css"
BREAKING CHANGE: remove support of undocumented "main": false, replace with generic "lazyMain": true. But this is handled transparently without breaking user's existing app.

huochunpeng added a commit to huochunpeng/cli that referenced this pull request Jul 31, 2018

feat(bundler): auto tracing for requirejs/systemjs
remove all lib/importer files.
remove most of amodro-tracing.
manual efficient js and html tracing for aurelia.
remove irrelevant tracing cache.
cover all aurelia-webpack-plugin covers, plus more edge cases.
more permissive, usage of PLATFORM.moduleName is NOT required.
almost zero manual maintenance of aurelia.json dependencies.
fix node id compatibility issue aurelia#831 for both requirejs and systemjs.
fix bundles moduleIds format for modules need plugin.
fix compatibility issue with yarn workspaces.
support npm package "main":"./lib" when main file is lib/index.js.
improve backwards compatibility by ignoring main:false.
simplify and reduce source code, but increase test coverge.
add "au run --watch --auto-install" for frictionless dev flow.
best guess on package manager 'yarn' to avoid 'npm i' error on yarn
controlled node_modules.
overtake webpack on simplicity, usability, compatibility and flexibility,
but probably not on performance.
perform slightly faster than existing amodro-trace + cache.

Supersede aurelia#853, aurelia#842, aurelia#831
BREAKING CHANGE: require minor user code change to support non-js main, like "main": "font-awesome.css"
BREAKING CHANGE: remove support of undocumented "main": false, replace with generic "lazyMain": true. But this is handled transparently without breaking user's existing app.

huochunpeng added a commit to huochunpeng/cli that referenced this pull request Aug 9, 2018

feat(bundler): auto tracing for requirejs/systemjs
remove all lib/importer files.
remove most of amodro-tracing.
manual efficient js and html tracing for aurelia.
remove irrelevant tracing cache.
cover all aurelia-webpack-plugin covers, plus more edge cases.
more permissive, usage of PLATFORM.moduleName is NOT required.
almost zero manual maintenance of aurelia.json dependencies.
fix node id compatibility issue aurelia#831 for both requirejs and systemjs.
fix bundles moduleIds format for modules need plugin.
fix compatibility issue with yarn workspaces.
support npm package "main":"./lib" when main file is lib/index.js.
improve backwards compatibility by ignoring main:false.
simplify and reduce source code, but increase test coverge.
add "au run --watch --auto-install" for frictionless dev flow.
best guess on package manager 'yarn' to avoid 'npm i' error on yarn
controlled node_modules.
overtake webpack on simplicity, usability, compatibility and flexibility,
but probably not on performance.
perform slightly faster than existing amodro-trace + cache.

Supersede aurelia#853, aurelia#842, aurelia#831
BREAKING CHANGE: require minor user code change to support non-js main, like "main": "font-awesome.css"
BREAKING CHANGE: remove support of undocumented "main": false, replace with generic "lazyMain": true. But this is handled transparently without breaking user's existing app.

huochunpeng added a commit to huochunpeng/cli that referenced this pull request Aug 24, 2018

feat(bundler): auto tracing for requirejs/systemjs
remove all lib/importer files.
remove most of amodro-tracing.
manual efficient js and html tracing for aurelia.
remove irrelevant tracing cache.
cover all aurelia-webpack-plugin covers, plus more edge cases.
more permissive, usage of PLATFORM.moduleName is NOT required.
almost zero manual maintenance of aurelia.json dependencies.
fix node id compatibility issue aurelia#831 for both requirejs and systemjs.
fix bundles moduleIds format for modules need plugin.
fix compatibility issue with yarn workspaces.
support npm package "main":"./lib" when main file is lib/index.js.
improve backwards compatibility by ignoring main:false.
simplify and reduce source code, but increase test coverge.
add "au run --watch --auto-install" for frictionless dev flow.
best guess on package manager 'yarn' to avoid 'npm i' error on yarn
controlled node_modules.
overtake webpack on simplicity, usability, compatibility and flexibility,
but probably not on performance.
perform slightly faster than existing amodro-trace + cache.

Supersede aurelia#853, aurelia#842, aurelia#831
BREAKING CHANGE: require minor user code change to support non-js main, like "main": "font-awesome.css"
BREAKING CHANGE: remove support of undocumented "main": false, replace with generic "lazyMain": true. But this is handled transparently without breaking user's existing app.

huochunpeng added a commit to huochunpeng/cli that referenced this pull request Aug 24, 2018

feat(bundler): auto tracing for requirejs/systemjs
remove all lib/importer files.
remove most of amodro-tracing.
manual efficient js and html tracing for aurelia.
remove irrelevant tracing cache.
cover all aurelia-webpack-plugin covers, plus more edge cases.
more permissive, usage of PLATFORM.moduleName is NOT required.
almost zero manual maintenance of aurelia.json dependencies.
fix node id compatibility issue aurelia#831 for both requirejs and systemjs.
fix bundles moduleIds format for modules need plugin.
fix compatibility issue with yarn workspaces.
support npm package "main":"./lib" when main file is lib/index.js.
improve backwards compatibility by ignoring main:false.
simplify and reduce source code, but increase test coverge.
add "au run --watch --auto-install" for frictionless dev flow.
best guess on package manager 'yarn' to avoid 'npm i' error on yarn
controlled node_modules.
overtake webpack on simplicity, usability, compatibility and flexibility,
but probably not on performance.
perform slightly faster than existing amodro-trace + cache.

Supersede aurelia#853, aurelia#842, aurelia#831
BREAKING CHANGE: require minor user code change to support non-js main, like "main": "font-awesome.css"
BREAKING CHANGE: remove support of undocumented "main": false, replace with generic "lazyMain": true. But this is handled transparently without breaking user's existing app.

huochunpeng added a commit to huochunpeng/cli that referenced this pull request Sep 13, 2018

feat(bundler): auto tracing for requirejs/systemjs
remove all lib/importer files.
remove most of amodro-tracing.
manual efficient js and html tracing for aurelia.
remove irrelevant tracing cache.
cover all aurelia-webpack-plugin covers, plus more edge cases.
more permissive, usage of PLATFORM.moduleName is NOT required.
almost zero manual maintenance of aurelia.json dependencies.
fix node id compatibility issue aurelia#831 for both requirejs and systemjs.
fix bundles moduleIds format for modules need plugin.
fix compatibility issue with yarn workspaces.
support npm package "main":"./lib" when main file is lib/index.js.
improve backwards compatibility by ignoring main:false.
simplify and reduce source code, but increase test coverge.
add "au run --watch --auto-install" for frictionless dev flow.
best guess on package manager 'yarn' to avoid 'npm i' error on yarn
controlled node_modules.
overtake webpack on simplicity, usability, compatibility and flexibility,
but probably not on performance.
perform slightly faster than existing amodro-trace + cache.

Supersede aurelia#853, aurelia#842, aurelia#831
BREAKING CHANGE: require minor user code change to support non-js main, like "main": "font-awesome.css"
BREAKING CHANGE: remove support of undocumented "main": false, replace with generic "lazyMain": true. But this is handled transparently without breaking user's existing app.

huochunpeng added a commit to huochunpeng/cli that referenced this pull request Sep 14, 2018

feat(bundler): auto tracing for requirejs/systemjs
remove all lib/importer files.
remove most of amodro-tracing.
manual efficient js and html tracing for aurelia.
remove irrelevant tracing cache.
cover all aurelia-webpack-plugin covers, plus more edge cases.
more permissive, usage of PLATFORM.moduleName is NOT required.
almost zero manual maintenance of aurelia.json dependencies.
fix node id compatibility issue aurelia#831 for both requirejs and systemjs.
fix bundles moduleIds format for modules need plugin.
fix compatibility issue with yarn workspaces.
support npm package "main":"./lib" when main file is lib/index.js.
improve backwards compatibility by ignoring main:false.
simplify and reduce source code, but increase test coverge.
add "au run --watch --auto-install" for frictionless dev flow.
best guess on package manager 'yarn' to avoid 'npm i' error on yarn
controlled node_modules.
overtake webpack on simplicity, usability, compatibility and flexibility,
but probably not on performance.
perform slightly faster than existing amodro-trace + cache.

Supersede aurelia#853, aurelia#842, aurelia#831
BREAKING CHANGE: require minor user code change to support non-js main, like "main": "font-awesome.css"
BREAKING CHANGE: remove support of undocumented "main": false, replace with generic "lazyMain": true. But this is handled transparently without breaking user's existing app.

huochunpeng added a commit to huochunpeng/cli that referenced this pull request Sep 25, 2018

feat(bundler): auto tracing for requirejs/systemjs
remove all lib/importer files.
remove most of amodro-tracing.
manual efficient js and html tracing for aurelia.
remove irrelevant tracing cache.
cover all aurelia-webpack-plugin covers, plus more edge cases.
more permissive, usage of PLATFORM.moduleName is NOT required.
almost zero manual maintenance of aurelia.json dependencies.
fix node id compatibility issue aurelia#831 for both requirejs and systemjs.
fix bundles moduleIds format for modules need plugin.
fix compatibility issue with yarn workspaces.
support npm package "main":"./lib" when main file is lib/index.js.
improve backwards compatibility by ignoring main:false.
simplify and reduce source code, but increase test coverge.
add "au run --watch --auto-install" for frictionless dev flow.
best guess on package manager 'yarn' to avoid 'npm i' error on yarn
controlled node_modules.
overtake webpack on simplicity, usability, compatibility and flexibility,
but probably not on performance.
perform slightly faster than existing amodro-trace + cache.

Supersede aurelia#853, aurelia#842, aurelia#831
BREAKING CHANGE: require minor user code change to support non-js main, like "main": "font-awesome.css"
BREAKING CHANGE: remove support of undocumented "main": false, replace with generic "lazyMain": true. But this is handled transparently without breaking user's existing app.

huochunpeng added a commit to huochunpeng/cli that referenced this pull request Sep 27, 2018

feat(bundler): auto tracing for requirejs/systemjs
remove all lib/importer files.
remove most of amodro-tracing.
manual efficient js and html tracing for aurelia.
remove irrelevant tracing cache.
cover all aurelia-webpack-plugin covers, plus more edge cases.
more permissive, usage of PLATFORM.moduleName is NOT required.
almost zero manual maintenance of aurelia.json dependencies.
fix node id compatibility issue aurelia#831 for both requirejs and systemjs.
fix bundles moduleIds format for modules need plugin.
fix compatibility issue with yarn workspaces.
support npm package "main":"./lib" when main file is lib/index.js.
improve backwards compatibility by ignoring main:false.
simplify and reduce source code, but increase test coverge.
add "au run --watch --auto-install" for frictionless dev flow.
best guess on package manager 'yarn' to avoid 'npm i' error on yarn
controlled node_modules.
overtake webpack on simplicity, usability, compatibility and flexibility,
but probably not on performance.
perform slightly faster than existing amodro-trace + cache.

Supersede aurelia#853, aurelia#842, aurelia#831
BREAKING CHANGE: require minor user code change to support non-js main, like "main": "font-awesome.css"
BREAKING CHANGE: remove support of undocumented "main": false, replace with generic "lazyMain": true. But this is handled transparently without breaking user's existing app.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment