From 48580bfc179091109f8d9a98b81e5f0cd669e982 Mon Sep 17 00:00:00 2001 From: phet-dev Date: Fri, 27 Sep 2019 03:06:34 -0600 Subject: [PATCH 01/12] update copyright dates from daily grunt work --- js/SimVersion.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/SimVersion.js b/js/SimVersion.js index 20d51706f..c219ca733 100644 --- a/js/SimVersion.js +++ b/js/SimVersion.js @@ -1,4 +1,4 @@ -// Copyright 2017-2019, University of Colorado Boulder +// Copyright 2019, University of Colorado Boulder /** * Handles serializing and deserializing versions for simulations. From d22f63c0ded1ab839d0e5926f5bd3f9a3fc3001d Mon Sep 17 00:00:00 2001 From: phet-dev Date: Fri, 27 Sep 2019 03:27:46 -0600 Subject: [PATCH 02/12] Update chipper's SimVersion from daily grunt work --- js/SimVersion.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/SimVersion.js b/js/SimVersion.js index c219ca733..20d51706f 100644 --- a/js/SimVersion.js +++ b/js/SimVersion.js @@ -1,4 +1,4 @@ -// Copyright 2019, University of Colorado Boulder +// Copyright 2017-2019, University of Colorado Boulder /** * Handles serializing and deserializing versions for simulations. From 9dcf17cf6194bde96c730c486d28262f1498338d Mon Sep 17 00:00:00 2001 From: phet-dev Date: Sat, 28 Sep 2019 03:04:59 -0600 Subject: [PATCH 03/12] update copyright dates from daily grunt work --- js/SimVersion.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/SimVersion.js b/js/SimVersion.js index 20d51706f..c219ca733 100644 --- a/js/SimVersion.js +++ b/js/SimVersion.js @@ -1,4 +1,4 @@ -// Copyright 2017-2019, University of Colorado Boulder +// Copyright 2019, University of Colorado Boulder /** * Handles serializing and deserializing versions for simulations. From 0b13449355d0bff38f72f0e1355f1de2065f1013 Mon Sep 17 00:00:00 2001 From: phet-dev Date: Sat, 28 Sep 2019 03:25:11 -0600 Subject: [PATCH 04/12] Update chipper's SimVersion from daily grunt work --- js/SimVersion.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/SimVersion.js b/js/SimVersion.js index c219ca733..20d51706f 100644 --- a/js/SimVersion.js +++ b/js/SimVersion.js @@ -1,4 +1,4 @@ -// Copyright 2019, University of Colorado Boulder +// Copyright 2017-2019, University of Colorado Boulder /** * Handles serializing and deserializing versions for simulations. From 72e27004b06bc3e9a9ef6ddfb22aa66bfec30bd0 Mon Sep 17 00:00:00 2001 From: samreid Date: Sat, 28 Sep 2019 07:16:50 -0600 Subject: [PATCH 05/12] Remove eslint_review file, see https://github.com/phetsims/chipper/issues/734 --- eslint/sim_es6_eslintrc_review.js | 41 ------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 eslint/sim_es6_eslintrc_review.js diff --git a/eslint/sim_es6_eslintrc_review.js b/eslint/sim_es6_eslintrc_review.js deleted file mode 100644 index 8b7bf2224..000000000 --- a/eslint/sim_es6_eslintrc_review.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2015-2019, University of Colorado Boulder - -/* eslint-env node */ -'use strict'; - -/** - * Stricter rules to support code reviews. - * - * @author Sam Reid (PhET Interactive Simulations) - * @author Michael Kauzmann (PhET Interactive Simulations) - */ -module.exports = { - - // Use all of the default rules from eslint, unless overridden below. - extends: './sim_es6_eslintrc.js', - - // The new rules, overrides, etc. - rules: { - - 'no-use-before-define': [ - 2 - ], - // TODO: This may be good to have - 'new-cap': [ - 2 - ], - - // disallow trailing whitespace at the end of lines (fixable) - 'no-trailing-spaces': 2, - - // USE THIS DURING CODE REVIEW - // specify the maximum length of a line in your program - 'max-len': [ - 2, - // this many columns per line - 120, - // tab counts for this many spaces - 4 - ] - } -}; \ No newline at end of file From 89540de1b2afa441368923b3136422f7069dfc3c Mon Sep 17 00:00:00 2001 From: samreid Date: Sat, 28 Sep 2019 07:31:03 -0600 Subject: [PATCH 06/12] Add lint rule to prevent trailing spaces, see https://github.com/phetsims/chipper/issues/734 --- eslint/.eslintrc.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eslint/.eslintrc.js b/eslint/.eslintrc.js index 4a76d4926..da23135a2 100644 --- a/eslint/.eslintrc.js +++ b/eslint/.eslintrc.js @@ -161,7 +161,9 @@ module.exports = { 'phet-object-shorthand': 2, // disallow parens surrounding single args in arrow functions - 'arrow-parens': [ 2, 'as-needed' ] + 'arrow-parens': [ 2, 'as-needed' ], + + 'no-trailing-spaces': [ 2, { skipBlankLines: true, ignoreComments: true } ] }, env: { browser: true, From 923d16ef508177f8e090b30af05c1fd03912a5ac Mon Sep 17 00:00:00 2001 From: phet-dev Date: Sun, 29 Sep 2019 03:04:55 -0600 Subject: [PATCH 07/12] update copyright dates from daily grunt work --- js/SimVersion.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/SimVersion.js b/js/SimVersion.js index 20d51706f..c219ca733 100644 --- a/js/SimVersion.js +++ b/js/SimVersion.js @@ -1,4 +1,4 @@ -// Copyright 2017-2019, University of Colorado Boulder +// Copyright 2019, University of Colorado Boulder /** * Handles serializing and deserializing versions for simulations. From 494f21d011050fb3bf80aaa9ec1f0e8de68d4ce7 Mon Sep 17 00:00:00 2001 From: phet-dev Date: Sun, 29 Sep 2019 03:22:50 -0600 Subject: [PATCH 08/12] Update chipper's SimVersion from daily grunt work --- js/SimVersion.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/SimVersion.js b/js/SimVersion.js index c219ca733..20d51706f 100644 --- a/js/SimVersion.js +++ b/js/SimVersion.js @@ -1,4 +1,4 @@ -// Copyright 2019, University of Colorado Boulder +// Copyright 2017-2019, University of Colorado Boulder /** * Handles serializing and deserializing versions for simulations. From 8ceadb10eda040e601a32146a816920513cd7b26 Mon Sep 17 00:00:00 2001 From: phet-dev Date: Mon, 30 Sep 2019 03:07:10 -0600 Subject: [PATCH 09/12] update copyright dates from daily grunt work --- js/SimVersion.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/SimVersion.js b/js/SimVersion.js index 20d51706f..c219ca733 100644 --- a/js/SimVersion.js +++ b/js/SimVersion.js @@ -1,4 +1,4 @@ -// Copyright 2017-2019, University of Colorado Boulder +// Copyright 2019, University of Colorado Boulder /** * Handles serializing and deserializing versions for simulations. From bc48bea78261612fdafa51506f72db65e0b17cab Mon Sep 17 00:00:00 2001 From: phet-dev Date: Mon, 30 Sep 2019 03:39:21 -0600 Subject: [PATCH 10/12] Update chipper's SimVersion from daily grunt work --- js/SimVersion.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/SimVersion.js b/js/SimVersion.js index c219ca733..20d51706f 100644 --- a/js/SimVersion.js +++ b/js/SimVersion.js @@ -1,4 +1,4 @@ -// Copyright 2019, University of Colorado Boulder +// Copyright 2017-2019, University of Colorado Boulder /** * Handles serializing and deserializing versions for simulations. From 8bac91fe175ddd73f446e2fd50b6e4e5b866fffc Mon Sep 17 00:00:00 2001 From: zepumph Date: Mon, 30 Sep 2019 10:12:46 -0800 Subject: [PATCH 11/12] bug fix by adding `SimVersion.isSimNotPublished`, https://github.com/phetsims/perennial/issues/111 --- js/SimVersion.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/SimVersion.js b/js/SimVersion.js index 20d51706f..1cdfd1a42 100644 --- a/js/SimVersion.js +++ b/js/SimVersion.js @@ -113,6 +113,18 @@ const assert = typeof module !== 'undefined' ? require( 'assert' ) : window && w }; } + /** + * @returns {boolean} + * @public + */ + get isSimNotPublished() { + return this.major < 1 || // e.g. 0.0.0-dev.1 + ( this.major === 1 && // e.g. 1.0.0-dev.1 + this.minor === 0 && + this.maintenance === 0 && + this.testType ); + } + /** * Takes a serialized form of the SimVersion and returns an actual instance. * @public From abf477ce55e118bb67dcafc4c6d3c1559a5f5d49 Mon Sep 17 00:00:00 2001 From: zepumph Date: Mon, 30 Sep 2019 10:34:12 -0800 Subject: [PATCH 12/12] rename UpdateCheck-> updateCheck as a singleton, factor out constants, improve doc, https://github.com/phetsims/perennial/issues/111 --- js/SimVersion.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/SimVersion.js b/js/SimVersion.js index 1cdfd1a42..ef073264d 100644 --- a/js/SimVersion.js +++ b/js/SimVersion.js @@ -6,7 +6,7 @@ ************************************************************** * IMPORTANT NOTE: This file is copied from PERENNIAL to CHIPPER frequently. If this is in CHIPPER, then it is AUTO * GENERATED; do not edit, as it will be overwritten. Make sure that any change here is supported by usages of - * CHIPPER's SimVersion (i.e. in JOIST/UpdateCheck.js), see https://github.com/phetsims/perennial/issues/111 for more + * CHIPPER's SimVersion (i.e. in JOIST/updateCheck.js), see https://github.com/phetsims/perennial/issues/111 for more ************************************************************** * * See https://github.com/phetsims/chipper/issues/560 for discussion on version ID definition.