Ticket #35105: stranger-node-things.diff
File stranger-node-things.diff, 23.1 KB (added by , 8 years ago) |
---|
-
branches/3.7/package.json
6 6 "type": "svn", 7 7 "url": "https://develop.svn.wordpress.org/trunk" 8 8 }, 9 "engines": { 10 "node": "4.7.2" 11 }, 9 12 "author": "The WordPress Contributors", 10 13 "license": "GPLv2 or later", 11 14 "devDependencies": { -
branches/3.7/tests/phpunit/tests/basic.php
22 22 $this->assertTrue($this->val); 23 23 } 24 24 25 function test_readme() { 26 $readme = file_get_contents( ABSPATH . 'readme.html' ); 27 preg_match( '#<br /> Version (.*)#', $readme, $matches ); 28 list( $version ) = explode( '-', $GLOBALS['wp_version'] ); 29 $this->assertEquals( $version, trim( $matches[1] ), "readme.html's version needs to be updated to $version." ); 30 } 31 32 function test_license() { 33 $license = file_get_contents( ABSPATH . 'license.txt' ); 34 preg_match( '#Copyright (\d+) by the contributors#', $license, $matches ); 35 $this_year = date( 'Y' ); 36 $this->assertEquals( $this_year, trim( $matches[1] ), "license.txt's year needs to be updated to $this_year." ); 37 } 38 39 function test_package_json() { 40 $package_json = file_get_contents( dirname( ABSPATH ) . '/package.json' ); 41 $package_json = json_decode( $package_json, true ); 42 list( $version ) = explode( '-', $GLOBALS['wp_version'] ); 43 // package.json uses x.y.z, so fill cleaned $wp_version for .0 releases 44 if ( 1 == substr_count( $version, '.' ) ) { 45 $version .= '.0'; 46 } 47 $this->assertEquals( $version, $package_json['version'], "package.json's version needs to be updated to $version." ); 48 return $package_json; 49 } 50 51 /** 52 * @depends test_package_json 53 */ 54 function test_package_json_node_engine( $package_json ) { 55 $this->assertArrayHasKey( 'engines', $package_json ); 56 $this->assertArrayHasKey( 'node', $package_json['engines'] ); 57 $node = $package_json['engines']['node']; 58 $this->assertRegExp( '~^=?\d+\.\d+\.\d+$~', $node, "package.json's node version cannot be a range." ); 59 } 60 25 61 // two tests for a lame bug in PHPUnit that broke the $GLOBALS reference 26 62 function test_globals() { 27 63 global $test_foo; -
branches/3.8/.travis.yml
1 1 language: php 2 2 3 3 php: 4 5 6 7 4 - "5.2" 5 - "5.3" 6 - "5.4" 7 - "5.5" 8 8 9 9 before_script: 10 - mysql -e "CREATE DATABASE wordpress_tests;" -uroot 11 - cp wp-tests-config-sample.php wp-tests-config.php 12 - sed -i "s/youremptytestdbnamehere/wordpress_tests/" wp-tests-config.php 13 - sed -i "s/yourusernamehere/travis/" wp-tests-config.php 14 - sed -i "s/yourpasswordhere//" wp-tests-config.php 15 - svn checkout https://plugins.svn.wordpress.org/wordpress-importer/trunk tests/phpunit/data/plugins/wordpress-importer 16 - npm install -g grunt-cli 17 - npm install 10 - mysql -e "CREATE DATABASE wordpress_tests;" -uroot 11 - cp wp-tests-config-sample.php wp-tests-config.php 12 - sed -i "s/youremptytestdbnamehere/wordpress_tests/" wp-tests-config.php 13 - sed -i "s/yourusernamehere/travis/" wp-tests-config.php 14 - sed -i "s/yourpasswordhere//" wp-tests-config.php 15 - svn checkout https://plugins.svn.wordpress.org/wordpress-importer/trunk tests/phpunit/data/plugins/wordpress-importer 16 - npm --version 17 - node --version 18 - nvm install 4.7.2 19 - npm install -g grunt-cli 20 - npm install 21 - mysql --version 22 - phpenv versions 23 - npm --version 24 - node --version 18 25 19 26 script: grunt test 27 No newline at end of file -
branches/3.8/package.json
6 6 "type": "svn", 7 7 "url": "https://develop.svn.wordpress.org/trunk" 8 8 }, 9 "engines": { 10 "node": "4.7.2" 11 }, 9 12 "author": "The WordPress Contributors", 10 13 "license": "GPLv2 or later", 11 14 "devDependencies": { -
branches/3.8/tests/phpunit/tests/basic.php
29 29 $this->assertEquals( $version, trim( $matches[1] ), "readme.html's version needs to be updated to $version." ); 30 30 } 31 31 32 function test_license() { 33 $license = file_get_contents( ABSPATH . 'license.txt' ); 34 preg_match( '#Copyright (\d+) by the contributors#', $license, $matches ); 35 $this_year = date( 'Y' ); 36 $this->assertEquals( $this_year, trim( $matches[1] ), "license.txt's year needs to be updated to $this_year." ); 37 } 38 39 function test_package_json() { 40 $package_json = file_get_contents( dirname( ABSPATH ) . '/package.json' ); 41 $package_json = json_decode( $package_json, true ); 42 list( $version ) = explode( '-', $GLOBALS['wp_version'] ); 43 // package.json uses x.y.z, so fill cleaned $wp_version for .0 releases 44 if ( 1 == substr_count( $version, '.' ) ) { 45 $version .= '.0'; 46 } 47 $this->assertEquals( $version, $package_json['version'], "package.json's version needs to be updated to $version." ); 48 return $package_json; 49 } 50 51 /** 52 * @depends test_package_json 53 */ 54 function test_package_json_node_engine( $package_json ) { 55 $this->assertArrayHasKey( 'engines', $package_json ); 56 $this->assertArrayHasKey( 'node', $package_json['engines'] ); 57 $node = $package_json['engines']['node']; 58 $this->assertRegExp( '~^=?\d+\.\d+\.\d+$~', $node, "package.json's node version cannot be a range." ); 59 } 60 32 61 // two tests for a lame bug in PHPUnit that broke the $GLOBALS reference 33 62 function test_globals() { 34 63 global $test_foo; -
branches/3.9/.travis.yml
1 1 language: php 2 2 3 3 php: 4 5 6 7 4 - "5.2" 5 - "5.3" 6 - "5.4" 7 - "5.5" 8 8 9 9 before_script: 10 - mysql -e "CREATE DATABASE wordpress_tests;" -uroot 11 - cp wp-tests-config-sample.php wp-tests-config.php 12 - sed -i "s/youremptytestdbnamehere/wordpress_tests/" wp-tests-config.php 13 - sed -i "s/yourusernamehere/travis/" wp-tests-config.php 14 - sed -i "s/yourpasswordhere//" wp-tests-config.php 15 - svn checkout https://plugins.svn.wordpress.org/wordpress-importer/trunk tests/phpunit/data/plugins/wordpress-importer 16 - npm install -g grunt-cli 17 - npm install 10 - mysql -e "CREATE DATABASE wordpress_tests;" -uroot 11 - cp wp-tests-config-sample.php wp-tests-config.php 12 - sed -i "s/youremptytestdbnamehere/wordpress_tests/" wp-tests-config.php 13 - sed -i "s/yourusernamehere/travis/" wp-tests-config.php 14 - sed -i "s/yourpasswordhere//" wp-tests-config.php 15 - svn checkout https://plugins.svn.wordpress.org/wordpress-importer/trunk tests/phpunit/data/plugins/wordpress-importer 16 - npm --version 17 - node --version 18 - nvm install 4.7.2 19 - npm install -g grunt-cli 20 - npm install 21 - mysql --version 22 - phpenv versions 23 - npm --version 24 - node --version 18 25 19 script: grunt travis 26 script: grunt travis -
branches/3.9/package.json
6 6 "type": "svn", 7 7 "url": "https://develop.svn.wordpress.org/trunk" 8 8 }, 9 "engines": { 10 "node": "4.7.2" 11 }, 9 12 "author": "The WordPress Contributors", 10 13 "license": "GPLv2 or later", 11 14 "devDependencies": { -
branches/3.9/tests/phpunit/tests/basic.php
45 45 $version .= '.0'; 46 46 } 47 47 $this->assertEquals( $version, $package_json['version'], "package.json's version needs to be updated to $version." ); 48 return $package_json; 49 } 50 51 /** 52 * @depends test_package_json 53 */ 54 function test_package_json_node_engine( $package_json ) { 55 $this->assertArrayHasKey( 'engines', $package_json ); 56 $this->assertArrayHasKey( 'node', $package_json['engines'] ); 57 $node = $package_json['engines']['node']; 58 $this->assertRegExp( '~^=?\d+\.\d+\.\d+$~', $node, "package.json's node version cannot be a range." ); 48 59 } 49 60 50 61 // two tests for a lame bug in PHPUnit that broke the $GLOBALS reference -
branches/4.0/.travis.yml
40 40 41 41 # Before script, failures in this section will result in build status 'failed' 42 42 before_script: 43 - npm install -g grunt-cli 44 - npm install 43 - npm --version 44 - node --version 45 - nvm install 4.7.2 46 - npm install -g grunt-cli 47 - npm install 48 - mysql --version 49 - phpenv versions 50 - npm --version 51 - node --version 45 52 46 53 # Script, failures in this section will result in build status 'failed' 47 54 script: grunt $WP_TRAVISCI -
branches/4.0/package.json
6 6 "type": "svn", 7 7 "url": "https://develop.svn.wordpress.org/trunk" 8 8 }, 9 "engines": { 10 "node": "4.7.2" 11 }, 9 12 "author": "The WordPress Contributors", 10 13 "license": "GPLv2 or later", 11 14 "devDependencies": { -
branches/4.0/tests/phpunit/tests/basic.php
44 44 $version .= '.0'; 45 45 } 46 46 $this->assertEquals( $version, $package_json['version'], "package.json's version needs to be updated to $version." ); 47 return $package_json; 48 } 49 50 /** 51 * @depends test_package_json 52 */ 53 function test_package_json_node_engine( $package_json ) { 54 $this->assertArrayHasKey( 'engines', $package_json ); 55 $this->assertArrayHasKey( 'node', $package_json['engines'] ); 56 $node = $package_json['engines']['node']; 57 $this->assertRegExp( '~^=?\d+\.\d+\.\d+$~', $node, "package.json's node version cannot be a range." ); 47 58 } 48 59 49 60 // two tests for a lame bug in PHPUnit that broke the $GLOBALS reference -
branches/4.1/.travis.yml
39 39 40 40 # Before script, failures in this section will result in build status 'failed' 41 41 before_script: 42 - npm install -g grunt-cli 43 - npm install 42 - npm --version 43 - node --version 44 - nvm install 4.7.2 45 - npm install -g grunt-cli 46 - npm install 47 - mysql --version 48 - phpenv versions 49 - npm --version 50 - node --version 44 51 45 52 # Script, failures in this section will result in build status 'failed' 46 53 script: grunt $WP_TRAVISCI -
branches/4.1/package.json
6 6 "type": "svn", 7 7 "url": "https://develop.svn.wordpress.org/trunk" 8 8 }, 9 "engines": { 10 "node": "4.7.2" 11 }, 9 12 "author": "The WordPress Contributors", 10 13 "license": "GPLv2 or later", 11 14 "devDependencies": { … … 21 24 "grunt-contrib-qunit": "~0.5.2", 22 25 "grunt-contrib-uglify": "~0.6.0", 23 26 "grunt-contrib-watch": "~0.6.1", 24 "grunt-cssjanus": " git://github.com/ocean90/grunt-cssjanus.git#97c43554ff7a86e2ff414d34e66725b05118bf10",27 "grunt-cssjanus": "0.2.4", 25 28 "grunt-jsvalidate": "~0.2.2", 26 29 "grunt-legacy-util": "^0.2.0", 27 30 "grunt-patch-wordpress": "~0.2.1", -
branches/4.1/tests/phpunit/tests/basic.php
44 44 $version .= '.0'; 45 45 } 46 46 $this->assertEquals( $version, $package_json['version'], "package.json's version needs to be updated to $version." ); 47 return $package_json; 48 } 49 50 /** 51 * @depends test_package_json 52 */ 53 function test_package_json_node_engine( $package_json ) { 54 $this->assertArrayHasKey( 'engines', $package_json ); 55 $this->assertArrayHasKey( 'node', $package_json['engines'] ); 56 $node = $package_json['engines']['node']; 57 $this->assertRegExp( '~^=?\d+\.\d+\.\d+$~', $node, "package.json's node version cannot be a range." ); 47 58 } 48 59 49 60 // two tests for a lame bug in PHPUnit that broke the $GLOBALS reference -
branches/4.2/.travis.yml
34 34 svn checkout https://plugins.svn.wordpress.org/wordpress-importer/trunk tests/phpunit/data/plugins/wordpress-importer 35 35 fi 36 36 before_script: 37 - npm install -g npm 37 - npm --version 38 - node --version 39 - nvm install 4.7.2 38 40 - npm install -g grunt-cli 39 41 - npm install 42 - mysql --version 43 - phpenv versions 44 - npm --version 45 - node --version 40 46 script: grunt $WP_TRAVISCI 41 47 notifications: 42 48 slack: -
branches/4.2/package.json
6 6 "type": "svn", 7 7 "url": "https://develop.svn.wordpress.org/trunk" 8 8 }, 9 "engines": { 10 "node": "4.7.2" 11 }, 9 12 "author": "The WordPress Contributors", 10 13 "license": "GPLv2 or later", 11 14 "devDependencies": { -
branches/4.2/tests/phpunit/tests/basic.php
44 44 $version .= '.0'; 45 45 } 46 46 $this->assertEquals( $version, $package_json['version'], "package.json's version needs to be updated to $version." ); 47 return $package_json; 48 } 49 50 /** 51 * @depends test_package_json 52 */ 53 function test_package_json_node_engine( $package_json ) { 54 $this->assertArrayHasKey( 'engines', $package_json ); 55 $this->assertArrayHasKey( 'node', $package_json['engines'] ); 56 $node = $package_json['engines']['node']; 57 $this->assertRegExp( '~^=?\d+\.\d+\.\d+$~', $node, "package.json's node version cannot be a range." ); 47 58 } 48 59 49 60 // two tests for a lame bug in PHPUnit that broke the $GLOBALS reference -
branches/4.3/.travis.yml
34 34 svn checkout https://plugins.svn.wordpress.org/wordpress-importer/trunk tests/phpunit/data/plugins/wordpress-importer 35 35 fi 36 36 before_script: 37 - npm install -g npm 37 - npm --version 38 - node --version 39 - nvm install 4.7.2 38 40 - npm install -g grunt-cli 39 41 - npm install 42 - mysql --version 43 - phpenv versions 44 - npm --version 45 - node --version 40 46 script: grunt $WP_TRAVISCI 41 47 notifications: 42 48 slack: -
branches/4.3/package.json
6 6 "type": "svn", 7 7 "url": "https://develop.svn.wordpress.org/trunk" 8 8 }, 9 "engines": { 10 "node": "4.7.2" 11 }, 9 12 "author": "The WordPress Contributors", 10 13 "license": "GPL-2.0+", 11 14 "devDependencies": { -
branches/4.3/tests/phpunit/tests/basic.php
44 44 $version .= '.0'; 45 45 } 46 46 $this->assertEquals( $version, $package_json['version'], "package.json's version needs to be updated to $version." ); 47 return $package_json; 48 } 49 50 /** 51 * @depends test_package_json 52 */ 53 function test_package_json_node_engine( $package_json ) { 54 $this->assertArrayHasKey( 'engines', $package_json ); 55 $this->assertArrayHasKey( 'node', $package_json['engines'] ); 56 $node = $package_json['engines']['node']; 57 $this->assertRegExp( '~^=?\d+\.\d+\.\d+$~', $node, "package.json's node version cannot be a range." ); 47 58 } 48 59 49 60 // two tests for a lame bug in PHPUnit that broke the $GLOBALS reference -
branches/4.4/.travis.yml
44 44 echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini 45 45 fi 46 46 before_script: 47 - npm install -g npm 47 - npm --version 48 - node --version 49 - nvm install 4.7.2 48 50 - npm install -g grunt-cli 49 51 - npm install 52 - mysql --version 53 - phpenv versions 50 54 - npm --version 51 55 - node --version 52 56 script: grunt $WP_TRAVISCI -
branches/4.4/package.json
8 8 }, 9 9 "author": "The WordPress Contributors", 10 10 "license": "GPL-2.0+", 11 "engines": { 12 "node": "4.7.2" 13 }, 11 14 "devDependencies": { 12 15 "autoprefixer": "~6.1.0", 13 16 "grunt": "~0.4.5", -
branches/4.4/tests/phpunit/tests/basic.php
22 22 $version .= '.0'; 23 23 } 24 24 $this->assertEquals( $version, $package_json['version'], "package.json's version needs to be updated to $version." ); 25 return $package_json; 26 } 27 28 /** 29 * @depends test_package_json 30 */ 31 function test_package_json_node_engine( $package_json ) { 32 $this->assertArrayHasKey( 'engines', $package_json ); 33 $this->assertArrayHasKey( 'node', $package_json['engines'] ); 34 $node = $package_json['engines']['node']; 35 $this->assertRegExp( '~^=?\d+\.\d+\.\d+$~', $node, "package.json's node version cannot be a range." ); 25 36 } 26 37 27 38 // two tests for a lame bug in PHPUnit that broke the $GLOBALS reference -
branches/4.5/.travis.yml
47 47 echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini 48 48 fi 49 49 before_script: 50 - npm install -g npm 50 - npm --version 51 - node --version 52 - nvm install 4.7.2 51 53 - npm install -g grunt-cli 52 54 - npm install 55 - npm prune 56 - mysql --version 57 - phpenv versions 53 58 - npm --version 54 59 - node --version 60 55 61 script: grunt $WP_TRAVISCI 56 62 notifications: 57 63 slack: -
branches/4.5/package.json
8 8 }, 9 9 "author": "The WordPress Contributors", 10 10 "license": "GPL-2.0+", 11 "engines": { 12 "node": "4.7.2" 13 }, 11 14 "devDependencies": { 12 15 "autoprefixer": "~6.3.3", 13 16 "git-or-svn": "~0.1.0", -
branches/4.5/tests/phpunit/tests/basic.php
22 22 $version .= '.0'; 23 23 } 24 24 $this->assertEquals( $version, $package_json['version'], "package.json's version needs to be updated to $version." ); 25 return $package_json; 26 } 27 28 /** 29 * @depends test_package_json 30 */ 31 function test_package_json_node_engine( $package_json ) { 32 $this->assertArrayHasKey( 'engines', $package_json ); 33 $this->assertArrayHasKey( 'node', $package_json['engines'] ); 34 $node = $package_json['engines']['node']; 35 $this->assertRegExp( '~^=?\d+\.\d+\.\d+$~', $node, "package.json's node version cannot be a range." ); 25 36 } 26 37 27 38 // two tests for a lame bug in PHPUnit that broke the $GLOBALS reference -
branches/4.6/.travis.yml
51 51 echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini 52 52 fi 53 53 before_script: 54 - npm install -g npm 54 - npm --version 55 - node --version 56 - nvm install 6.9.1 55 57 - npm install -g grunt-cli 56 58 - npm install 57 59 - npm prune … … 59 61 - phpenv versions 60 62 - npm --version 61 63 - node --version 64 62 65 script: grunt $WP_TRAVISCI 63 66 notifications: 64 67 slack: -
branches/4.6/package.json
6 6 "type": "svn", 7 7 "url": "https://develop.svn.wordpress.org/trunk" 8 8 }, 9 "engines": { 10 "node": "6.9.1" 11 }, 9 12 "author": "The WordPress Contributors", 10 13 "license": "GPL-2.0+", 11 14 "devDependencies": { -
branches/4.6/tests/phpunit/tests/basic.php
22 22 $version .= '.0'; 23 23 } 24 24 $this->assertEquals( $version, $package_json['version'], "package.json's version needs to be updated to $version." ); 25 return $package_json; 25 26 } 26 27 28 /** 29 * @depends test_package_json 30 */ 31 function test_package_json_node_engine( $package_json ) { 32 $this->assertArrayHasKey( 'engines', $package_json ); 33 $this->assertArrayHasKey( 'node', $package_json['engines'] ); 34 $node = $package_json['engines']['node']; 35 $this->assertRegExp( '~^=?\d+\.\d+\.\d+$~', $node, "package.json's node version cannot be a range." ); 36 } 37 27 38 // two tests for a lame bug in PHPUnit that broke the $GLOBALS reference 28 39 function test_globals() { 29 40 global $test_foo; -
branches/4.7/.travis.yml
52 52 echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini 53 53 fi 54 54 before_script: 55 - npm --version 56 - node --version 55 57 - npm install -g npm 56 58 - npm install -g grunt-cli 57 59 - npm install -
trunk/.travis.yml
52 52 echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini 53 53 fi 54 54 before_script: 55 - npm install -g npm 55 - npm --version 56 - node --version 57 - nvm install 6.9.1 56 58 - npm install -g grunt-cli 57 59 - npm install 58 60 - npm prune