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

Support npm CLI 3.x #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

cpetrov
Copy link
Contributor

@cpetrov cpetrov commented Oct 29, 2015

Package dependencies are now installed in the root "node_modules" directory when possible.

@angelozerr
Copy link
Owner

@cpetrov I'm sorry, but I don't understand very well your PR? It seems that yoru PR contains too changes of PR #33 and why have you changed the path of acorn inside HTML page demo?

Before acorn was declared in the package.json. Now it is not declared because it must be the same acorn version than tern.

I suggets you that you remove your node_modules and do npm install.

Done to support npm 3.x CLI.
@cpetrov
Copy link
Contributor Author

cpetrov commented Oct 29, 2015

With npm version 3.x (npm -v) npm package dependencies are installed to the root node_modules when possible. acorn is a dependency of tern and with npm 3.x it is now installed to tern-tabris/node_modules instead of tern-tabris/node_modules/tern/node_modules.

@angelozerr
Copy link
Owner

Ok I understand, but I think we should provide simple demo: user does just npm install (without some option) and it works directly. Are you agree with me?

@cpetrov
Copy link
Contributor Author

cpetrov commented Oct 29, 2015

Bundling required dependencies with a tool like Browserify may be an option?

@angelozerr
Copy link
Owner

As I said you, I woud like to have a simple thing. Just do "npm install". Demo is just to play with them, that's all.

@cpetrov
Copy link
Contributor Author

cpetrov commented Oct 30, 2015

Users would still have to npm install without specifying any arguments, but dependencies structure would only be compatible with the newer npm 3.x which introduced the flatter dependency structure.

Before this PR doing npm install with the new 3.x npm version would result into the acorn dependency not being found, as it is not placed nested inside tern's node_modules anymore, but is inside tern-tabris' node_modules.

This change would however break dependency structure for users with older npm versions (<3.x). That's why I thought dependencies could be alternatively bundled to make the demo easier to consume without relying on a specific version of the globally installed npm.

Do you have any other ideas? I hope I understood you right :)

@angelozerr
Copy link
Owner

@cpetrov I have installed last version of node.js https://nodejs.org/en/download/ which is v4.2.1 and which provides npm 2.14.7. I don't know how to install npm 3.x. Is it an official version?

@angelozerr
Copy link
Owner

After finish this PR, can I create a release?

@cpetrov
Copy link
Contributor Author

cpetrov commented Nov 1, 2015

@angelozerr Sure!

LTS includes 2.14.7, Stable (https://github.com/nodejs/node/blob/v5.0.0/CHANGELOG.md) includes 3.3.6. LTS is the default option when downloading Node.js though. Should we wait until npm is also updated for LTS?

@angelozerr
Copy link
Owner

Should we wait until npm is also updated for LTS?

Yes I prefer waiting.

Do you know if there is an option with npm < 3.x which does the same thing than npm 3.x?

@angelozerr Sure!

Release 0.4.0 was done.

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

Successfully merging this pull request may close these issues.

None yet

2 participants