Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

New: Check node version based on package.json #824

Merged
merged 1 commit into from
Dec 5, 2017

Conversation

stramel
Copy link
Contributor

@stramel stramel commented Jul 15, 2017

  • CHANGELOG.md has been updated

@@ -12,6 +12,9 @@
* http://polymer.github.io/PATENTS.txt
*/

// Bail out if invalid node version
require('please-upgrade-node')(require('../package.json'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have similar logic here: https://github.com/Polymer/polymer-cli/blob/master/bin/polymer.js#L27

Also, I'd be hesitant to put statements before import declarations, as that's not actually spec-compliant.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh! I definitely didn't look here.

I put this in the wrong place apparently. The require before import is to ensure that older versions that don't support import. By placing it in bin/polymer.js it is technically before all the other imports.

I will modify this to do the bin/polymer.js

bin/polymer.js Outdated
console.log(
'Polymer CLI requires at least Node v6. ' +
'Polymer CLI requires at least Node v' + verion.replace(/[^\d\.]*/, '') + '. '
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: verion > version.

bin/polymer.js Outdated
console.log(
'Polymer CLI requires at least Node v6. ' +
'Polymer CLI requires at least Node v' + verion.replace(/[^\d\.]*/, '') + '. '
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing + at the end of the line.

bin/polymer.js Outdated
console.log(
'Polymer CLI requires at least Node v6. ' +
'Polymer CLI requires at least Node v' + verion.replace(/[^\d\.]*/, '') + '. '
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you store the version.replace result in a variable and comment what it's doing?

@stramel stramel changed the title New: Check for valid node version New: Check node version based on package.json Sep 11, 2017
CHANGELOG.md Outdated
@@ -1,6 +1,7 @@
# Changelog

## Unreleased
- Drives node version check from the package.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Derives 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@Polymer Polymer deleted a comment from googlebot Oct 9, 2017
Copy link
Contributor

@FredKSchott FredKSchott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @justinfagnani you have an outstanding review, can you PTAL/merge?

@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this State. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@stramel
Copy link
Contributor Author

stramel commented Oct 31, 2017

@justinfagnani @FredKSchott Following up on this, I have resolved the changelog conflicts

@stramel
Copy link
Contributor Author

stramel commented Nov 2, 2017

Thanks @justinfagnani looks like the build failed on lint integration test. Not sure if this is a flake or a change someone else introduced.

@stramel stramel force-pushed the ms/node-version-check branch 2 times, most recently from a8808ff to f03e3a0 Compare November 10, 2017 04:24
@stramel
Copy link
Contributor Author

stramel commented Dec 5, 2017

Any chance we can get this merged? I just rebased again. I also regenerated the package-lock.json since I had conflicts in there and none seemed to be any breaking changes.

@justinfagnani justinfagnani merged commit 080f346 into Polymer:master Dec 5, 2017
@justinfagnani
Copy link
Contributor

@stramel merged!

@stramel stramel deleted the ms/node-version-check branch December 5, 2017 19:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants