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

update/improve travis.yml #4

Merged
merged 1 commit into from Sep 14, 2019

Conversation

@ljharb
Copy link
Contributor

commented Jan 19, 2019

add node 10 and 11; use nvm install-latest-npm; fix install script so it works on older nodes; cache nvm dir

update/improve travis.yml
add node 10 and 11; use `nvm install-latest-npm`; fix install script so it works on older nodes; cache nvm dir
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
- 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac'
- 'nvm install-latest-npm'
install:
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'

This comment has been minimized.

Copy link
@balupton

balupton Sep 10, 2019

Member

Could you explain what each segment in the before_install and install does, as my travis/bash cripts are nowhere near as gooda as yours it seems?

This comment has been minimized.

Copy link
@ljharb

ljharb Sep 10, 2019

Author Contributor

this is because the latest npm version that 0.6 and 0.9 support, doesn't support scoped modules, so it uses node 0.8 to install them and then switches back.

This comment has been minimized.

Copy link
@balupton

balupton Sep 12, 2019

Member

I'm leaning towards this being another awesome-travis script as it conflicts with the existing node-install and node-upgrade-npm functionality.

Would be nice for these two parts to become their own scripts for easy embedding/combination with other awesome-travis scripts.

I can make the necessary alterations upon feedback.

This comment has been minimized.

Copy link
@ljharb

ljharb Sep 12, 2019

Author Contributor

You can remove this line; it just means any package with scoped deps won’t be able to successfully install on 0.6.

I’m confused what conflicts tho, since it’s using nvm already inside Travis.

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
- linux
before_install:
- 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac'
- 'nvm install-latest-npm'

This comment has been minimized.

Copy link
@ljharb

ljharb Sep 10, 2019

Author Contributor

this installs the latest supported version of npm for the current node version, with logic that is far more accurate than anything else in the ecosystem :-)

This comment has been minimized.

Copy link
@balupton

balupton Sep 12, 2019

Member

Perhaps this functionality should go into the node-upgrade-npm script or become another script — not sure how their functionality differs.

The code inside this snippet should allow easy embedding of the various awesome-travis scripts.

I can make the necessary alterations upon feedback.

This comment has been minimized.

Copy link
@ljharb

ljharb Sep 12, 2019

Author Contributor

the logic is baked into nvm; it’s not a simple mapping (it’s multi step) and i keep it up to date as npm releases new versions. tbh I’d just replace that entire upgrade npm script with this nvm command, since it’s always available in Travis.

- 'case "${TRAVIS_NODE_VERSION}" in 0.*) export NPM_CONFIG_STRICT_SSL=false ;; esac'
- 'nvm install-latest-npm'
install:
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'

This comment has been minimized.

Copy link
@ljharb

ljharb Sep 10, 2019

Author Contributor

this is because the latest npm version that 0.6 and 0.9 support, doesn't support scoped modules, so it uses node 0.8 to install them and then switches back.

README.md Show resolved Hide resolved

@balupton balupton merged commit 49ac740 into bevry:master Sep 14, 2019

@balupton

This comment has been minimized.

Copy link
Member

commented Sep 14, 2019

Ok merged, will extract the scripts out, so they are more plug-n-play with the rest of the scripts.

@ljharb ljharb deleted the ljharb:patch-1 branch Sep 14, 2019

balupton added a commit that referenced this pull request Sep 14, 2019
@balupton

This comment has been minimized.

Copy link
Member

commented Sep 14, 2019

Ok all done. I replaced node-upgrade-npm with your script, and moved the old code to node-latest-npm, and added your new install script to node-npm-install. And added their appropriate listings to the readme. Also updated the node versions to the latest as of merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.