content_type
stringclasses
8 values
main_lang
stringclasses
7 values
message
stringlengths
1
50
sha
stringlengths
40
40
patch
stringlengths
52
962k
file_count
int64
1
300
PHP
PHP
fix config deprecations in cache/
9ff3399128ec747cafd056f320e0cb0515098b05
<ide><path>tests/TestCase/Cache/CacheTest.php <ide> public function testConfigErrorOnReconfigure() <ide> Cache::setConfig('tests', ['engine' => 'Apc']); <ide> } <ide> <add> /** <add> * Test reading configuration. <add> * <add> * @group deprecated <add> * @return void <add> */ <add> public function testConfigReadCompat() <add> { <add> $this->deprecated(function () { <add> $config = [ <add> 'engine' => 'File', <add> 'path' => TMP, <add> 'prefix' => 'cake_' <add> ]; <add> Cache::config('tests', $config); <add> $expected = $config; <add> $expected['className'] = $config['engine']; <add> unset($expected['engine']); <add> $this->assertEquals($expected, Cache::config('tests')); <add> }); <add> } <add> <ide> /** <ide> * Test reading configuration. <ide> * <ide> public function testConfigRead() <ide> $expected = $config; <ide> $expected['className'] = $config['engine']; <ide> unset($expected['engine']); <del> $this->assertEquals($expected, Cache::config('tests')); <add> $this->assertEquals($expected, Cache::getConfig('tests')); <ide> } <ide> <ide> /** <ide> public function testConfigDottedAlias() <ide> public function testGroupConfigs() <ide> { <ide> Cache::drop('test'); <del> Cache::config('latest', [ <add> Cache::setConfig('latest', [ <ide> 'duration' => 300, <ide> 'engine' => 'File', <ide> 'groups' => ['posts', 'comments'], <ide> public function testGroupConfigs() <ide> $result = Cache::groupConfigs('posts'); <ide> $this->assertEquals(['posts' => ['latest']], $result); <ide> <del> Cache::config('page', [ <add> Cache::setConfig('page', [ <ide> 'duration' => 86400, <ide> 'engine' => 'File', <ide> 'groups' => ['posts', 'archive'], <ide> public function testCacheDisable() <ide> Cache::clear(false, 'test_cache_disable_1'); <ide> <ide> Cache::disable(); <del> Cache::config('test_cache_disable_2', [ <add> Cache::setConfig('test_cache_disable_2', [ <ide> 'engine' => 'File', <ide> 'path' => TMP . 'tests' <ide> ]); <ide> public function testCacheDisable() <ide> */ <ide> public function testClearAll() <ide> { <del> Cache::config('configTest', [ <add> Cache::setConfig('configTest', [ <ide> 'engine' => 'File', <ide> 'path' => TMP . 'tests' <ide> ]); <del> Cache::config('anotherConfigTest', [ <add> Cache::setConfig('anotherConfigTest', [ <ide> 'engine' => 'File', <ide> 'path' => TMP . 'tests' <ide> ]); <ide><path>tests/TestCase/Cache/Engine/FileEngineTest.php <ide> protected function _configCache($config = []) <ide> 'path' => TMP . 'tests', <ide> ]; <ide> Cache::drop('file_test'); <del> Cache::config('file_test', array_merge($defaults, $config)); <add> Cache::setConfig('file_test', array_merge($defaults, $config)); <ide> } <ide> <ide> /** <ide> public function testKeyPath() <ide> */ <ide> public function testRemoveWindowsSlashesFromCache() <ide> { <del> Cache::config('windows_test', [ <add> Cache::setConfig('windows_test', [ <ide> 'engine' => 'File', <ide> 'isWindows' => true, <ide> 'prefix' => null, <ide> public function testWriteQuotedString() <ide> $this->assertSame(Cache::read('App.singleQuoteTest', 'file_test'), "'this is a quoted string'"); <ide> <ide> Cache::drop('file_test'); <del> Cache::config('file_test', [ <add> Cache::setConfig('file_test', [ <ide> 'className' => 'File', <ide> 'isWindows' => true, <ide> 'path' => TMP . 'tests' <ide> public function testPathDoesNotExist() <ide> $dir = TMP . 'tests/autocreate-' . microtime(true); <ide> <ide> Cache::drop('file_test'); <del> Cache::config('file_test', [ <add> Cache::setConfig('file_test', [ <ide> 'engine' => 'File', <ide> 'path' => $dir <ide> ]); <ide> public function testPathDoesNotExistDebugOff() <ide> $dir = TMP . 'tests/autocreate-' . microtime(true); <ide> <ide> Cache::drop('file_test'); <del> Cache::config('file_test', [ <add> Cache::setConfig('file_test', [ <ide> 'engine' => 'File', <ide> 'path' => $dir <ide> ]); <ide> public function testMaskSetting() <ide> if (DS === '\\') { <ide> $this->markTestSkipped('File permission testing does not work on Windows.'); <ide> } <del> Cache::config('mask_test', ['engine' => 'File', 'path' => TMP . 'tests']); <add> Cache::setConfig('mask_test', ['engine' => 'File', 'path' => TMP . 'tests']); <ide> $data = 'This is some test content'; <ide> $write = Cache::write('masking_test', $data, 'mask_test'); <ide> $result = substr(sprintf('%o', fileperms(TMP . 'tests/cake_masking_test')), -4); <ide> public function testMaskSetting() <ide> Cache::delete('masking_test', 'mask_test'); <ide> Cache::drop('mask_test'); <ide> <del> Cache::config('mask_test', ['engine' => 'File', 'mask' => 0666, 'path' => TMP . 'tests']); <add> Cache::setConfig('mask_test', ['engine' => 'File', 'mask' => 0666, 'path' => TMP . 'tests']); <ide> Cache::write('masking_test', $data, 'mask_test'); <ide> $result = substr(sprintf('%o', fileperms(TMP . 'tests/cake_masking_test')), -4); <ide> $expected = '0666'; <ide> $this->assertEquals($expected, $result); <ide> Cache::delete('masking_test', 'mask_test'); <ide> Cache::drop('mask_test'); <ide> <del> Cache::config('mask_test', ['engine' => 'File', 'mask' => 0644, 'path' => TMP . 'tests']); <add> Cache::setConfig('mask_test', ['engine' => 'File', 'mask' => 0644, 'path' => TMP . 'tests']); <ide> Cache::write('masking_test', $data, 'mask_test'); <ide> $result = substr(sprintf('%o', fileperms(TMP . 'tests/cake_masking_test')), -4); <ide> $expected = '0644'; <ide> $this->assertEquals($expected, $result); <ide> Cache::delete('masking_test', 'mask_test'); <ide> Cache::drop('mask_test'); <ide> <del> Cache::config('mask_test', ['engine' => 'File', 'mask' => 0640, 'path' => TMP . 'tests']); <add> Cache::setConfig('mask_test', ['engine' => 'File', 'mask' => 0640, 'path' => TMP . 'tests']); <ide> Cache::write('masking_test', $data, 'mask_test'); <ide> $result = substr(sprintf('%o', fileperms(TMP . 'tests/cake_masking_test')), -4); <ide> $expected = '0640'; <ide> public function testMaskSetting() <ide> */ <ide> public function testGroupsReadWrite() <ide> { <del> Cache::config('file_groups', [ <add> Cache::setConfig('file_groups', [ <ide> 'engine' => 'File', <ide> 'duration' => 3600, <ide> 'groups' => ['group_a', 'group_b'] <ide> public function testGroupsReadWrite() <ide> */ <ide> public function testClearingWithRepeatWrites() <ide> { <del> Cache::config('repeat', [ <add> Cache::setConfig('repeat', [ <ide> 'engine' => 'File', <ide> 'groups' => ['users'] <ide> ]); <ide> public function testClearingWithRepeatWrites() <ide> */ <ide> public function testGroupDelete() <ide> { <del> Cache::config('file_groups', [ <add> Cache::setConfig('file_groups', [ <ide> 'engine' => 'File', <ide> 'duration' => 3600, <ide> 'groups' => ['group_a', 'group_b'] <ide> public function testGroupDelete() <ide> */ <ide> public function testGroupClear() <ide> { <del> Cache::config('file_groups', [ <add> Cache::setConfig('file_groups', [ <ide> 'engine' => 'File', <ide> 'duration' => 3600, <ide> 'groups' => ['group_a', 'group_b'] <ide> ]); <del> Cache::config('file_groups2', [ <add> Cache::setConfig('file_groups2', [ <ide> 'engine' => 'File', <ide> 'duration' => 3600, <ide> 'groups' => ['group_b'] <ide> ]); <del> Cache::config('file_groups3', [ <add> Cache::setConfig('file_groups3', [ <ide> 'engine' => 'File', <ide> 'duration' => 3600, <ide> 'groups' => ['group_b'], <ide> public function testGroupClear() <ide> */ <ide> public function testGroupClearNoPrefix() <ide> { <del> Cache::config('file_groups', [ <add> Cache::setConfig('file_groups', [ <ide> 'className' => 'File', <ide> 'duration' => 3600, <ide> 'prefix' => '', <ide><path>tests/TestCase/Cache/Engine/MemcachedEngineTest.php <ide> protected function _configCache($config = []) <ide> 'duration' => 3600 <ide> ]; <ide> Cache::drop('memcached'); <del> Cache::config('memcached', array_merge($defaults, $config)); <add> Cache::setConfig('memcached', array_merge($defaults, $config)); <ide> } <ide> <ide> /** <ide> public function tearDown() <ide> */ <ide> public function testConfig() <ide> { <del> $config = Cache::engine('memcached')->config(); <add> $config = Cache::engine('memcached')->getConfig(); <ide> unset($config['path']); <ide> $expecting = [ <ide> 'prefix' => 'cake_', <ide> public function testMultipleServers() <ide> $Memcached = new MemcachedEngine(); <ide> $Memcached->init(['engine' => 'Memcached', 'servers' => $servers]); <ide> <del> $config = $Memcached->config(); <add> $config = $Memcached->getConfig(); <ide> $this->assertEquals($config['servers'], $servers); <ide> Cache::drop('dual_server'); <ide> } <ide> public function testDecrement() <ide> */ <ide> public function testDecrementCompressedKeys() <ide> { <del> Cache::config('compressed_memcached', [ <add> Cache::setConfig('compressed_memcached', [ <ide> 'engine' => 'Memcached', <ide> 'duration' => '+2 seconds', <ide> 'servers' => ['127.0.0.1:11211'], <ide> public function testIncrementDecrementExpiring() <ide> */ <ide> public function testIncrementCompressedKeys() <ide> { <del> Cache::config('compressed_memcached', [ <add> Cache::setConfig('compressed_memcached', [ <ide> 'engine' => 'Memcached', <ide> 'duration' => '+2 seconds', <ide> 'servers' => ['127.0.0.1:11211'], <ide> public function testIncrementCompressedKeys() <ide> */ <ide> public function testConfigurationConflict() <ide> { <del> Cache::config('long_memcached', [ <add> Cache::setConfig('long_memcached', [ <ide> 'engine' => 'Memcached', <ide> 'duration' => '+3 seconds', <ide> 'servers' => ['127.0.0.1:11211'], <ide> ]); <del> Cache::config('short_memcached', [ <add> Cache::setConfig('short_memcached', [ <ide> 'engine' => 'Memcached', <ide> 'duration' => '+2 seconds', <ide> 'servers' => ['127.0.0.1:11211'], <ide> public function testConfigurationConflict() <ide> */ <ide> public function testClear() <ide> { <del> Cache::config('memcached2', [ <add> Cache::setConfig('memcached2', [ <ide> 'engine' => 'Memcached', <ide> 'prefix' => 'cake2_', <ide> 'duration' => 3600 <ide> public function testZeroDuration() <ide> */ <ide> public function testGroupReadWrite() <ide> { <del> Cache::config('memcached_groups', [ <add> Cache::setConfig('memcached_groups', [ <ide> 'engine' => 'Memcached', <ide> 'duration' => 3600, <ide> 'groups' => ['group_a', 'group_b'], <ide> 'prefix' => 'test_' <ide> ]); <del> Cache::config('memcached_helper', [ <add> Cache::setConfig('memcached_helper', [ <ide> 'engine' => 'Memcached', <ide> 'duration' => 3600, <ide> 'prefix' => 'test_' <ide> public function testGroupReadWrite() <ide> */ <ide> public function testGroupDelete() <ide> { <del> Cache::config('memcached_groups', [ <add> Cache::setConfig('memcached_groups', [ <ide> 'engine' => 'Memcached', <ide> 'duration' => 3600, <ide> 'groups' => ['group_a', 'group_b'] <ide> public function testGroupDelete() <ide> */ <ide> public function testGroupClear() <ide> { <del> Cache::config('memcached_groups', [ <add> Cache::setConfig('memcached_groups', [ <ide> 'engine' => 'Memcached', <ide> 'duration' => 3600, <ide> 'groups' => ['group_a', 'group_b'] <ide><path>tests/TestCase/Cache/Engine/RedisEngineTest.php <ide> protected function _configCache($config = []) <ide> 'duration' => 3600 <ide> ]; <ide> Cache::drop('redis'); <del> Cache::config('redis', array_merge($defaults, $config)); <add> Cache::setConfig('redis', array_merge($defaults, $config)); <ide> } <ide> <ide> /** <ide> protected function _configCache($config = []) <ide> */ <ide> public function testConfig() <ide> { <del> $config = Cache::engine('redis')->config(); <add> $config = Cache::engine('redis')->getConfig(); <ide> $expecting = [ <ide> 'prefix' => 'cake_', <ide> 'duration' => 3600, <ide> public function testConfig() <ide> */ <ide> public function testConfigDsn() <ide> { <del> Cache::config('redis_dsn', [ <add> Cache::setConfig('redis_dsn', [ <ide> 'url' => 'redis://localhost:6379?database=1&prefix=redis_' <ide> ]); <ide> <del> $config = Cache::engine('redis_dsn')->config(); <add> $config = Cache::engine('redis_dsn')->getConfig(); <ide> $expecting = [ <ide> 'prefix' => 'redis_', <ide> 'duration' => 3600, <ide> public function testConfigDsn() <ide> public function testConnect() <ide> { <ide> $Redis = new RedisEngine(); <del> $this->assertTrue($Redis->init(Cache::engine('redis')->config())); <add> $this->assertTrue($Redis->init(Cache::engine('redis')->getConfig())); <ide> } <ide> <ide> /** <ide> public function testConnect() <ide> */ <ide> public function testMultiDatabaseOperations() <ide> { <del> Cache::config('redisdb0', [ <add> Cache::setConfig('redisdb0', [ <ide> 'engine' => 'Redis', <ide> 'prefix' => 'cake2_', <ide> 'duration' => 3600, <ide> 'persistent' => false, <ide> ]); <ide> <del> Cache::config('redisdb1', [ <add> Cache::setConfig('redisdb1', [ <ide> 'engine' => 'Redis', <ide> 'database' => 1, <ide> 'prefix' => 'cake2_', <ide> public function testIncrementDecrementExpiring() <ide> */ <ide> public function testClear() <ide> { <del> Cache::config('redis2', [ <add> Cache::setConfig('redis2', [ <ide> 'engine' => 'Redis', <ide> 'prefix' => 'cake2_', <ide> 'duration' => 3600 <ide> public function testZeroDuration() <ide> */ <ide> public function testGroupReadWrite() <ide> { <del> Cache::config('redis_groups', [ <add> Cache::setConfig('redis_groups', [ <ide> 'engine' => 'Redis', <ide> 'duration' => 3600, <ide> 'groups' => ['group_a', 'group_b'], <ide> 'prefix' => 'test_' <ide> ]); <del> Cache::config('redis_helper', [ <add> Cache::setConfig('redis_helper', [ <ide> 'engine' => 'Redis', <ide> 'duration' => 3600, <ide> 'prefix' => 'test_' <ide> public function testGroupReadWrite() <ide> */ <ide> public function testGroupDelete() <ide> { <del> Cache::config('redis_groups', [ <add> Cache::setConfig('redis_groups', [ <ide> 'engine' => 'Redis', <ide> 'duration' => 3600, <ide> 'groups' => ['group_a', 'group_b'] <ide> public function testGroupDelete() <ide> */ <ide> public function testGroupClear() <ide> { <del> Cache::config('redis_groups', [ <add> Cache::setConfig('redis_groups', [ <ide> 'engine' => 'Redis', <ide> 'duration' => 3600, <ide> 'groups' => ['group_a', 'group_b'] <ide><path>tests/TestCase/Cache/Engine/XcacheEngineTest.php <ide> public function setUp() <ide> $this->markTestSkipped('Xcache is not installed or configured properly'); <ide> } <ide> Cache::enable(); <del> Cache::config('xcache', ['engine' => 'Xcache', 'prefix' => 'cake_']); <add> Cache::setConfig('xcache', ['engine' => 'Xcache', 'prefix' => 'cake_']); <ide> } <ide> <ide> /** <ide> protected function _configCache($config = []) <ide> 'prefix' => 'cake_', <ide> ]; <ide> Cache::drop('xcache'); <del> Cache::config('xcache', array_merge($defaults, $config)); <add> Cache::setConfig('xcache', array_merge($defaults, $config)); <ide> } <ide> <ide> /** <ide> public function testIncrement() <ide> */ <ide> public function testGroupsReadWrite() <ide> { <del> Cache::config('xcache_groups', [ <add> Cache::setConfig('xcache_groups', [ <ide> 'engine' => 'Xcache', <ide> 'duration' => 0, <ide> 'groups' => ['group_a', 'group_b'], <ide> public function testGroupsReadWrite() <ide> */ <ide> public function testGroupDelete() <ide> { <del> Cache::config('xcache_groups', [ <add> Cache::setConfig('xcache_groups', [ <ide> 'engine' => 'Xcache', <ide> 'duration' => 0, <ide> 'groups' => ['group_a', 'group_b'], <ide> public function testGroupDelete() <ide> */ <ide> public function testGroupClear() <ide> { <del> Cache::config('xcache_groups', [ <add> Cache::setConfig('xcache_groups', [ <ide> 'engine' => 'Xcache', <ide> 'duration' => 0, <ide> 'groups' => ['group_a', 'group_b'], <ide><path>tests/TestCase/Core/ConfigureTest.php <ide> public function testLoadPlugin() <ide> public function testStoreAndRestore() <ide> { <ide> Cache::enable(); <del> Cache::config('configure', [ <add> Cache::setConfig('configure', [ <ide> 'className' => 'File', <ide> 'path' => TMP . 'tests' <ide> ]); <ide> public function testStoreAndRestore() <ide> public function testStoreAndRestoreWithData() <ide> { <ide> Cache::enable(); <del> Cache::config('configure', [ <add> Cache::setConfig('configure', [ <ide> 'className' => 'File', <ide> 'path' => TMP . 'tests' <ide> ]);
6
Ruby
Ruby
add godep and sphinx-doc to build time deps
14af3e35155c5a8c9035b24773dc5858cca6b01b
<ide><path>Library/Homebrew/cmd/audit.rb <ide> class FormulaAuditor <ide> boost-build <ide> bsdmake <ide> cmake <add> godep <ide> imake <ide> intltool <ide> libtool <ide> pkg-config <ide> scons <ide> smake <add> sphinx-doc <ide> swig <ide> ] <ide>
1
Javascript
Javascript
expose pressretentionoffset for text
550469bb823592797c4c16090dd46b4d6bc3850f
<ide><path>Libraries/Text/Text.js <ide> */ <ide> 'use strict'; <ide> <add>const EdgeInsetsPropType = require('EdgeInsetsPropType'); <ide> const NativeMethodsMixin = require('NativeMethodsMixin'); <ide> const Platform = require('Platform'); <ide> const React = require('React'); <ide> const Text = React.createClass({ <ide> * e.g., `onLongPress={this.increaseSize}>`` <ide> */ <ide> onLongPress: React.PropTypes.func, <add> /** <add> * When the scroll view is disabled, this defines how far your touch may <add> * move off of the button, before deactivating the button. Once deactivated, <add> * try moving it back and you'll see that the button is once again <add> * reactivated! Move it back and forth several times while the scroll view <add> * is disabled. Ensure you pass in a constant to reduce memory allocations. <add> */ <add> pressRetentionOffset: EdgeInsetsPropType, <ide> /** <ide> * Lets the user select text, to use the native copy and paste functionality. <ide> */ <ide> const Text = React.createClass({ <ide> }; <ide> <ide> this.touchableGetPressRectOffset = function(): RectOffset { <del> return PRESS_RECT_OFFSET; <add> return this.props.pressRetentionOffset || PRESS_RECT_OFFSET; <ide> }; <ide> } <ide> return setResponder;
1
Text
Text
add a changelog entry for
7f41321cbda1a946c8d8e15b31587af63ae97428
<ide><path>activerecord/CHANGELOG.md <add>* Support passing an array to `order` for SQL parameter sanitization. <add> <add> *Aaron Suggs* <add> <ide> * Avoid disabling errors on the PostgreSQL connection when enabling the <ide> standard_conforming_strings setting. Errors were previously disabled because <ide> the setting wasn't writable in Postgres 8.1 and didn't exist in earlier
1
Python
Python
fix lint error
f66ad0bea2e25a707f3a0cdfcb8a4fbeaaf5bf27
<ide><path>libcloud/compute/drivers/dimensiondata.py <ide> def ex_create_node_uncustomized(self, <ide> "to True") <ide> <ide> server_uncustomized_elm = ET.Element('deployUncustomizedServer', <del> {'xmlns': TYPES_URN}) <add> {'xmlns': TYPES_URN}) <ide> ET.SubElement(server_uncustomized_elm, "name").text = name <del> ET.SubElement(server_uncustomized_elm, "description").text = ex_description <add> ET.SubElement(server_uncustomized_elm, "description").text = \ <add> ex_description <ide> image_id = self._image_to_image_id(image) <ide> ET.SubElement(server_uncustomized_elm, "imageId").text = image_id <ide> <ide> def ex_create_node_uncustomized(self, <ide> str(ex_cpu_specification.cores_per_socket)) <ide> <ide> if ex_memory_gb is not None: <del> ET.SubElement(server_uncustomized_elm, "memoryGb").text = str(ex_memory_gb) <add> ET.SubElement(server_uncustomized_elm, "memoryGb").text = \ <add> str(ex_memory_gb) <ide> <ide> if (ex_primary_nic_private_ipv4 is None and <ide> ex_primary_nic_vlan is None):
1
Text
Text
update readme to point to new documentation
2b836cae0cd7b39a83ea3e8f8b3aa8105d1023b8
<ide><path>README.md <ide> Visit [atom.io](https://atom.io) to learn more or visit the [Atom forum](https:/ <ide> Visit [issue #3684](https://github.com/atom/atom/issues/3684) to learn more <ide> about the Atom 1.0 roadmap. <ide> <add>## Documentation <add> <add>If you want to read about using Atom or developing packages in Atom, the [Atom Flight Manual](https://atom.io/docs/latest/) is free and available online, along with ePub, PDF and mobi versions. You can find the source to the manual in [atom/docs](https://github.com/atom/docs). <add> <add>The [API reference](https://atom.io/docs/api) for developing packages is also documented on Atom.io. <add> <add> <ide> ## Installing <ide> <ide> ### OS X <ide> repeat these steps to upgrade to future releases. <ide> * [OS X](docs/build-instructions/os-x.md) <ide> * [FreeBSD](docs/build-instructions/freebsd.md) <ide> * [Windows](docs/build-instructions/windows.md) <del> <del>## Developing <del> <del>Check out the [guides](https://atom.io/docs/latest) and the [API reference](https://atom.io/docs/api).
1
Mixed
Javascript
support proxy auth (#483)
df6d3ce6cf10432b7920d8c3ac0efb7254989bc4
<ide><path>README.md <ide> These are the available config options for making requests. Only the `url` is re <ide> httpsAgent: new https.Agent({ keepAlive: true }), <ide> <ide> // 'proxy' defines the hostname and port of the proxy server <add> // `auth` indicates that HTTP Basic auth should be used to connect to the proxy, and supplies credentials. <add> // This will set an `Proxy-Authorization` header, overwriting any existing `Proxy-Authorization` custom headers you have set using `headers`. <ide> proxy: { <ide> host: '127.0.0.1', <del> port: 9000 <add> port: 9000, <add> auth: : { <add> username: 'mikeymike', <add> password: 'rapunz3l' <add> } <ide> }, <ide> <ide> // `cancelToken` specifies a cancel token that can be used to cancel the request <ide><path>lib/adapters/http.js <ide> module.exports = function httpAdapter(config) { <ide> host: parsedProxyUrl.hostname, <ide> port: parsedProxyUrl.port <ide> }; <add> <add> if (parsedProxyUrl.auth) { <add> var proxyUrlAuth = parsedProxyUrl.auth.split(':'); <add> proxy.auth = { <add> username: proxyUrlAuth[0], <add> password: proxyUrlAuth[1] <add> }; <add> } <ide> } <ide> } <ide> <ide> if (proxy) { <del> options.host = proxy.host; <ide> options.hostname = proxy.host; <add> options.host = proxy.host; <ide> options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : ''); <ide> options.port = proxy.port; <ide> options.path = protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path; <add> <add> // Basic proxy authorization <add> if (proxy.auth) { <add> var base64 = new Buffer(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64'); <add> options.headers['Proxy-Authorization'] = 'Basic ' + base64; <add> } <ide> } <ide> <ide> var transport; <ide><path>test/unit/adapters/http.js <ide> module.exports = { <ide> }); <ide> }, <ide> <del> testProxy: function(test) { <add> testHTTPProxy: function(test) { <ide> server = http.createServer(function(req, res) { <ide> res.setHeader('Content-Type', 'text/html; charset=UTF-8'); <ide> res.end('12345'); <ide> module.exports = { <ide> }); <ide> }, <ide> <add> testHTTPProxyAuth: function(test) { <add> server = http.createServer(function(req, res) { <add> res.end(); <add> }).listen(4444, function() { <add> proxy = http.createServer(function(request, response) { <add> var parsed = url.parse(request.url); <add> var opts = { <add> host: parsed.hostname, <add> port: parsed.port, <add> path: parsed.path <add> }; <add> var proxyAuth = request.headers['proxy-authorization']; <add> <add> http.get(opts, function(res) { <add> var body = ''; <add> res.on('data', function(data) { <add> body += data; <add> }); <add> res.on('end', function() { <add> response.setHeader('Content-Type', 'text/html; charset=UTF-8'); <add> response.end(proxyAuth); <add> }); <add> }); <add> <add> }).listen(4000, function() { <add> axios.get('http://localhost:4444/', { <add> proxy: { <add> host: 'localhost', <add> port: 4000, <add> auth: { <add> username: 'user', <add> password: 'pass' <add> } <add> } <add> }).then(function(res) { <add> var base64 = new Buffer('user:pass', 'utf8').toString('base64'); <add> test.equal(res.data, 'Basic ' + base64, 'should authenticate to the proxy'); <add> test.done(); <add> }); <add> }); <add> }); <add> }, <add> <add> testHTTPProxyAuthFromEnv: function(test) { <add> server = http.createServer(function(req, res) { <add> res.end(); <add> }).listen(4444, function() { <add> proxy = http.createServer(function(request, response) { <add> var parsed = url.parse(request.url); <add> var opts = { <add> host: parsed.hostname, <add> port: parsed.port, <add> path: parsed.path <add> }; <add> var proxyAuth = request.headers['proxy-authorization']; <add> <add> http.get(opts, function(res) { <add> var body = ''; <add> res.on('data', function(data) { <add> body += data; <add> }); <add> res.on('end', function() { <add> response.setHeader('Content-Type', 'text/html; charset=UTF-8'); <add> response.end(proxyAuth); <add> }); <add> }); <add> <add> }).listen(4000, function() { <add> process.env.http_proxy = 'http://user:pass@localhost:4000/'; <add> <add> axios.get('http://localhost:4444/').then(function(res) { <add> var base64 = new Buffer('user:pass', 'utf8').toString('base64'); <add> test.equal(res.data, 'Basic ' + base64, 'should authenticate to the proxy set by process.env.http_proxy'); <add> test.done(); <add> }); <add> }); <add> }); <add> }, <add> <add> testHTTPProxyAuthWithHeader: function (test) { <add> server = http.createServer(function(req, res) { <add> res.end(); <add> }).listen(4444, function() { <add> proxy = http.createServer(function(request, response) { <add> var parsed = url.parse(request.url); <add> var opts = { <add> host: parsed.hostname, <add> port: parsed.port, <add> path: parsed.path <add> }; <add> var proxyAuth = request.headers['proxy-authorization']; <add> <add> http.get(opts, function(res) { <add> var body = ''; <add> res.on('data', function(data) { <add> body += data; <add> }); <add> res.on('end', function() { <add> response.setHeader('Content-Type', 'text/html; charset=UTF-8'); <add> response.end(proxyAuth); <add> }); <add> }); <add> <add> }).listen(4000, function() { <add> axios.get('http://localhost:4444/', { <add> proxy: { <add> host: 'localhost', <add> port: 4000, <add> auth: { <add> username: 'user', <add> password: 'pass' <add> } <add> }, <add> headers: { <add> 'Proxy-Authorization': 'Basic abc123' <add> } <add> }).then(function(res) { <add> var base64 = new Buffer('user:pass', 'utf8').toString('base64'); <add> test.equal(res.data, 'Basic ' + base64, 'should authenticate to the proxy'); <add> test.done(); <add> }); <add> }); <add> }); <add> }, <add> <ide> testCancel: function(test) { <ide> var source = axios.CancelToken.source(); <ide> server = http.createServer(function (req, res) {
3
Javascript
Javascript
leak strict mode with umd builds
49cd77d24a5244d159be14671654da63932ea9be
<ide><path>scripts/rollup/wrappers.js <ide> ${source}`; <ide> * <ide> ${license} <ide> */ <del> <del>'use strict'; <del> <ide> ${source}`; <ide> }, <ide> <ide> ${source}`; <ide> * <ide> ${license} <ide> */ <del>${source}`; <add>(function(){${source}})();`; <ide> }, <ide> <ide> /***************** UMD_PROFILING *****************/ <ide> ${source}`; <ide> * <ide> ${license} <ide> */ <del>${source}`; <add>(function(){${source}})();`; <ide> }, <ide> <ide> /***************** NODE_DEV *****************/
1
Javascript
Javascript
fix --debug-brk on symlinked scripts
27c85727edda169cbe9c04178c6fdee642cb8845
<ide><path>lib/module.js <ide> Module.prototype.require = function(path) { <ide> }; <ide> <ide> <add>// Resolved path to process.argv[1] will be lazily placed here <add>// (needed for setting breakpoint when called with --debug-brk) <add>var resolvedArgv; <add> <add> <ide> // Returns exception if any <ide> Module.prototype._compile = function(content, filename) { <ide> var self = this; <ide> Module.prototype._compile = function(content, filename) { <ide> var wrapper = Module.wrap(content); <ide> <ide> var compiledWrapper = runInThisContext(wrapper, filename, true); <del> if (filename === process.argv[1] && global.v8debug) { <del> global.v8debug.Debug.setBreakPoint(compiledWrapper, 0, 0); <add> if (global.v8debug) { <add> if (!resolvedArgv) { <add> resolvedArgv = Module._resolveFilename(process.argv[1], null)[1]; <add> } <add> <add> // Set breakpoint on module start <add> if (filename === resolvedArgv) { <add> global.v8debug.Debug.setBreakPoint(compiledWrapper, 0, 0); <add> } <ide> } <ide> var args = [self.exports, require, self, filename, dirname]; <ide> return compiledWrapper.apply(self.exports, args);
1
Ruby
Ruby
improve parsing of url-only, non-filename versions
f87fadd4ee7a5f157df6813c233b9e8684a66a4b
<ide><path>Library/Homebrew/version.rb <ide> def self._parse(spec) <ide> <ide> # e.g. http://mirrors.jenkins-ci.org/war/1.486/jenkins.war <ide> # e.g. https://github.com/foo/bar/releases/download/0.10.11/bar.phar <del> m = %r{/(\d\.\d+(\.\d+)?)}.match(spec_s) <del> return m.captures.first unless m.nil? <add> # e.g. https://github.com/clojure/clojurescript/releases/download/r1.9.293/cljs.jar <add> # e.g. https://github.com/fibjs/fibjs/releases/download/v0.6.1/fullsrc.zip <add> # e.g. https://wwwlehre.dhbw-stuttgart.de/~sschulz/WORK/E_DOWNLOAD/V_1.9/E.tgz <add> # e.g. https://github.com/JustArchi/ArchiSteamFarm/releases/download/2.3.2.0/ASF.zip <add> # e.g. https://people.gnome.org/~newren/eg/download/1.7.5.2/eg <add> m = %r{/([rvV]_?)?(\d\.\d+(\.\d+){,2})}.match(spec_s) <add> return m.captures[1] unless m.nil? <ide> <ide> # e.g. http://www.ijg.org/files/jpegsrc.v8d.tar.gz <ide> m = /\.v(\d+[a-z]?)/.match(stem)
1
Java
Java
add experimental to onbackpressuredrop(action1)
8758fdd98cca2ed065654bb5a93a0351327aeda0
<ide><path>src/main/java/rx/Observable.java <ide> public final Observable<T> onBackpressureBuffer(long capacity, Action0 onOverflo <ide> * @param onDrop the action to invoke for each item dropped. onDrop action should be fast and should never block. <ide> * @return the source Observable modified to drop {@code onNext} notifications on overflow <ide> * @see <a href="http://reactivex.io/documentation/operators/backpressure.html">ReactiveX operators documentation: backpressure operators</a> <add> * @Experimental The behavior of this can change at any time. <add> * @since (if this graduates from Experimental/Beta to supported, replace this parenthetical with the release number) <ide> */ <add> @Experimental <ide> public final Observable<T> onBackpressureDrop(Action1<? super T> onDrop) { <ide> return lift(new OperatorOnBackpressureDrop<T>(onDrop)); <ide> }
1
Javascript
Javascript
update arabic language
50beb2eb2d71f36708140d2aa0e2ba1013c438fb
<ide><path>lang/ar.js <ide> factory(window.moment); // Browser global <ide> } <ide> }(function (moment) { <add> var symbolMap = { <add> '1': '١', <add> '2': '٢', <add> '3': '٣', <add> '4': '٤', <add> '5': '٥', <add> '6': '٦', <add> '7': '٧', <add> '8': '٨', <add> '9': '٩', <add> '0': '٠' <add> }, numberMap = { <add> '١': '1', <add> '٢': '2', <add> '٣': '3', <add> '٤': '4', <add> '٥': '5', <add> '٦': '6', <add> '٧': '7', <add> '٨': '8', <add> '٩': '9', <add> '٠': '0' <add> }; <add> <ide> return moment.lang('ar', { <ide> months : "يناير/ كانون الثاني_فبراير/ شباط_مارس/ آذار_أبريل/ نيسان_مايو/ أيار_يونيو/ حزيران_يوليو/ تموز_أغسطس/ آب_سبتمبر/ أيلول_أكتوبر/ تشرين الأول_نوفمبر/ تشرين الثاني_ديسمبر/ كانون الأول".split("_"), <ide> monthsShort : "يناير/ كانون الثاني_فبراير/ شباط_مارس/ آذار_أبريل/ نيسان_مايو/ أيار_يونيو/ حزيران_يوليو/ تموز_أغسطس/ آب_سبتمبر/ أيلول_أكتوبر/ تشرين الأول_نوفمبر/ تشرين الثاني_ديسمبر/ كانون الأول".split("_"), <ide> weekdays : "الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"), <del> weekdaysShort : "الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"), <add> weekdaysShort : "أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"), <ide> weekdaysMin : "ح_ن_ث_ر_خ_ج_س".split("_"), <ide> longDateFormat : { <ide> LT : "HH:mm", <ide> LLL : "D MMMM YYYY LT", <ide> LLLL : "dddd D MMMM YYYY LT" <ide> }, <add> meridiem : function (hour, minute, isLower) { <add> if (hour < 12) { <add> return "ص"; <add> } else { <add> return "م"; <add> } <add> }, <ide> calendar : { <ide> sameDay: "[اليوم على الساعة] LT", <ide> nextDay: '[غدا على الساعة] LT', <ide> y : "سنة", <ide> yy : "%d سنوات" <ide> }, <add> preparse: function (string) { <add> return string.replace(/[۰-۹]/g, function (match) { <add> return numberMap[match]; <add> }).replace(/،/g, ','); <add> }, <add> postformat: function (string) { <add> return string.replace(/\d/g, function (match) { <add> return symbolMap[match]; <add> }).replace(/,/g, '،'); <add> }, <ide> week : { <ide> dow : 6, // Saturday is the first day of the week. <ide> doy : 12 // The week that contains Jan 1st is the first week of the year. <ide><path>test/lang/ar.js <ide> exports["lang:ar"] = { <ide> "format" : function (test) { <ide> test.expect(22); <ide> var a = [ <del> ['dddd, MMMM Do YYYY, h:mm:ss a', 'الأحد, فبراير/ شباط 14 2010, 3:25:50 pm'], <del> ['ddd, hA', 'الأحد, 3PM'], <del> ['M Mo MM MMMM MMM', '2 2 02 فبراير/ شباط فبراير/ شباط'], <del> ['YYYY YY', '2010 10'], <del> ['D Do DD', '14 14 14'], <del> ['d do dddd ddd dd', '0 0 الأحد الأحد ح'], <del> ['DDD DDDo DDDD', '45 45 045'], <del> ['w wo ww', '8 8 08'], <del> ['h hh', '3 03'], <del> ['H HH', '15 15'], <del> ['m mm', '25 25'], <del> ['s ss', '50 50'], <del> ['a A', 'pm PM'], <del> ['[the] DDDo [day of the year]', 'the 45 day of the year'], <del> ['L', '14/02/2010'], <del> ['LL', '14 فبراير/ شباط 2010'], <del> ['LLL', '14 فبراير/ شباط 2010 15:25'], <del> ['LLLL', 'الأحد 14 فبراير/ شباط 2010 15:25'], <del> ['l', '14/2/2010'], <del> ['ll', '14 فبراير/ شباط 2010'], <del> ['lll', '14 فبراير/ شباط 2010 15:25'], <del> ['llll', 'الأحد 14 فبراير/ شباط 2010 15:25'] <add> ['dddd, MMMM Do YYYY, h:mm:ss a', 'الأحد، فبراير/ شباط ١٤ ٢٠١٠، ٣:٢٥:٥٠ م'], <add> ['ddd, hA', 'الأحد، ٣م'], <add> ['M Mo MM MMMM MMM', '٢ ٢ ٠٢ فبراير/ شباط فبراير/ شباط'], <add> ['YYYY YY', '٢٠١٠ ١٠'], <add> ['D Do DD', '١٤ ١٤ ١٤'], <add> ['d do dddd ddd dd', '٠ ٠ الأحد أحد ح'], <add> ['DDD DDDo DDDD', '٤٥ ٤٥ ٠٤٥'], <add> ['w wo ww', '٨ ٨ ٠٨'], <add> ['h hh', '٣ ٠٣'], <add> ['H HH', '١٥ ١٥'], <add> ['m mm', '٢٥ ٢٥'], <add> ['s ss', '٥٠ ٥٠'], <add> ['a A', 'م م'], <add> ['[the] DDDo [day of the year]', 'the ٤٥ day of the year'], <add> ['L', '١٤/٠٢/٢٠١٠'], <add> ['LL', '١٤ فبراير/ شباط ٢٠١٠'], <add> ['LLL', '١٤ فبراير/ شباط ٢٠١٠ ١٥:٢٥'], <add> ['LLLL', 'الأحد ١٤ فبراير/ شباط ٢٠١٠ ١٥:٢٥'], <add> ['l', '١٤/2/٢٠١٠'], <add> ['ll', '١٤ فبراير/ شباط ٢٠١٠'], <add> ['lll', '١٤ فبراير/ شباط ٢٠١٠ ١٥:٢٥'], <add> ['llll', 'الأحد ١٤ فبراير/ شباط ٢٠١٠ ١٥:٢٥'] <ide> ], <ide> b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), <ide> i; <ide> exports["lang:ar"] = { <ide> test.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "ثوان", "44 seconds = a few seconds"); <ide> test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "دقيقة", "45 seconds = a minute"); <ide> test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "دقيقة", "89 seconds = a minute"); <del> test.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), "2 دقائق", "90 seconds = 2 minutes"); <del> test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "44 دقائق", "44 minutes = 44 minutes"); <add> test.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), "٢ دقائق", "90 seconds = 2 minutes"); <add> test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "٤٤ دقائق", "44 minutes = 44 minutes"); <ide> test.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true), "ساعة", "45 minutes = an hour"); <ide> test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "ساعة", "89 minutes = an hour"); <del> test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true), "2 ساعات", "90 minutes = 2 hours"); <del> test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "5 ساعات", "5 hours = 5 hours"); <del> test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "21 ساعات", "21 hours = 21 hours"); <add> test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true), "٢ ساعات", "90 minutes = 2 hours"); <add> test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "٥ ساعات", "5 hours = 5 hours"); <add> test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "٢١ ساعات", "21 hours = 21 hours"); <ide> test.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true), "يوم", "22 hours = a day"); <ide> test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "يوم", "35 hours = a day"); <del> test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 أيام", "36 hours = 2 days"); <add> test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "٢ أيام", "36 hours = 2 days"); <ide> test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "يوم", "1 day = a day"); <del> test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 أيام", "5 days = 5 days"); <del> test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 أيام", "25 days = 25 days"); <add> test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "٥ أيام", "5 days = 5 days"); <add> test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "٢٥ أيام", "25 days = 25 days"); <ide> test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "شهر", "26 days = a month"); <ide> test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "شهر", "30 days = a month"); <ide> test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "شهر", "45 days = a month"); <del> test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "2 أشهر", "46 days = 2 months"); <del> test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "2 أشهر", "75 days = 2 months"); <del> test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "3 أشهر", "76 days = 3 months"); <add> test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "٢ أشهر", "46 days = 2 months"); <add> test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "٢ أشهر", "75 days = 2 months"); <add> test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "٣ أشهر", "76 days = 3 months"); <ide> test.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), "شهر", "1 month = a month"); <del> test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "5 أشهر", "5 months = 5 months"); <del> test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "11 أشهر", "344 days = 11 months"); <add> test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "٥ أشهر", "5 months = 5 months"); <add> test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "١١ أشهر", "344 days = 11 months"); <ide> test.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), "سنة", "345 days = a year"); <ide> test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "سنة", "547 days = a year"); <del> test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "2 سنوات", "548 days = 2 years"); <add> test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "٢ سنوات", "548 days = 2 years"); <ide> test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), "سنة", "1 year = a year"); <del> test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 سنوات", "5 years = 5 years"); <add> test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "٥ سنوات", "5 years = 5 years"); <ide> test.done(); <ide> }, <ide> <ide> exports["lang:ar"] = { <ide> <ide> var a = moment().hours(2).minutes(0).seconds(0); <ide> <del> test.equal(moment(a).calendar(), "اليوم على الساعة 02:00", "today at the same time"); <del> test.equal(moment(a).add({ m: 25 }).calendar(), "اليوم على الساعة 02:25", "Now plus 25 min"); <del> test.equal(moment(a).add({ h: 1 }).calendar(), "اليوم على الساعة 03:00", "Now plus 1 hour"); <del> test.equal(moment(a).add({ d: 1 }).calendar(), "غدا على الساعة 02:00", "tomorrow at the same time"); <del> test.equal(moment(a).subtract({ h: 1 }).calendar(), "اليوم على الساعة 01:00", "Now minus 1 hour"); <del> test.equal(moment(a).subtract({ d: 1 }).calendar(), "أمس على الساعة 02:00", "yesterday at the same time"); <add> test.equal(moment(a).calendar(), "اليوم على الساعة ٠٢:٠٠", "today at the same time"); <add> test.equal(moment(a).add({ m: 25 }).calendar(), "اليوم على الساعة ٠٢:٢٥", "Now plus 25 min"); <add> test.equal(moment(a).add({ h: 1 }).calendar(), "اليوم على الساعة ٠٣:٠٠", "Now plus 1 hour"); <add> test.equal(moment(a).add({ d: 1 }).calendar(), "غدا على الساعة ٠٢:٠٠", "tomorrow at the same time"); <add> test.equal(moment(a).subtract({ h: 1 }).calendar(), "اليوم على الساعة ٠١:٠٠", "Now minus 1 hour"); <add> test.equal(moment(a).subtract({ d: 1 }).calendar(), "أمس على الساعة ٠٢:٠٠", "yesterday at the same time"); <ide> test.done(); <ide> }, <ide>
2
Mixed
Ruby
fix counter_cache for polymorphic associations
0ed096ddf5416fefa3afacb72c64632c02826f95
<ide><path>activerecord/CHANGELOG.md <add>* Fix a bug where counter_cache doesn't always work with polymorphic <add> relations. <add> <add> Fixes #16407. <add> <add> *Stefan Kanev & Sean Griffin* <add> <ide> * Ensure that cyclic associations with autosave don't cause duplicate errors <ide> to be added to the parent record. <ide> <ide><path>activerecord/lib/active_record/associations/builder/belongs_to.rb <ide> def belongs_to_counter_cache_after_update(reflection) <ide> <ide> if (@_after_create_counter_called ||= false) <ide> @_after_create_counter_called = false <del> elsif attribute_changed?(foreign_key) && !new_record? && reflection.constructable? <del> model = reflection.klass <add> elsif attribute_changed?(foreign_key) && !new_record? <add> if reflection.polymorphic? <add> model = attribute(reflection.foreign_type).try(:constantize) <add> model_was = attribute_was(reflection.foreign_type).try(:constantize) <add> else <add> model = reflection.klass <add> model_was = reflection.klass <add> end <add> <ide> foreign_key_was = attribute_was foreign_key <ide> foreign_key = attribute foreign_key <ide> <ide> if foreign_key && model.respond_to?(:increment_counter) <ide> model.increment_counter(cache_column, foreign_key) <ide> end <del> if foreign_key_was && model.respond_to?(:decrement_counter) <del> model.decrement_counter(cache_column, foreign_key_was) <add> <add> if foreign_key_was && model_was.respond_to?(:decrement_counter) <add> model_was.decrement_counter(cache_column, foreign_key_was) <ide> end <ide> end <ide> end <ide><path>activerecord/test/cases/counter_cache_test.rb <ide> require 'cases/helper' <ide> require 'models/topic' <ide> require 'models/car' <add>require 'models/aircraft' <ide> require 'models/wheel' <ide> require 'models/engine' <ide> require 'models/reply' <ide> class ::SpecialReply < ::Reply <ide> assert_equal 2, car.engines_count <ide> assert_equal 2, car.reload.engines_count <ide> end <add> <add> test "update counters in a polymorphic relationship" do <add> aircraft = Aircraft.create! <add> <add> assert_difference 'aircraft.reload.wheels_count' do <add> aircraft.wheels << Wheel.create! <add> end <add> <add> assert_difference 'aircraft.reload.wheels_count', -1 do <add> aircraft.wheels.first.destroy <add> end <add> end <ide> end <ide><path>activerecord/test/cases/locking_test.rb <ide> def test_update_without_attributes_does_not_only_update_lock_version <ide> end <ide> end <ide> <del> def test_polymorphic_destroy_with_dependencies_and_lock_version <del> car = Car.create! <del> <del> assert_difference 'car.wheels.count' do <del> car.wheels << Wheel.create! <del> end <del> assert_difference 'car.wheels.count', -1 do <del> car.destroy <del> end <del> assert car.destroyed? <del> end <del> <ide> def test_removing_has_and_belongs_to_many_associations_upon_destroy <ide> p = RichPerson.create! first_name: 'Jon' <ide> p.treasures.create! <ide><path>activerecord/test/models/aircraft.rb <ide> class Aircraft < ActiveRecord::Base <ide> self.pluralize_table_names = false <ide> has_many :engines, :foreign_key => "car_id" <add> has_many :wheels, as: :wheelable <ide> end <ide><path>activerecord/test/schema/schema.rb <ide> def except(adapter_names_to_exclude) <ide> <ide> create_table :aircraft, force: true do |t| <ide> t.string :name <add> t.integer :wheels_count, default: 0, null: false <ide> end <ide> <ide> create_table :articles, force: true do |t|
6
Ruby
Ruby
add newlines before and after hr
04367c4dafdf85a47a7f9f5e8444b1ad1a5cd5af
<ide><path>Library/Homebrew/dev-cmd/bump-formula-pr.rb <ide> def bump_formula_pr <ide> EOS <ide> user_message = ARGV.value("message") <ide> if user_message <del> pr_message += <<~EOS <add> pr_message += "\n" + <<~EOS <ide> --- <add> <ide> #{user_message} <ide> EOS <ide> end
1
PHP
PHP
fix failing tests
2d168c51a703e84aad8ac043aeb7454c07b2f90b
<ide><path>tests/TestCase/Filesystem/FileTest.php <ide> * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) <ide> * <ide> * Licensed under The MIT License <del> * For full copyright and license information, please see the LICENSE.txt <add> * For full copyright and license information, please see the LICENSE <ide> * Redistributions of files must retain the above copyright notice <ide> * <ide> * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) <ide> public function tearDown() <ide> */ <ide> public function testBasic() <ide> { <del> $file = CORE_PATH . DS . 'LICENSE.txt'; <add> $file = CORE_PATH . DS . 'LICENSE'; <ide> <ide> $this->File = new File($file, false); <ide> <ide> public function testBasic() <ide> $expecting = [ <ide> 'dirname' => dirname($file), <ide> 'basename' => basename($file), <del> 'extension' => 'txt', <ide> 'filename' => 'LICENSE', <ide> 'filesize' => filesize($file), <ide> 'mime' => 'text/plain' <ide> function_exists('mime_content_type') && <ide> $this->assertEquals($expecting, $result); <ide> <ide> $result = $this->File->ext(); <del> $expecting = 'txt'; <del> $this->assertEquals($expecting, $result); <add> $this->assertEquals('', $result); <ide> <ide> $result = $this->File->name(); <ide> $expecting = 'LICENSE';
1
Javascript
Javascript
add objects es6 unit tests
cf98f0a3c461c7109ba0ae722563f7ff71af9ba4
<ide><path>test/unit/src/objects/Bone.tests.js <add>/** <add> * @author TristanVALCKE / https://github.com/Itee <add> */ <add>/* global QUnit */ <add> <add>import { Bone } from '../../../../src/objects/Bone'; <add> <add>export default QUnit.module( 'Objects', () => { <add> <add> QUnit.module.todo( 'Bone', () => { <add> <add> // INHERITANCE <add> QUnit.test( "Extending", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // INSTANCING <add> QUnit.test( "Instancing", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // PUBLIC STUFF <add> QUnit.test( "isBone", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> <add> } ); <add> <add>} ); <ide><path>test/unit/src/objects/Group.tests.js <add>/** <add> * @author TristanVALCKE / https://github.com/Itee <add> */ <add>/* global QUnit */ <add> <add>import { Group } from '../../../../src/objects/Group'; <add> <add>export default QUnit.module( 'Objects', () => { <add> <add> QUnit.module.todo( 'Group', () => { <add> <add> // INHERITANCE <add> QUnit.test( "Extending", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // INSTANCING <add> QUnit.test( "Instancing", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> } ); <add> <add>} ); <ide><path>test/unit/src/objects/LOD.tests.js <add>/** <add> * @author TristanVALCKE / https://github.com/Itee <add> */ <add>/* global QUnit */ <add> <add>import { LOD } from '../../../../src/objects/LOD'; <add> <add>export default QUnit.module( 'Objects', () => { <add> <add> QUnit.module.todo( 'LOD', () => { <add> <add> // INHERITANCE <add> QUnit.test( "Extending", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // INSTANCING <add> QUnit.test( "Instancing", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // PROPERTIES <add> QUnit.test( "levels", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // PUBLIC STUFF <add> QUnit.test( "isLOD", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> QUnit.test( "copy", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> QUnit.test( "addLevel", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> QUnit.test( "getObjectForDistance", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> QUnit.test( "raycast", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> QUnit.test( "update", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> QUnit.test( "toJSON", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> } ); <add> <add>} ); <ide><path>test/unit/src/objects/LensFlare.tests.js <add>/** <add> * @author TristanVALCKE / https://github.com/Itee <add> */ <add>/* global QUnit */ <add> <add>import { LensFlare } from '../../../../src/objects/LensFlare'; <add> <add>export default QUnit.module( 'Objects', () => { <add> <add> QUnit.module.todo( 'LensFlare', () => { <add> <add> // INHERITANCE <add> QUnit.test( "Extending", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // INSTANCING <add> QUnit.test( "Instancing", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // PUBLIC STUFF <add> QUnit.test( "isLensFlare", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> QUnit.test( "copy", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> QUnit.test( "add", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> QUnit.test( "updateLensFlares", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> } ); <add> <add>} ); <ide><path>test/unit/src/objects/Line.tests.js <add>/** <add> * @author TristanVALCKE / https://github.com/Itee <add> */ <add>/* global QUnit */ <add> <add>import { Line } from '../../../../src/objects/Line'; <add> <add>export default QUnit.module( 'Objects', () => { <add> <add> QUnit.module.todo( 'Line', () => { <add> <add> // INHERITANCE <add> QUnit.test( "Extending", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // INSTANCING <add> QUnit.test( "Instancing", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // PUBLIC STUFF <add> QUnit.test( "isLine", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> QUnit.test( "raycast", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> QUnit.test( "clone", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> <add> } ); <add> <add>} ); <ide><path>test/unit/src/objects/LineLoop.tests.js <add>/** <add> * @author TristanVALCKE / https://github.com/Itee <add> */ <add>/* global QUnit */ <add> <add>import { LineLoop } from '../../../../src/objects/LineLoop'; <add> <add>export default QUnit.module( 'Objects', () => { <add> <add> QUnit.module.todo( 'LineLoop', () => { <add> <add> // INHERITANCE <add> QUnit.test( "Extending", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // INSTANCING <add> QUnit.test( "Instancing", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // PUBLIC STUFF <add> QUnit.test( "isLineLoop", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> <add> } ); <add> <add>} ); <ide><path>test/unit/src/objects/LineSegments.tests.js <add>/** <add> * @author TristanVALCKE / https://github.com/Itee <add> */ <add>/* global QUnit */ <add> <add>import { LineSegments } from '../../../../src/objects/LineSegments'; <add> <add>export default QUnit.module( 'Objects', () => { <add> <add> QUnit.module.todo( 'LineSegments', () => { <add> <add> // INHERITANCE <add> QUnit.test( "Extending", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // INSTANCING <add> QUnit.test( "Instancing", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // PUBLIC STUFF <add> QUnit.test( "isLineSegments", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> <add> } ); <add> <add>} ); <ide><path>test/unit/src/objects/Mesh.tests.js <add>/** <add> * @author TristanVALCKE / https://github.com/Itee <add> */ <add>/* global QUnit */ <add> <add>import { Mesh } from '../../../../src/objects/Mesh'; <add> <add>export default QUnit.module( 'Objects', () => { <add> <add> QUnit.module.todo( 'Mesh', () => { <add> <add> // INHERITANCE <add> QUnit.test( "Extending", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // INSTANCING <add> QUnit.test( "Instancing", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // PUBLIC STUFF <add> QUnit.test( "isMesh", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> QUnit.test( "setDrawMode", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> QUnit.test( "copy", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> QUnit.test( "updateMorphTargets", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> QUnit.test( "raycast", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> QUnit.test( "clone", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> <add> } ); <add> <add>} ); <ide><path>test/unit/src/objects/Points.tests.js <add>/** <add> * @author TristanVALCKE / https://github.com/Itee <add> */ <add>/* global QUnit */ <add> <add>import { Points } from '../../../../src/objects/Points'; <add> <add>export default QUnit.module( 'Objects', () => { <add> <add> QUnit.module.todo( 'Points', () => { <add> <add> // INHERITANCE <add> QUnit.test( "isPoints", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // INSTANCING <add> QUnit.test( "raycast", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // PUBLIC STUFF <add> QUnit.test( "clone", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> } ); <add> <add>} ); <ide><path>test/unit/src/objects/Skeleton.tests.js <add>/** <add> * @author TristanVALCKE / https://github.com/Itee <add> */ <add>/* global QUnit */ <add> <add>import { Skeleton } from '../../../../src/objects/Skeleton'; <add> <add>export default QUnit.module( 'Objects', () => { <add> <add> QUnit.module.todo( 'Skeleton', () => { <add> <add> // INSTANCING <add> QUnit.test( "Instancing", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // PUBLIC STUFF <add> QUnit.test( "calculateInverses", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> QUnit.test( "pose", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> QUnit.test( "update", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> QUnit.test( "clone", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> } ); <add> <add>} ); <ide><path>test/unit/src/objects/SkinnedMesh.tests.js <add>/** <add> * @author TristanVALCKE / https://github.com/Itee <add> */ <add>/* global QUnit */ <add> <add>import { SkinnedMesh } from '../../../../src/objects/SkinnedMesh'; <add> <add>export default QUnit.module( 'Objects', () => { <add> <add> QUnit.module.todo( 'SkinnedMesh', () => { <add> <add> // INHERITANCE <add> QUnit.test( "Extending", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // INSTANCING <add> QUnit.test( "Instancing", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // PUBLIC STUFF <add> QUnit.test( "isSkinnedMesh", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> QUnit.test( "initBones", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> QUnit.test( "bind", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> QUnit.test( "pose", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> QUnit.test( "normalizeSkinWeights", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> QUnit.test( "updateMatrixWorld", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> QUnit.test( "clone", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> } ); <add> <add>} ); <ide><path>test/unit/src/objects/Sprite.tests.js <add>/** <add> * @author TristanVALCKE / https://github.com/Itee <add> */ <add>/* global QUnit */ <add> <add>import { Sprite } from '../../../../src/objects/Sprite'; <add> <add>export default QUnit.module( 'Objects', () => { <add> <add> QUnit.module.todo( 'Sprite', () => { <add> <add> // INHERITANCE <add> QUnit.test( "Extending", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // INSTANCING <add> QUnit.test( "Instancing", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> // PUBLIC STUFF <add> QUnit.test( "isSprite", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> QUnit.test( "raycast", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> QUnit.test( "clone", ( assert ) => { <add> <add> assert.ok( false, "everything's gonna be alright" ); <add> <add> } ); <add> <add> } ); <add> <add>} );
12
Ruby
Ruby
add tests for formula spec selection
25c0ecfd63270939aef8102e11afea161915f8c2
<ide><path>Library/Homebrew/test/test_bottles.rb <del>require 'testing_env' <del>require 'test/testball' <del> <del>class BottleTests < Test::Unit::TestCase <del> def test_bottle_spec_selection <del> f = SnowLeopardBottleSpecTestBall.new <del> <del> assert_equal case MacOS.cat <del> when :snow_leopard then f.bottle <del> else f.stable <del> end, f.active_spec <del> <del> f = LionBottleSpecTestBall.new <del> assert_equal case MacOS.cat <del> when :lion then f.bottle <del> else f.stable <del> end, f.active_spec <del> <del> f = AllCatsBottleSpecTestBall.new <del> assert_equal f.bottle, f.active_spec <del> end <del>end <ide><path>Library/Homebrew/test/test_formula_spec_selection.rb <add>require 'testing_env' <add>require 'formula' <add> <add>class FormulaSpecSelectionTests < Test::Unit::TestCase <add> def formula(*args, &block) <add> @_f = Class.new(Formula, &block).new(*args) <add> end <add> <add> def assert_spec_selected(spec) <add> assert_equal @_f.send(spec), @_f.active_spec <add> end <add> <add> def test_selects_head_when_requested <add> ARGV.stubs(:build_head?).returns(true) <add> <add> formula do <add> url 'foo-1.0' <add> devel { url 'foo-1.1a' } <add> head 'foo' <add> end <add> <add> assert_spec_selected :head <add> end <add> <add> def test_selects_devel_when_requested <add> ARGV.stubs(:build_devel?).returns(true) <add> <add> formula do <add> url 'foo-1.0' <add> devel { url 'foo-1.1a' } <add> head 'foo' <add> end <add> <add> assert_spec_selected :devel <add> end <add> <add> def test_selects_bottle_when_available <add> formula do <add> def install_bottle?(*); true; end <add> <add> url 'foo-1.0' <add> bottle do <add> { <add> :snow_leopard_32 => 'deadbeef'*5, <add> :snow_leopard => 'faceb00c'*5, <add> :lion => 'baadf00d'*5, <add> :mountain_lion => '8badf00d'*5, <add> }.each_pair do |cat, val| <add> sha1(val => cat) <add> end <add> end <add> end <add> <add> assert_spec_selected :bottle <add> end <add> <add> def test_selects_stable_by_default <add> formula do <add> url 'foo-1.0' <add> devel { url 'foo-1.1a' } <add> head 'foo' <add> end <add> <add> assert_spec_selected :stable <add> end <add> <add> def test_selects_stable_when_exclusive <add> formula do <add> url 'foo-1.0' <add> end <add> <add> assert_spec_selected :stable <add> end <add> <add> def test_selects_devel_before_head <add> formula do <add> devel { url 'foo-1.1a' } <add> head 'foo' <add> end <add> <add> assert_spec_selected :devel <add> end <add> <add> def test_selects_devel_when_exclusive <add> formula do <add> devel { url 'foo-1.1a' } <add> end <add> <add> assert_spec_selected :devel <add> end <add> <add> def test_selects_head_when_exclusive <add> formula do <add> head 'foo' <add> end <add> <add> assert_spec_selected :head <add> end <add>end
2
Javascript
Javascript
follow the amd specification for define
892625b3c36eda6bb6ac226d15e0a158ba35cf21
<ide><path>src/selector.js <del>define([ "./selector-sizzle" ]); <add>define([ "./selector-sizzle" ], function() {});
1
Text
Text
add section on thinc implementation details
a16afb79e3fa0a86dfbd85e8eb281b52ef7a1d19
<ide><path>website/docs/usage/layers-architectures.md <ide> menu: <ide> - ['Type Signatures', 'type-sigs'] <ide> - ['Swapping Architectures', 'swap-architectures'] <ide> - ['PyTorch & TensorFlow', 'frameworks'] <del> - ['Thinc Models', 'thinc'] <add> - ['Custom Models', 'custom-models'] <add> - ['Thinc implementation', 'thinc'] <ide> - ['Trainable Components', 'components'] <ide> next: /usage/projects <ide> --- <ide> you'll be able to try it out in any of the spaCy components. ​ <ide> <ide> Thinc allows you to [wrap models](https://thinc.ai/docs/usage-frameworks) <ide> written in other machine learning frameworks like PyTorch, TensorFlow and MXNet <del>using a unified [`Model`](https://thinc.ai/docs/api-model) API. <add>using a unified [`Model`](https://thinc.ai/docs/api-model) API. <ide> <del>For example, let's use Pytorch to define a very simple Neural network consisting <del>of two hidden `Linear` layers with `ReLU` activation and dropout, and a <del>softmax-activated output layer. <add>For example, let's use Pytorch to define a very simple Neural network consisting <add>of two hidden `Linear` layers with `ReLU` activation and dropout, and a <add>softmax-activated output layer. <ide> <ide> ```python <ide> from torch import nn <ide> torch_model = nn.Sequential( <ide> ) <ide> ``` <ide> <del>This PyTorch model can be wrapped as a Thinc `Model` by using Thinc's `PyTorchWrapper`: <add>This PyTorch model can be wrapped as a Thinc `Model` by using Thinc's <add>`PyTorchWrapper`: <ide> <ide> ```python <ide> from thinc.api import PyTorchWrapper <ide> <ide> wrapped_pt_model = PyTorchWrapper(torch_model) <ide> ``` <ide> <del>The resulting wrapped `Model` can be used as a **custom architecture** as such, or <del>can be a **subcomponent of a larger model**. For instance, we can use Thinc's <del>[`chain`](https://thinc.ai/docs/api-layers#chain) <del>combinator, which works like `Sequential` in PyTorch, <del>to combine the wrapped model with other components in a larger network. <del>This effectively means that you can easily wrap different components <del>from different frameworks, and "glue" them together with Thinc: <del> <add>The resulting wrapped `Model` can be used as a **custom architecture** as such, <add>or can be a **subcomponent of a larger model**. For instance, we can use Thinc's <add>[`chain`](https://thinc.ai/docs/api-layers#chain) combinator, which works like <add>`Sequential` in PyTorch, to combine the wrapped model with other components in a <add>larger network. This effectively means that you can easily wrap different <add>components from different frameworks, and "glue" them together with Thinc: <add> <ide> ```python <ide> from thinc.api import chain, with_array <ide> from spacy.ml import CharacterEmbed <ide> <del>embed = CharacterEmbed(width, embed_size, nM, nC) <del>model = chain(embed, with_array(wrapped_pt_model)) <add>char_embed = CharacterEmbed(width, embed_size, nM, nC) <add>model = chain(char_embed, with_array(wrapped_pt_model)) <ide> ``` <ide> <del>In the above example, we have combined our custom PyTorch model with a <del>character embedding layer defined by spaCy. <del>[CharacterEmbed](/api/architectures#CharacterEmbed) returns a <del>`Model` that takes a `List[Doc]` as input, and outputs a `List[Floats2d]`. <del>To make sure that the wrapped Pytorch model receives valid inputs, we use Thinc's <add>In the above example, we have combined our custom PyTorch model with a character <add>embedding layer defined by spaCy. <add>[CharacterEmbed](/api/architectures#CharacterEmbed) returns a `Model` that takes <add>a `List[Doc]` as input, and outputs a `List[Floats2d]`. To make sure that the <add>wrapped Pytorch model receives valid inputs, we use Thinc's <ide> [`with_array`](https://thinc.ai/docs/api-layers#with_array) helper. <del> <del>As another example, you could have a model where you use PyTorch just for <del>the transformer layers, and use "native" Thinc layers to do fiddly input and <del>output transformations and add on task-specific "heads", as efficiency is less <del>of a consideration for those parts of the network. <ide> <add>As another example, you could have a model where you use PyTorch just for the <add>transformer layers, and use "native" Thinc layers to do fiddly input and output <add>transformations and add on task-specific "heads", as efficiency is less of a <add>consideration for those parts of the network. <ide> <del>## Models for trainable components {#components} <add>## Custom models for trainable components {#custom-models} <ide> <del>To use our custom model including the Pytorch subnetwork, all we need to do is register <del>the architecture. The full example then becomes: <add>To use our custom model including the Pytorch subnetwork, all we need to do is <add>register the architecture. The full example then becomes: <ide> <ide> ```python <ide> from typing import List <ide> def TorchModel(nO: int, <ide> nC: int, <ide> dropout: float, <ide> ) -> Model[List[Doc], List[Floats2d]]: <del> embed = CharacterEmbed(width, embed_size, nM, nC) <add> char_embed = CharacterEmbed(width, embed_size, nM, nC) <ide> torch_model = nn.Sequential( <ide> nn.Linear(width, hidden_width), <ide> nn.ReLU(), <ide> def TorchModel(nO: int, <ide> nn.Softmax(dim=1) <ide> ) <ide> wrapped_pt_model = PyTorchWrapper(torch_model) <del> model = chain(embed, with_array(wrapped_pt_model)) <add> model = chain(char_embed, with_array(wrapped_pt_model)) <ide> return model <ide> ``` <ide> <del>Now you can use this model definition in any existing trainable spaCy component, <add>Now you can use this model definition in any existing trainable spaCy component, <ide> by specifying it in the config file: <ide> <ide> ```ini <ide> hidden_width = 48 <ide> embed_size = 2000 <ide> ``` <ide> <del>In this configuration, we pass all required parameters for the various <del>subcomponents of the custom architecture as settings in the training config file. <del>Remember that it is best not to rely on any (hidden) default values, to ensure that <del>training configs are complete and experiments fully reproducible. <add>In this configuration, we pass all required parameters for the various <add>subcomponents of the custom architecture as settings in the training config <add>file. Remember that it is best not to rely on any (hidden) default values, to <add>ensure that training configs are complete and experiments fully reproducible. <add> <add>## Thinc implemention details {#thinc} <add> <add>Ofcourse it's also possible to define the `Model` from the previous section <add>entirely in Thinc. The Thinc documentation documents the <add>[various layers](https://thinc.ai/docs/api-layers) and helper functions <add>available. <add> <add>The combinators often used in Thinc can be used to <add>[overload operators](https://thinc.ai/docs/usage-models#operators). A common <add>usage is for example to bind `chain` to `>>`: <add> <add>```python <add>from thinc.api import chain, with_array, Model, Relu, Dropout, Softmax <add>from spacy.ml import CharacterEmbed <add> <add>char_embed = CharacterEmbed(width, embed_size, nM, nC) <add> <add>with Model.define_operators({">>": chain}): <add> layers = ( <add> Relu(nO=hidden_width, nI=width) <add> >> Dropout(dropout) <add> >> Relu(nO=hidden_width, nI=hidden_width) <add> >> Dropout(dropout) <add> >> Softmax(nO=nO, nI=hidden_width) <add> ) <add> model = char_embed >> with_array(layers) <add>``` <add> <add>**⚠️ Note that Thinc layers define the output dimension (`nO`) as the first <add>argument, followed (optionally) by the input dimension (`nI`). This is in <add>contrast to how the PyTorch layers are defined, where `in_features` precedes <add>`out_features`.** <add> <add> <add><!-- TODO: shape inference, tagger assumes 50 output classes --> <add> <ide> <add>## Create new components {#components} <ide> <ide> <!-- TODO: <ide>
1
Python
Python
create tests to validate libcloud-875
b3b5086d19baa585af4987b0e32e7fdbe595ea5a
<ide><path>libcloud/test/dns/test_route53.py <ide> def test_create_record_zone_name(self): <ide> self.assertEqual(record.type, RecordType.A) <ide> self.assertEqual(record.data, '127.0.0.1') <ide> <add> def test_create_TXT_record(self): <add> """ <add> Check that TXT records are created in quotes <add> """ <add> zone = self.driver.list_zones()[0] <add> record = self.driver.create_record( <add> name='', zone=zone, <add> type=RecordType.TXT, data='test' <add> ) <add> self.assertEqual(record.id, 'TXT:') <add> self.assertEqual(record.name, '') <add> self.assertEqual(record.zone, zone) <add> self.assertEqual(record.type, RecordType.TXT) <add> self.assertEqual(record.data, '"test"') <add> <add> def test_create_TXT_record_quoted(self): <add> """ <add> Check that TXT values already quoted are not changed <add> """ <add> zone = self.driver.list_zones()[0] <add> record = self.driver.create_record( <add> name='', zone=zone, <add> type=RecordType.TXT, data='"test"' <add> ) <add> self.assertEqual(record.id, 'TXT:') <add> self.assertEqual(record.name, '') <add> self.assertEqual(record.zone, zone) <add> self.assertEqual(record.type, RecordType.TXT) <add> self.assertEqual(record.data, '"test"') <add> <add> def test_create_SPF_record(self): <add> """ <add> Check that SPF records are created in quotes <add> """ <add> zone = self.driver.list_zones()[0] <add> record = self.driver.create_record( <add> name='', zone=zone, <add> type=RecordType.SPF, data='test' <add> ) <add> self.assertEqual(record.id, 'SPF:') <add> self.assertEqual(record.name, '') <add> self.assertEqual(record.zone, zone) <add> self.assertEqual(record.type, RecordType.SPF) <add> self.assertEqual(record.data, '"test"') <add> <add> def test_create_SPF_record_quoted(self): <add> """ <add> Check that SPF values already quoted are not changed <add> """ <add> zone = self.driver.list_zones()[0] <add> record = self.driver.create_record( <add> name='', zone=zone, <add> type=RecordType.SPF, data='"test"' <add> ) <add> self.assertEqual(record.id, 'SPF:') <add> self.assertEqual(record.name, '') <add> self.assertEqual(record.zone, zone) <add> self.assertEqual(record.type, RecordType.SPF) <add> self.assertEqual(record.data, '"test"') <add> <ide> def test_create_multi_value_record(self): <ide> zone = self.driver.list_zones()[0] <ide> records = self.driver.ex_create_multi_value_record(
1
Python
Python
use paramspec to replace ... in callable
ad4717b24b5a85447f2bb9769c4e8d4ded89ad70
<ide><path>airflow/utils/session.py <ide> from typing import Callable, Generator, TypeVar, cast <ide> <ide> from airflow import settings <add>from airflow.typing_compat import ParamSpec <ide> <ide> <ide> @contextlib.contextmanager <ide> def create_session() -> Generator[settings.SASession, None, None]: <ide> session.close() <ide> <ide> <add>PS = ParamSpec("PS") <ide> RT = TypeVar("RT") <ide> <ide> <del>def find_session_idx(func: Callable[..., RT]) -> int: <add>def find_session_idx(func: Callable[PS, RT]) -> int: <ide> """Find session index in function call parameter.""" <ide> func_params = signature(func).parameters <ide> try: <ide> def find_session_idx(func: Callable[..., RT]) -> int: <ide> return session_args_idx <ide> <ide> <del>def provide_session(func: Callable[..., RT]) -> Callable[..., RT]: <add>def provide_session(func: Callable[PS, RT]) -> Callable[PS, RT]: <ide> """ <ide> Function decorator that provides a session if it isn't provided. <ide> If you want to reuse a session or run the function as part of a
1
Ruby
Ruby
fix bug in reporting curl errors
c6e069bfe5df0e2563b50ca1b89a8d9166ce05b9
<ide><path>Library/Homebrew/utils.rb <ide> def self.system cmd, *args <ide> # Kernel.system but with exceptions <ide> def safe_system cmd, *args <ide> unless Homebrew.system cmd, *args <del> args = args.map{ |arg| arg.gsub " ", "\\ " } * " " <add> args = args.map{ |arg| arg.to_s.gsub " ", "\\ " } * " " <ide> raise "Failure while executing: #{cmd} #{args}" <ide> end <ide> end
1
PHP
PHP
fix entitycontext operations on collections
f031b3c9f91dcb667a6cc0155c0026b77f8b4537
<ide><path>src/View/Form/EntityContext.php <ide> class EntityContext implements ContextInterface { <ide> */ <ide> protected $_rootName; <ide> <add>/** <add> * Boolean to track whether or not the entity is a <add> * collection. <add> * <add> * @var boolean <add> */ <add> protected $_isCollection = false; <add> <ide> /** <ide> * A dictionary of tables <ide> * <ide> public function __construct(Request $request, array $context) { <ide> */ <ide> protected function _prepare() { <ide> $table = $this->_context['table']; <add> $entity = $this->_context['entity']; <ide> if (empty($table)) { <del> $entity = $this->_context['entity']; <ide> if (is_array($entity) || $entity instanceof Traversable) { <ide> $entity = (new Collection($entity))->first(); <ide> } <ide> protected function _prepare() { <ide> 'Unable to find table class for current entity' <ide> ); <ide> } <add> $this->_isCollection = ( <add> is_array($entity) || <add> $entity instanceof Traversable <add> ); <ide> $alias = $this->_rootName = $table->alias(); <ide> $this->_tables[$alias] = $table; <ide> } <ide> public function val($field) { <ide> return null; <ide> } <ide> $parts = explode('.', $field); <del> list($entity, $prop) = $this->_getEntity($parts); <del> return $entity->get(array_pop($parts)); <add> list($entity) = $this->_getEntity($parts); <add> if ($entity instanceof Entity) { <add> return $entity->get(array_pop($parts)); <add> } <add> return null; <ide> } <ide> <ide> /** <ide> public function val($field) { <ide> * @throws \RuntimeException When properties cannot be read. <ide> */ <ide> protected function _getEntity($path) { <add> $oneElement = count($path) === 1; <add> if ($oneElement && $this->_isCollection) { <add> return [false, false]; <add> } <ide> $entity = $this->_context['entity']; <del> if (count($path) === 1) { <add> if ($oneElement) { <ide> return [$entity, $this->_rootName]; <ide> } <ide> <ide> protected function _getEntity($path) { <ide> * @return mixed <ide> */ <ide> protected function _getProp($target, $field) { <del> if (is_array($target) || $target instanceof Traversable) { <add> if (is_array($target) && isset($target[$field])) { <add> return $target[$field]; <add> } <add> if ($target instanceof Entity) { <add> return $target->get($field); <add> } <add> if ($target instanceof Traversable) { <ide> foreach ($target as $i => $val) { <ide> if ($i == $field) { <ide> return $val; <ide> } <ide> } <add> return false; <ide> } <del> return $target->get($field); <ide> } <ide> <ide> /** <ide> public function isRequired($field) { <ide> $parts = explode('.', $field); <ide> list($entity, $prop) = $this->_getEntity($parts); <ide> <add> $isNew = true; <add> if ($entity instanceof Entity) { <add> $isNew = $entity->isNew(); <add> } <add> <ide> $validator = $this->_getValidator($prop); <ide> $field = array_pop($parts); <ide> if (!$validator->hasField($field)) { <ide> return false; <ide> } <del> $allowed = $validator->isEmptyAllowed($field, $entity->isNew()); <add> $allowed = $validator->isEmptyAllowed($field, $isNew); <ide> return $allowed === false; <ide> } <ide> <ide> public function hasError($field) { <ide> public function error($field) { <ide> $parts = explode('.', $field); <ide> list($entity, $prop) = $this->_getEntity($parts); <del> if (!$entity) { <del> return []; <add> <add> if ($entity instanceof Entity) { <add> return $entity->errors(array_pop($parts)); <ide> } <del> return $entity->errors(array_pop($parts)); <add> return []; <ide> } <ide> <ide> } <ide><path>tests/TestCase/View/Form/EntityContextTest.php <ide> public function testValOnCollections($collection) { <ide> <ide> $result = $context->val('1.user.username'); <ide> $this->assertEquals('jose', $result); <add> <add> $this->assertNull($context->val('nope')); <add> $this->assertNull($context->val('99.title')); <ide> } <ide> <ide> /** <ide> public function testErrorsOnCollections($collection) { <ide> $this->assertFalse($context->hasError('1.title')); <ide> $this->assertEquals(['Not long enough'], $context->error('1.body')); <ide> $this->assertTrue($context->hasError('1.body')); <add> <add> $this->assertFalse($context->hasError('nope')); <add> $this->assertFalse($context->hasError('99.title')); <ide> } <ide> <ide> /** <ide> public function testSchemaOnCollections($collection) { <ide> $this->assertEquals('text', $context->type('1.body')); <ide> $this->assertEquals('string', $context->type('0.user.username')); <ide> $this->assertEquals('string', $context->type('1.user.username')); <add> $this->assertEquals('string', $context->type('99.title')); <ide> $this->assertNull($context->type('0.nope')); <ide> <ide> $expected = ['length' => 255, 'precision' => null]; <ide> public function testValidatorsOnCollections($collection) { <ide> 'Users' => 'custom', <ide> ] <ide> ]); <add> $this->assertFalse($context->isRequired('nope')); <ide> <ide> $this->assertTrue($context->isRequired('0.title')); <del> $this->assertFalse($context->isRequired('1.body')); <ide> $this->assertTrue($context->isRequired('0.user.username')); <add> $this->assertFalse($context->isRequired('1.body')); <add> <add> $this->assertTrue($context->isRequired('99.title')); <add> $this->assertFalse($context->isRequired('99.nope')); <ide> } <ide> <ide> /**
2
Text
Text
remove changelog entry for backported change
3b36d75c8fef2e8d3bc9db87486729d4e8229840
<ide><path>activesupport/CHANGELOG.md <del>* Do not delegate missing `marshal_dump` and `_dump` methods via the <del> `delegate_missing_to` extension. This avoids unintentionally adding instance <del> variables when calling `Marshal.dump(object)`, should the delegation target of <del> `object` be a method which would otherwise add them. Fixes #36522. <del> <del> *Aaron Lipman* <del> <ide> * Allow the on_rotation proc used when decrypting/verifying a message to be <ide> be passed at the constructor level. <ide>
1
Text
Text
add release notes for 1.6.0-rc.2
dcfcf8189361fc1359583525ee48fce1fa2e9de1
<ide><path>CHANGELOG.md <add> <add><a name="1.6.0-rc.2"></a> <add># 1.6.0-rc.2 safety-insurance (2016-11-24) <add> <add> <add>## Security Fixes <add>- **bootstrap:** explicitly whitelist URL schemes for bootstrap. (#15427) <add> ([7f1b8b](https://github.com/angular/angular.js/commit/7f1b8bdfe1043871c5ead2ec602efc41e0de5e53)) <add> <add>## Bug Fixes <add>- **$sce:** fix `adjustMatcher` to replace multiple '*' and '**' <add> ([991a2b](https://github.com/angular/angular.js/commit/991a2b30e00aed1d312e29555e356a795f9e3d62)) <add> <add> <add>## Performance Improvements <add>- ***:** don't trigger digests after enter/leave of structural directives <add> ([f4fb6e](https://github.com/angular/angular.js/commit/f4fb6e0983a6a700dc4a246a913504550b55f1e9) <add> [#15322](https://github.com/angular/angular.js/issues/15322)) <add> <add> <add> <add> <ide> <a name="1.5.9"></a> <ide> # 1.5.9 timeturning-lockdown (2016-11-24) <ide>
1
Text
Text
publish release notes for latest cs docker engine
740b1b5a2d89ef8d2c4c606636e5b42234298734
<ide><path>docs/sources/docker-hub-enterprise/release-notes.md <ide> page_keywords: docker, documentation, about, technology, understanding, enterpri <ide> <ide> - First release <ide> <del>## Commercialy Supported Docker Engine <add>## Commercially Supported Docker Engine <ide> <ide> ### CS Docker Engine 1.6.2-cs5 <add>(21 May 2015) <ide> <ide> For customers running Docker Engine on [supported versions of RedHat Enterprise <ide> Linux](https://www.docker.com/enterprise/support/) with [SELinux <ide> enabled](https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/ <ide> 6/html/Security-Enhanced_Linux/sect-Security-Enhanced_Linux-Working_with_SELinux <ide> -Enabling_and_Disabling_SELinux.html), the `docker build` and `docker run` <del>commands will fail because bind mounted volumes or files are not accessible. As <del>a result, customers with SELinux enabled cannot use these commands in their <del>environment. By installing Docker Engine 1.6.2-cs5, customers can run with <del>SELinux enabled and run these commands on their supported operating system. <add>commands will not have DNS host name resolution and bind-mounted volumes may <add>not be accessible. <add>As a result, customers with SELinux will be unable to use hostname-based network <add>access in either `docker build` or `docker run`, nor will they be able to <add>`docker run` containers <add>that use `--volume` or `-v` bind-mounts (with an incorrect SELinux label) in <add>their environment. By installing Docker <add>Engine 1.6.2-cs5, customers can use Docker as intended on RHEL with SELinux enabled. <add> <add>For example, you see will failures like: <add> <add>``` <add>[root@dhe ~]# docker -v <add>Docker version 1.6.0-cs2, build b8dd430 <add>[root@dhe ~]# ping dhe.home.org.au <add>PING dhe.home.org.au (10.10.10.104) 56(84) bytes of data. <add>64 bytes from dhe.home.gateway (10.10.10.104): icmp_seq=1 ttl=64 time=0.663 ms <add>^C <add>--- dhe.home.org.au ping statistics --- <add>2 packets transmitted, 2 received, 0% packet loss, time 1001ms <add>rtt min/avg/max/mdev = 0.078/0.370/0.663/0.293 ms <add>[root@dhe ~]# docker run --rm -it debian ping dhe.home.org.au <add>ping: unknown host <add>[root@dhe ~]# docker run --rm -it debian cat /etc/resolv.conf <add>cat: /etc/resolv.conf: Permission denied <add>[root@dhe ~]# docker run --rm -it debian apt-get update <add>Err http://httpredir.debian.org jessie InRelease <add> <add>Err http://security.debian.org jessie/updates InRelease <add> <add>Err http://httpredir.debian.org jessie-updates InRelease <add> <add>Err http://security.debian.org jessie/updates Release.gpg <add> Could not resolve 'security.debian.org' <add>Err http://httpredir.debian.org jessie Release.gpg <add> Could not resolve 'httpredir.debian.org' <add>Err http://httpredir.debian.org jessie-updates Release.gpg <add> Could not resolve 'httpredir.debian.org' <add>[output truncated] <add> <add>``` <add> <add>or when running a `docker build`: <add> <add>``` <add>[root@dhe ~]# docker build . <add>Sending build context to Docker daemon 11.26 kB <add>Sending build context to Docker daemon <add>Step 0 : FROM fedora <add> ---> e26efd418c48 <add>Step 1 : RUN yum install httpd <add> ---> Running in cf274900ea35 <add> <add>One of the configured repositories failed (Fedora 21 - x86_64), <add>and yum doesn't have enough cached data to continue. At this point the only <add>safe thing yum can do is fail. There are a few ways to work "fix" this: <add> <add>[output truncated] <add>``` <add> <add> <add>**Affected Versions**: All previous versions of Docker Engine when SELinux <add>is enabled. <add> <add>Docker **highly recommends** that all customers running previous versions of <add>Docker Engine update to this release. <add> <add>#### **How to workaround this issue** <add> <add>Customers who choose not to install this update have two options. The <add>first option is to disable SELinux. This is *not recommended* for production <add>systems where SELinux is typically required. <add> <add>The second option is to pass the following parameter in to `docker run`. <ide> <del>**Affected Versions**: Docker Engine: 1.6.x-cs1 through 1.6.x-cs4 <del> <del>It is **highly recommended** that all customers running Docker Engine 1.6.x-cs1 <del>through 1.6.x-cs4 update to this release. <del> <del>#### How to workaround this issue <del> <del>Customers who do not install this update have two options. The <del>first option, is to disable SELinux. This is *not recommended* for production <del>systems where SELinux is required. <del> <del>The second option is to pass the following parameter in to `docker run`. <del> <ide> --security-opt=label:type:docker_t <ide> <ide> This parameter cannot be passed to the `docker build` command. <ide> <del>#### Upgrade notes <add>#### **Upgrade notes** <add> <add>When upgrading, make sure you stop DHE first, perform the Engine upgrade, and <add>then restart DHE. <ide> <ide> If you are running with SELinux enabled, previous Docker Engine releases allowed <del>you to bind mount additional volumes or files inside the container as follows: <add>you to bind-mount additional volumes or files inside the container as follows: <ide> <del> $ docker run -it -v /home/user/foo.txt:/foobar.txt:ro <add> $ docker run -it -v /home/user/foo.txt:/foobar.txt:ro <imagename> <ide> <del>In the 1.6.2-cs5 release, you must ensure additional bind mounts have the correct <del>SELinux context. As an example, if you want to mount `foobar.txt` as read only <del>into the container, do the following to create and test your bind mount: <add>In the 1.6.2-cs5 release, you must ensure additional bind-mounts have the correct <add>SELinux context. For example, if you want to mount `foobar.txt` as read-only <add>into the container, do the following to create and test your bind-mount: <ide> <ide> 1. Add the `z` option to the bind mount when you specify `docker run`. <ide> <del> $ docker run -it -v /home/user/foo.txt:/foobar.txt:ro,z <add> $ docker run -it -v /home/user/foo.txt:/foobar.txt:ro,z <imagename> <ide> <del>2. Exec into your new container. <add>2. Exec into your new container. <ide> <del> For example, if your container is `bashful_curie` open a shell on the <add> For example, if your container is `bashful_curie`, open a shell on the <ide> container: <del> <add> <ide> $ docker exec -it bashful_curie bash <ide> <del>3. Use the `cat` command to check the permissions on the mounted file. <add>3. Use `cat` to check the permissions on the mounted file. <ide> <ide> $ cat /foobar.txt <ide> the contents of foobar appear <ide> <ide> If you see the file's contents, your mount succeeded. If you receive a <del> `Permission denied` message and/or the `/var/log/audit/audit.log` file on your <del> Docker host contains an AVC Denial message, the mount did not succeed. <add> `Permission denied` message and/or the `/var/log/audit/audit.log` file on <add> your Docker host contains an AVC Denial message, the mount did not succeed. <ide> <ide> type=AVC msg=audit(1432145409.197:7570): avc: denied { read } for pid=21167 comm="cat" name="foobar.txt" dev="xvda2" ino=17704136 scontext=system_u:system_r:svirt_lxc_net_t:s0:c909,c965 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=file <del> <add> <ide> Recheck your command line to make sure you passed in the `z` option. <ide> <del>### CS Docker Engine 1.6.2 <add> <add>### CS Docker Engine 1.6.2-cs4 <ide> (13 May 2015) <ide> <ide> Fix mount regression for `/sys`. <ide> <del> <del>### CS Docker Engine 1.6.1 <add>### CS Docker Engine 1.6.1-cs3 <ide> (11 May 2015) <ide> <ide> Docker Engine version 1.6.1 has been released to address several vulnerabilities <ide> proactively tighten the policy further by outright denying the use of the <ide> <ide> Because this addition is preventative, no CVE-ID is requested. <ide> <del>### CS Docker Engine 1.6.0 <add>### CS Docker Engine 1.6.0-cs2 <ide> (23 Apr 2015) <ide> <ide> - First release, please see the [Docker Engine 1.6.0 Release notes](/release-notes/)
1
PHP
PHP
fix excerpt on new php 5.4
66f532a9b8046901d595c202ba1b562e985e1f85
<ide><path>src/Error/Debugger.php <ide> protected static function _highlight($str) { <ide> $highlight = highlight_string($str, true); <ide> if ($added) { <ide> $highlight = str_replace( <del> '&lt;?php&nbsp;<br/>', <add> ['&lt;?php&nbsp;<br/>', '&lt;?php&nbsp;<br />'], <ide> '', <ide> $highlight <ide> );
1
Javascript
Javascript
add test for option node false
2fe7cd2f55ee360b6f28ee0ab8fb48e922d8a130
<ide><path>test/configCases/parsing/node-source-plugin-off/index.js <add>require("should"); <add> <add>it("should not load node-libs-browser when node option is false", function() { <add> (typeof process).should.be.eql("undefined"); <add>}); <ide><path>test/configCases/parsing/node-source-plugin-off/webpack.config.js <add>module.exports = { <add> target: "web", <add> node: false <add>}; <ide><path>test/configCases/parsing/node-source-plugin/index.js <add>require("should"); <add> <add>it("should add node-libs-browser to target web by default", function() { <add> process.browser.should.be.eql(true); <add>}); <ide><path>test/configCases/parsing/node-source-plugin/webpack.config.js <add>module.exports = { <add> target: "web", <add> node: { <add> process: true <add> } <add>};
4
PHP
PHP
add @auth blade component
6ce2f5a6bc7046be8cf3813f2f1894ecaf4f4761
<ide><path>src/Illuminate/View/Compilers/Concerns/CompilesConditionals.php <ide> protected function compileEndIsset() <ide> { <ide> return '<?php endif; ?>'; <ide> } <add> <add> /** <add> * Compile the if-auth statements into valid PHP. <add> * <add> * @param string|null $guard <add> * @return string <add> */ <add> protected function compileAuth($guard = null) <add> { <add> return "<?php if(auth()->guard({$guard})->check()): ?>"; <add> } <add> <add> /** <add> * Compile the end-auth statements into valid PHP. <add> * <add> * @return string <add> */ <add> protected function compileEndAuth() <add> { <add> return '<?php endif; ?>'; <add> } <ide> } <ide><path>tests/View/Blade/BladeIfAuthStatementsTest.php <add><?php <add> <add>namespace Illuminate\Tests\Blade; <add> <add>use Mockery as m; <add>use PHPUnit\Framework\TestCase; <add>use Illuminate\View\Compilers\BladeCompiler; <add> <add>class BladeIfAuthStatementsTest extends TestCase <add>{ <add> public function tearDown() <add> { <add> m::close(); <add> } <add> <add> public function testIfStatementsAreCompiled() <add> { <add> $compiler = new BladeCompiler($this->getFiles(), __DIR__); <add> $string = '@auth ("api") <add>breeze <add>@endisset'; <add> $expected = '<?php if(auth()->guard("api")->check()): ?> <add>breeze <add><?php endif; ?>'; <add> $this->assertEquals($expected, $compiler->compileString($string)); <add> } <add> <add> protected function getFiles() <add> { <add> return m::mock('Illuminate\Filesystem\Filesystem'); <add> } <add>}
2
Ruby
Ruby
use the sql literal factory method
23b03baba611b0ef664eec9e9384c14099eb73e9
<ide><path>activerecord/lib/active_record/relation.rb <ide> def update_all(updates, conditions = nil, options = {}) <ide> order = arel.orders <ide> end <ide> <del> stmt = arel.compile_update(Arel::SqlLiteral.new(@klass.send(:sanitize_sql_for_assignment, updates))) <add> stmt = arel.compile_update(Arel.sql(@klass.send(:sanitize_sql_for_assignment, updates))) <ide> stmt.take limit <ide> stmt.order(*order) <ide> stmt.key = @klass.arel_table[@klass.primary_key]
1
Text
Text
fix a link
5558aa45f52379d16941aab363fd246ffb4ae567
<ide><path>README.md <ide> But in some cases, the size of React itself would far exceed the content of the <ide> <ide> For this reason we want to promote a situation where users can share the cache for the basic runtime across internet properties. The application code continues to load from your server as usual. <ide> <del>We are committed to providing a great uptime and levels of security for our CDN. Even so, we also **automatically fall back** if the CDN script fails to load [with a simple trick](). <add>We are committed to providing a great uptime and levels of security for our CDN. Even so, we also **automatically fall back** if the CDN script fails to load [with a simple trick](http://www.hanselman.com/blog/CDNsFailButYourScriptsDontHaveToFallbackFromCDNToLocalJQuery.aspx). <ide> <ide> To turn the CDN off, just set `{ “next”: { “cdn”: false } }` in `package.json`. <ide> </details>
1
Python
Python
add a future warning for --empty-gen
e96bf13c71ec0dc6d75245352ee414ca3e8253db
<ide><path>numpy/f2py/f2py2e.py <ide> def scaninputline(inputline): <ide> options['buildpath'] = buildpath <ide> options['include_paths'] = include_paths <ide> options.setdefault('f2cmap_file', None) <add> if not emptygen: <add> import warnings <add> warnings.warn("\n --empty-gen is false" <add> " this will default to true" <add> " in subsequent releases" <add> " for build uniformity\n" <add> " see: " <add> "https://numpy.org/devdocs/f2py/buildtools/index.html" <add> "\n Pass --empty-gen to silence this warning\n", <add> FutureWarning, stacklevel=2) <ide> return files, options <ide> <ide>
1
Javascript
Javascript
remove atom from dispatcher state
bf81cf3aa468f7331e7a4cf0d53ec2eaf9f71c46
<ide><path>src/Dispatcher.js <del>import { Component, PropTypes } from 'react'; <add>import { PropTypes } from 'react'; <ide> <ide> function dispatch(store, atom, action) { <ide> return store(atom, action); <ide> } <ide> <del>export default class Dispatcher extends Component { <add>export default class Dispatcher { <ide> static propTypes = { <ide> store: PropTypes.func.isRequired, <ide> children: PropTypes.func.isRequired <ide> export default class Dispatcher extends Component { <ide> return { redux: this }; <ide> } <ide> <del> constructor(props, context) { <del> super(props, context); <del> <add> constructor(props) { <ide> this.subscriptions = []; <ide> this.emitChange = this.emitChange.bind(this); <ide> this.dispatch = this.dispatch.bind(this); <ide> export default class Dispatcher extends Component { <ide> <ide> setAtom(atom) { <ide> this.atom = atom; <del> if (this.state) { <del> this.setState({ atom }); <del> } else { <del> this.state = { atom }; <del> } <ide> this.emitChange(); <ide> } <ide>
1
Javascript
Javascript
fix unused scope
2ec3df1ff60793728c314b709dcd22469ed40f80
<ide><path>examples/js/loaders/XLoader.js <ide> THREE.XLoader.prototype = { <ide> <ide> getPlaneStr: function ( _str ) { <ide> <del> var scope = this; <ide> var firstDbl = _str.indexOf( '"' ) + 1; <ide> var dbl2 = _str.indexOf( '"', firstDbl ); <ide> return _str.substr( firstDbl, dbl2 - firstDbl );
1
Mixed
Javascript
add glossary, some renames
ee8e721c33418368183aea7a397c6d3e0a73c613
<ide><path>packager/Glossary.md <add>Glossary <add>=== <add> <add>Terminology commonly used in React Native Packager / Metro Bundler is explained <add>here. This document is work in progress, please help completing it. <add> <add>## Build Root <add> <add>Configuration files (`rn-cli.config.js`) support configuring one or more roots <add>that are watched for file changes during development. In the context of the <add>integration with the `js_*` rule family in [Buck][], there is only a single root, <add>the build root used by Buck. <add> <add> <add>## Local Path <add> <add>A *local path* / `localPath` is the path to a file relative to a <add>[*build root*](#build-root). <add> <add> <add> <add>[Buck]: http://buckbuild.com/ <ide><path>packager/src/Bundler/index.js <ide> class Bundler { <ide> log(createActionEndEntry(transformingFilesLogEntry)); <ide> onResolutionResponse(response); <ide> <del> // get entry file complete path (`entryFile` is relative to roots) <add> // get entry file complete path (`entryFile` is a local path, i.e. relative to roots) <ide> let entryFilePath; <ide> if (response.dependencies.length > 1) { // skip HMR requests <ide> const numModuleSystemDependencies = <ide> class Bundler { <ide> const placeHolder = {}; <ide> dependencies.forEach(dep => { <ide> if (dep.isAsset()) { <del> const relPath = getPathRelativeToRoot( <add> const localPath = toLocalPath( <ide> this._projectRoots, <ide> dep.path <ide> ); <ide> promises.push( <del> this._assetServer.getAssetData(relPath, platform) <add> this._assetServer.getAssetData(localPath, platform) <ide> ); <ide> ret.push(placeHolder); <ide> } else { <ide> class Bundler { <ide> assetPlugins: Array<string>, <ide> platform: ?string = null, <ide> ) { <del> const relPath = getPathRelativeToRoot(this._projectRoots, module.path); <del> var assetUrlPath = joinPath('/assets', pathDirname(relPath)); <add> const localPath = toLocalPath(this._projectRoots, module.path); <add> var assetUrlPath = joinPath('/assets', pathDirname(localPath)); <ide> <ide> // On Windows, change backslashes to slashes to get proper URL path from file path. <ide> if (pathSeparator === '\\') { <ide> class Bundler { <ide> <ide> const isImage = isAssetTypeAnImage(extname(module.path).slice(1)); <ide> <del> return this._assetServer.getAssetData(relPath, platform).then(assetData => { <add> return this._assetServer.getAssetData(localPath, platform).then(assetData => { <ide> return Promise.all([isImage ? sizeOf(assetData.files[0]) : null, assetData]); <ide> }).then(res => { <ide> const dimensions = res[0]; <ide> class Bundler { <ide> <ide> } <ide> <del>function getPathRelativeToRoot(roots, absPath) { <add>function toLocalPath(roots, absPath) { <ide> for (let i = 0; i < roots.length; i++) { <del> const relPath = relativePath(roots[i], absPath); <del> if (relPath[0] !== '.') { <del> return relPath; <add> const localPath = relativePath(roots[i], absPath); <add> if (localPath[0] !== '.') { <add> return localPath; <ide> } <ide> } <ide> <ide><path>packager/src/lib/GlobalTransformCache.js <ide> class OptionsHasher { <ide> * This function is extra-conservative with how it hashes the transform <ide> * options. In particular: <ide> * <del> * * we need to hash paths relative to the root, not the absolute paths, <del> * otherwise everyone would have a different cache, defeating the <del> * purpose of global cache; <add> * * we need to hash paths as local paths, i.e. relative to the root, not <add> * the absolute paths, otherwise everyone would have a different cache, <add> * defeating the purpose of global cache; <ide> * * we need to reject any additional field we do not know of, because <ide> * they could contain absolute path, and we absolutely want to process <ide> * these. <ide> class OptionsHasher { <ide> +dev | +generateSourceMaps << 1 | +hot << 2 | +!!inlineRequires << 3, <ide> ])); <ide> hash.update(JSON.stringify(platform)); <del> let relativeBlacklist = []; <add> let blacklistWithLocalPaths = []; <ide> if (typeof inlineRequires === 'object') { <del> relativeBlacklist = this.relativizeFilePaths(Object.keys(inlineRequires.blacklist)); <add> blacklistWithLocalPaths = this.pathsToLocal(Object.keys(inlineRequires.blacklist)); <ide> } <del> const relativeProjectRoot = this.relativizeFilePath(projectRoot); <del> const optionTuple = [relativeBlacklist, relativeProjectRoot]; <add> const localProjectRoot = this.toLocalPath(projectRoot); <add> const optionTuple = [blacklistWithLocalPaths, localProjectRoot]; <ide> hash.update(JSON.stringify(optionTuple)); <ide> return hash; <ide> } <ide> <del> relativizeFilePaths(filePaths: Array<string>): Array<string> { <del> return filePaths.map(this.relativizeFilePath.bind(this)); <add> pathsToLocal(filePaths: Array<string>): Array<string> { <add> return filePaths.map(this.toLocalPath, this); <ide> } <ide> <del> relativizeFilePath(filePath: string): string { <add> toLocalPath(filePath: string): string { <ide> return path.relative(this._rootPath, filePath); <ide> } <ide> }
3
Go
Go
reduce the number of calls to b.image
52626bb9199ca3562fa70f14d8fc7b8c12c8b0f5
<ide><path>builder/dockerfile/builder.go <ide> func (b *Builder) build(stdout io.Writer, stderr io.Writer, out io.Writer) (stri <ide> return "", err <ide> } <ide> <del> shortImageID, err := b.dispatchDockerfileWithCancellation(dockerfile) <add> imageID, err := b.dispatchDockerfileWithCancellation(dockerfile) <ide> if err != nil { <ide> return "", err <ide> } <ide> <ide> b.warnOnUnusedBuildArgs() <ide> <del> if b.image == "" { <add> if imageID == "" { <ide> return "", errors.New("No image was generated. Is your Dockerfile empty?") <ide> } <ide> <ide> if b.options.Squash { <del> if err := b.squashBuild(); err != nil { <add> if imageID, err = b.squashBuild(imageID); err != nil { <ide> return "", err <ide> } <ide> } <ide> <del> fmt.Fprintf(b.Stdout, "Successfully built %s\n", shortImageID) <del> if err := b.tagImages(repoAndTags); err != nil { <add> fmt.Fprintf(b.Stdout, "Successfully built %s\n", stringid.TruncateID(imageID)) <add> if err := b.tagImages(imageID, repoAndTags); err != nil { <ide> return "", err <ide> } <del> return b.image, nil <add> return imageID, nil <ide> } <ide> <ide> func (b *Builder) dispatchDockerfileWithCancellation(dockerfile *parser.Result) (string, error) { <ide> // TODO: pass this to dispatchRequest instead <ide> b.escapeToken = dockerfile.EscapeToken <ide> <ide> total := len(dockerfile.AST.Children) <del> var shortImgID string <add> var imageID string <ide> for i, n := range dockerfile.AST.Children { <ide> select { <ide> case <-b.clientCtx.Done(): <ide> func (b *Builder) dispatchDockerfileWithCancellation(dockerfile *parser.Result) <ide> return "", err <ide> } <ide> <del> shortImgID = stringid.TruncateID(b.image) <del> fmt.Fprintf(b.Stdout, " ---> %s\n", shortImgID) <add> // TODO: get this from dispatch <add> imageID = b.image <add> <add> fmt.Fprintf(b.Stdout, " ---> %s\n", stringid.TruncateID(imageID)) <ide> if b.options.Remove { <ide> b.clearTmp() <ide> } <ide> func (b *Builder) dispatchDockerfileWithCancellation(dockerfile *parser.Result) <ide> return "", errors.Errorf("failed to reach build target %s in Dockerfile", b.options.Target) <ide> } <ide> <del> return shortImgID, nil <add> return imageID, nil <ide> } <ide> <del>func (b *Builder) squashBuild() error { <add>func (b *Builder) squashBuild(imageID string) (string, error) { <ide> var fromID string <ide> var err error <ide> if b.from != nil { <ide> fromID = b.from.ImageID() <ide> } <del> b.image, err = b.docker.SquashImage(b.image, fromID) <add> imageID, err = b.docker.SquashImage(imageID, fromID) <ide> if err != nil { <del> return errors.Wrap(err, "error squashing image") <add> return "", errors.Wrap(err, "error squashing image") <ide> } <del> return nil <add> return imageID, nil <ide> } <ide> <ide> func addNodesForLabelOption(dockerfile *parser.Node, labels map[string]string) { <ide> func (b *Builder) warnOnUnusedBuildArgs() { <ide> } <ide> } <ide> <del>func (b *Builder) tagImages(repoAndTags []reference.Named) error { <del> imageID := image.ID(b.image) <add>func (b *Builder) tagImages(id string, repoAndTags []reference.Named) error { <add> imageID := image.ID(id) <ide> for _, rt := range repoAndTags { <ide> if err := b.docker.TagImageWithReference(imageID, rt); err != nil { <ide> return err <ide><path>builder/dockerfile/dispatchers.go <ide> func workdir(req dispatchRequest) error { <ide> // We've already updated the runConfig and that's enough. <ide> return nil <ide> } <del> req.runConfig.Image = req.builder.image <ide> <ide> cmd := req.runConfig.Cmd <ide> comment := "WORKDIR " + req.runConfig.WorkingDir <ide><path>builder/dockerfile/dispatchers_test.go <ide> import ( <ide> "github.com/docker/docker/api/types/container" <ide> "github.com/docker/docker/api/types/strslice" <ide> "github.com/docker/docker/builder" <add> "github.com/docker/docker/pkg/testutil" <ide> "github.com/docker/go-connections/nat" <ide> "github.com/stretchr/testify/assert" <ide> "github.com/stretchr/testify/require" <del> "github.com/docker/docker/pkg/testutil" <ide> ) <ide> <ide> type commandWithFunction struct { <ide><path>builder/dockerfile/evaluator.go <ide> package dockerfile <ide> <ide> import ( <add> "bytes" <ide> "fmt" <ide> "strings" <del> "bytes" <ide> <ide> "github.com/docker/docker/api/types/container" <ide> "github.com/docker/docker/builder/dockerfile/command"
4
Ruby
Ruby
remove rexml security fix for rubies 1.8
2ba1f460008536c4d7a9fa1fba623a53e1b8aed1
<ide><path>activesupport/lib/active_support/core_ext/rexml.rb <del>require 'active_support/core_ext/kernel/reporting' <del> <del># Fixes the rexml vulnerability disclosed at: <del># http://www.ruby-lang.org/en/news/2008/08/23/dos-vulnerability-in-rexml/ <del># This fix is identical to rexml-expansion-fix version 1.0.1. <del># <del># We still need to distribute this fix because albeit the REXML <del># in recent 1.8.7s is patched, it wasn't in early patchlevels. <del>require 'rexml/rexml' <del> <del># Earlier versions of rexml defined REXML::Version, newer ones REXML::VERSION <del>unless (defined?(REXML::VERSION) ? REXML::VERSION : REXML::Version) > "3.1.7.2" <del> silence_warnings { require 'rexml/document' } <del> <del> # REXML in 1.8.7 has the patch but early patchlevels didn't update Version from 3.1.7.2. <del> unless REXML::Document.respond_to?(:entity_expansion_limit=) <del> silence_warnings { require 'rexml/entity' } <del> <del> module REXML #:nodoc: <del> class Entity < Child #:nodoc: <del> undef_method :unnormalized <del> def unnormalized <del> document.record_entity_expansion! if document <del> v = value() <del> return nil if v.nil? <del> @unnormalized = Text::unnormalize(v, parent) <del> @unnormalized <del> end <del> end <del> class Document < Element #:nodoc: <del> @@entity_expansion_limit = 10_000 <del> def self.entity_expansion_limit= val <del> @@entity_expansion_limit = val <del> end <del> <del> def record_entity_expansion! <del> @number_of_expansions ||= 0 <del> @number_of_expansions += 1 <del> if @number_of_expansions > @@entity_expansion_limit <del> raise "Number of entity expansions exceeded, processing aborted." <del> end <del> end <del> end <del> end <del> end <del>end <ide><path>activesupport/lib/active_support/ruby/shim.rb <ide> # Date next_year, next_month <ide> # DateTime to_date, to_datetime, xmlschema <ide> # Enumerable group_by, none? <del># REXML security fix <ide> # String ord <ide> # Time to_date, to_time, to_datetime <ide> require 'active_support' <ide> require 'active_support/core_ext/string/conversions' <ide> require 'active_support/core_ext/string/interpolation' <ide> require 'active_support/core_ext/string/encoding' <del>require 'active_support/core_ext/rexml' <ide> require 'active_support/core_ext/time/conversions'
2
PHP
PHP
add option description to the constructor docblock
d9a18ee0eb31fd13b30e81f748fe12e15d1c75fc
<ide><path>src/Http/ServerRequest.php <ide> public static function createFromGlobals() <ide> * - `input` The data that would come from php://input this is useful for simulating <ide> * requests with put, patch or delete data. <ide> * - `session` An instance of a Session object <add> * - `mergeFilesAsObjects` Whether to merge file uploads as objects (`true`) or arrays (`false`). <ide> * <ide> * @param string|array $config An array of request data to create a request with. <ide> * The string version of this argument is *deprecated* and will be removed in 4.0.0
1
Javascript
Javascript
add option in integration test
f668785bedeea5a05b4d148cd3aa3728c61c2e12
<ide><path>test/statsCases/simple-more-info/webpack.config.js <ide> module.exports = { <ide> cachedAssets: true, <ide> source: true, <ide> errorDetails: true, <del> publicPath: true <add> publicPath: true, <add> outputPath: true, <ide> } <ide> };
1
Java
Java
make abstractwebrequestmatchertests abstract
280a1b8880d400af5f4fc958296e53e2e308f4a5
<ide><path>spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/AbstractWebRequestMatcherTests.java <ide> * @author Sam Brannen <ide> * @since 4.2 <ide> */ <del>public class AbstractWebRequestMatcherTests { <add>abstract class AbstractWebRequestMatcherTests { <ide> <ide> protected void assertMatches(WebRequestMatcher matcher, String url) throws MalformedURLException { <ide> assertThat(matcher.matches(new WebRequest(new URL(url)))).isTrue();
1
Ruby
Ruby
stream blobs from disk in 5 mb chunks
5f2ee4c0bb790480a7032d1779052be2e1e46808
<ide><path>activestorage/lib/active_storage/service/disk_service.rb <ide> def download(key) <ide> if block_given? <ide> instrument :streaming_download, key: key do <ide> File.open(path_for(key), "rb") do |file| <del> while data = file.read(64.kilobytes) <add> while data = file.read(5.megabytes) <ide> yield data <ide> end <ide> end <ide><path>activestorage/test/models/blob_test.rb <ide> class UserWithHasOneAttachedDependentFalse < User <ide> end <ide> <ide> test "download yields chunks" do <del> blob = create_blob data: "a" * 75.kilobytes <add> blob = create_blob data: "a" * 5.0625.megabytes <ide> chunks = [] <ide> <ide> blob.download do |chunk| <ide> chunks << chunk <ide> end <ide> <ide> assert_equal 2, chunks.size <del> assert_equal "a" * 64.kilobytes, chunks.first <del> assert_equal "a" * 11.kilobytes, chunks.second <add> assert_equal "a" * 5.megabytes, chunks.first <add> assert_equal "a" * 64.kilobytes, chunks.second <ide> end <ide> <ide> test "urls expiring in 5 minutes" do
2
Javascript
Javascript
remove global variable
ccf94aa65aaa95426de31e05bc9eb1f88b3943cf
<ide><path>local-cli/bundle/buildBundle.js <ide> function buildBundle( <ide> blacklistRE: config.getBlacklistRE(), <ide> extraNodeModules: config.extraNodeModules, <ide> getTransformOptions: config.getTransformOptions, <add> globalTransformCache: null, <ide> projectRoots: config.getProjectRoots(), <ide> providesModuleNodeModules: providesModuleNodeModules, <ide> resetCache: args.resetCache, <ide><path>packager/react-packager/react-packager.js <ide> const Logger = require('./src/Logger'); <ide> const debug = require('debug'); <ide> const invariant = require('fbjs/lib/invariant'); <ide> <add>import type GlobalTransformCache from './src/lib/GlobalTransformCache'; <ide> import type {Reporter} from './src/lib/reporting'; <ide> <ide> exports.createServer = createServer; <ide> exports.Logger = Logger; <ide> <ide> type Options = { <add> globalTransformCache: ?GlobalTransformCache, <ide> nonPersistent: boolean, <ide> projectRoots: Array<string>, <ide> reporter?: Reporter, <ide> watch?: boolean, <ide> }; <ide> <ide> type StrictOptions = { <add> globalTransformCache: ?GlobalTransformCache, <ide> nonPersistent: boolean, <ide> projectRoots: Array<string>, <ide> reporter: Reporter, <ide><path>packager/react-packager/src/Bundler/index.js <ide> import type Module from '../node-haste/Module'; <ide> import type ResolutionResponse from '../node-haste/DependencyGraph/ResolutionResponse'; <ide> import type {Options as JSTransformerOptions, TransformOptions} from '../JSTransformer/worker/worker'; <ide> import type {Reporter} from '../lib/reporting'; <add>import type GlobalTransformCache from '../lib/GlobalTransformCache'; <ide> <ide> export type GetTransformOptions = ( <ide> mainModuleName: string, <ide> type Options = { <ide> cacheVersion: string, <ide> extraNodeModules: {}, <ide> getTransformOptions?: GetTransformOptions, <add> globalTransformCache: ?GlobalTransformCache, <ide> moduleFormat: string, <ide> platforms: Array<string>, <ide> polyfillModuleNames: Array<string>, <ide> class Bundler { <ide> blacklistRE: opts.blacklistRE, <ide> cache: this._cache, <ide> extraNodeModules: opts.extraNodeModules, <add> globalTransformCache: opts.globalTransformCache, <ide> minifyCode: this._transformer.minify, <ide> moduleFormat: opts.moduleFormat, <ide> platforms: opts.platforms, <ide><path>packager/react-packager/src/Resolver/index.js <ide> import type {Options as TransformOptions} from '../JSTransformer/worker/worker'; <ide> import type {Reporter} from '../lib/reporting'; <ide> import type {TransformCode} from '../node-haste/Module'; <ide> import type Cache from '../node-haste/Cache'; <add>import type GlobalTransformCache from '../lib/GlobalTransformCache'; <ide> <ide> type MinifyCode = (filePath: string, code: string, map: SourceMap) => <ide> Promise<{code: string, map: SourceMap}>; <ide> type Options = { <ide> blacklistRE?: RegExp, <ide> cache: Cache, <ide> extraNodeModules?: {}, <add> globalTransformCache: ?GlobalTransformCache, <ide> minifyCode: MinifyCode, <ide> platforms: Array<string>, <ide> polyfillModuleNames?: Array<string>, <ide> class Resolver { <ide> assetExts: opts.assetExts, <ide> cache: opts.cache, <ide> extraNodeModules: opts.extraNodeModules, <add> globalTransformCache: opts.globalTransformCache, <ide> ignoreFilePath: function(filepath) { <ide> return filepath.indexOf('__tests__') !== -1 || <ide> (opts.blacklistRE != null && opts.blacklistRE.test(filepath)); <ide><path>packager/react-packager/src/Server/index.js <ide> import type ResolutionResponse from '../node-haste/DependencyGraph/ResolutionRes <ide> import type Bundle from '../Bundler/Bundle'; <ide> import type {Reporter} from '../lib/reporting'; <ide> import type {GetTransformOptions} from '../Bundler'; <add>import type GlobalTransformCache from '../lib/GlobalTransformCache'; <ide> <ide> const { <ide> createActionStartEntry, <ide> type Options = { <ide> cacheVersion?: string, <ide> extraNodeModules?: {}, <ide> getTransformOptions?: GetTransformOptions, <add> globalTransformCache: ?GlobalTransformCache, <ide> moduleFormat?: string, <ide> platforms?: Array<string>, <ide> polyfillModuleNames?: Array<string>, <ide> class Server { <ide> cacheVersion: options.cacheVersion || '1.0', <ide> extraNodeModules: options.extraNodeModules || {}, <ide> getTransformOptions: options.getTransformOptions, <add> globalTransformCache: options.globalTransformCache, <ide> moduleFormat: options.moduleFormat != null ? options.moduleFormat : 'haste', <ide> platforms: options.platforms || defaults.platforms, <ide> polyfillModuleNames: options.polyfillModuleNames || [], <ide> class Server { <ide> const bundlerOpts = Object.create(this._opts); <ide> bundlerOpts.assetServer = this._assetServer; <ide> bundlerOpts.allowBundleUpdates = this._opts.watch; <add> bundlerOpts.globalTransformCache = options.globalTransformCache; <ide> bundlerOpts.watch = this._opts.watch; <ide> bundlerOpts.reporter = options.reporter; <ide> this._bundler = new Bundler(bundlerOpts); <ide><path>packager/react-packager/src/lib/GlobalTransformCache.js <ide> class TransformProfileSet { <ide> } <ide> } <ide> <del>/** <del> * One can enable the global cache by calling configure() from a custom CLI <del> * script. Eventually we may make it more flexible. <del> */ <ide> class GlobalTransformCache { <ide> <ide> _fetcher: KeyURIFetcher; <ide> _store: ?KeyResultStore; <ide> _profileSet: TransformProfileSet; <del> static _global: ?GlobalTransformCache; <ide> <add> /** <add> * For using the global cache one needs to have some kind of central key-value <add> * store that gets prefilled using keyOf() and the transformed results. The <add> * fetching function should provide a mapping of keys to URIs. The files <add> * referred by these URIs contains the transform results. Using URIs instead <add> * of returning the content directly allows for independent and parallel <add> * fetching of each result, that may be arbitrarily large JSON blobs. <add> */ <ide> constructor( <ide> fetchResultURIs: FetchResultURIs, <ide> storeResults: ?StoreResults, <ide> class GlobalTransformCache { <ide> } <ide> } <ide> <del> /** <del> * For using the global cache one needs to have some kind of central key-value <del> * store that gets prefilled using keyOf() and the transformed results. The <del> * fetching function should provide a mapping of keys to URIs. The files <del> * referred by these URIs contains the transform results. Using URIs instead <del> * of returning the content directly allows for independent fetching of each <del> * result. <del> */ <del> static configure( <del> fetchResultURIs: FetchResultURIs, <del> storeResults: ?StoreResults, <del> profiles: Iterable<TransformProfile>, <del> ) { <del> GlobalTransformCache._global = new GlobalTransformCache( <del> fetchResultURIs, <del> storeResults, <del> profiles, <del> ); <del> } <del> <del> static get() { <del> return GlobalTransformCache._global; <del> } <del> <ide> } <ide> <del>GlobalTransformCache._global = null; <del> <ide> module.exports = GlobalTransformCache; <ide><path>packager/react-packager/src/node-haste/Module.js <ide> <ide> 'use strict'; <ide> <del>const GlobalTransformCache = require('../lib/GlobalTransformCache'); <ide> const TransformCache = require('../lib/TransformCache'); <ide> <ide> const crypto = require('crypto'); <ide> const jsonStableStringify = require('json-stable-stringify'); <ide> const {join: joinPath, relative: relativePath, extname} = require('path'); <ide> <ide> import type {TransformedCode, Options as TransformOptions} from '../JSTransformer/worker/worker'; <add>import type GlobalTransformCache from '../lib/GlobalTransformCache'; <ide> import type {SourceMap} from '../lib/SourceMap'; <ide> import type {ReadTransformProps} from '../lib/TransformCache'; <ide> import type {Reporter} from '../lib/reporting'; <ide> export type Options = { <ide> }; <ide> <ide> export type ConstructorArgs = { <del> file: string, <del> moduleCache: ModuleCache, <ide> cache: Cache, <del> transformCode: ?TransformCode, <del> transformCacheKey: ?string, <ide> depGraphHelpers: DependencyGraphHelpers, <add> globalTransformCache: ?GlobalTransformCache, <add> file: string, <add> moduleCache: ModuleCache, <ide> options: Options, <ide> reporter: Reporter, <add> transformCacheKey: ?string, <add> transformCode: ?TransformCode, <ide> }; <ide> <ide> class Module { <ide> class Module { <ide> _depGraphHelpers: DependencyGraphHelpers; <ide> _options: Options; <ide> _reporter: Reporter; <add> _globalCache: ?GlobalTransformCache; <ide> <ide> _docBlock: Promise<{id?: string, moduleDocBlock: {[key: string]: mixed}}>; <ide> _readSourceCodePromise: Promise<string>; <ide> class Module { <ide> static _globalCacheRetries: number; <ide> <ide> constructor({ <del> file, <del> moduleCache, <ide> cache, <del> transformCode, <del> transformCacheKey, <ide> depGraphHelpers, <del> reporter, <add> file, <add> globalTransformCache, <add> moduleCache, <ide> options, <add> reporter, <add> transformCacheKey, <add> transformCode, <ide> }: ConstructorArgs) { <ide> if (!isAbsolutePath(file)) { <ide> throw new Error('Expected file to be absolute path but got ' + file); <ide> class Module { <ide> this._depGraphHelpers = depGraphHelpers; <ide> this._options = options || {}; <ide> this._reporter = reporter; <add> this._globalCache = globalTransformCache; <ide> <ide> this._readPromises = new Map(); <ide> } <ide> class Module { <ide> cacheProps: ReadTransformProps, <ide> callback: (error: ?Error, result: ?TransformedCode) => void, <ide> ) { <del> const globalCache = GlobalTransformCache.get(); <add> const {_globalCache} = this; <ide> const noMoreRetries = Module._globalCacheRetries <= 0; <del> if (globalCache == null || noMoreRetries) { <add> if (_globalCache == null || noMoreRetries) { <ide> this._transformCodeForCallback(cacheProps, callback); <ide> return; <ide> } <del> globalCache.fetch(cacheProps, (globalCacheError, globalCachedResult) => { <add> _globalCache.fetch(cacheProps, (globalCacheError, globalCachedResult) => { <ide> if (globalCacheError != null && Module._globalCacheRetries > 0) { <ide> this._reporter.update({ <ide> type: 'global_cache_error', <ide> class Module { <ide> } <ide> } <ide> if (globalCachedResult == null) { <del> this._transformAndStoreCodeGlobally(cacheProps, globalCache, callback); <add> this._transformAndStoreCodeGlobally(cacheProps, _globalCache, callback); <ide> return; <ide> } <ide> callback(undefined, globalCachedResult); <ide><path>packager/react-packager/src/node-haste/ModuleCache.js <ide> const Module = require('./Module'); <ide> const Package = require('./Package'); <ide> const Polyfill = require('./Polyfill'); <ide> <add>import type GlobalTransformCache from '../lib/GlobalTransformCache'; <ide> import type {Reporter} from '../lib/reporting'; <ide> import type Cache from './Cache'; <ide> import type DependencyGraphHelpers from './DependencyGraph/DependencyGraphHelpers'; <del>import type { <del> TransformCode, <del> Options as ModuleOptions, <del>} from './Module'; <add>import type {TransformCode, Options as ModuleOptions} from './Module'; <ide> <ide> type GetClosestPackageFn = (filePath: string) => ?string; <ide> <ide> class ModuleCache { <ide> _cache: Cache; <ide> _depGraphHelpers: DependencyGraphHelpers; <ide> _getClosestPackage: GetClosestPackageFn; <add> _globalTransformCache: ?GlobalTransformCache; <ide> _moduleCache: {[filePath: string]: Module}; <ide> _moduleOptions: ModuleOptions; <ide> _packageCache: {[filePath: string]: Package}; <ide> class ModuleCache { <ide> depGraphHelpers, <ide> extractRequires, <ide> getClosestPackage, <add> globalTransformCache, <ide> moduleOptions, <add> reporter, <ide> transformCacheKey, <ide> transformCode, <del> reporter, <ide> }: { <ide> assetDependencies: Array<string>, <ide> cache: Cache, <ide> depGraphHelpers: DependencyGraphHelpers, <ide> getClosestPackage: GetClosestPackageFn, <add> globalTransformCache: ?GlobalTransformCache, <ide> moduleOptions: ModuleOptions, <add> reporter: Reporter, <ide> transformCacheKey: string, <ide> transformCode: TransformCode, <del> reporter: Reporter, <ide> }, platforms: Set<string>) { <ide> this._assetDependencies = assetDependencies; <ide> this._getClosestPackage = getClosestPackage; <add> this._globalTransformCache = globalTransformCache; <ide> this._cache = cache; <ide> this._depGraphHelpers = depGraphHelpers; <ide> this._moduleCache = Object.create(null); <ide> class ModuleCache { <ide> getModule(filePath: string) { <ide> if (!this._moduleCache[filePath]) { <ide> this._moduleCache[filePath] = new Module({ <del> file: filePath, <del> moduleCache: this, <ide> cache: this._cache, <del> transformCode: this._transformCode, <del> transformCacheKey: this._transformCacheKey, <ide> depGraphHelpers: this._depGraphHelpers, <add> file: filePath, <add> globalTransformCache: this._globalTransformCache, <add> moduleCache: this, <ide> options: this._moduleOptions, <ide> reporter: this._reporter, <add> transformCacheKey: this._transformCacheKey, <add> transformCode: this._transformCode, <ide> }); <ide> } <ide> return this._moduleCache[filePath]; <ide><path>packager/react-packager/src/node-haste/index.js <ide> const { <ide> } = require('../Logger'); <ide> <ide> import type {Options as TransformOptions} from '../JSTransformer/worker/worker'; <add>import type GlobalTransformCache from '../lib/GlobalTransformCache'; <ide> import type {Reporter} from '../lib/reporting'; <ide> import type { <ide> Options as ModuleOptions, <ide> class DependencyGraph { <ide> extensions: Array<string>, <ide> extraNodeModules: ?Object, <ide> forceNodeFilesystemAPI: boolean, <add> globalTransformCache: ?GlobalTransformCache, <ide> ignoreFilePath: (filePath: string) => boolean, <ide> maxWorkers: ?number, <ide> mocksPattern: mixed, <ide> class DependencyGraph { <ide> extensions, <ide> extraNodeModules, <ide> forceNodeFilesystemAPI, <add> globalTransformCache, <ide> ignoreFilePath, <ide> maxWorkers, <ide> mocksPattern, <ide> class DependencyGraph { <ide> extensions?: ?Array<string>, <ide> extraNodeModules: ?Object, <ide> forceNodeFilesystemAPI?: boolean, <add> globalTransformCache: ?GlobalTransformCache, <ide> ignoreFilePath: (filePath: string) => boolean, <ide> maxWorkers?: ?number, <ide> mocksPattern?: mixed, <ide> class DependencyGraph { <ide> extensions: extensions || ['js', 'json'], <ide> extraNodeModules, <ide> forceNodeFilesystemAPI: !!forceNodeFilesystemAPI, <add> globalTransformCache, <ide> ignoreFilePath: ignoreFilePath || (() => {}), <ide> maxWorkers, <ide> mocksPattern, <ide> class DependencyGraph { <ide> <ide> this._moduleCache = new ModuleCache({ <ide> cache: this._cache, <add> globalTransformCache: this._opts.globalTransformCache, <ide> transformCode: this._opts.transformCode, <ide> transformCacheKey: this._opts.transformCacheKey, <ide> depGraphHelpers: this._helpers,
9
PHP
PHP
fix bug in update database grammar
c3c0fbce96b8a2a58d121ab4f7a48fb10d2ffb32
<ide><path>laravel/database/grammars/grammar.php <ide> public function update(Query $query, $values) <ide> { <ide> foreach ($values as $column => $value) <ide> { <del> $columns = $this->wrap($column).' = '.$this->parameter($value); <add> $columns[] = $this->wrap($column).' = '.$this->parameter($value); <ide> } <ide> <add> $columns = implode(', ', $columns); <add> <ide> return trim('UPDATE '.$this->wrap($query->from).' SET '.$columns.' '.$this->wheres($query)); <ide> } <ide>
1
Text
Text
fix readme titles
414a22d38eeee5ffee941a85b4257537d668aab4
<ide><path>examples/nested-components/README.md <ide> <del># Redux example <add># Example app using nested components <ide> <ide> ## How to use <ide> <ide><path>examples/with-styled-components/README.md <ide> <del># Redux example <add># Example app with styled-components <ide> <ide> ## How to use <ide>
2
Ruby
Ruby
enforce gnome urls
26d1683039508647de1adbe675cafb507216bcf1
<ide><path>Library/Homebrew/cmd/audit.rb <ide> def audit_urls <ide> problem "Please use https:// for #{p}" <ide> when %r[^http://search\.mcpan\.org/CPAN/(.*)]i <ide> problem "#{p} should be `https://cpan.metacpan.org/#{$1}`" <add> when %r[^(http|ftp)://ftp\.gnome\.org/pub/gnome/(.*)]i <add> problem "#{p} should be `https://download.gnome.org/#{$2}`" <ide> end <ide> end <ide>
1
Javascript
Javascript
reset bind state before emitting error
99e874e545b7c69bbd22c93b7546037290a727d3
<ide><path>lib/dgram.js <ide> Socket.prototype.bind = function(port_, address_ /* , callback */) { <ide> }, (err) => { <ide> // Callback to handle error. <ide> const ex = errnoException(err, 'open'); <del> this.emit('error', ex); <ide> state.bindState = BIND_STATE_UNBOUND; <add> this.emit('error', ex); <ide> }); <ide> return this; <ide> } <ide> Socket.prototype.bind = function(port_, address_ /* , callback */) { <ide> }, (err) => { <ide> // Callback to handle error. <ide> const ex = exceptionWithHostPort(err, 'bind', ip, port); <del> this.emit('error', ex); <ide> state.bindState = BIND_STATE_UNBOUND; <add> this.emit('error', ex); <ide> }); <ide> } else { <ide> if (!state.handle) <ide> Socket.prototype.bind = function(port_, address_ /* , callback */) { <ide> const err = state.handle.bind(ip, port || 0, flags); <ide> if (err) { <ide> const ex = exceptionWithHostPort(err, 'bind', ip, port); <del> this.emit('error', ex); <ide> state.bindState = BIND_STATE_UNBOUND; <add> this.emit('error', ex); <ide> // Todo: close? <ide> return; <ide> }
1
Text
Text
post about 0.10.4
56e90dacb39f36a02c2b7b4e473ada6bc913c8bf
<ide><path>doc/blog/release/v0.10.4.md <add>date: Thu Apr 11 10:52:56 PDT 2013 <add>version: 0.10.4 <add>category: release <add>title: Node v0.10.4 (Stable) <add>slug: node-v0-10-4-stable <add> <add>2013.04.11, Version 0.10.4 (Stable) <add> <add>* uv: Upgrade to 0.10.4 <add> <add>* npm: Upgrade to 1.2.18 <add> <add>* v8: Avoid excessive memory growth in JSON.parse (Fedor Indutny) <add> <add>* child_process, cluster: fix O(n*m) scan of cmd string (Ben Noordhuis) <add> <add>* net: fix socket.bytesWritten Buffers support (Fedor Indutny) <add> <add>* buffer: fix offset checks (Łukasz Walukiewicz) <add> <add>* stream: call write cb before finish event (isaacs) <add> <add>* http: Support write(data, 'hex') (isaacs) <add> <add>* crypto: dh secret should be left-padded (Fedor Indutny) <add> <add>* process: expose NODE_MODULE_VERSION in process.versions (Rod Vagg) <add> <add>* crypto: fix constructor call in crypto streams (Andreas Madsen) <add> <add>* net: account for encoding in .byteLength (Fedor Indutny) <add> <add>* net: fix buffer iteration in bytesWritten (Fedor Indutny) <add> <add>* crypto: zero is not an error if writing 0 bytes (Fedor Indutny) <add> <add>* tls: Re-enable check of CN-ID in cert verification (Tobias Müllerleile) <add> <add> <add>Source Code: http://nodejs.org/dist/v0.10.4/node-v0.10.4.tar.gz <add> <add>Macintosh Installer (Universal): http://nodejs.org/dist/v0.10.4/node-v0.10.4.pkg <add> <add>Windows Installer: http://nodejs.org/dist/v0.10.4/node-v0.10.4-x86.msi <add> <add>Windows x64 Installer: http://nodejs.org/dist/v0.10.4/x64/node-v0.10.4-x64.msi <add> <add>Windows x64 Files: http://nodejs.org/dist/v0.10.4/x64/ <add> <add>Linux 32-bit Binary: http://nodejs.org/dist/v0.10.4/node-v0.10.4-linux-x86.tar.gz <add> <add>Linux 64-bit Binary: http://nodejs.org/dist/v0.10.4/node-v0.10.4-linux-x64.tar.gz <add> <add>Solaris 32-bit Binary: http://nodejs.org/dist/v0.10.4/node-v0.10.4-sunos-x86.tar.gz <add> <add>Solaris 64-bit Binary: http://nodejs.org/dist/v0.10.4/node-v0.10.4-sunos-x64.tar.gz <add> <add>Other release files: http://nodejs.org/dist/v0.10.4/ <add> <add>Website: http://nodejs.org/docs/v0.10.4/ <add> <add>Documentation: http://nodejs.org/docs/v0.10.4/api/ <add> <add>Shasums: <add> <add>``` <add>0bebde7d5d698e93fd96ad1b5d223166cd0c5892 node-v0.10.4-darwin-x64.tar.gz <add>8d847a68f8178b102c72c3f35861f496e12fe455 node-v0.10.4-darwin-x86.tar.gz <add>28e3a4d2702a13454a3c1d9e1035ee07ef8764bc node-v0.10.4-linux-x64.tar.gz <add>839be3dfe4504072e372b2a3f597e0b0f4e26331 node-v0.10.4-linux-x86.tar.gz <add>94d68094afacb70b71a3393f07f81eff6e8a14f1 node-v0.10.4-sunos-x64.tar.gz <add>6b287dcdb9498cb7d59acbab8faaea4455ffe2c4 node-v0.10.4-sunos-x86.tar.gz <add>1863868f40d4e3af876d21976d9b06a9e99d1dcf node-v0.10.4-x86.msi <add>bafb80cff0ada4cdfd98c917459d627d7df408d5 node-v0.10.4.pkg <add>901c1410b7c28a79644292567d3384255f3a6274 node-v0.10.4.tar.gz <add>73b5f6eaea8417f4b937bf99812263dc170696e0 node.exe <add>85064a019b8e6416152ae609ace81469331f773c node.exp <add>e5b26b8480c3979ddab5ea3bf6bfb0fbef9ecb54 node.lib <add>0098965a1a2206a1fc148ab776d182018b80d0ba node.pdb <add>31bd64f33436fa543f0599f80c5df97c14b10224 x64/node-v0.10.4-x64.msi <add>8280dbeb5a1296fe3496f57376a619467c4c6263 x64/node.exe <add>e317e0db2693e42851f3774a20dc98e02a9a90fe x64/node.exp <add>7f0aa389465ac7983a4c099671bb52c7a6988676 x64/node.lib <add>a7fb9a08d6337225dd8c5b1db5fb95a2f39fd773 x64/node.pdb <add>```
1
Mixed
Ruby
remove non-default serializers
3785a5729959a838bb13f2d298a59e12e1844f74
<ide><path>activejob/README.md <ide> That's it! <ide> ActiveJob supports the following types of arguments by default: <ide> <ide> - Standard types (`NilClass`, `String`, `Integer`, `Fixnum`, `Bignum`, `Float`, `BigDecimal`, `TrueClass`, `FalseClass`) <del> - `Symbol` (`:foo`, `:bar`, ...) <del> - `ActiveSupport::Duration` (`1.day`, `2.weeks`, ...) <del> - Classes constants (`ActiveRecord::Base`, `MySpecialService`, ...) <del> - Struct instances (`Struct.new('Rectangle', :width, :height).new(12, 20)`, ...) <ide> - `Hash`. Keys should be of `String` or `Symbol` type <ide> - `ActiveSupport::HashWithIndifferentAccess` <ide> - `Array` <ide><path>activejob/lib/active_job/serializers.rb <ide> module Serializers <ide> <ide> autoload :ArraySerializer <ide> autoload :BaseSerializer <del> autoload :ClassSerializer <del> autoload :DurationSerializer <ide> autoload :GlobalIDSerializer <ide> autoload :HashWithIndifferentAccessSerializer <ide> autoload :HashSerializer <ide> autoload :ObjectSerializer <ide> autoload :StandardTypeSerializer <del> autoload :StructSerializer <del> autoload :SymbolSerializer <ide> <ide> included do <ide> class_attribute :_additional_serializers, instance_accessor: false, instance_predicate: false <ide> module Serializers <ide> module ClassMethods <ide> # Returns list of known serializers <ide> def serializers <del> self._additional_serializers + SERIALIZERS <add> self._additional_serializers + ActiveJob::Serializers::SERIALIZERS <ide> end <ide> <ide> # Adds a new serializer to a list of known serializers <del> def add_serializers(*serializers) <del> check_duplicate_serializer_keys!(serializers) <add> def add_serializers(*new_serializers) <add> check_duplicate_serializer_keys!(new_serializers) <ide> <del> @_additional_serializers = serializers + @_additional_serializers <add> self._additional_serializers = new_serializers + self._additional_serializers <ide> end <ide> <ide> # Returns a list of reserved keys, which cannot be used as keys for a hash <ide> def reserved_serializers_keys <ide> def check_duplicate_serializer_keys!(serializers) <ide> keys_to_add = serializers.select { |s| s.respond_to?(:key) }.map(&:key) <ide> <del> duplicate_keys = reserved_keys & keys_to_add <add> duplicate_keys = reserved_serializers_keys & keys_to_add <ide> <ide> raise ArgumentError.new("Can't add serializers because of keys duplication: #{duplicate_keys}") if duplicate_keys.any? <ide> end <ide> def check_duplicate_serializer_keys!(serializers) <ide> # :nodoc: <ide> SERIALIZERS = [ <ide> ::ActiveJob::Serializers::GlobalIDSerializer, <del> ::ActiveJob::Serializers::DurationSerializer, <del> ::ActiveJob::Serializers::StructSerializer, <del> ::ActiveJob::Serializers::SymbolSerializer, <del> ::ActiveJob::Serializers::ClassSerializer, <ide> ::ActiveJob::Serializers::StandardTypeSerializer, <ide> ::ActiveJob::Serializers::HashWithIndifferentAccessSerializer, <ide> ::ActiveJob::Serializers::HashSerializer, <ide> ::ActiveJob::Serializers::ArraySerializer <ide> ].freeze <del> private_constant :SERIALIZERS <ide> <ide> class << self <ide> # Returns serialized representative of the passed object. <ide> # Will look up through all known serializers. <del> # Raises `SerializationError` if it can't find a proper serializer. <add> # Raises `ActiveJob::SerializationError` if it can't find a proper serializer. <ide> def serialize(argument) <ide> serializer = ::ActiveJob::Base.serializers.detect { |s| s.serialize?(argument) } <ide> raise SerializationError.new("Unsupported argument type: #{argument.class.name}") unless serializer <ide><path>activejob/lib/active_job/serializers/class_serializer.rb <del># frozen_string_literal: true <del> <del>module ActiveJob <del> module Serializers <del> # Provides methods to serialize and deserialize `Class` (`ActiveRecord::Base`, `MySpecialService`, ...) <del> class ClassSerializer < ObjectSerializer <del> class << self <del> def serialize(argument_klass) <del> { key => "::#{argument_klass.name}" } <del> end <del> <del> def key <del> "_aj_class" <del> end <del> <del> private <del> <del> def klass <del> ::Class <del> end <del> end <del> end <del> end <del>end <ide><path>activejob/lib/active_job/serializers/duration_serializer.rb <del># frozen_string_literal: true <del> <del>module ActiveJob <del> module Serializers <del> # Provides methods to serialize and deserialize `ActiveSupport::Duration` (`1.day`, `2.weeks`, ...) <del> class DurationSerializer < ObjectSerializer <del> class << self <del> def serialize(duration) <del> { <del> key => duration.value, <del> parts_key => ::ActiveJob::Serializers.serialize(duration.parts) <del> } <del> end <del> <del> def deserialize(hash) <del> value = hash[key] <del> parts = ::ActiveJob::Serializers.deserialize(hash[parts_key]) <del> <del> klass.new(value, parts) <del> end <del> <del> def key <del> "_aj_activesupport_duration" <del> end <del> <del> private <del> <del> def klass <del> ::ActiveSupport::Duration <del> end <del> <del> def keys <del> super.push parts_key <del> end <del> <del> def parts_key <del> "parts" <del> end <del> end <del> end <del> end <del>end <ide><path>activejob/lib/active_job/serializers/struct_serializer.rb <del># frozen_string_literal: true <del> <del>module ActiveJob <del> module Serializers <del> # Provides methods to serialize and deserialize struct instances <del> # (`Struct.new('Rectangle', :width, :height).new(12, 20)`) <del> class StructSerializer < ObjectSerializer <del> class << self <del> def serialize(object) <del> super.merge values_key => ::ActiveJob::Serializers.serialize(object.values) <del> end <del> <del> def deserialize(hash) <del> values = ::ActiveJob::Serializers.deserialize(hash[values_key]) <del> super.new(*values) <del> end <del> <del> def key <del> "_aj_struct" <del> end <del> <del> private <del> <del> def klass <del> ::Struct <del> end <del> <del> def keys <del> super.push values_key <del> end <del> <del> def values_key <del> "values" <del> end <del> end <del> end <del> end <del>end <ide><path>activejob/lib/active_job/serializers/symbol_serializer.rb <del># frozen_string_literal: true <del> <del>module ActiveJob <del> module Serializers <del> # Provides methods to serialize and deserialize `Symbol` (`:foo`, `:bar`, ...) <del> class SymbolSerializer < ObjectSerializer <del> class << self <del> def serialize(symbol) <del> { key => symbol.to_s } <del> end <del> <del> def deserialize(hash) <del> hash[key].to_sym <del> end <del> <del> def key <del> "_aj_symbol" <del> end <del> <del> private <del> <del> def klass <del> ::Symbol <del> end <del> end <del> end <del> end <del>end <ide><path>activejob/lib/rails/generators/job/job_generator.rb <ide> def create_job_file <ide> private <ide> def application_job_file_name <ide> @application_job_file_name ||= if mountable_engine? <del> "app/jobs/#{namespaced_path}/application_job.rb" <add> "app/jobs/#{namespaced_path}/application_job.rb" <ide> else <ide> "app/jobs/application_job.rb" <ide> end <ide><path>activejob/test/cases/argument_serialization_test.rb <ide> require "active_job/arguments" <ide> require "models/person" <ide> require "active_support/core_ext/hash/indifferent_access" <del>require "active_support/duration" <ide> require "jobs/kwargs_job" <ide> <ide> class ArgumentSerializationTest < ActiveSupport::TestCase <ide> class ArgumentSerializationTest < ActiveSupport::TestCase <ide> <ide> [ nil, 1, 1.0, 1_000_000_000_000_000_000_000, <ide> "a", true, false, BigDecimal.new(5), <del> :a, self, 1.day, <ide> [ 1, "a" ], <ide> { "a" => 1 } <ide> ].each do |arg| <ide> class ArgumentSerializationTest < ActiveSupport::TestCase <ide> end <ide> end <ide> <del> [ Object.new, Person.find("5").to_gid ].each do |arg| <add> [ :a, Object.new, self, Person.find("5").to_gid ].each do |arg| <ide> test "does not serialize #{arg.class}" do <ide> assert_raises ActiveJob::SerializationError do <ide> ActiveJob::Arguments.serialize [ arg ] <ide> class ArgumentSerializationTest < ActiveSupport::TestCase <ide> end <ide> end <ide> <del> test "serializes Struct" do <del> assert_arguments_unchanged Struct.new("Rectangle", :width, :height).new(10, 15) <del> end <del> <ide> test "should convert records to Global IDs" do <ide> assert_arguments_roundtrip [@person] <ide> end <ide><path>activejob/test/cases/serializers_test.rb <add># frozen_string_literal: true <add> <add>require "helper" <add>require "active_job/serializers" <add> <add>class SerializersTest < ActiveSupport::TestCase <add> class DummyValueObject <add> attr_accessor :value <add> <add> def initialize(value) <add> @value = value <add> end <add> end <add> <add> class DummySerializer < ActiveJob::Serializers::ObjectSerializer <add> class << self <add> def serialize(object) <add> { key => object.value } <add> end <add> <add> def deserialize(hash) <add> DummyValueObject.new(hash[key]) <add> end <add> <add> def key <add> "_dummy_serializer" <add> end <add> <add> private <add> <add> def klass <add> DummyValueObject <add> end <add> end <add> end <add> <add> setup do <add> @value_object = DummyValueObject.new 123 <add> ActiveJob::Base._additional_serializers = [] <add> end <add> <add> test "can't serialize unknown object" do <add> assert_raises ActiveJob::SerializationError do <add> ActiveJob::Serializers.serialize @value_object <add> end <add> end <add> <add> test "won't deserialize unknown hash" do <add> hash = { "_dummy_serializer" => 123, "_aj_symbol_keys" => [] } <add> assert ActiveJob::Serializers.deserialize(hash), hash.except("_aj_symbol_keys") <add> end <add> <add> test "adds new serializer" do <add> ActiveJob::Base.add_serializers DummySerializer <add> assert ActiveJob::Base.serializers.include?(DummySerializer) <add> end <add> <add> test "can't add serializer with the same key twice" do <add> ActiveJob::Base.add_serializers DummySerializer <add> assert_raises ArgumentError do <add> ActiveJob::Base.add_serializers DummySerializer <add> end <add> end <add>end <ide><path>guides/source/active_job_basics.md <ide> Supported types for arguments <ide> ActiveJob supports the following types of arguments by default: <ide> <ide> - Basic types (`NilClass`, `String`, `Integer`, `Fixnum`, `Bignum`, `Float`, `BigDecimal`, `TrueClass`, `FalseClass`) <del> - `Symbol` (`:foo`, `:bar`, ...) <del> - `ActiveSupport::Duration` (`1.day`, `2.weeks`, ...) <del> - Classes constants (`ActiveRecord::Base`, `MySpecialService`, ...) <del> - Struct instances (`Struct.new('Rectangle', :width, :height).new(12, 20)`, ...) <ide> - `Hash`. Keys should be of `String` or `Symbol` type <ide> - `ActiveSupport::HashWithIndifferentAccess` <ide> - `Array`
10
Javascript
Javascript
add type for resource and context
a96ac96780a34a8b2b2a42b919ba66c7efc9f673
<ide><path>lib/IgnorePlugin.js <ide> class IgnorePlugin { <ide> } <ide> <ide> /** <del> * @param {TODO} resource resource <add> * @param {string} resource resource <ide> * @returns {boolean} returns true if a "resourceRegExp" exists <ide> * and the resource given matches the regexp. <ide> */ <ide> class IgnorePlugin { <ide> } <ide> <ide> /** <del> * @param {TODO} context context <add> * @param {string} context context <ide> * @returns {boolean} returns true if "contextRegExp" does not exist <ide> * or if context matches the given regexp. <ide> */
1
Text
Text
remove wrong escapes
ab05d43083fd5f4dafbe9d10442d265a52833b3f
<ide><path>doc/changelogs/CHANGELOG_V10.md <ide> This release patches a [regression](https://github.com/nodejs/node/issues/28932) <ide> ### Notable changes <ide> <ide> * **deps**: upgrade openssl sources to 1.1.1c (Sam Roberts) [#28212](https://github.com/nodejs/node/pull/28212) <del>* **stream**: do not unconditionally call `\_read()` on `resume()` (Anna Henningsen) [#26965](https://github.com/nodejs/node/pull/26965) <add>* **stream**: do not unconditionally call `_read()` on `resume()` (Anna Henningsen) [#26965](https://github.com/nodejs/node/pull/26965) <ide> * **worker**: fix nullptr deref after MessagePort deser failure (Anna Henningsen) [#25076](https://github.com/nodejs/node/pull/25076) <ide> <ide> ### Commits <ide> This release patches a [regression](https://github.com/nodejs/node/issues/28932) <ide> * [[`0dee607409`](https://github.com/nodejs/node/commit/0dee607409)] - **src**: extract common Bind method (Jon Moss) [#22315](https://github.com/nodejs/node/pull/22315) <ide> * [[`08a32fbf57`](https://github.com/nodejs/node/commit/08a32fbf57)] - **src**: elevate v8 namespaces for node\_process.cc (Jayasankar) [#24578](https://github.com/nodejs/node/pull/24578) <ide> * [[`f3841c6750`](https://github.com/nodejs/node/commit/f3841c6750)] - **stream**: convert existing buffer when calling .setEncoding (Anna Henningsen) [#27936](https://github.com/nodejs/node/pull/27936) <del>* [[`274b97c4ea`](https://github.com/nodejs/node/commit/274b97c4ea)] - **stream**: do not unconditionally call `\_read()` on `resume()` (Anna Henningsen) [#26965](https://github.com/nodejs/node/pull/26965) <add>* [[`274b97c4ea`](https://github.com/nodejs/node/commit/274b97c4ea)] - **stream**: do not unconditionally call `_read()` on `resume()` (Anna Henningsen) [#26965](https://github.com/nodejs/node/pull/26965) <ide> * [[`044e753aaf`](https://github.com/nodejs/node/commit/044e753aaf)] - **stream**: make \_read() be called indefinitely if the user wants so (Matteo Collina) [#26135](https://github.com/nodejs/node/pull/26135) <ide> * [[`f332265cda`](https://github.com/nodejs/node/commit/f332265cda)] - **test**: remove `util.inherits()` usage (ZYSzys) [#25245](https://github.com/nodejs/node/pull/25245) <ide> * [[`ada0ed55d1`](https://github.com/nodejs/node/commit/ada0ed55d1)] - **test**: fix pty test hangs on aix (Ben Noordhuis) [#28600](https://github.com/nodejs/node/pull/28600) <ide> This release patches a [regression](https://github.com/nodejs/node/issues/28932) <ide> * [[`5631d7a6e0`](https://github.com/nodejs/node/commit/5631d7a6e0)] - **doc**: add metadata about ecdh curve options (Sam Roberts) [#25502](https://github.com/nodejs/node/pull/25502) <ide> * [[`5c602dabc4`](https://github.com/nodejs/node/commit/5c602dabc4)] - **doc**: add TLSSocket.isSessionReused() docs (Sam Roberts) [#25423](https://github.com/nodejs/node/pull/25423) <ide> * [[`07f878b0c1`](https://github.com/nodejs/node/commit/07f878b0c1)] - **doc**: fix sorting in buffer.md (Vse Mozhet Byt) [#25477](https://github.com/nodejs/node/pull/25477) <del>* [[`9dffc2ba0c`](https://github.com/nodejs/node/commit/9dffc2ba0c)] - **doc**: fix `napi\_open\_callback\_scope` description (Philipp Renoth) [#25366](https://github.com/nodejs/node/pull/25366) <add>* [[`9dffc2ba0c`](https://github.com/nodejs/node/commit/9dffc2ba0c)] - **doc**: fix `napi_open_callback_scope` description (Philipp Renoth) [#25366](https://github.com/nodejs/node/pull/25366) <ide> * [[`0c33ecb2bd`](https://github.com/nodejs/node/commit/0c33ecb2bd)] - **doc**: document that stream.on('close') was changed in Node 10 (Matteo Collina) [#25413](https://github.com/nodejs/node/pull/25413) <ide> * [[`8f0fa61406`](https://github.com/nodejs/node/commit/8f0fa61406)] - **doc**: fix the path to postMessage() (Mitar) [#25332](https://github.com/nodejs/node/pull/25332) <ide> * [[`3a30c87e88`](https://github.com/nodejs/node/commit/3a30c87e88)] - **doc**: update `os.networkInterfaces()` example (jvelezpo) [#25417](https://github.com/nodejs/node/pull/25417) <ide> This release patches a [regression](https://github.com/nodejs/node/issues/28932) <ide> * [[`378d4f18f1`](https://github.com/nodejs/node/commit/378d4f18f1)] - **http**: remove unused variable in \_http\_server.js (gengjiawen) [#26407](https://github.com/nodejs/node/pull/26407) <ide> * [[`cb88c58e42`](https://github.com/nodejs/node/commit/cb88c58e42)] - **http**: check for existance in resetHeadersTimeoutOnReqEnd (Matteo Collina) [#26402](https://github.com/nodejs/node/pull/26402) <ide> * [[`277271c4a9`](https://github.com/nodejs/node/commit/277271c4a9)] - **http**: send connection: close when closing conn (Yann Hamon) [#26467](https://github.com/nodejs/node/pull/26467) <del>* [[`decba1c59b`](https://github.com/nodejs/node/commit/decba1c59b)] - **http2**: allow fully synchronous `\_final()` (Anna Henningsen) [#25609](https://github.com/nodejs/node/pull/25609) <add>* [[`decba1c59b`](https://github.com/nodejs/node/commit/decba1c59b)] - **http2**: allow fully synchronous `_final()` (Anna Henningsen) [#25609](https://github.com/nodejs/node/pull/25609) <ide> * [[`ba6829d1b8`](https://github.com/nodejs/node/commit/ba6829d1b8)] - **http2**: add test case for goaway (Anto Aravinth) [#24054](https://github.com/nodejs/node/pull/24054) <ide> * [[`91b1b2cf84`](https://github.com/nodejs/node/commit/91b1b2cf84)] - **http2**: delete unused enum in node\_http2.h (gengjiawen) [#26704](https://github.com/nodejs/node/pull/26704) <ide> * [[`59b348e0e4`](https://github.com/nodejs/node/commit/59b348e0e4)] - **http2**: `Http2ServerResponse.end()` should always return self (Robert Nagy) [#24346](https://github.com/nodejs/node/pull/24346) <ide> This release patches a [regression](https://github.com/nodejs/node/issues/28932) <ide> * [[`b9188d473b`](https://github.com/nodejs/node/commit/b9188d473b)] - **(SEMVER-MINOR)** **repl**: support top-level for-await-of (Shelley Vohr) [#23841](https://github.com/nodejs/node/pull/23841) <ide> * [[`b9ea23c0ed`](https://github.com/nodejs/node/commit/b9ea23c0ed)] - **src**: add WeakReference utility (Anna Henningsen) [#25993](https://github.com/nodejs/node/pull/25993) <ide> * [[`57469e62d9`](https://github.com/nodejs/node/commit/57469e62d9)] - **src**: extract common sockaddr creation code (Daniel Bevenius) [#26070](https://github.com/nodejs/node/pull/26070) <del>* [[`bc5e04b5f7`](https://github.com/nodejs/node/commit/bc5e04b5f7)] - **src**: fix race condition in `\~NodeTraceBuffer` (Anna Henningsen) [#25896](https://github.com/nodejs/node/pull/25896) <add>* [[`bc5e04b5f7`](https://github.com/nodejs/node/commit/bc5e04b5f7)] - **src**: fix race condition in `~NodeTraceBuffer` (Anna Henningsen) [#25896](https://github.com/nodejs/node/pull/25896) <ide> * [[`51ec21cb17`](https://github.com/nodejs/node/commit/51ec21cb17)] - **src**: remove unused field in node\_http2.h (gengjiawen) [#25727](https://github.com/nodejs/node/pull/25727) <ide> * [[`550af6d72f`](https://github.com/nodejs/node/commit/550af6d72f)] - **src**: remove unnecessary call to SSL\_get\_mode (Sam Roberts) [#25711](https://github.com/nodejs/node/pull/25711) <ide> * [[`b31035d0b3`](https://github.com/nodejs/node/commit/b31035d0b3)] - **src**: fix macro duplicate declaration in env.h (gengjiawen) [#25703](https://github.com/nodejs/node/pull/25703) <del>* [[`cd4a932af3`](https://github.com/nodejs/node/commit/cd4a932af3)] - **src**: remove outdated `Neuter()` call in `node\_buffer.cc` (Anna Henningsen) [#25479](https://github.com/nodejs/node/pull/25479) <add>* [[`cd4a932af3`](https://github.com/nodejs/node/commit/cd4a932af3)] - **src**: remove outdated `Neuter()` call in `node_buffer.cc` (Anna Henningsen) [#25479](https://github.com/nodejs/node/pull/25479) <ide> * [[`883d61c7ae`](https://github.com/nodejs/node/commit/883d61c7ae)] - **src**: trace\_events: fix race with metadata events (Ali Ijaz Sheikh) [#25235](https://github.com/nodejs/node/pull/25235) <ide> * [[`7655253251`](https://github.com/nodejs/node/commit/7655253251)] - **src**: remove unused method declaration (Ben Noordhuis) [#25329](https://github.com/nodejs/node/pull/25329) <ide> * [[`f5e4a1e9d8`](https://github.com/nodejs/node/commit/f5e4a1e9d8)] - **src**: remove unused variable from string\_search.h (Anna Henningsen) [#25139](https://github.com/nodejs/node/pull/25139) <ide> This release patches a [regression](https://github.com/nodejs/node/issues/28932) <ide> * [[`e418b4f650`](https://github.com/nodejs/node/commit/e418b4f650)] - **src**: fix if indent in node\_http2.cc (gengjiawen) [#26396](https://github.com/nodejs/node/pull/26396) <ide> * [[`0bff833df9`](https://github.com/nodejs/node/commit/0bff833df9)] - **src**: remove unused struct in test\_inspector\_socket.cc (gengjiawen) [#26284](https://github.com/nodejs/node/pull/26284) <ide> * [[`281eb0f928`](https://github.com/nodejs/node/commit/281eb0f928)] - **src**: extra-semi warning in node\_platform.h (Jeremy Apthorp) [#26330](https://github.com/nodejs/node/pull/26330) <del>* [[`0fa3a512c1`](https://github.com/nodejs/node/commit/0fa3a512c1)] - **src**: reduce to simple `const char\*` in OptionsParser (ZYSzys) [#26297](https://github.com/nodejs/node/pull/26297) <add>* [[`0fa3a512c1`](https://github.com/nodejs/node/commit/0fa3a512c1)] - **src**: reduce to simple `const char*` in OptionsParser (ZYSzys) [#26297](https://github.com/nodejs/node/pull/26297) <ide> * [[`44fd3a2fce`](https://github.com/nodejs/node/commit/44fd3a2fce)] - **src**: remove already elevated Isolate namespce (Juan José Arboleda) [#26294](https://github.com/nodejs/node/pull/26294) <ide> * [[`5cd96b367b`](https://github.com/nodejs/node/commit/5cd96b367b)] - **src**: avoid race condition in tracing code (Anna Henningsen) [#25624](https://github.com/nodejs/node/pull/25624) <ide> * [[`452b6aad5a`](https://github.com/nodejs/node/commit/452b6aad5a)] - **src**: remove redundant cast in PipeWrap::Fchmod (gengjiawen) [#26242](https://github.com/nodejs/node/pull/26242) <ide> A fix for the following CVE is included in this release: <ide> * [[`fa52ba621b`](https://github.com/nodejs/node/commit/fa52ba621b)] - **src**: elevate v8 namespaces of referenced artifacts (Kanika Singhal) [#24424](https://github.com/nodejs/node/pull/24424) <ide> * [[`9a69d030ce`](https://github.com/nodejs/node/commit/9a69d030ce)] - **src**: reuse std::make\_unique (alyssaq) [#24132](https://github.com/nodejs/node/pull/24132) <ide> * [[`44a1993e9d`](https://github.com/nodejs/node/commit/44a1993e9d)] - **src**: avoid extra `Persistent` in `DefaultTriggerAsyncIdScope` (Anna Henningsen) [#23844](https://github.com/nodejs/node/pull/23844) <del>* [[`15d05bbf02`](https://github.com/nodejs/node/commit/15d05bbf02)] - **src**: simplify `TimerFunctionCall()` in `node\_perf.cc` (Anna Henningsen) [#23782](https://github.com/nodejs/node/pull/23782) <add>* [[`15d05bbf02`](https://github.com/nodejs/node/commit/15d05bbf02)] - **src**: simplify `TimerFunctionCall()` in `node_perf.cc` (Anna Henningsen) [#23782](https://github.com/nodejs/node/pull/23782) <ide> * [[`383d512ed7`](https://github.com/nodejs/node/commit/383d512ed7)] - **src**: memory management using smart pointer (Uttam Pawar) [#23628](https://github.com/nodejs/node/pull/23628) <ide> * [[`ffb4087def`](https://github.com/nodejs/node/commit/ffb4087def)] - **src**: remove function hasTextDecoder in encoding.js (Chi-chi Wang) [#23625](https://github.com/nodejs/node/pull/23625) <ide> * [[`fa60eb83be`](https://github.com/nodejs/node/commit/fa60eb83be)] - **stream**: correctly pause and resume after once('readable') (Matteo Collina) [#24366](https://github.com/nodejs/node/pull/24366) <ide> This LTS release comes with 374 commits. This includes 165 which are test or ben <ide> * [[`a116e32a09`](https://github.com/nodejs/node/commit/a116e32a09)] - **meta,doc**: ping community about new release (Refael Ackermann) [#24064](https://github.com/nodejs/node/pull/24064) <ide> * [[`19e2e6d891`](https://github.com/nodejs/node/commit/19e2e6d891)] - **module**: removed unused variable (Martin Omander) [#23624](https://github.com/nodejs/node/pull/23624) <ide> * [[`9f8349c49c`](https://github.com/nodejs/node/commit/9f8349c49c)] - **n-api**: add missing handle scopes (Daniel Bevenius) [#24011](https://github.com/nodejs/node/pull/24011) <del>* [[`02a54ed1fa`](https://github.com/nodejs/node/commit/02a54ed1fa)] - **n-api**: make per-`Context`-ness of `napi\_env` explicit (Anna Henningsen) [#23689](https://github.com/nodejs/node/pull/23689) <add>* [[`02a54ed1fa`](https://github.com/nodejs/node/commit/02a54ed1fa)] - **n-api**: make per-`Context`-ness of `napi_env` explicit (Anna Henningsen) [#23689](https://github.com/nodejs/node/pull/23689) <ide> * [[`56afb7b481`](https://github.com/nodejs/node/commit/56afb7b481)] - **net**: `net.Server.listen()` avoid operations on `null` when fail (Ouyang Yadong) [#23920](https://github.com/nodejs/node/pull/23920) <ide> * [[`4a79bef6c6`](https://github.com/nodejs/node/commit/4a79bef6c6)] - **os**: fix memory leak in `userInfo()` (Anna Henningsen) [#23893](https://github.com/nodejs/node/pull/23893) <ide> * [[`8001beefac`](https://github.com/nodejs/node/commit/8001beefac)] - **querystring**: remove unused catch bindings (cjihrig) [#24079](https://github.com/nodejs/node/pull/24079) <ide> This LTS release comes with 374 commits. This includes 165 which are test or ben <ide> * [[`84aa6b2c59`](https://github.com/nodejs/node/commit/84aa6b2c59)] - **src**: move default assignment of async\_id\_ in async\_wrap.h (David Corona) [#23495](https://github.com/nodejs/node/pull/23495) <ide> * [[`a663d5674d`](https://github.com/nodejs/node/commit/a663d5674d)] - **src**: fix bug in MallocedBuffer constructor (Tobias Nießen) [#23434](https://github.com/nodejs/node/pull/23434) <ide> * [[`38f5644449`](https://github.com/nodejs/node/commit/38f5644449)] - **src**: improve SSL version extraction logic (Gireesh Punathil) [#23050](https://github.com/nodejs/node/pull/23050) <del>* [[`8cfbce3163`](https://github.com/nodejs/node/commit/8cfbce3163)] - **src**: revert removal of SecureContext `\_external` getter (Vitaly Dyatlov) [#21711](https://github.com/nodejs/node/pull/21711) <add>* [[`8cfbce3163`](https://github.com/nodejs/node/commit/8cfbce3163)] - **src**: revert removal of SecureContext `_external` getter (Vitaly Dyatlov) [#21711](https://github.com/nodejs/node/pull/21711) <ide> * [[`7ed4079286`](https://github.com/nodejs/node/commit/7ed4079286)] - **src**: remove unused limits header from util-inl.h (Daniel Bevenius) [#23353](https://github.com/nodejs/node/pull/23353) <ide> * [[`eb71ab5f99`](https://github.com/nodejs/node/commit/eb71ab5f99)] - **src**: replace NO\_RETURN with \[\[noreturn\]\] (Refael Ackermann) [#23337](https://github.com/nodejs/node/pull/23337) <ide> * [[`a22ef72afb`](https://github.com/nodejs/node/commit/a22ef72afb)] - **src**: fix usage of deprecated v8::Date::New (Michaël Zasso) [#23288](https://github.com/nodejs/node/pull/23288) <ide> This release only includes minimal changes necessary to fix known regressions pr <ide> * [[`b69ed9c80c`](https://github.com/nodejs/node/commit/b69ed9c80c)] - **build**: stop printing execution of lint-md command (Ruben Bridgewater) [#22904](https://github.com/nodejs/node/pull/22904) <ide> * [[`2b8f569388`](https://github.com/nodejs/node/commit/2b8f569388)] - **build,deps**: refactor and fix v8.gyp (Refael Ackermann) [#23182](https://github.com/nodejs/node/pull/23182) <ide> * [[`4db9e36b57`](https://github.com/nodejs/node/commit/4db9e36b57)] - **build,doc**: remove outdated `lint-md-build` (Michaël Zasso) [#22991](https://github.com/nodejs/node/pull/22991) <del>* [[`c29e5ac5be`](https://github.com/nodejs/node/commit/c29e5ac5be)] - **(SEMVER-MINOR)** **cli**: normalize `\_` → `-` when parsing options (Anna Henningsen) [#23020](https://github.com/nodejs/node/pull/23020) <add>* [[`c29e5ac5be`](https://github.com/nodejs/node/commit/c29e5ac5be)] - **(SEMVER-MINOR)** **cli**: normalize `_` → `-` when parsing options (Anna Henningsen) [#23020](https://github.com/nodejs/node/pull/23020) <ide> * [[`54ca0e159f`](https://github.com/nodejs/node/commit/54ca0e159f)] - **cluster**: move handle tracking out of utils (cjihrig) [#23131](https://github.com/nodejs/node/pull/23131) <ide> * [[`cb0d8239b7`](https://github.com/nodejs/node/commit/cb0d8239b7)] - **cluster**: use Map to track handles in master (cjihrig) [#23125](https://github.com/nodejs/node/pull/23125) <ide> * [[`0f133eb5a3`](https://github.com/nodejs/node/commit/0f133eb5a3)] - **cluster**: use Map to track handles in cluster child (cjihrig) [#23125](https://github.com/nodejs/node/pull/23125) <ide> This release only includes minimal changes necessary to fix known regressions pr <ide> * [[`5a8396796d`](https://github.com/nodejs/node/commit/5a8396796d)] - **src**: use JS inheritance for `AsyncWrap` (Anna Henningsen) [#23094](https://github.com/nodejs/node/pull/23094) <ide> * [[`894210ec12`](https://github.com/nodejs/node/commit/894210ec12)] - **src**: add virtual desctructor to Options class (Daniel Bevenius) [#23215](https://github.com/nodejs/node/pull/23215) <ide> * [[`8f5fb6f90c`](https://github.com/nodejs/node/commit/8f5fb6f90c)] - **src**: clean up zlib write code (Anna Henningsen) [#23183](https://github.com/nodejs/node/pull/23183) <del>* [[`2da6f622dc`](https://github.com/nodejs/node/commit/2da6f622dc)] - **(SEMVER-MINOR)** **src**: deprecate `UVException()` without `Isolate\*` (Anna Henningsen) [#23175](https://github.com/nodejs/node/pull/23175) <add>* [[`2da6f622dc`](https://github.com/nodejs/node/commit/2da6f622dc)] - **(SEMVER-MINOR)** **src**: deprecate `UVException()` without `Isolate*` (Anna Henningsen) [#23175](https://github.com/nodejs/node/pull/23175) <ide> * [[`e9a0cffbd6`](https://github.com/nodejs/node/commit/e9a0cffbd6)] - **(SEMVER-MINOR)** **src**: deprecate V8 date conversion helpers (Anna Henningsen) [#23179](https://github.com/nodejs/node/pull/23179) <ide> * [[`a2c1ce24b5`](https://github.com/nodejs/node/commit/a2c1ce24b5)] - **src**: fix indentation for `AsyncResource` (Anna Henningsen) [#23177](https://github.com/nodejs/node/pull/23177) <ide> * [[`64689edf76`](https://github.com/nodejs/node/commit/64689edf76)] - **src**: remove unused using declarations (Daniel Bevenius) [#23120](https://github.com/nodejs/node/pull/23120) <ide> This release only includes minimal changes necessary to fix known regressions pr <ide> * [[`bc076120f3`](https://github.com/nodejs/node/commit/bc076120f3)] - **src**: fix `--prof-process` CLI argument handling (Anna Henningsen) [#22790](https://github.com/nodejs/node/pull/22790) <ide> * [[`7e4f29f201`](https://github.com/nodejs/node/commit/7e4f29f201)] - **src**: move DebugPortGetter/Setter to node\_process.cc (James M Snell) [#22758](https://github.com/nodejs/node/pull/22758) <ide> * [[`1d3a63f079`](https://github.com/nodejs/node/commit/1d3a63f079)] - **src**: move getActiveResources/Handles to node\_process.cc (James M Snell) [#22758](https://github.com/nodejs/node/pull/22758) <del>* [[`0c3242862a`](https://github.com/nodejs/node/commit/0c3242862a)] - **src**: make `FIXED\_ONE\_BYTE\_STRING` an inline fn (Anna Henningsen) [#22725](https://github.com/nodejs/node/pull/22725) <add>* [[`0c3242862a`](https://github.com/nodejs/node/commit/0c3242862a)] - **src**: make `FIXED_ONE_BYTE_STRING` an inline fn (Anna Henningsen) [#22725](https://github.com/nodejs/node/pull/22725) <ide> * [[`7fa5f54e6f`](https://github.com/nodejs/node/commit/7fa5f54e6f)] - **src**: remove trace\_sync\_io\_ from env (Daniel Bevenius) [#22726](https://github.com/nodejs/node/pull/22726) <ide> * [[`c3c5141f68`](https://github.com/nodejs/node/commit/c3c5141f68)] - **src**: remove abort\_on\_uncaught\_exception node.cc (Daniel Bevenius) [#22724](https://github.com/nodejs/node/pull/22724) <ide> * [[`44f1438b79`](https://github.com/nodejs/node/commit/44f1438b79)] - **src**: fix trace-event-file-pattern description (Andreas Madsen) [#22690](https://github.com/nodejs/node/pull/22690) <ide> This release only includes minimal changes necessary to fix known regressions pr <ide> * [[`f0be05342b`](https://github.com/nodejs/node/commit/f0be05342b)] - **lib**: merge onread handlers for http2 streams & net.Socket (Ashok) [#22449](https://github.com/nodejs/node/pull/22449) <ide> * [[`1eac11f626`](https://github.com/nodejs/node/commit/1eac11f626)] - **lib**: extract validateNumber validator (Jon Moss) [#22249](https://github.com/nodejs/node/pull/22249) <ide> * [[`3f93782767`](https://github.com/nodejs/node/commit/3f93782767)] - **lib**: remove unused exec param (MaleDong) [#22274](https://github.com/nodejs/node/pull/22274) <del>* [[`46fbc23614`](https://github.com/nodejs/node/commit/46fbc23614)] - **lib,src**: standardize `owner\_symbol` for handles (Anna Henningsen) [#22002](https://github.com/nodejs/node/pull/22002) <add>* [[`46fbc23614`](https://github.com/nodejs/node/commit/46fbc23614)] - **lib,src**: standardize `owner_symbol` for handles (Anna Henningsen) [#22002](https://github.com/nodejs/node/pull/22002) <ide> * [[`96213c8027`](https://github.com/nodejs/node/commit/96213c8027)] - **n-api**: clean up thread-safe function (Gabriel Schulhof) [#22259](https://github.com/nodejs/node/pull/22259) <ide> * [[`609ae33bbe`](https://github.com/nodejs/node/commit/609ae33bbe)] - **n-api**: remove idle\_running from TsFn (Lars-Magnus Skog) [#22520](https://github.com/nodejs/node/pull/22520) <ide> * [[`ad0072abfa`](https://github.com/nodejs/node/commit/ad0072abfa)] - **os**: don't use getCheckedFunction() in userInfo() (cjihrig) [#22609](https://github.com/nodejs/node/pull/22609) <ide> This release only includes minimal changes necessary to fix known regressions pr <ide> * [[`3b44053ce8`](https://github.com/nodejs/node/commit/3b44053ce8)] - **os**: improve networkInterfaces performance (Ruben Bridgewater) [#22359](https://github.com/nodejs/node/pull/22359) <ide> * [[`107c8c0d4d`](https://github.com/nodejs/node/commit/107c8c0d4d)] - **perf_hooks**: move strings to env (James M Snell) [#22401](https://github.com/nodejs/node/pull/22401) <ide> * [[`2bf46ae45e`](https://github.com/nodejs/node/commit/2bf46ae45e)] - **(SEMVER-MINOR)** **process**: add allowedNodeEnvironmentFlags property (Christopher Hiller) [#19335](https://github.com/nodejs/node/pull/19335) <del>* [[`5af6a89a73`](https://github.com/nodejs/node/commit/5af6a89a73)] - **process**: use owner\_symbol for `\_getActive\*` (Anna Henningsen) [#22002](https://github.com/nodejs/node/pull/22002) <add>* [[`5af6a89a73`](https://github.com/nodejs/node/commit/5af6a89a73)] - **process**: use owner\_symbol for `_getActive*` (Anna Henningsen) [#22002](https://github.com/nodejs/node/pull/22002) <ide> * [[`0b340ab5e7`](https://github.com/nodejs/node/commit/0b340ab5e7)] - **repl**: tab auto complete big arrays (Ruben Bridgewater) [#22408](https://github.com/nodejs/node/pull/22408) <ide> * [[`1025868d5c`](https://github.com/nodejs/node/commit/1025868d5c)] - **src**: remove calls to deprecated V8 functions (Equals) (Michaël Zasso) [#22665](https://github.com/nodejs/node/pull/22665) <ide> * [[`c637d41b9d`](https://github.com/nodejs/node/commit/c637d41b9d)] - **src**: remove calls to deprecated v8 functions (IntegerValue) (Ujjwal Sharma) [#22129](https://github.com/nodejs/node/pull/22129) <ide> This release only includes minimal changes necessary to fix known regressions pr <ide> * [[`f064d44fad`](https://github.com/nodejs/node/commit/f064d44fad)] - **src**: warn about odd UTF-16 decoding function signature (Anna Henningsen) [#22623](https://github.com/nodejs/node/pull/22623) <ide> * [[`516d71af66`](https://github.com/nodejs/node/commit/516d71af66)] - **src**: fix a typo in the comment (Gireesh Punathil) [#22640](https://github.com/nodejs/node/pull/22640) <ide> * [[`1edd47e0b7`](https://github.com/nodejs/node/commit/1edd47e0b7)] - **src**: disable debug options when inspector is unavailable (Anna Henningsen) [#22657](https://github.com/nodejs/node/pull/22657) <del>* [[`cfca8518f8`](https://github.com/nodejs/node/commit/cfca8518f8)] - **src**: add `NODE\_EXTERN` to class definition (Anna Henningsen) [#22559](https://github.com/nodejs/node/pull/22559) <add>* [[`cfca8518f8`](https://github.com/nodejs/node/commit/cfca8518f8)] - **src**: add `NODE_EXTERN` to class definition (Anna Henningsen) [#22559](https://github.com/nodejs/node/pull/22559) <ide> * [[`c8e586c859`](https://github.com/nodejs/node/commit/c8e586c859)] - **src**: add trace points to dns (Chin Huang) [#21840](https://github.com/nodejs/node/pull/21840) <ide> * [[`b8299585bc`](https://github.com/nodejs/node/commit/b8299585bc)] - **src**: make CLI options programatically accesible (Anna Henningsen) [#22490](https://github.com/nodejs/node/pull/22490) <ide> * [[`8930268382`](https://github.com/nodejs/node/commit/8930268382)] - **src**: fix node::FatalException (Tobias Nießen) [#22654](https://github.com/nodejs/node/pull/22654) <ide> This release only includes minimal changes necessary to fix known regressions pr <ide> * [[`332b035a96`](https://github.com/nodejs/node/commit/332b035a96)] - **src**: use String::Utf8Length with isolate (Michaël Zasso) [#22531](https://github.com/nodejs/node/pull/22531) <ide> * [[`8375f753c0`](https://github.com/nodejs/node/commit/8375f753c0)] - **src**: use String::Write{OneByte,Utf8} with isolate (Michaël Zasso) [#22531](https://github.com/nodejs/node/pull/22531) <ide> * [[`9478f29387`](https://github.com/nodejs/node/commit/9478f29387)] - **src**: use StackFrame::GetFrame with isolate (Michaël Zasso) [#22531](https://github.com/nodejs/node/pull/22531) <del>* [[`f8feb0253d`](https://github.com/nodejs/node/commit/f8feb0253d)] - **src**: add missing `NODE\_WANT\_INTERNALS` guards (Anna Henningsen) [#22514](https://github.com/nodejs/node/pull/22514) <add>* [[`f8feb0253d`](https://github.com/nodejs/node/commit/f8feb0253d)] - **src**: add missing `NODE_WANT_INTERNALS` guards (Anna Henningsen) [#22514](https://github.com/nodejs/node/pull/22514) <ide> * [[`2c5dfef393`](https://github.com/nodejs/node/commit/2c5dfef393)] - **src**: fix NODE\_OPTIONS parsing bug (Anna Henningsen) [#22529](https://github.com/nodejs/node/pull/22529) <ide> * [[`034ba7322f`](https://github.com/nodejs/node/commit/034ba7322f)] - **src**: fix --without-ssl build (Ian McKellar) [#22484](https://github.com/nodejs/node/pull/22484) <ide> * [[`2767ebad2f`](https://github.com/nodejs/node/commit/2767ebad2f)] - **src**: move more to node\_process.cc from node.cc (James M Snell) [#22422](https://github.com/nodejs/node/pull/22422) <ide> Fixes for the following CVEs are included in this release: <ide> * [[`be75795868`](https://github.com/nodejs/node/commit/be75795868)] - **src**: don't store one-use strings in variable (Jon Moss) [#21876](https://github.com/nodejs/node/pull/21876) <ide> * [[`d9cd171a6b`](https://github.com/nodejs/node/commit/d9cd171a6b)] - **src**: remove unnecessary else (Jon Moss) [#21874](https://github.com/nodejs/node/pull/21874) <ide> * [[`4f8620e2b7`](https://github.com/nodejs/node/commit/4f8620e2b7)] - **src**: fix formatting of PIDs (Tobias Nießen) [#21852](https://github.com/nodejs/node/pull/21852) <del>* [[`d0f8af021f`](https://github.com/nodejs/node/commit/d0f8af021f)] - **src**: use offset calc. instead of `req-\>data` in node\_file (Anna Henningsen) [#21839](https://github.com/nodejs/node/pull/21839) <add>* [[`d0f8af021f`](https://github.com/nodejs/node/commit/d0f8af021f)] - **src**: use offset calc. instead of `req->data` in node\_file (Anna Henningsen) [#21839](https://github.com/nodejs/node/pull/21839) <ide> * [[`41ff1bb9c7`](https://github.com/nodejs/node/commit/41ff1bb9c7)] - **src**: prepare for V8 Swallowed Rejection Hook (Benedikt Meurer) [#21838](https://github.com/nodejs/node/pull/21838) <ide> * [[`c45623a548`](https://github.com/nodejs/node/commit/c45623a548)] - **src**: avoid unnecessarily formatting a warning (Tobias Nießen) [#21832](https://github.com/nodejs/node/pull/21832) <ide> * [[`6af4f1f515`](https://github.com/nodejs/node/commit/6af4f1f515)] - **stream**: name anonymous function in \_stream\_writable.js (mariotsi) [#21753](https://github.com/nodejs/node/pull/21753) <ide> Fixes for the following CVEs are included in this release: <ide> * [[`d1f372f052`](https://github.com/nodejs/node/commit/d1f372f052)] - **(SEMVER-MINOR)** **worker**: add `SharedArrayBuffer` sharing (Anna Henningsen) [#20876](https://github.com/nodejs/node/pull/20876) <ide> * [[`f447acd87b`](https://github.com/nodejs/node/commit/f447acd87b)] - **(SEMVER-MINOR)** **worker**: support MessagePort passing in messages (Anna Henningsen) [#20876](https://github.com/nodejs/node/pull/20876) <ide> * [[`337be58ee6`](https://github.com/nodejs/node/commit/337be58ee6)] - **(SEMVER-MINOR)** **worker**: implement `MessagePort` and `MessageChannel` (Anna Henningsen) [#20876](https://github.com/nodejs/node/pull/20876) <del>* [[`4a54ebc3bd`](https://github.com/nodejs/node/commit/4a54ebc3bd)] - **worker,src**: display remaining handles if `uv\_loop\_close` fails (Anna Henningsen) [#21238](https://github.com/nodejs/node/pull/21238) <add>* [[`4a54ebc3bd`](https://github.com/nodejs/node/commit/4a54ebc3bd)] - **worker,src**: display remaining handles if `uv_loop_close` fails (Anna Henningsen) [#21238](https://github.com/nodejs/node/pull/21238) <ide> * [[`529d24e3e8`](https://github.com/nodejs/node/commit/529d24e3e8)] - ***Revert*** "**workers,trace_events**: set thread name for workers" (James M Snell) [#21363](https://github.com/nodejs/node/pull/21363) <ide> * [[`dfb5cf6963`](https://github.com/nodejs/node/commit/dfb5cf6963)] - **workers,trace_events**: set thread name for workers (James M Snell) [#21246](https://github.com/nodejs/node/pull/21246) <ide> <ide> Fixes for the following CVEs are included in this release: <ide> * [[`a30bf55e69`](https://github.com/nodejs/node/commit/a30bf55e69)] - **lib**: use focused ESLint disabling in util.js (Rich Trott) [#21041](https://github.com/nodejs/node/pull/21041) <ide> * [[`f2c9e5af09`](https://github.com/nodejs/node/commit/f2c9e5af09)] - **lib**: introduce internal/validators (Michaël Zasso) [#21149](https://github.com/nodejs/node/pull/21149) <ide> * [[`46d1025add`](https://github.com/nodejs/node/commit/46d1025add)] - **net**: use object destructuring (starkewang) [#20959](https://github.com/nodejs/node/pull/20959) <del>* [[`afc811cc1c`](https://github.com/nodejs/node/commit/afc811cc1c)] - **src**: break out of timers loop if `!can\_call\_into\_js()` (Anna Henningsen) [#20884](https://github.com/nodejs/node/pull/20884) <add>* [[`afc811cc1c`](https://github.com/nodejs/node/commit/afc811cc1c)] - **src**: break out of timers loop if `!can_call_into_js()` (Anna Henningsen) [#20884](https://github.com/nodejs/node/pull/20884) <ide> * [[`8862f0a613`](https://github.com/nodejs/node/commit/8862f0a613)] - **src**: store pointer to Environment on DestroyParam (Anatoli Papirovski) [#21099](https://github.com/nodejs/node/pull/21099) <ide> * [[`66f4c7bdec`](https://github.com/nodejs/node/commit/66f4c7bdec)] - **src**: fix typo string\_search.h comment (Masashi Hirano) [#21115](https://github.com/nodejs/node/pull/21115) <ide> * [[`f79096a3f2`](https://github.com/nodejs/node/commit/f79096a3f2)] - **src**: do not cache `NumberOfHeapSpaces()` globally (Anna Henningsen) [#20971](https://github.com/nodejs/node/pull/20971) <ide> This is a follow up release to fix two regressions that were introduced in v10.2 <ide> * [[`5eb0765fc9`](https://github.com/nodejs/node/commit/5eb0765fc9)] - **src**: handle TryCatch with empty message (Ben Noordhuis) [#20708](https://github.com/nodejs/node/pull/20708) <ide> * [[`e0b438a641`](https://github.com/nodejs/node/commit/e0b438a641)] - **(SEMVER-MINOR)** **src**: add public API to create isolate and context (helloshuangzi) [#20639](https://github.com/nodejs/node/pull/20639) <ide> * [[`d223e3ca41`](https://github.com/nodejs/node/commit/d223e3ca41)] - **src**: make `AsyncResource` destructor virtual (Anna Henningsen) [#20633](https://github.com/nodejs/node/pull/20633) <del>* [[`28b58b56a8`](https://github.com/nodejs/node/commit/28b58b56a8)] - **src**: replace `template\<` → `template \<` (Anna Henningsen) [#20675](https://github.com/nodejs/node/pull/20675) <add>* [[`28b58b56a8`](https://github.com/nodejs/node/commit/28b58b56a8)] - **src**: replace `template<` → `template <` (Anna Henningsen) [#20675](https://github.com/nodejs/node/pull/20675) <ide> * [[`30aceedba6`](https://github.com/nodejs/node/commit/30aceedba6)] - **src**: make env\_ and context\_ private (Daniel Bevenius) [#20671](https://github.com/nodejs/node/pull/20671) <ide> * [[`9422909e07`](https://github.com/nodejs/node/commit/9422909e07)] - **src**: remove unused includes from node\_contextify.h (Daniel Bevenius) [#20670](https://github.com/nodejs/node/pull/20670) <ide> * [[`e732b4ce5c`](https://github.com/nodejs/node/commit/e732b4ce5c)] - **src**: use unqualified names in node\_contextify.cc (Daniel Bevenius) [#20669](https://github.com/nodejs/node/pull/20669) <ide> This is a follow up release to fix two regressions that were introduced in v10.2 <ide> * [[`38fc741c36`](https://github.com/nodejs/node/commit/38fc741c36)] - **tools**: eliminate intermediate module in doctools (Vse Mozhet Byt) [#20701](https://github.com/nodejs/node/pull/20701) <ide> * [[`6f4e9ffb7b`](https://github.com/nodejs/node/commit/6f4e9ffb7b)] - **tools**: fix "the the" typos in comments (Masashi Hirano) [#20716](https://github.com/nodejs/node/pull/20716) <ide> * [[`b795953b5f`](https://github.com/nodejs/node/commit/b795953b5f)] - **tools**: hide symbols for builtin JS files in binary (Anna Henningsen) [#20634](https://github.com/nodejs/node/pull/20634) <del>* [[`44960a0d5a`](https://github.com/nodejs/node/commit/44960a0d5a)] - **tools**: make C++ linter reject `template\<` (Anna Henningsen) [#20675](https://github.com/nodejs/node/pull/20675) <add>* [[`44960a0d5a`](https://github.com/nodejs/node/commit/44960a0d5a)] - **tools**: make C++ linter reject `template<` (Anna Henningsen) [#20675](https://github.com/nodejs/node/pull/20675) <ide> * [[`7bff6d15b2`](https://github.com/nodejs/node/commit/7bff6d15b2)] - **tools**: overhaul tools/doc/html.js (Vse Mozhet Byt) [#20613](https://github.com/nodejs/node/pull/20613) <ide> * [[`f2ad1d5d22`](https://github.com/nodejs/node/commit/f2ad1d5d22)] - **(SEMVER-MINOR)** **tools**: remove `--quiet` from run-valgrind.py (Anna Henningsen) [#19377](https://github.com/nodejs/node/pull/19377) <ide> * [[`ebd102e473`](https://github.com/nodejs/node/commit/ebd102e473)] - **tools**: use macOS as operating system name (Rich Trott) [#20579](https://github.com/nodejs/node/pull/20579) <ide> * [[`08097ccf84`](https://github.com/nodejs/node/commit/08097ccf84)] - **tools**: ignore VS compiler output (Yulong Wang) [#20527](https://github.com/nodejs/node/pull/20527) <ide> * [[`8781bcb1ee`](https://github.com/nodejs/node/commit/8781bcb1ee)] - **tools, doc**: wrap manpage links in code elements (Vse Mozhet Byt) [#20785](https://github.com/nodejs/node/pull/20785) <ide> * [[`e1ff587a26`](https://github.com/nodejs/node/commit/e1ff587a26)] - **tools, doc**: fix stability index isssues (Vse Mozhet Byt) [#20731](https://github.com/nodejs/node/pull/20731) <del>* [[`526163cff9`](https://github.com/nodejs/node/commit/526163cff9)] - **url**: introduce `URL\_FLAGS\_IS\_DEFAULT\_SCHEME\_PORT` flag (Ayush Gupta) [#20479](https://github.com/nodejs/node/pull/20479) <add>* [[`526163cff9`](https://github.com/nodejs/node/commit/526163cff9)] - **url**: introduce `URL_FLAGS_IS_DEFAULT_SCHEME_PORT` flag (Ayush Gupta) [#20479](https://github.com/nodejs/node/pull/20479) <ide> * [[`c8c9211fa6`](https://github.com/nodejs/node/commit/c8c9211fa6)] - **util**: improve error inspection (Ruben Bridgewater) [#20802](https://github.com/nodejs/node/pull/20802) <ide> * [[`f0d6a37c5c`](https://github.com/nodejs/node/commit/f0d6a37c5c)] - **util**: fix inspected stack indentation (Ruben Bridgewater) [#20802](https://github.com/nodejs/node/pull/20802) <ide> * [[`38bc5fbd6b`](https://github.com/nodejs/node/commit/38bc5fbd6b)] - **util**: remove erroneous whitespace (Ruben Bridgewater) [#20802](https://github.com/nodejs/node/pull/20802) <ide> This is a follow up release to fix two regressions that were introduced in v10.2 <ide> * [[`df2cddc9c7`](https://github.com/nodejs/node/commit/df2cddc9c7)] - **src**: removed unnecessary prototypes from Environment::SetProtoMethod (Brandon Ruggles) [#20321](https://github.com/nodejs/node/pull/20321) <ide> * [[`54f30658a3`](https://github.com/nodejs/node/commit/54f30658a3)] - **src**: fix inconsistency in extern declaration (Yang Guo) [#20436](https://github.com/nodejs/node/pull/20436) <ide> * [[`f5d42532a3`](https://github.com/nodejs/node/commit/f5d42532a3)] - **src**: refactor `BaseObject` internal field management (Anna Henningsen) [#20455](https://github.com/nodejs/node/pull/20455) <del>* [[`c21a52f415`](https://github.com/nodejs/node/commit/c21a52f415)] - **src**: access `ContextifyContext\*` more directly in property cbs (Anna Henningsen) [#20455](https://github.com/nodejs/node/pull/20455) <add>* [[`c21a52f415`](https://github.com/nodejs/node/commit/c21a52f415)] - **src**: access `ContextifyContext*` more directly in property cbs (Anna Henningsen) [#20455](https://github.com/nodejs/node/pull/20455) <ide> * [[`c0f153528e`](https://github.com/nodejs/node/commit/c0f153528e)] - **src**: remove `kFlagNoShutdown` flag (Anna Henningsen) [#20388](https://github.com/nodejs/node/pull/20388) <del>* [[`58be6efd29`](https://github.com/nodejs/node/commit/58be6efd29)] - **src**: avoid `std::make\_unique` (Anna Henningsen) [#20386](https://github.com/nodejs/node/pull/20386) <add>* [[`58be6efd29`](https://github.com/nodejs/node/commit/58be6efd29)] - **src**: avoid `std::make_unique` (Anna Henningsen) [#20386](https://github.com/nodejs/node/pull/20386) <ide> * [[`31812edb2d`](https://github.com/nodejs/node/commit/31812edb2d)] - **src**: remove unnecessary copy operations in tracing (Anna Henningsen) [#20356](https://github.com/nodejs/node/pull/20356) <ide> * [[`e0d2bc5cce`](https://github.com/nodejs/node/commit/e0d2bc5cce)] - **src**: improve fatal exception (Ruben Bridgewater) [#20294](https://github.com/nodejs/node/pull/20294) <del>* [[`44fdd36b96`](https://github.com/nodejs/node/commit/44fdd36b96)] - **src**: remove SecureContext `\_external` getter (Anna Henningsen) [#20237](https://github.com/nodejs/node/pull/20237) <add>* [[`44fdd36b96`](https://github.com/nodejs/node/commit/44fdd36b96)] - **src**: remove SecureContext `_external` getter (Anna Henningsen) [#20237](https://github.com/nodejs/node/pull/20237) <ide> * [[`81de533836`](https://github.com/nodejs/node/commit/81de533836)] - **src**: create per-isolate strings after platform setup (Ulan Degenbaev) [#20175](https://github.com/nodejs/node/pull/20175) <ide> * [[`b5bc6bd94b`](https://github.com/nodejs/node/commit/b5bc6bd94b)] - **src**: fix Systemtap node\_gc\_stop probe (William Cohen) [#20152](https://github.com/nodejs/node/pull/20152) <ide> * [[`6bf816fde2`](https://github.com/nodejs/node/commit/6bf816fde2)] - **src**: limit foreground tasks draining loop (Ulan Degenbaev) [#19987](https://github.com/nodejs/node/pull/19987) <ide> The following APIs have been deprecated in Node.js 10.0.0 <ide> * [[`c667c87528`](https://github.com/nodejs/node/commit/c667c87528)] - **(SEMVER-MINOR)** **tools**: add eslintrc rule for `assert.rejects` (Ruben Bridgewater) [#19885](https://github.com/nodejs/node/pull/19885) <ide> * [[`4b733834fc`](https://github.com/nodejs/node/commit/4b733834fc)] - **(SEMVER-MINOR)** **util**: introduce types.isModuleNamespaceObject (Gus Caplan) [#20016](https://github.com/nodejs/node/pull/20016) <ide> * [[`678f2c261a`](https://github.com/nodejs/node/commit/678f2c261a)] - **(SEMVER-MINOR)** **util**: introduce `formatWithOptions()` (Anna Henningsen) [#19372](https://github.com/nodejs/node/pull/19372) <del>* [[`b20af8088a`](https://github.com/nodejs/node/commit/b20af8088a)] - **(SEMVER-MINOR)** **util**: introduce `util.types.is\[…\]` type checks (Anna Henningsen) [#18415](https://github.com/nodejs/node/pull/18415) <add>* [[`b20af8088a`](https://github.com/nodejs/node/commit/b20af8088a)] - **(SEMVER-MINOR)** **util**: introduce `util.types.is[…]` type checks (Anna Henningsen) [#18415](https://github.com/nodejs/node/pull/18415) <ide> * [[`39dc947409`](https://github.com/nodejs/node/commit/39dc947409)] - **(SEMVER-MINOR)** **util**: add bigint formatting to util.inspect (Gus Caplan) [#18412](https://github.com/nodejs/node/pull/18412) <ide> * [[`cb5f358ee7`](https://github.com/nodejs/node/commit/cb5f358ee7)] - **(SEMVER-MINOR)** **vm**: add code generation options (Gus Caplan) [#19016](https://github.com/nodejs/node/pull/19016) <ide> * [[`49fd9c63d2`](https://github.com/nodejs/node/commit/49fd9c63d2)] - **(SEMVER-MINOR)** **zlib**: use `.bytesWritten` instead of `.bytesRead` (Anna Henningsen) [#19414](https://github.com/nodejs/node/pull/19414) <ide> The following APIs have been deprecated in Node.js 10.0.0 <ide> * [[`4766f51823`](https://github.com/nodejs/node/commit/4766f51823)] - **doc**: remove superfluous word from crypto doc (Tobias Nießen) [#19946](https://github.com/nodejs/node/pull/19946) <ide> * [[`105980f6e4`](https://github.com/nodejs/node/commit/105980f6e4)] - **doc**: fix parameter type format (Vse Mozhet Byt) [#19957](https://github.com/nodejs/node/pull/19957) <ide> * [[`a8533cf543`](https://github.com/nodejs/node/commit/a8533cf543)] - **doc**: add quotes for event names + fix similar nits (Vse Mozhet Byt) [#19915](https://github.com/nodejs/node/pull/19915) <del>* [[`a60e4989cb`](https://github.com/nodejs/node/commit/a60e4989cb)] - **doc**: `vm.runIn\*Context` can accept a string as options (Gerhard Stoebich) [#19910](https://github.com/nodejs/node/pull/19910) <add>* [[`a60e4989cb`](https://github.com/nodejs/node/commit/a60e4989cb)] - **doc**: `vm.runIn*Context` can accept a string as options (Gerhard Stoebich) [#19910](https://github.com/nodejs/node/pull/19910) <ide> * [[`0a553d56b6`](https://github.com/nodejs/node/commit/0a553d56b6)] - **doc**: improve buf.lastIndexOf() text (Rich Trott) [#19904](https://github.com/nodejs/node/pull/19904) <ide> * [[`31b5ed49e0`](https://github.com/nodejs/node/commit/31b5ed49e0)] - **doc**: add and unify even more return values (Vse Mozhet Byt) [#19955](https://github.com/nodejs/node/pull/19955) <ide> * [[`0be14def2c`](https://github.com/nodejs/node/commit/0be14def2c)] - **doc**: replace unneeded snake cases (Vse Mozhet Byt) [#19951](https://github.com/nodejs/node/pull/19951) <ide><path>doc/changelogs/CHANGELOG_V11.md <ide> * [[`e6c1ad5901`](https://github.com/nodejs/node/commit/e6c1ad5901)] - **src**: fix warnings around node\_options (Refael Ackermann) [#26280](https://github.com/nodejs/node/pull/26280) <ide> * [[`62f904974d`](https://github.com/nodejs/node/commit/62f904974d)] - **src**: refactor node options parsers to mitigate MSVC bug (Refael Ackermann) [#26280](https://github.com/nodejs/node/pull/26280) <ide> * [[`b29afa212a`](https://github.com/nodejs/node/commit/b29afa212a)] - **(SEMVER-MINOR)** **stream**: make Symbol.asyncIterator support stable (Matteo Collina) [#26989](https://github.com/nodejs/node/pull/26989) <del>* [[`ea47189b40`](https://github.com/nodejs/node/commit/ea47189b40)] - **stream**: do not unconditionally call `\_read()` on `resume()` (Anna Henningsen) [#26965](https://github.com/nodejs/node/pull/26965) <add>* [[`ea47189b40`](https://github.com/nodejs/node/commit/ea47189b40)] - **stream**: do not unconditionally call `_read()` on `resume()` (Anna Henningsen) [#26965](https://github.com/nodejs/node/pull/26965) <ide> * [[`b359a7a7e5`](https://github.com/nodejs/node/commit/b359a7a7e5)] - **test**: make module test pass with NODE\_PENDING\_DEPRECATION (Anna Henningsen) [#27019](https://github.com/nodejs/node/pull/27019) <ide> * [[`1b2a07855a`](https://github.com/nodejs/node/commit/1b2a07855a)] - **test**: remove test-trace-events-api-worker-disabled from flaky (Rich Trott) [#27020](https://github.com/nodejs/node/pull/27020) <ide> * [[`ecac6547c0`](https://github.com/nodejs/node/commit/ecac6547c0)] - **test**: move test that creates 1Gb file to pummel (Rich Trott) [#27053](https://github.com/nodejs/node/pull/27053) <ide> * [[`1481e5b5c1`](https://github.com/nodejs/node/commit/1481e5b5c1)] - **process**: set the trace category update handler during bootstrap (Joyee Cheung) [#26605](https://github.com/nodejs/node/pull/26605) <ide> * [[`be3ea2a1eb`](https://github.com/nodejs/node/commit/be3ea2a1eb)] - **process**: handle node --debug deprecation in pre-execution (Joyee Cheung) [#26670](https://github.com/nodejs/node/pull/26670) <ide> * [[`8b65aa73f6`](https://github.com/nodejs/node/commit/8b65aa73f6)] - **process**: make stdout and stderr emit 'close' on destroy (Matteo Collina) [#26691](https://github.com/nodejs/node/pull/26691) <del>* [[`dd2f2cca00`](https://github.com/nodejs/node/commit/dd2f2cca00)] - **process**: remove usage of require('util') in `per\_thread.js` (dnlup) [#26817](https://github.com/nodejs/node/pull/26817) <add>* [[`dd2f2cca00`](https://github.com/nodejs/node/commit/dd2f2cca00)] - **process**: remove usage of require('util') in `per_thread.js` (dnlup) [#26817](https://github.com/nodejs/node/pull/26817) <ide> * [[`41761cc4a6`](https://github.com/nodejs/node/commit/41761cc4a6)] - **process**: load internal/async\_hooks before inspector hooks registration (Joyee Cheung) [#26866](https://github.com/nodejs/node/pull/26866) <ide> * [[`b0afac2833`](https://github.com/nodejs/node/commit/b0afac2833)] - **process**: call prepareMainThreadExecution in all main thread scripts (Joyee Cheung) [#26468](https://github.com/nodejs/node/pull/26468) <ide> * [[`cf1117a818`](https://github.com/nodejs/node/commit/cf1117a818)] - **process**: move deprecation warning setup for --debug\* args (Refael Ackermann) [#26662](https://github.com/nodejs/node/pull/26662) <ide> * [[`b2e27a02b4`](https://github.com/nodejs/node/commit/b2e27a02b4)] - ***Revert*** "**build**: silence cpp lint by default" (Refael Ackermann) [#26358](https://github.com/nodejs/node/pull/26358) <ide> * [[`240de933f4`](https://github.com/nodejs/node/commit/240de933f4)] - **build**: indicate that configure has done something (Richard Lau) [#26436](https://github.com/nodejs/node/pull/26436) <ide> * [[`02faa1a50c`](https://github.com/nodejs/node/commit/02faa1a50c)] - **build,deps**: less warnings from V8 (Refael Ackermann) [#26405](https://github.com/nodejs/node/pull/26405) <del>* [[`c2471538ef`](https://github.com/nodejs/node/commit/c2471538ef)] - **build,win**: simplify new `msbuild\_arg` option (Refael Ackermann) [#26431](https://github.com/nodejs/node/pull/26431) <add>* [[`c2471538ef`](https://github.com/nodejs/node/commit/c2471538ef)] - **build,win**: simplify new `msbuild_arg` option (Refael Ackermann) [#26431](https://github.com/nodejs/node/pull/26431) <ide> * [[`8c864deaa4`](https://github.com/nodejs/node/commit/8c864deaa4)] - **child_process**: fire close event from stdio (kohta ito) [#22892](https://github.com/nodejs/node/pull/22892) <ide> * [[`cba23ed92a`](https://github.com/nodejs/node/commit/cba23ed92a)] - **cluster**: refactor empty for in round\_robin\_handle.js (gengjiawen) [#26560](https://github.com/nodejs/node/pull/26560) <ide> * [[`2a3cca7ec5`](https://github.com/nodejs/node/commit/2a3cca7ec5)] - **cluster**: improve for-loop (gengjiawen) [#26336](https://github.com/nodejs/node/pull/26336) <ide> * [[`8e60193aef`](https://github.com/nodejs/node/commit/8e60193aef)] - **win,build**: add ARM64 support to vcbuild.bat (Jon Kunkee) [#25995](https://github.com/nodejs/node/pull/25995) <ide> * [[`d75cb919d0`](https://github.com/nodejs/node/commit/d75cb919d0)] - **win,build**: add arbitrary and binlog options (Jon Kunkee) [#25994](https://github.com/nodejs/node/pull/25994) <ide> * [[`62801b9320`](https://github.com/nodejs/node/commit/62801b9320)] - **worker**: release native Worker object earlier (Anna Henningsen) [#26542](https://github.com/nodejs/node/pull/26542) <del>* [[`73370b4584`](https://github.com/nodejs/node/commit/73370b4584)] - **worker**: remove `ERR\_CLOSED\_MESSAGE\_PORT` (Anna Henningsen) [#26487](https://github.com/nodejs/node/pull/26487) <add>* [[`73370b4584`](https://github.com/nodejs/node/commit/73370b4584)] - **worker**: remove `ERR_CLOSED_MESSAGE_PORT` (Anna Henningsen) [#26487](https://github.com/nodejs/node/pull/26487) <ide> <ide> <a id="11.11.0"></a> <ide> ## 2019-03-06, Version 11.11.0 (Current), @BridgeAR <ide> * [[`05e6ec0143`](https://github.com/nodejs/node/commit/05e6ec0143)] - **build**: make 'floating patch' message informational (Ben Noordhuis) [#26349](https://github.com/nodejs/node/pull/26349) <ide> * [[`e2baa6836b`](https://github.com/nodejs/node/commit/e2baa6836b)] - **build**: remove v8\_typed\_array\_max\_size\_in\_heap option (Anna Henningsen) [#26301](https://github.com/nodejs/node/pull/26301) <ide> * [[`fa8110a60e`](https://github.com/nodejs/node/commit/fa8110a60e)] - **build**: silence cpp lint by default (Ruben Bridgewater) [#26252](https://github.com/nodejs/node/pull/26252) <del>* [[`dbbcedae6d`](https://github.com/nodejs/node/commit/dbbcedae6d)] - **build**: tidy up comments in `create\_expfile.sh` (Richard Lau) [#26220](https://github.com/nodejs/node/pull/26220) <add>* [[`dbbcedae6d`](https://github.com/nodejs/node/commit/dbbcedae6d)] - **build**: tidy up comments in `create_expfile.sh` (Richard Lau) [#26220](https://github.com/nodejs/node/pull/26220) <ide> * [[`f408d78914`](https://github.com/nodejs/node/commit/f408d78914)] - **build**: fixed clang's warning when building openssl (Thang Tran) [#25954](https://github.com/nodejs/node/pull/25954) <ide> * [[`a3f7471d35`](https://github.com/nodejs/node/commit/a3f7471d35)] - **build,test**: guard eslint with crypto check (Daniel Bevenius) [#26182](https://github.com/nodejs/node/pull/26182) <ide> * [[`a70bafb3cc`](https://github.com/nodejs/node/commit/a70bafb3cc)] - **console**: prevent constructing console methods (Thomas) [#26096](https://github.com/nodejs/node/pull/26096) <ide> * [[`633c1eac29`](https://github.com/nodejs/node/commit/633c1eac29)] - **report**: simplify TriggerNodeReport() (cjihrig) [#26174](https://github.com/nodejs/node/pull/26174) <ide> * [[`fc9ba36fb2`](https://github.com/nodejs/node/commit/fc9ba36fb2)] - **src**: fix typo in callback.cc (gengjiawen) [#26337](https://github.com/nodejs/node/pull/26337) <ide> * [[`63942de82c`](https://github.com/nodejs/node/commit/63942de82c)] - **src**: extra-semi warning in node\_platform.h (Jeremy Apthorp) [#26330](https://github.com/nodejs/node/pull/26330) <del>* [[`cb62c24e1b`](https://github.com/nodejs/node/commit/cb62c24e1b)] - **src**: reduce to simple `const char\*` in OptionsParser (ZYSzys) [#26297](https://github.com/nodejs/node/pull/26297) <add>* [[`cb62c24e1b`](https://github.com/nodejs/node/commit/cb62c24e1b)] - **src**: reduce to simple `const char*` in OptionsParser (ZYSzys) [#26297](https://github.com/nodejs/node/pull/26297) <ide> * [[`3093617c0e`](https://github.com/nodejs/node/commit/3093617c0e)] - **src**: remove unused variable (cjihrig) [#26386](https://github.com/nodejs/node/pull/26386) <ide> * [[`b216f44513`](https://github.com/nodejs/node/commit/b216f44513)] - **src**: remove unnecessary function declaration (cjihrig) [#26386](https://github.com/nodejs/node/pull/26386) <ide> * [[`cb2cbf2eca`](https://github.com/nodejs/node/commit/cb2cbf2eca)] - **src**: remove already elevated Isolate namespce (Juan José Arboleda) [#26294](https://github.com/nodejs/node/pull/26294) <ide> * [[`4bf58ac13d`](https://github.com/nodejs/node/commit/4bf58ac13d)] - **util**: update set iterator entries inspection (Ruben Bridgewater) [#25941](https://github.com/nodejs/node/pull/25941) <ide> * [[`7d66d47dba`](https://github.com/nodejs/node/commit/7d66d47dba)] - **vm**: do not overwrite error when creating context (Anna Henningsen) [#26112](https://github.com/nodejs/node/pull/26112) <ide> * [[`8cf4170c94`](https://github.com/nodejs/node/commit/8cf4170c94)] - **worker**: provide process.execArgv (Anna Henningsen) [#26267](https://github.com/nodejs/node/pull/26267) <del>* [[`6fdc502a32`](https://github.com/nodejs/node/commit/6fdc502a32)] - **worker**: make MessagePort `uv\_async\_t` inline field (Anna Henningsen) [#26271](https://github.com/nodejs/node/pull/26271) <add>* [[`6fdc502a32`](https://github.com/nodejs/node/commit/6fdc502a32)] - **worker**: make MessagePort `uv_async_t` inline field (Anna Henningsen) [#26271](https://github.com/nodejs/node/pull/26271) <ide> * [[`51f01aa25b`](https://github.com/nodejs/node/commit/51f01aa25b)] - **worker**: remove MessagePort::AddToIncomingQueue (Anna Henningsen) [#26271](https://github.com/nodejs/node/pull/26271) <ide> * [[`74d11e7d0e`](https://github.com/nodejs/node/commit/74d11e7d0e)] - **worker**: refactor thread life cycle management (Gireesh Punathil) [#26099](https://github.com/nodejs/node/pull/26099) <ide> * [[`20dc172011`](https://github.com/nodejs/node/commit/20dc172011)] - **worker**: copy transferList ArrayBuffers on unknown allocator (Anna Henningsen) [#26207](https://github.com/nodejs/node/pull/26207) <ide> A fix for the following CVE is included in this release: <ide> * [[`0772ce35fb`](https://github.com/nodejs/node/commit/0772ce35fb)] - **src**: remove unused TLWrap::EnableTrace() (Sam Roberts) [#25861](https://github.com/nodejs/node/pull/25861) <ide> * [[`703549665e`](https://github.com/nodejs/node/commit/703549665e)] - **src**: add PrintLibuvHandleInformation debug helper (Anna Henningsen) [#25905](https://github.com/nodejs/node/pull/25905) <ide> * [[`2e80b912ef`](https://github.com/nodejs/node/commit/2e80b912ef)] - **src**: use `visibility("default")` exports on POSIX (Jeremy Apthorp) [#25893](https://github.com/nodejs/node/pull/25893) <del>* [[`e28d891788`](https://github.com/nodejs/node/commit/e28d891788)] - **src**: fix race condition in `\~NodeTraceBuffer` (Anna Henningsen) [#25896](https://github.com/nodejs/node/pull/25896) <add>* [[`e28d891788`](https://github.com/nodejs/node/commit/e28d891788)] - **src**: fix race condition in `~NodeTraceBuffer` (Anna Henningsen) [#25896](https://github.com/nodejs/node/pull/25896) <ide> * [[`bd771d90fd`](https://github.com/nodejs/node/commit/bd771d90fd)] - **src**: remove unimplemented method in node\_http2.h (gengjiawen) [#25732](https://github.com/nodejs/node/pull/25732) <ide> * [[`00f8e86702`](https://github.com/nodejs/node/commit/00f8e86702)] - **src**: use nullptr in node\_buffer.cc (gengjiawen) [#25820](https://github.com/nodejs/node/pull/25820) <ide> * [[`84358b5010`](https://github.com/nodejs/node/commit/84358b5010)] - **src**: handle errors while printing error objects (Anna Henningsen) [#25834](https://github.com/nodejs/node/pull/25834) <ide> A fix for the following CVE is included in this release: <ide> * [[`ee61ab6894`](https://github.com/nodejs/node/commit/ee61ab6894)] - **repl**: improve doc for disabling REPL history on Windows (Samuel D. Leslie) [#25672](https://github.com/nodejs/node/pull/25672) <ide> * [[`ce28caf517`](https://github.com/nodejs/node/commit/ce28caf517)] - **report**: represent numbers as numbers (Anna Henningsen) [#25651](https://github.com/nodejs/node/pull/25651) <ide> * [[`1dfdbc6cf7`](https://github.com/nodejs/node/commit/1dfdbc6cf7)] - **report**: refactor JSON writer (Anna Henningsen) [#25651](https://github.com/nodejs/node/pull/25651) <del>* [[`14bce1ea5a`](https://github.com/nodejs/node/commit/14bce1ea5a)] - **report**: do not use `uv\_default\_loop()` as fallback (Anna Henningsen) [#25652](https://github.com/nodejs/node/pull/25652) <add>* [[`14bce1ea5a`](https://github.com/nodejs/node/commit/14bce1ea5a)] - **report**: do not use `uv_default_loop()` as fallback (Anna Henningsen) [#25652](https://github.com/nodejs/node/pull/25652) <ide> * [[`152d633366`](https://github.com/nodejs/node/commit/152d633366)] - **src**: remove unused env\_ field from env.h (Daniel Bevenius) [#25784](https://github.com/nodejs/node/pull/25784) <ide> * [[`c0951062b9`](https://github.com/nodejs/node/commit/c0951062b9)] - **src**: pass along errors from i18n converter instantiation (Anna Henningsen) [#25734](https://github.com/nodejs/node/pull/25734) <ide> * [[`deebf10bd5`](https://github.com/nodejs/node/commit/deebf10bd5)] - **src**: pass along errors from vm data wrapper creation (Anna Henningsen) [#25734](https://github.com/nodejs/node/pull/25734) <ide> A fix for the following CVE is included in this release: <ide> * [[`593714e4bd`](https://github.com/nodejs/node/commit/593714e4bd)] - **events**: show inspected error in uncaught 'error' message (Anna Henningsen) [#25621](https://github.com/nodejs/node/pull/25621) <ide> * [[`d6b50c66cc`](https://github.com/nodejs/node/commit/d6b50c66cc)] - **http**: make ClientRequest#setTimeout() noop at end (Tim De Pauw) [#25536](https://github.com/nodejs/node/pull/25536) <ide> * [[`e55c5c341d`](https://github.com/nodejs/node/commit/e55c5c341d)] - **http**: reuse noop function in socketOnError() (cjihrig) [#25566](https://github.com/nodejs/node/pull/25566) <del>* [[`9a410a189e`](https://github.com/nodejs/node/commit/9a410a189e)] - **http2**: allow fully synchronous `\_final()` (Anna Henningsen) [#25609](https://github.com/nodejs/node/pull/25609) <add>* [[`9a410a189e`](https://github.com/nodejs/node/commit/9a410a189e)] - **http2**: allow fully synchronous `_final()` (Anna Henningsen) [#25609](https://github.com/nodejs/node/pull/25609) <ide> * [[`f688e73984`](https://github.com/nodejs/node/commit/f688e73984)] - **n-api**: change #ifdef to #if in node\_api\_types (Daniel Bevenius) [#25635](https://github.com/nodejs/node/pull/25635) <ide> * [[`2b1858298a`](https://github.com/nodejs/node/commit/2b1858298a)] - **(SEMVER-MINOR)** **n-api**: mark thread-safe function as stable (Gabriel Schulhof) [#25556](https://github.com/nodejs/node/pull/25556) <ide> * [[`0ebe6ebbb1`](https://github.com/nodejs/node/commit/0ebe6ebbb1)] - **os**: implement os.release() using uv\_os\_uname() (cjihrig) [#25600](https://github.com/nodejs/node/pull/25600) <ide> A fix for the following CVE is included in this release: <ide> * [[`b2834ce65b`](https://github.com/nodejs/node/commit/b2834ce65b)] - **process**: fix call process.reallyExit, vs., binding (Benjamin Coe) [#25655](https://github.com/nodejs/node/pull/25655) <ide> * [[`92dd8998e7`](https://github.com/nodejs/node/commit/92dd8998e7)] - **process**: check env-\>EmitProcessEnvWarning() last (Benjamin) [#25575](https://github.com/nodejs/node/pull/25575) <ide> * [[`07f1bb001c`](https://github.com/nodejs/node/commit/07f1bb001c)] - **process**: allow reading umask in workers (cjihrig) [#25526](https://github.com/nodejs/node/pull/25526) <del>* [[`f3d0591abf`](https://github.com/nodejs/node/commit/f3d0591abf)] - **report**: use `uv\_handle\_type\_name()` to get handle type (Anna Henningsen) [#25610](https://github.com/nodejs/node/pull/25610) <add>* [[`f3d0591abf`](https://github.com/nodejs/node/commit/f3d0591abf)] - **report**: use `uv_handle_type_name()` to get handle type (Anna Henningsen) [#25610](https://github.com/nodejs/node/pull/25610) <ide> * [[`03ba34401b`](https://github.com/nodejs/node/commit/03ba34401b)] - **report**: downgrade reinterpret\_cast to static\_cast (Anna Henningsen) [#25610](https://github.com/nodejs/node/pull/25610) <ide> * [[`07a0dc89ad`](https://github.com/nodejs/node/commit/07a0dc89ad)] - **report**: roll extra loop iteration in `PrintNativeStack()` (Anna Henningsen) [#25610](https://github.com/nodejs/node/pull/25610) <ide> * [[`64959b6668`](https://github.com/nodejs/node/commit/64959b6668)] - **report**: remove `internalBinding('config').hasReport` (Anna Henningsen) [#25610](https://github.com/nodejs/node/pull/25610) <ide> A fix for the following CVE is included in this release: <ide> * [[`42bbe58c47`](https://github.com/nodejs/node/commit/42bbe58c47)] - **report**: remove unnecessary intermediate variable (cjihrig) [#25597](https://github.com/nodejs/node/pull/25597) <ide> * [[`a161a9b9c3`](https://github.com/nodejs/node/commit/a161a9b9c3)] - **src**: remove unnecessary `filename` variable (Anna Henningsen) [#25610](https://github.com/nodejs/node/pull/25610) <ide> * [[`c59edcadc1`](https://github.com/nodejs/node/commit/c59edcadc1)] - **src**: remove using v8::Function in node\_os.cc (cjihrig) [#25640](https://github.com/nodejs/node/pull/25640) <del>* [[`dbecc82524`](https://github.com/nodejs/node/commit/dbecc82524)] - **src**: remove outdated `Neuter()` call in `node\_buffer.cc` (Anna Henningsen) [#25479](https://github.com/nodejs/node/pull/25479) <add>* [[`dbecc82524`](https://github.com/nodejs/node/commit/dbecc82524)] - **src**: remove outdated `Neuter()` call in `node_buffer.cc` (Anna Henningsen) [#25479](https://github.com/nodejs/node/pull/25479) <ide> * [[`8f42c9efe9`](https://github.com/nodejs/node/commit/8f42c9efe9)] - **src**: silence compiler warning in node\_report.cc (Daniel Bevenius) [#25557](https://github.com/nodejs/node/pull/25557) <ide> * [[`549216a138`](https://github.com/nodejs/node/commit/549216a138)] - **(SEMVER-MINOR)** **src**: merge into core (Gireesh Punathil) [#22712](https://github.com/nodejs/node/pull/22712) <ide> * [[`55768c0079`](https://github.com/nodejs/node/commit/55768c0079)] - **src**: restrict unloading addons to Worker threads (Anna Henningsen) [#25577](https://github.com/nodejs/node/pull/25577) <ide> A fix for the following CVE is included in this release: <ide> * [[`7123167e31`](https://github.com/nodejs/node/commit/7123167e31)] - **doc**: improve Sign/Verify examples and docs (Sam Roberts) [#25452](https://github.com/nodejs/node/pull/25452) <ide> * [[`9a61a7abb3`](https://github.com/nodejs/node/commit/9a61a7abb3)] - **doc**: fix section order in vm.md (Vse Mozhet Byt) [#25374](https://github.com/nodejs/node/pull/25374) <ide> * [[`2b0c8538ef`](https://github.com/nodejs/node/commit/2b0c8538ef)] - **doc**: fix sorting in buffer.md (Vse Mozhet Byt) [#25477](https://github.com/nodejs/node/pull/25477) <del>* [[`f8bb544bfb`](https://github.com/nodejs/node/commit/f8bb544bfb)] - **doc**: fix `napi\_open\_callback\_scope` description (Philipp Renoth) [#25366](https://github.com/nodejs/node/pull/25366) <add>* [[`f8bb544bfb`](https://github.com/nodejs/node/commit/f8bb544bfb)] - **doc**: fix `napi_open_callback_scope` description (Philipp Renoth) [#25366](https://github.com/nodejs/node/pull/25366) <ide> * [[`b67c4b4f99`](https://github.com/nodejs/node/commit/b67c4b4f99)] - **doc**: document that stream.on('close') was changed in Node 10 (Matteo Collina) [#25413](https://github.com/nodejs/node/pull/25413) <ide> * [[`3db7a9ffba`](https://github.com/nodejs/node/commit/3db7a9ffba)] - **doc**: fix, unify, formalize, and amplify vm.md (Vse Mozhet Byt) [#25422](https://github.com/nodejs/node/pull/25422) <ide> * [[`ebd202736c`](https://github.com/nodejs/node/commit/ebd202736c)] - **doc**: fix the path to postMessage() (Mitar) [#25332](https://github.com/nodejs/node/pull/25332) <ide> A fix for the following CVE is included in this release: <ide> * [[`d7d772b2f8`](https://github.com/nodejs/node/commit/d7d772b2f8)] - ***Revert*** "**lib**: remove duplicated noop function" (Joyee Cheung) [#25446](https://github.com/nodejs/node/pull/25446) <ide> * [[`42a7eaf9d4`](https://github.com/nodejs/node/commit/42a7eaf9d4)] - ***Revert*** "**lib**: remove unused NativeModule/NativeModule wraps" (Joyee Cheung) [#25446](https://github.com/nodejs/node/pull/25446) <ide> * [[`b48865f03f`](https://github.com/nodejs/node/commit/b48865f03f)] - **lib**: move lib/console.js to lib/internal/console/constructor.js (Joyee Cheung) [#24709](https://github.com/nodejs/node/pull/24709) <del>* [[`3350230e20`](https://github.com/nodejs/node/commit/3350230e20)] - **lib**: remove internal `util.\_extends()` usage (Ruben Bridgewater) [#25105](https://github.com/nodejs/node/pull/25105) <add>* [[`3350230e20`](https://github.com/nodejs/node/commit/3350230e20)] - **lib**: remove internal `util._extends()` usage (Ruben Bridgewater) [#25105](https://github.com/nodejs/node/pull/25105) <ide> * [[`73c3a3d5ed`](https://github.com/nodejs/node/commit/73c3a3d5ed)] - **(SEMVER-MAJOR)** **lib**: make the global console \[\[Prototype\]\] an empty object (Joyee Cheung) [#23509](https://github.com/nodejs/node/pull/23509) <ide> * [[`8d0c638583`](https://github.com/nodejs/node/commit/8d0c638583)] - **(SEMVER-MINOR)** **lib**: support overriding http\\s.globalAgent (Roy Sommer) [#25170](https://github.com/nodejs/node/pull/25170) <ide> * [[`217bb0e5f0`](https://github.com/nodejs/node/commit/217bb0e5f0)] - **lib**: simplify several debug() calls (cjihrig) [#25241](https://github.com/nodejs/node/pull/25241) <ide> A fix for the following CVE is included in this release: <ide> * [[`53fac5c0d3`](https://github.com/nodejs/node/commit/53fac5c0d3)] - **src**: fix compiler warning (cjihrig) [#23954](https://github.com/nodejs/node/pull/23954) <ide> * [[`c2fde2124f`](https://github.com/nodejs/node/commit/c2fde2124f)] - **src**: remove unused variables (Anna Henningsen) [#23880](https://github.com/nodejs/node/pull/23880) <ide> * [[`dba003cbff`](https://github.com/nodejs/node/commit/dba003cbff)] - **src**: include util-inl.h in worker\_agent.cc (Anna Henningsen) [#23880](https://github.com/nodejs/node/pull/23880) <del>* [[`25a9eee9fd`](https://github.com/nodejs/node/commit/25a9eee9fd)] - **src**: add direct dependency on `\*-inl.h` file (Refael Ackermann) [#23808](https://github.com/nodejs/node/pull/23808) <add>* [[`25a9eee9fd`](https://github.com/nodejs/node/commit/25a9eee9fd)] - **src**: add direct dependency on `*-inl.h` file (Refael Ackermann) [#23808](https://github.com/nodejs/node/pull/23808) <ide> * [[`33e7f6e953`](https://github.com/nodejs/node/commit/33e7f6e953)] - **src**: add AliasedBuffer::reserve (Refael Ackermann) [#23808](https://github.com/nodejs/node/pull/23808) <ide> * [[`74c0a97a96`](https://github.com/nodejs/node/commit/74c0a97a96)] - **src**: clean clang-tidy errors in node\_file.h (Refael Ackermann) [#23793](https://github.com/nodejs/node/pull/23793) <ide> * [[`260d77710e`](https://github.com/nodejs/node/commit/260d77710e)] - **src**: fix resource leak in node::fs::FileHandle (Refael Ackermann) [#23793](https://github.com/nodejs/node/pull/23793) <ide> * [[`c0a9a83c51`](https://github.com/nodejs/node/commit/c0a9a83c51)] - **src**: refactor FillStatsArray (Refael Ackermann) [#23793](https://github.com/nodejs/node/pull/23793) <del>* [[`5061610094`](https://github.com/nodejs/node/commit/5061610094)] - **src**: remove `Environment::tracing\_agent\_writer()` (Anna Henningsen) [#23781](https://github.com/nodejs/node/pull/23781) <add>* [[`5061610094`](https://github.com/nodejs/node/commit/5061610094)] - **src**: remove `Environment::tracing_agent_writer()` (Anna Henningsen) [#23781](https://github.com/nodejs/node/pull/23781) <ide> * [[`af3c7efffc`](https://github.com/nodejs/node/commit/af3c7efffc)] - **src**: factor out Node.js-agnostic N-APIs (Gabriel Schulhof) [#23786](https://github.com/nodejs/node/pull/23786) <ide> * [[`b44623e776`](https://github.com/nodejs/node/commit/b44623e776)] - **src**: elevate v8 namespaces of referenced artifacts (Kanika Singhal) [#24424](https://github.com/nodejs/node/pull/24424) <ide> * [[`a7f6c043a4`](https://github.com/nodejs/node/commit/a7f6c043a4)] - ***Revert*** "**src**: enable detailed source positions in V8" (Refael Ackermann) [#24394](https://github.com/nodejs/node/pull/24394) <ide> Fixes for the following CVEs are included in this release: <ide> * [[`1c5ffb3ec5`](https://github.com/nodejs/node/commit/1c5ffb3ec5)] - **(SEMVER-MINOR)** **lib**: add escapeCodeTimeout as an option to createInterface (Raoof) [#19780](https://github.com/nodejs/node/pull/19780) <ide> * [[`1cda41b7da`](https://github.com/nodejs/node/commit/1cda41b7da)] - **lib**: migrate from process.binding('config') to getOptions() (Vladimir Ilic) [#23588](https://github.com/nodejs/node/pull/23588) <ide> * [[`22cd53791a`](https://github.com/nodejs/node/commit/22cd53791a)] - **lib**: trigger uncaught exception handler for microtasks (Gus Caplan) [#23794](https://github.com/nodejs/node/pull/23794) <del>* [[`97496f0fd9`](https://github.com/nodejs/node/commit/97496f0fd9)] - **n-api**: make per-`Context`-ness of `napi\_env` explicit (Anna Henningsen) [#23689](https://github.com/nodejs/node/pull/23689) <add>* [[`97496f0fd9`](https://github.com/nodejs/node/commit/97496f0fd9)] - **n-api**: make per-`Context`-ness of `napi_env` explicit (Anna Henningsen) [#23689](https://github.com/nodejs/node/pull/23689) <ide> * [[`3e512f1897`](https://github.com/nodejs/node/commit/3e512f1897)] - **os**: fix memory leak in `userInfo()` (Anna Henningsen) [#23893](https://github.com/nodejs/node/pull/23893) <ide> * [[`02f13abde3`](https://github.com/nodejs/node/commit/02f13abde3)] - **repl**: support top-level for-await-of (Shelley Vohr) [#23841](https://github.com/nodejs/node/pull/23841) <ide> * [[`86cf01404c`](https://github.com/nodejs/node/commit/86cf01404c)] - **repl**: migrate from process.binding('config') to getOptions() (Jose Bucio) [#23684](https://github.com/nodejs/node/pull/23684) <ide> Fixes for the following CVEs are included in this release: <ide> * [[`1bdbf8765d`](https://github.com/nodejs/node/commit/1bdbf8765d)] - **src**: reduce duplication in tcp\_wrap Connect (Daniel Bevenius) [#23753](https://github.com/nodejs/node/pull/23753) <ide> * [[`9fbe91a061`](https://github.com/nodejs/node/commit/9fbe91a061)] - **src**: refactor deprecated v8::String::NewFromTwoByte call (Romain Lanz) [#23803](https://github.com/nodejs/node/pull/23803) <ide> * [[`48ed81fad2`](https://github.com/nodejs/node/commit/48ed81fad2)] - **src**: improve StreamBase read throughput (Anna Henningsen) [#23797](https://github.com/nodejs/node/pull/23797) <del>* [[`a6fe2caaae`](https://github.com/nodejs/node/commit/a6fe2caaae)] - **src**: simplify `TimerFunctionCall()` in `node\_perf.cc` (Anna Henningsen) [#23782](https://github.com/nodejs/node/pull/23782) <add>* [[`a6fe2caaae`](https://github.com/nodejs/node/commit/a6fe2caaae)] - **src**: simplify `TimerFunctionCall()` in `node_perf.cc` (Anna Henningsen) [#23782](https://github.com/nodejs/node/pull/23782) <ide> * [[`30be5cbdb0`](https://github.com/nodejs/node/commit/30be5cbdb0)] - **src**: memory management using smart pointer (Uttam Pawar) [#23628](https://github.com/nodejs/node/pull/23628) <ide> * [[`df05ddfd72`](https://github.com/nodejs/node/commit/df05ddfd72)] - **src**: refactor deprecated v8::Function::Call call (Romain Lanz) [#23804](https://github.com/nodejs/node/pull/23804) <ide> * [[`7bbc072529`](https://github.com/nodejs/node/commit/7bbc072529)] - **stream**: do not error async iterators on destroy(null) (Matteo Collina) [#23901](https://github.com/nodejs/node/pull/23901) <ide> Fixes for the following CVEs are included in this release: <ide> * [[`2fd248f639`](https://github.com/nodejs/node/commit/2fd248f639)] - **(SEMVER-MAJOR)** **process**: migrate methods to throw errors with code (Michaël Zasso) [#19973](https://github.com/nodejs/node/pull/19973) <ide> * [[`2bf4697ff4`](https://github.com/nodejs/node/commit/2bf4697ff4)] - **(SEMVER-MAJOR)** **repl**: remove duplicate util binding (cjihrig) [#22675](https://github.com/nodejs/node/pull/22675) <ide> * [[`eeb1d514ad`](https://github.com/nodejs/node/commit/eeb1d514ad)] - **(SEMVER-MAJOR)** **repl**: changes ctrl+u to delete from cursor to line start (Shobhit Chittora) [#20686](https://github.com/nodejs/node/pull/20686) <del>* [[`5f714ac0bd`](https://github.com/nodejs/node/commit/5f714ac0bd)] - **(SEMVER-MAJOR)** **src**: remove long-deprecated APIs without `Isolate\*` arg (Anna Henningsen) [#23178](https://github.com/nodejs/node/pull/23178) <add>* [[`5f714ac0bd`](https://github.com/nodejs/node/commit/5f714ac0bd)] - **(SEMVER-MAJOR)** **src**: remove long-deprecated APIs without `Isolate*` arg (Anna Henningsen) [#23178](https://github.com/nodejs/node/pull/23178) <ide> * [[`24186e0d20`](https://github.com/nodejs/node/commit/24186e0d20)] - **(SEMVER-MAJOR)** **src**: remove public API for option variables (Anna Henningsen) [#23069](https://github.com/nodejs/node/pull/23069) <ide> * [[`0f73875e7b`](https://github.com/nodejs/node/commit/0f73875e7b)] - **(SEMVER-MAJOR)** **src**: update postmortem constants (cjihrig) [#22754](https://github.com/nodejs/node/pull/22754) <ide> * [[`a5604a73d8`](https://github.com/nodejs/node/commit/a5604a73d8)] - **(SEMVER-MAJOR)** **src**: use HeapStatistics to get external memory (Rodrigo Bruno) [#22754](https://github.com/nodejs/node/pull/22754) <ide> Fixes for the following CVEs are included in this release: <ide> * [[`e917a23d2e`](https://github.com/nodejs/node/commit/e917a23d2e)] - **(SEMVER-MAJOR)** **url**: move process.binding('url') to internalBinding (Weijia Wang) [#22204](https://github.com/nodejs/node/pull/22204) <ide> * [[`1a1fe53e3d`](https://github.com/nodejs/node/commit/1a1fe53e3d)] - **(SEMVER-MAJOR)** **util**: change %o depth default (Ruben Bridgewater) [#22846](https://github.com/nodejs/node/pull/22846) <ide> * [[`ac7450a09a`](https://github.com/nodejs/node/commit/ac7450a09a)] - **(SEMVER-MAJOR)** **util**: change util.inspect depth default (Ruben Bridgewater) [#22846](https://github.com/nodejs/node/pull/22846) <del>* [[`5e6940d4f6`](https://github.com/nodejs/node/commit/5e6940d4f6)] - **(SEMVER-MAJOR)** **util**: set `super\_` property to non-enumerable (Ruben Bridgewater) [#23107](https://github.com/nodejs/node/pull/23107) <add>* [[`5e6940d4f6`](https://github.com/nodejs/node/commit/5e6940d4f6)] - **(SEMVER-MAJOR)** **util**: set `super_` property to non-enumerable (Ruben Bridgewater) [#23107](https://github.com/nodejs/node/pull/23107) <ide> * [[`932be0164f`](https://github.com/nodejs/node/commit/932be0164f)] - **(SEMVER-MAJOR)** **util**: make TextEncoder/TextDecoder global (James M Snell) [#22281](https://github.com/nodejs/node/pull/22281) <ide> * [[`eb61127c48`](https://github.com/nodejs/node/commit/eb61127c48)] - **(SEMVER-MAJOR)** **util**: limit inspection output size to 128 MB (Ruben Bridgewater) [#22756](https://github.com/nodejs/node/pull/22756) <ide> * [[`7e4b0a4850`](https://github.com/nodejs/node/commit/7e4b0a4850)] - **(SEMVER-MAJOR)** **util**: make util binding internal (cjihrig) [#22675](https://github.com/nodejs/node/pull/22675) <ide> Fixes for the following CVEs are included in this release: <ide> * [[`b61bbbbb03`](https://github.com/nodejs/node/commit/b61bbbbb03)] - **src**: trace\_event: secondary storage for metadata (Ali Ijaz Sheikh) [#20900](https://github.com/nodejs/node/pull/20900) <ide> * [[`ecacf33356`](https://github.com/nodejs/node/commit/ecacf33356)] - **src**: fix bug in MallocedBuffer constructor (Tobias Nießen) [#23434](https://github.com/nodejs/node/pull/23434) <ide> * [[`a83096a65d`](https://github.com/nodejs/node/commit/a83096a65d)] - **src**: improve SSL version extraction logic (Gireesh Punathil) [#23050](https://github.com/nodejs/node/pull/23050) <del>* [[`f40b1dbe5d`](https://github.com/nodejs/node/commit/f40b1dbe5d)] - **src**: revert removal of SecureContext `\_external` getter (Vitaly Dyatlov) [#21711](https://github.com/nodejs/node/pull/21711) <add>* [[`f40b1dbe5d`](https://github.com/nodejs/node/commit/f40b1dbe5d)] - **src**: revert removal of SecureContext `_external` getter (Vitaly Dyatlov) [#21711](https://github.com/nodejs/node/pull/21711) <ide> * [[`51fd86730f`](https://github.com/nodejs/node/commit/51fd86730f)] - **src**: remove unused limits header from util-inl.h (Daniel Bevenius) [#23353](https://github.com/nodejs/node/pull/23353) <ide> * [[`5f21755e60`](https://github.com/nodejs/node/commit/5f21755e60)] - **src**: replace NO\_RETURN with \[\[noreturn\]\] (Refael Ackermann) [#23337](https://github.com/nodejs/node/pull/23337) <ide> * [[`4d21e34a6d`](https://github.com/nodejs/node/commit/4d21e34a6d)] - **src**: fix usage of deprecated v8::Date::New (Michaël Zasso) [#23288](https://github.com/nodejs/node/pull/23288) <ide><path>doc/changelogs/CHANGELOG_V12.md <ide> * [[`f4f88270e7`](https://github.com/nodejs/node/commit/f4f88270e7)] - **process**: improve nextTick performance (Brian White) [#25461](https://github.com/nodejs/node/pull/25461) <ide> * [[`0e1ccca81d`](https://github.com/nodejs/node/commit/0e1ccca81d)] - **querystring**: improve performance (Brian White) [#29306](https://github.com/nodejs/node/pull/29306) <ide> * [[`f8f3af099a`](https://github.com/nodejs/node/commit/f8f3af099a)] - **src**: do not crash when accessing empty WeakRefs (Anna Henningsen) [#29289](https://github.com/nodejs/node/pull/29289) <del>* [[`b964bdd162`](https://github.com/nodejs/node/commit/b964bdd162)] - **src**: turn `GET\_OFFSET()` into an inline function (Anna Henningsen) [#29357](https://github.com/nodejs/node/pull/29357) <del>* [[`2666e006e1`](https://github.com/nodejs/node/commit/2666e006e1)] - **src**: inline `SLICE\_START\_END()` in node\_buffer.cc (Anna Henningsen) [#29357](https://github.com/nodejs/node/pull/29357) <add>* [[`b964bdd162`](https://github.com/nodejs/node/commit/b964bdd162)] - **src**: turn `GET_OFFSET()` into an inline function (Anna Henningsen) [#29357](https://github.com/nodejs/node/pull/29357) <add>* [[`2666e006e1`](https://github.com/nodejs/node/commit/2666e006e1)] - **src**: inline `SLICE_START_END()` in node\_buffer.cc (Anna Henningsen) [#29357](https://github.com/nodejs/node/pull/29357) <ide> * [[`8c6896e5d3`](https://github.com/nodejs/node/commit/8c6896e5d3)] - **src**: allow --interpreted-frames-native-stack in NODE\_OPTIONS (Matheus Marchini) [#27744](https://github.com/nodejs/node/pull/27744) <ide> * [[`db6e4ce239`](https://github.com/nodejs/node/commit/db6e4ce239)] - **src**: expose MaybeInitializeContext to allow existing contexts (Samuel Attard) [#28544](https://github.com/nodejs/node/pull/28544) <ide> * [[`4d4583e0a2`](https://github.com/nodejs/node/commit/4d4583e0a2)] - **src**: add large page support for macOS (David Carlier) [#28977](https://github.com/nodejs/node/pull/28977) <ide> This release fixes two regressions in the **http** module: <ide> * [[`c9f8d28f71`](https://github.com/nodejs/node/commit/c9f8d28f71)] - **(SEMVER-MINOR)** **deps**: V8: fix BUILDING\_V8\_SHARED issues (Refael Ackermann) [#27375](https://github.com/nodejs/node/pull/27375) <ide> * [[`f24caeff2f`](https://github.com/nodejs/node/commit/f24caeff2f)] - **(SEMVER-MINOR)** **deps**: V8: add workaround for MSVC optimizer bug (Refael Ackermann) [#28016](https://github.com/nodejs/node/pull/28016) <ide> * [[`94c8d068f8`](https://github.com/nodejs/node/commit/94c8d068f8)] - **(SEMVER-MINOR)** **deps**: V8: use ATOMIC\_VAR\_INIT instead of std::atomic\_init (Refael Ackermann) [#27375](https://github.com/nodejs/node/pull/27375) <del>* [[`d940403c20`](https://github.com/nodejs/node/commit/d940403c20)] - **(SEMVER-MINOR)** **deps**: V8: forward declaration of `Rtl\*FunctionTable` (Refael Ackermann) [#27375](https://github.com/nodejs/node/pull/27375) <add>* [[`d940403c20`](https://github.com/nodejs/node/commit/d940403c20)] - **(SEMVER-MINOR)** **deps**: V8: forward declaration of `Rtl*FunctionTable` (Refael Ackermann) [#27375](https://github.com/nodejs/node/pull/27375) <ide> * [[`ac0c075cad`](https://github.com/nodejs/node/commit/ac0c075cad)] - **(SEMVER-MINOR)** **deps**: V8: patch register-arm64.h (Refael Ackermann) [#27375](https://github.com/nodejs/node/pull/27375) <ide> * [[`eefbc0773f`](https://github.com/nodejs/node/commit/eefbc0773f)] - **(SEMVER-MINOR)** **deps**: V8: update postmortem metadata generation script (cjihrig) [#28016](https://github.com/nodejs/node/pull/28016) <ide> * [[`33f3e383da`](https://github.com/nodejs/node/commit/33f3e383da)] - **(SEMVER-MINOR)** **deps**: V8: silence irrelevant warning (Michaël Zasso) [#26685](https://github.com/nodejs/node/pull/26685) <ide> Vulnerabilities fixed: <ide> * [[`f8a33abe0c`](https://github.com/nodejs/node/commit/f8a33abe0c)] - **(SEMVER-MINOR)** **deps**: V8: workaround for MSVC 14.20 optimizer bug (Refael Ackermann) [#27375](https://github.com/nodejs/node/pull/27375) <ide> * [[`0a5ff4cb33`](https://github.com/nodejs/node/commit/0a5ff4cb33)] - **(SEMVER-MINOR)** **deps**: V8: template explicit instantiation for GCC-8 (Refael Ackermann) [#27375](https://github.com/nodejs/node/pull/27375) <ide> * [[`b411114a52`](https://github.com/nodejs/node/commit/b411114a52)] - **(SEMVER-MINOR)** **deps**: V8: use ATOMIC\_VAR\_INIT instead of std::atomic\_init (Refael Ackermann) [#27375](https://github.com/nodejs/node/pull/27375) <del>* [[`c08d94baef`](https://github.com/nodejs/node/commit/c08d94baef)] - **(SEMVER-MINOR)** **deps**: V8: forward declaration of `Rtl\*FunctionTable` (Refael Ackermann) [#27375](https://github.com/nodejs/node/pull/27375) <add>* [[`c08d94baef`](https://github.com/nodejs/node/commit/c08d94baef)] - **(SEMVER-MINOR)** **deps**: V8: forward declaration of `Rtl*FunctionTable` (Refael Ackermann) [#27375](https://github.com/nodejs/node/pull/27375) <ide> * [[`445bb81ab6`](https://github.com/nodejs/node/commit/445bb81ab6)] - **(SEMVER-MINOR)** **deps**: V8: patch register-arm64.h (Refael Ackermann) [#27375](https://github.com/nodejs/node/pull/27375) <ide> * [[`fa6dfec186`](https://github.com/nodejs/node/commit/fa6dfec186)] - **(SEMVER-MINOR)** **deps**: V8: backport f89e555 (Michaël Zasso) [#27375](https://github.com/nodejs/node/pull/27375) <ide> * [[`8b8fe87e54`](https://github.com/nodejs/node/commit/8b8fe87e54)] - **deps**: V8: cherry-pick cca9ae3c9a (Benedikt Meurer) [#27729](https://github.com/nodejs/node/pull/27729) <ide> Vulnerabilities fixed: <ide> * [[`5bbc6d79c3`](https://github.com/nodejs/node/commit/5bbc6d79c3)] - **assert**: remove unreachable code (Rich Trott) [#27840](https://github.com/nodejs/node/pull/27840) <ide> * [[`530e63a4eb`](https://github.com/nodejs/node/commit/530e63a4eb)] - **assert**: remove unreachable code (Rich Trott) [#27786](https://github.com/nodejs/node/pull/27786) <ide> * [[`9b08c458be`](https://github.com/nodejs/node/commit/9b08c458be)] - **build,aix**: link with `noerrmsg` to eliminate warnings (Refael Ackermann) [#27773](https://github.com/nodejs/node/pull/27773) <del>* [[`08b0ca9645`](https://github.com/nodejs/node/commit/08b0ca9645)] - **build,win**: create junction instead of symlink to `out\\%config%` (Refael Ackermann) [#27736](https://github.com/nodejs/node/pull/27736) <add>* [[`08b0ca9645`](https://github.com/nodejs/node/commit/08b0ca9645)] - **build,win**: create junction instead of symlink to `out\%config%` (Refael Ackermann) [#27736](https://github.com/nodejs/node/pull/27736) <ide> * [[`ea2d550507`](https://github.com/nodejs/node/commit/ea2d550507)] - **child_process**: move exports to bottom for consistent code style (himself65) [#27845](https://github.com/nodejs/node/pull/27845) <ide> * [[`a9f95572c3`](https://github.com/nodejs/node/commit/a9f95572c3)] - **child_process**: remove extra shallow copy (zero1five) [#27801](https://github.com/nodejs/node/pull/27801) <ide> * [[`449ee8dd42`](https://github.com/nodejs/node/commit/449ee8dd42)] - **console**: fix table() output (Brian White) [#27917](https://github.com/nodejs/node/pull/27917) <ide> Vulnerabilities fixed: <ide> * [[`02f794a53f`](https://github.com/nodejs/node/commit/02f794a53f)] - **src**: remove memory\_tracker-inl.h from header files (Sam Roberts) [#27755](https://github.com/nodejs/node/pull/27755) <ide> * [[`940577bd76`](https://github.com/nodejs/node/commit/940577bd76)] - **src**: move ThreadPoolWork inlines into a -inl.h (Sam Roberts) [#27755](https://github.com/nodejs/node/pull/27755) <ide> * [[`c0cf17388c`](https://github.com/nodejs/node/commit/c0cf17388c)] - **src**: ignore SIGXFSZ, don't terminate (ulimit -f) (Ben Noordhuis) [#27798](https://github.com/nodejs/node/pull/27798) <del>* [[`a47ee80114`](https://github.com/nodejs/node/commit/a47ee80114)] - **(SEMVER-MINOR)** **stream**: convert string to Buffer when calling `unshift(\<string\>)` (Marcos Casagrande) [#27194](https://github.com/nodejs/node/pull/27194) <add>* [[`a47ee80114`](https://github.com/nodejs/node/commit/a47ee80114)] - **(SEMVER-MINOR)** **stream**: convert string to Buffer when calling `unshift(<string>)` (Marcos Casagrande) [#27194](https://github.com/nodejs/node/pull/27194) <ide> * [[`5eccd642ef`](https://github.com/nodejs/node/commit/5eccd642ef)] - **stream**: convert existing buffer when calling .setEncoding (Anna Henningsen) [#27936](https://github.com/nodejs/node/pull/27936) <ide> * [[`6a5ce36fb8`](https://github.com/nodejs/node/commit/6a5ce36fb8)] - **test**: handle unknown message type in worker threads (Rich Trott) [#27995](https://github.com/nodejs/node/pull/27995) <ide> * [[`182725651b`](https://github.com/nodejs/node/commit/182725651b)] - **test**: add coverage for unserializable worker thread error (Rich Trott) [#27995](https://github.com/nodejs/node/pull/27995) <ide> Vulnerabilities fixed: <ide> * [[`c0cdf30e6e`](https://github.com/nodejs/node/commit/c0cdf30e6e)] - **doc**: improve CCM example (Tobias Nießen) [#27396](https://github.com/nodejs/node/pull/27396) <ide> * [[`b5498ed19b`](https://github.com/nodejs/node/commit/b5498ed19b)] - **doc,meta**: codify security release commit message (Richard Lau) [#27643](https://github.com/nodejs/node/pull/27643) <ide> * [[`6e2c8d0e18`](https://github.com/nodejs/node/commit/6e2c8d0e18)] - **doc,n-api**: update N-API version matrix for v12.x (Richard Lau) [#27745](https://github.com/nodejs/node/pull/27745) <del>* [[`767889b0a3`](https://github.com/nodejs/node/commit/767889b0a3)] - **doc,n-api**: fix `introduced\_in` metadata (Richard Lau) [#27745](https://github.com/nodejs/node/pull/27745) <add>* [[`767889b0a3`](https://github.com/nodejs/node/commit/767889b0a3)] - **doc,n-api**: fix `introduced_in` metadata (Richard Lau) [#27745](https://github.com/nodejs/node/pull/27745) <ide> * [[`4ed8a9ba7e`](https://github.com/nodejs/node/commit/4ed8a9ba7e)] - **doc,tools**: updates for 6.x End-of-Life (Richard Lau) [#27658](https://github.com/nodejs/node/pull/27658) <ide> * [[`80f30741bd`](https://github.com/nodejs/node/commit/80f30741bd)] - **esm**: use correct error arguments (cjihrig) [#27763](https://github.com/nodejs/node/pull/27763) <ide> * [[`47f913bedc`](https://github.com/nodejs/node/commit/47f913bedc)] - **(SEMVER-MINOR)** **esm**: --experimental-wasm-modules integration support (Myles Borins) [#27659](https://github.com/nodejs/node/pull/27659) <ide> Vulnerabilities fixed: <ide> * [[`8f48edd28f`](https://github.com/nodejs/node/commit/8f48edd28f)] - **vm**: mark global proxy as side-effect-free (Anna Henningsen) [#27523](https://github.com/nodejs/node/pull/27523) <ide> * [[`c7cf8d9b74`](https://github.com/nodejs/node/commit/c7cf8d9b74)] - **(SEMVER-MINOR)** **worker**: add ability to unshift message from MessagePort (Anna Henningsen) [#27294](https://github.com/nodejs/node/pull/27294) <ide> * [[`e004d427ce`](https://github.com/nodejs/node/commit/e004d427ce)] - **worker**: use special message as MessagePort close command (Anna Henningsen) [#27705](https://github.com/nodejs/node/pull/27705) <del>* [[`b7ed4d7187`](https://github.com/nodejs/node/commit/b7ed4d7187)] - **worker**: move `receiving\_messages\_` field to `MessagePort` (Anna Henningsen) [#27705](https://github.com/nodejs/node/pull/27705) <add>* [[`b7ed4d7187`](https://github.com/nodejs/node/commit/b7ed4d7187)] - **worker**: move `receiving_messages_` field to `MessagePort` (Anna Henningsen) [#27705](https://github.com/nodejs/node/pull/27705) <ide> <ide> <a id="12.2.0"></a> <ide> ## 2019-05-07, Version 12.2.0 (Current), @targos <ide> Vulnerabilities fixed: <ide> * [[`aa281d284a`](https://github.com/nodejs/node/commit/aa281d284a)] - **test**: better output for test-report-uv-handles.js (gengjiawen) [#27479](https://github.com/nodejs/node/pull/27479) <ide> * [[`86c27c6005`](https://github.com/nodejs/node/commit/86c27c6005)] - **test**: add mustcall in test-net-bytes-read.js (imhype) [#27471](https://github.com/nodejs/node/pull/27471) <ide> * [[`33fead3f5e`](https://github.com/nodejs/node/commit/33fead3f5e)] - ***Revert*** "**test**: skip test-cpu-prof in debug builds with code cache" (Anna Henningsen) [#27469](https://github.com/nodejs/node/pull/27469) <del>* [[`a9a85d6271`](https://github.com/nodejs/node/commit/a9a85d6271)] - **test**: check `napi\_get\_reference\_value()` during finalization (Anna Henningsen) [#27470](https://github.com/nodejs/node/pull/27470) <add>* [[`a9a85d6271`](https://github.com/nodejs/node/commit/a9a85d6271)] - **test**: check `napi_get_reference_value()` during finalization (Anna Henningsen) [#27470](https://github.com/nodejs/node/pull/27470) <ide> * [[`16af9435a0`](https://github.com/nodejs/node/commit/16af9435a0)] - **test**: remove flaky designation for test-tls-sni-option (Luigi Pinca) [#27425](https://github.com/nodejs/node/pull/27425) <ide> * [[`1b94d025bc`](https://github.com/nodejs/node/commit/1b94d025bc)] - **test**: add missing line breaks to keep-alive header of slow headers test (Shuhei Kagawa) [#27442](https://github.com/nodejs/node/pull/27442) <ide> * [[`fefbbd90af`](https://github.com/nodejs/node/commit/fefbbd90af)] - **test**: add tests for new language features (Ruben Bridgewater) [#27400](https://github.com/nodejs/node/pull/27400) <ide> Vulnerabilities fixed: <ide> * [[`a6d1fa5954`](https://github.com/nodejs/node/commit/a6d1fa5954)] - **doc**: simplify Collaborator pre-nomination text (Rich Trott) [#27348](https://github.com/nodejs/node/pull/27348) <ide> * [[`dd709fc84a`](https://github.com/nodejs/node/commit/dd709fc84a)] - **lib**: throw a special error in internal/assert (Joyee Cheung) [#26635](https://github.com/nodejs/node/pull/26635) <ide> * [[`4dfe54a89a`](https://github.com/nodejs/node/commit/4dfe54a89a)] - **module**: initialize module\_wrap.callbackMap during pre-execution (Joyee Cheung) [#27323](https://github.com/nodejs/node/pull/27323) <del>* [[`8b5d73867f`](https://github.com/nodejs/node/commit/8b5d73867f)] - **(SEMVER-MINOR)** **n-api**: do not require JS Context for `napi\_async\_destroy()` (Anna Henningsen) [#27255](https://github.com/nodejs/node/pull/27255) <add>* [[`8b5d73867f`](https://github.com/nodejs/node/commit/8b5d73867f)] - **(SEMVER-MINOR)** **n-api**: do not require JS Context for `napi_async_destroy()` (Anna Henningsen) [#27255](https://github.com/nodejs/node/pull/27255) <ide> * [[`d00014e599`](https://github.com/nodejs/node/commit/d00014e599)] - **process**: reduce the number of internal frames in async stack trace (Joyee Cheung) [#27392](https://github.com/nodejs/node/pull/27392) <ide> * [[`dc510fb435`](https://github.com/nodejs/node/commit/dc510fb435)] - **report**: print common items first for readability (gengjiawen) [#27367](https://github.com/nodejs/node/pull/27367) <ide> * [[`3614a00276`](https://github.com/nodejs/node/commit/3614a00276)] - **src**: refactor deprecated UVException in node\_file.cc (gengjiawen) [#27280](https://github.com/nodejs/node/pull/27280) <ide> * [[`071300b39d`](https://github.com/nodejs/node/commit/071300b39d)] - **src**: move OnMessage to node\_errors.cc (Joyee Cheung) [#27304](https://github.com/nodejs/node/pull/27304) <ide> * [[`81e7b49c8f`](https://github.com/nodejs/node/commit/81e7b49c8f)] - **src**: use predefined AliasedBuffer types in the code base (Joyee Cheung) [#27334](https://github.com/nodejs/node/pull/27334) <ide> * [[`8089d29567`](https://github.com/nodejs/node/commit/8089d29567)] - **src**: apply clang-tidy modernize-deprecated-headers found by Jenkins CI (gengjiawen) [#27279](https://github.com/nodejs/node/pull/27279) <del>* [[`619c5b6eb3`](https://github.com/nodejs/node/commit/619c5b6eb3)] - **(SEMVER-MINOR)** **src**: do not require JS Context for `\~AsyncResoure()` (Anna Henningsen) [#27255](https://github.com/nodejs/node/pull/27255) <add>* [[`619c5b6eb3`](https://github.com/nodejs/node/commit/619c5b6eb3)] - **(SEMVER-MINOR)** **src**: do not require JS Context for `~AsyncResoure()` (Anna Henningsen) [#27255](https://github.com/nodejs/node/pull/27255) <ide> * [[`809cf595eb`](https://github.com/nodejs/node/commit/809cf595eb)] - **(SEMVER-MINOR)** **src**: add `Environment` overload of `EmitAsyncDestroy` (Anna Henningsen) [#27255](https://github.com/nodejs/node/pull/27255) <ide> * [[`7bc47cba2e`](https://github.com/nodejs/node/commit/7bc47cba2e)] - **src**: apply clang-tidy rule modernize-use-equals-default (gengjiawen) [#27264](https://github.com/nodejs/node/pull/27264) <ide> * [[`ad42cd69cf`](https://github.com/nodejs/node/commit/ad42cd69cf)] - **src**: use std::vector\<size\_t\> instead of IndexArray (Joyee Cheung) [#27321](https://github.com/nodejs/node/pull/27321) <ide> Vulnerabilities fixed: <ide> * decode missing passphrase errors (Tobias Nießen) [#25208](https://github.com/nodejs/node/pull/25208) <ide> * remove `Cipher.setAuthTag()` and `Decipher.getAuthTag()` (Tobias Nießen) [#26249](https://github.com/nodejs/node/pull/26249) <ide> * remove deprecated `crypto._toBuf()` (Tobias Nießen) [#25338](https://github.com/nodejs/node/pull/25338) <del> * set `DEFAULT\_ENCODING` property to non-enumerable (Antoine du Hamel) [#23222](https://github.com/nodejs/node/pull/23222) <add> * set `DEFAULT_ENCODING` property to non-enumerable (Antoine du Hamel) [#23222](https://github.com/nodejs/node/pull/23222) <ide> * **deps**: <ide> * update V8 to 7.4.288.13 (Michaël Zasso, cjihrig, Refael Ackermann, Anna Henningsen, Ujjwal Sharma) [#26685](https://github.com/nodejs/node/pull/26685) <ide> * bump minimum icu version to 63 (Ujjwal Sharma) [#25852](https://github.com/nodejs/node/pull/25852) <ide> Vulnerabilities fixed: <ide> * [[`2e2c015422`](https://github.com/nodejs/node/commit/2e2c015422)] - **(SEMVER-MAJOR)** **crypto**: decode missing passphrase errors (Tobias Nießen) [#25208](https://github.com/nodejs/node/pull/25208) <ide> * [[`b8018f407b`](https://github.com/nodejs/node/commit/b8018f407b)] - **(SEMVER-MAJOR)** **crypto**: move DEP0113 to End-of-Life (Tobias Nießen) [#26249](https://github.com/nodejs/node/pull/26249) <ide> * [[`bf3cb3f9b1`](https://github.com/nodejs/node/commit/bf3cb3f9b1)] - **(SEMVER-MAJOR)** **crypto**: remove deprecated crypto.\_toBuf (Tobias Nießen) [#25338](https://github.com/nodejs/node/pull/25338) <del>* [[`0f63d84f80`](https://github.com/nodejs/node/commit/0f63d84f80)] - **(SEMVER-MAJOR)** **crypto**: set `DEFAULT\_ENCODING` property to non-enumerable (Antoine du Hamel) [#23222](https://github.com/nodejs/node/pull/23222) <add>* [[`0f63d84f80`](https://github.com/nodejs/node/commit/0f63d84f80)] - **(SEMVER-MAJOR)** **crypto**: set `DEFAULT_ENCODING` property to non-enumerable (Antoine du Hamel) [#23222](https://github.com/nodejs/node/pull/23222) <ide> * [[`95e779a6e9`](https://github.com/nodejs/node/commit/95e779a6e9)] - **(SEMVER-MAJOR)** **deps**: silence irrelevant V8 warning (Michaël Zasso) [#26685](https://github.com/nodejs/node/pull/26685) <ide> * [[`08efd3060d`](https://github.com/nodejs/node/commit/08efd3060d)] - **(SEMVER-MAJOR)** **deps**: update postmortem metadata generation script (cjihrig) [#26685](https://github.com/nodejs/node/pull/26685) <ide> * [[`0da7e99f98`](https://github.com/nodejs/node/commit/0da7e99f98)] - **(SEMVER-MAJOR)** **deps**: V8: un-cherry-pick bd019bd (Refael Ackermann) [#26685](https://github.com/nodejs/node/pull/26685) <ide><path>doc/changelogs/CHANGELOG_V6.md <ide> Fixes for the following CVEs are included in this release: <ide> * [[`1edadebaa0`](https://github.com/nodejs/node/commit/1edadebaa0)] - **http**: allow \_httpMessage to be GC'ed (Luigi Pinca) [#18865](https://github.com/nodejs/node/pull/18865) <ide> * [[`dbe70b744c`](https://github.com/nodejs/node/commit/dbe70b744c)] - **http**: free the parser before emitting 'upgrade' (Luigi Pinca) [#18209](https://github.com/nodejs/node/pull/18209) <ide> * [[`77a405b92f`](https://github.com/nodejs/node/commit/77a405b92f)] - **lib**: set process.execPath on OpenBSD (Aaron Bieber) [#18543](https://github.com/nodejs/node/pull/18543) <del>* [[`3aa5b7d939`](https://github.com/nodejs/node/commit/3aa5b7d939)] - **n-api**: add more `int64\_t` tests (Kyle Farnung) [#19402](https://github.com/nodejs/node/pull/19402) <add>* [[`3aa5b7d939`](https://github.com/nodejs/node/commit/3aa5b7d939)] - **n-api**: add more `int64_t` tests (Kyle Farnung) [#19402](https://github.com/nodejs/node/pull/19402) <ide> * [[`abd9fd6797`](https://github.com/nodejs/node/commit/abd9fd6797)] - **n-api**: back up env before finalize (Gabriel Schulhof) [#19718](https://github.com/nodejs/node/pull/19718) <ide> * [[`e6ccdfbde3`](https://github.com/nodejs/node/commit/e6ccdfbde3)] - **n-api**: ensure in-module exceptions are propagated (Gabriel Schulhof) [#19537](https://github.com/nodejs/node/pull/19537) <ide> * [[`c6d0a66ef2`](https://github.com/nodejs/node/commit/c6d0a66ef2)] - **n-api**: bump version of n-api supported (Michael Dawson) [#19497](https://github.com/nodejs/node/pull/19497) <ide> Fixes for the following CVEs are included in this release: <ide> * [[`e54b8e8184`](https://github.com/nodejs/node/commit/e54b8e8184)] - **stream**: cleanup() when unpiping all streams. (陈刚) [#18266](https://github.com/nodejs/node/pull/18266) <ide> * [[`8ab8d6afd6`](https://github.com/nodejs/node/commit/8ab8d6afd6)] - **stream**: fix y.pipe(x)+y.pipe(x)+y.unpipe(x) (Anna Henningsen) [#12746](https://github.com/nodejs/node/pull/12746) <ide> * [[`8f830ca896`](https://github.com/nodejs/node/commit/8f830ca896)] - **stream**: remove unreachable code (Luigi Pinca) [#18239](https://github.com/nodejs/node/pull/18239) <del>* [[`64c83d7da9`](https://github.com/nodejs/node/commit/64c83d7da9)] - **stream**: simplify `src.\_readableState` to `state` (陈刚) [#18264](https://github.com/nodejs/node/pull/18264) <add>* [[`64c83d7da9`](https://github.com/nodejs/node/commit/64c83d7da9)] - **stream**: simplify `src._readableState` to `state` (陈刚) [#18264](https://github.com/nodejs/node/pull/18264) <ide> * [[`7c58045470`](https://github.com/nodejs/node/commit/7c58045470)] - **test**: remove unnecessary timer (cjihrig) [#18719](https://github.com/nodejs/node/pull/18719) <ide> * [[`c90b77ed5d`](https://github.com/nodejs/node/commit/c90b77ed5d)] - **test**: convert new tests to use error types (Jack Horton) [#18581](https://github.com/nodejs/node/pull/18581) <ide> * [[`7f37dc9c48`](https://github.com/nodejs/node/commit/7f37dc9c48)] - **test**: improve error message output (Bhavani Shankar) [#18498](https://github.com/nodejs/node/pull/18498) <ide><path>doc/changelogs/CHANGELOG_V7.md <ide> _This is a security release impacting Windows 10 users._ <ide> * **icu**: <ide> * Upgraded to ICU 58 - small icu (Steven R. Loomis) [#9234](https://github.com/nodejs/node/pull/9234) <ide> * Add `cldr`, `tz`, and `unicode` to `process.versions` (Steven R. Loomis) [#9266](https://github.com/nodejs/node/pull/9266) <del>* **lib**: make `String(global) === '\[object global\]'` (Anna Henningsen) [#9279](https://github.com/nodejs/node/pull/9279) <add>* **lib**: make `String(global) === '[object global]'` (Anna Henningsen) [#9279](https://github.com/nodejs/node/pull/9279) <ide> * **libuv**: Upgraded to 1.10.0 (cjihrig) [#9267](https://github.com/nodejs/node/pull/9267) <ide> * **readline**: use icu based string width calculation (James M Snell) [#9040](https://github.com/nodejs/node/pull/9040) <ide> * **src**: <ide> _This is a security release impacting Windows 10 users._ <ide> * [[`2e7b078e7b`](https://github.com/nodejs/node/commit/2e7b078e7b)] - **inspector**: fix request path nullptr dereference (Ben Noordhuis) [#9184](https://github.com/nodejs/node/pull/9184) <ide> * [[`9940666c1b`](https://github.com/nodejs/node/commit/9940666c1b)] - **(SEMVER-MINOR)** **intl**: Add more versions from ICU (Steven R. Loomis) [#9266](https://github.com/nodejs/node/pull/9266) <ide> * [[`5bfefa6063`](https://github.com/nodejs/node/commit/5bfefa6063)] - **lib**: change == to === in linkedlist (jedireza) [#9362](https://github.com/nodejs/node/pull/9362) <del>* [[`d24bd20d2b`](https://github.com/nodejs/node/commit/d24bd20d2b)] - **lib**: make `String(global) === '\[object global\]'` (Anna Henningsen) [#9279](https://github.com/nodejs/node/pull/9279) <add>* [[`d24bd20d2b`](https://github.com/nodejs/node/commit/d24bd20d2b)] - **lib**: make `String(global) === '[object global]'` (Anna Henningsen) [#9279](https://github.com/nodejs/node/pull/9279) <ide> * [[`9372aee4a3`](https://github.com/nodejs/node/commit/9372aee4a3)] - **lib**: fix beforeExit not working with -e (Ben Noordhuis) [#8821](https://github.com/nodejs/node/pull/8821) <ide> * [[`c231130e06`](https://github.com/nodejs/node/commit/c231130e06)] - **module**: skip directories known not to exist (Ben Noordhuis) [#9196](https://github.com/nodejs/node/pull/9196) <ide> * [[`d09eb9c6b2`](https://github.com/nodejs/node/commit/d09eb9c6b2)] - **net**: name anonymous functions (Pedro Victor) [#9357](https://github.com/nodejs/node/pull/9357) <ide><path>doc/changelogs/CHANGELOG_V8.md <ide> Fixes for the following CVEs are included in this release: <ide> * [[`4911c4e9fa`](https://github.com/nodejs/node/commit/4911c4e9fa)] - **n-api**: improve runtime perf of n-api func call (Kenny Yuan) [#21072](https://github.com/nodejs/node/pull/21072) <ide> * [[`0b2f52706d`](https://github.com/nodejs/node/commit/0b2f52706d)] - **(SEMVER-MINOR)** **n-api**: take n-api out of experimental (Michael Dawson) [#19262](https://github.com/nodejs/node/pull/19262) <ide> * [[`4a267f0e3c`](https://github.com/nodejs/node/commit/4a267f0e3c)] - **net**: simplify net.Socket#end() (Anna Henningsen) [#18708](https://github.com/nodejs/node/pull/18708) <del>* [[`3d38bab64e`](https://github.com/nodejs/node/commit/3d38bab64e)] - **net**: use `\_final` instead of `on('finish')` (Anna Henningsen) [#18608](https://github.com/nodejs/node/pull/18608) <add>* [[`3d38bab64e`](https://github.com/nodejs/node/commit/3d38bab64e)] - **net**: use `_final` instead of `on('finish')` (Anna Henningsen) [#18608](https://github.com/nodejs/node/pull/18608) <ide> * [[`1a1288d03c`](https://github.com/nodejs/node/commit/1a1288d03c)] - **perf_hooks**: fix timing (Timothy Gu) [#18993](https://github.com/nodejs/node/pull/18993) <ide> * [[`b4192b007b`](https://github.com/nodejs/node/commit/b4192b007b)] - **(SEMVER-MINOR)** **perf_hooks**: add warning when too many entries in the timeline (James M Snell) [#18087](https://github.com/nodejs/node/pull/18087) <ide> * [[`68d33c692e`](https://github.com/nodejs/node/commit/68d33c692e)] - **perf_hooks**: fix scheduling regression (Anatoli Papirovski) [#18051](https://github.com/nodejs/node/pull/18051) <ide> Fixes for the following CVEs are included in this release: <ide> * [[`8076a793ed`](https://github.com/nodejs/node/commit/8076a793ed)] - **src**: fix nullptr dereference for signal during startup (Anna Henningsen) [#20637](https://github.com/nodejs/node/pull/20637) <ide> * [[`1cb9772a40`](https://github.com/nodejs/node/commit/1cb9772a40)] - **src**: remove unused freelist.h header (Anna Henningsen) [#20544](https://github.com/nodejs/node/pull/20544) <ide> * [[`e17f05a817`](https://github.com/nodejs/node/commit/e17f05a817)] - **src**: create per-isolate strings after platform setup (Ulan Degenbaev) [#20175](https://github.com/nodejs/node/pull/20175) <del>* [[`d38ccbb07f`](https://github.com/nodejs/node/commit/d38ccbb07f)] - **src**: use `unordered\_map` for perf marks (Anna Henningsen) [#19558](https://github.com/nodejs/node/pull/19558) <add>* [[`d38ccbb07f`](https://github.com/nodejs/node/commit/d38ccbb07f)] - **src**: use `unordered_map` for perf marks (Anna Henningsen) [#19558](https://github.com/nodejs/node/pull/19558) <ide> * [[`553e34ef9c`](https://github.com/nodejs/node/commit/553e34ef9c)] - **src**: simplify http2 perf tracking code (Anna Henningsen) [#19470](https://github.com/nodejs/node/pull/19470) <ide> * [[`67182912d7`](https://github.com/nodejs/node/commit/67182912d7)] - **src**: add "icu::" prefix before ICU symbols (Steven R. Loomis) <ide> * [[`2cf263519a`](https://github.com/nodejs/node/commit/2cf263519a)] - **src**: use unique\_ptr for scheduled delayed tasks (Franziska Hinkelmann) [#17083](https://github.com/nodejs/node/pull/17083) <ide> * [[`2148b1921e`](https://github.com/nodejs/node/commit/2148b1921e)] - **src**: use unique\_ptr in platform implementation (Franziska Hinkelmann) [#16970](https://github.com/nodejs/node/pull/16970) <ide> * [[`e9327541e1`](https://github.com/nodejs/node/commit/e9327541e1)] - **src**: cancel pending delayed platform tasks on exit (Anna Henningsen) [#16700](https://github.com/nodejs/node/pull/16700) <ide> * [[`bf8068e6f9`](https://github.com/nodejs/node/commit/bf8068e6f9)] - **src**: prepare v8 platform for multi-isolate support (Anna Henningsen) [#16700](https://github.com/nodejs/node/pull/16700) <ide> * [[`59f13304e1`](https://github.com/nodejs/node/commit/59f13304e1)] - **src**: refactor callback #defines into C++ templates (Anna Henningsen) [#18133](https://github.com/nodejs/node/pull/18133) <del>* [[`a8d2ab50fc`](https://github.com/nodejs/node/commit/a8d2ab50fc)] - **src**: rename `On\*` -\> `Emit\*` for stream callbacks (Anna Henningsen) [#17701](https://github.com/nodejs/node/pull/17701) <add>* [[`a8d2ab50fc`](https://github.com/nodejs/node/commit/a8d2ab50fc)] - **src**: rename `On*` -\> `Emit*` for stream callbacks (Anna Henningsen) [#17701](https://github.com/nodejs/node/pull/17701) <ide> * [[`15c4717e0a`](https://github.com/nodejs/node/commit/15c4717e0a)] - **src**: harden JSStream callbacks (Anna Henningsen) [#18028](https://github.com/nodejs/node/pull/18028) <ide> * [[`5ea1492b74`](https://github.com/nodejs/node/commit/5ea1492b74)] - **src**: fix code coverage cleanup (Michael Dawson) [#18081](https://github.com/nodejs/node/pull/18081) <ide> * [[`0d2a720c70`](https://github.com/nodejs/node/commit/0d2a720c70)] - **src**: update make for new code coverage locations (Michael Dawson) [#17987](https://github.com/nodejs/node/pull/17987) <ide> Fixes for the following CVEs are included in this release: <ide> * [[`f0f44f69a6`](https://github.com/nodejs/node/commit/f0f44f69a6)] - **test**: check TTY mode reset on exit (Anna Henningsen) [#21027](https://github.com/nodejs/node/pull/21027) <ide> * [[`71ee19e064`](https://github.com/nodejs/node/commit/71ee19e064)] - **test**: plug AliasedBuffer cctest memory leak (Anna Henningsen) [#20665](https://github.com/nodejs/node/pull/20665) <ide> * [[`3c6464a4f4`](https://github.com/nodejs/node/commit/3c6464a4f4)] - **test**: add regression test for large write (Anna Henningsen) [#19551](https://github.com/nodejs/node/pull/19551) <del>* [[`21cdb73d67`](https://github.com/nodejs/node/commit/21cdb73d67)] - **test**: allow running with `NODE\_PENDING\_DEPRECATION` (Anna Henningsen) [#18991](https://github.com/nodejs/node/pull/18991) <add>* [[`21cdb73d67`](https://github.com/nodejs/node/commit/21cdb73d67)] - **test**: allow running with `NODE_PENDING_DEPRECATION` (Anna Henningsen) [#18991](https://github.com/nodejs/node/pull/18991) <ide> * [[`ad862a0114`](https://github.com/nodejs/node/commit/ad862a0114)] - **test**: properly tag anonymous namespaces (Michael Dawson) [#18583](https://github.com/nodejs/node/pull/18583) <ide> * [[`1942440696`](https://github.com/nodejs/node/commit/1942440696)] - **test**: refactor test-repl (Anna Henningsen) [#17926](https://github.com/nodejs/node/pull/17926) <ide> * [[`7d263ff708`](https://github.com/nodejs/node/commit/7d263ff708)] - **test**: fix unreliable async-hooks/test-signalwrap (Rich Trott) [#17827](https://github.com/nodejs/node/pull/17827) <ide> Fixes for the following CVEs are included in this release: <ide> * [[`7e4a9c9fe2`](https://github.com/nodejs/node/commit/7e4a9c9fe2)] - **http2**: use original error for cancelling pending streams (Anna Henningsen) [#18988](https://github.com/nodejs/node/pull/18988) <ide> * [[`2a04f57444`](https://github.com/nodejs/node/commit/2a04f57444)] - **http2**: send error text in case of ALPN mismatch (Anna Henningsen) [#18986](https://github.com/nodejs/node/pull/18986) <ide> * [[`f366373ad8`](https://github.com/nodejs/node/commit/f366373ad8)] - **http2**: fix condition where data is lost (Matteo Collina) [#18895](https://github.com/nodejs/node/pull/18895) <del>* [[`20fb59fdc4`](https://github.com/nodejs/node/commit/20fb59fdc4)] - **http2**: use `\_final` instead of `on('finish')` (Anna Henningsen) [#18609](https://github.com/nodejs/node/pull/18609) <add>* [[`20fb59fdc4`](https://github.com/nodejs/node/commit/20fb59fdc4)] - **http2**: use `_final` instead of `on('finish')` (Anna Henningsen) [#18609](https://github.com/nodejs/node/pull/18609) <ide> * [[`ac64b4f6a7`](https://github.com/nodejs/node/commit/ac64b4f6a7)] - **http2**: add checks for server close callback (James M Snell) [#18182](https://github.com/nodejs/node/pull/18182) <ide> * [[`8b0a1b32de`](https://github.com/nodejs/node/commit/8b0a1b32de)] - **http2**: refactor read mechanism (Anna Henningsen) [#18030](https://github.com/nodejs/node/pull/18030) <ide> * [[`a4d910c644`](https://github.com/nodejs/node/commit/a4d910c644)] - **http2**: remember sent headers (James M Snell) [#18045](https://github.com/nodejs/node/pull/18045) <ide> Fixes for the following CVEs are included in this release: <ide> * [[`2019b023a7`](https://github.com/nodejs/node/commit/2019b023a7)] - **lib**: refactor ES module loader for readability (Anna Henningsen) [#16579](https://github.com/nodejs/node/pull/16579) <ide> * [[`3df0570c90`](https://github.com/nodejs/node/commit/3df0570c90)] - **lib**: fix spelling in comments (Tobias Nießen) [#18018](https://github.com/nodejs/node/pull/18018) <ide> * [[`20844d1716`](https://github.com/nodejs/node/commit/20844d1716)] - **lib**: remove debugger dead code (Qingyan Li) [#18426](https://github.com/nodejs/node/pull/18426) <del>* [[`07a6770614`](https://github.com/nodejs/node/commit/07a6770614)] - **n-api**: add more `int64\_t` tests (Kyle Farnung) [#19402](https://github.com/nodejs/node/pull/19402) <add>* [[`07a6770614`](https://github.com/nodejs/node/commit/07a6770614)] - **n-api**: add more `int64_t` tests (Kyle Farnung) [#19402](https://github.com/nodejs/node/pull/19402) <ide> * [[`8b3ef4660a`](https://github.com/nodejs/node/commit/8b3ef4660a)] - **n-api**: back up env before finalize (Gabriel Schulhof) [#19718](https://github.com/nodejs/node/pull/19718) <ide> * [[`92f699e021`](https://github.com/nodejs/node/commit/92f699e021)] - **n-api**: ensure in-module exceptions are propagated (Gabriel Schulhof) [#19537](https://github.com/nodejs/node/pull/19537) <ide> * [[`367113f5d7`](https://github.com/nodejs/node/commit/367113f5d7)] - **n-api**: bump version of n-api supported (Michael Dawson) [#19497](https://github.com/nodejs/node/pull/19497) <ide> Fixes for the following CVEs are included in this release: <ide> * [[`c0f40be23b`](https://github.com/nodejs/node/commit/c0f40be23b)] - **src**: free memory before re-setting URLHost value (Ivan Filenko) [#18357](https://github.com/nodejs/node/pull/18357) <ide> * [[`5e4f9b37ba`](https://github.com/nodejs/node/commit/5e4f9b37ba)] - **src,doc,test**: Fix common misspellings (Roman Reiss) [#18151](https://github.com/nodejs/node/pull/18151) <ide> * [[`10231a9e44`](https://github.com/nodejs/node/commit/10231a9e44)] - **stream**: cleanup() when unpiping all streams. (陈刚) [#18266](https://github.com/nodejs/node/pull/18266) <del>* [[`bf523822ba`](https://github.com/nodejs/node/commit/bf523822ba)] - **stream**: simplify `src.\_readableState` to `state` (陈刚) [#18264](https://github.com/nodejs/node/pull/18264) <add>* [[`bf523822ba`](https://github.com/nodejs/node/commit/bf523822ba)] - **stream**: simplify `src._readableState` to `state` (陈刚) [#18264](https://github.com/nodejs/node/pull/18264) <ide> * [[`37e594ed4a`](https://github.com/nodejs/node/commit/37e594ed4a)] - **stream**: remove unreachable code (Luigi Pinca) [#18239](https://github.com/nodejs/node/pull/18239) <ide> * [[`f96b0bf494`](https://github.com/nodejs/node/commit/f96b0bf494)] - **string_decoder**: reset decoder on end (Justin Ridgewell) [#18494](https://github.com/nodejs/node/pull/18494) <ide> * [[`4dbdb8ae4e`](https://github.com/nodejs/node/commit/4dbdb8ae4e)] - **test**: http2 errors on req.close() (Trivikram) [#18854](https://github.com/nodejs/node/pull/18854) <ide> LTS codename `'Carbon'`. Note that the <ide> * [[`78182458e6`](https://github.com/nodejs/node/commit/78182458e6)] - **(SEMVER-MAJOR)** **url**: fix error message of url.format (DavidCai) [#11162](https://github.com/nodejs/node/pull/11162) <ide> * [[`c65d55f087`](https://github.com/nodejs/node/commit/c65d55f087)] - **(SEMVER-MAJOR)** **url**: do not truncate long hostnames (Junshu Okamoto) [#9292](https://github.com/nodejs/node/pull/9292) <ide> * [[`3cc3e099be`](https://github.com/nodejs/node/commit/3cc3e099be)] - **(SEMVER-MAJOR)** **util**: show External values explicitly in inspect (Anna Henningsen) [#12151](https://github.com/nodejs/node/pull/12151) <del>* [[`4a5a9445b5`](https://github.com/nodejs/node/commit/4a5a9445b5)] - **(SEMVER-MAJOR)** **util**: use `\[Array\]` for deeply nested arrays (Anna Henningsen) [#12046](https://github.com/nodejs/node/pull/12046) <add>* [[`4a5a9445b5`](https://github.com/nodejs/node/commit/4a5a9445b5)] - **(SEMVER-MAJOR)** **util**: use `[Array]` for deeply nested arrays (Anna Henningsen) [#12046](https://github.com/nodejs/node/pull/12046) <ide> * [[`5bfd13b81e`](https://github.com/nodejs/node/commit/5bfd13b81e)] - **(SEMVER-MAJOR)** **util**: display Symbol keys in inspect by default (Shahar Or) [#9726](https://github.com/nodejs/node/pull/9726) <ide> * [[`455e6f1dd8`](https://github.com/nodejs/node/commit/455e6f1dd8)] - **(SEMVER-MAJOR)** **util**: throw toJSON errors when formatting %j (Timothy Gu) [#11708](https://github.com/nodejs/node/pull/11708) <ide> * [[`ec2f098156`](https://github.com/nodejs/node/commit/ec2f098156)] - **(SEMVER-MAJOR)** **util**: change sparse arrays inspection format (Alexey Orlenko) [#11576](https://github.com/nodejs/node/pull/11576) <ide><path>doc/changelogs/CHANGELOG_V9.md <ide> Fixes for the following CVEs are included in this release: <ide> * [[`223b42648f`](https://github.com/nodejs/node/commit/223b42648f)] - **openssl**: fix keypress requirement in apps on win32 (Shigeki Ohtsu) [iojs/io.js#1389](https://github.com/iojs/io.js/pull/1389) <ide> * [[`40916a27bc`](https://github.com/nodejs/node/commit/40916a27bc)] - **path**: fix regression in posix.normalize (Michaël Zasso) [#19520](https://github.com/nodejs/node/pull/19520) <ide> * [[`fad5dcce3b`](https://github.com/nodejs/node/commit/fad5dcce3b)] - **src**: drop CNNIC+StartCom certificate whitelisting (Ben Noordhuis) [#19322](https://github.com/nodejs/node/pull/19322) <del>* [[`780a5d6f3a`](https://github.com/nodejs/node/commit/780a5d6f3a)] - **src**: use `unordered\_map` for perf marks (Anna Henningsen) [#19558](https://github.com/nodejs/node/pull/19558) <add>* [[`780a5d6f3a`](https://github.com/nodejs/node/commit/780a5d6f3a)] - **src**: use `unordered_map` for perf marks (Anna Henningsen) [#19558](https://github.com/nodejs/node/pull/19558) <ide> * [[`f13cc3237e`](https://github.com/nodejs/node/commit/f13cc3237e)] - **stream**: improve stream creation performance (Brian White) [#19401](https://github.com/nodejs/node/pull/19401) <ide> * [[`8996d3cf45`](https://github.com/nodejs/node/commit/8996d3cf45)] - **test**: remove third param from assert.strictEqual (davis.okoth@kemsa.co.ke) [#19536](https://github.com/nodejs/node/pull/19536) <ide> * [[`c1a327b0ed`](https://github.com/nodejs/node/commit/c1a327b0ed)] - **test**: remove custom error message (DingDean) [#19526](https://github.com/nodejs/node/pull/19526) <ide> Fixes for the following CVEs are included in this release: <ide> * [[`1b32fc3276`](https://github.com/nodejs/node/commit/1b32fc3276)] - **n-api**: fix object test (Gabriel Schulhof) [#19039](https://github.com/nodejs/node/pull/19039) <ide> * [[`ef4714c2b6`](https://github.com/nodejs/node/commit/ef4714c2b6)] - **net**: inline and simplify onSocketEnd (Anna Henningsen) [#18607](https://github.com/nodejs/node/pull/18607) <ide> * [[`28880cf89d`](https://github.com/nodejs/node/commit/28880cf89d)] - **perf_hooks**: fix timing (Timothy Gu) [#18993](https://github.com/nodejs/node/pull/18993) <del>* [[`96f0bec48b`](https://github.com/nodejs/node/commit/96f0bec48b)] - **repl**: make last error available as `\_error` (Anna Henningsen) [#18919](https://github.com/nodejs/node/pull/18919) <add>* [[`96f0bec48b`](https://github.com/nodejs/node/commit/96f0bec48b)] - **repl**: make last error available as `_error` (Anna Henningsen) [#18919](https://github.com/nodejs/node/pull/18919) <ide> * [[`420d56c2ea`](https://github.com/nodejs/node/commit/420d56c2ea)] - **src**: don't touch js object in Http2Session dtor (Ben Noordhuis) [#18656](https://github.com/nodejs/node/pull/18656) <ide> * [[`f89f659dcf`](https://github.com/nodejs/node/commit/f89f659dcf)] - **src**: remove unnecessary Reset() calls (Ben Noordhuis) [#18656](https://github.com/nodejs/node/pull/18656) <ide> * [[`67a9742aed`](https://github.com/nodejs/node/commit/67a9742aed)] - **src**: prevent persistent handle resource leaks (Ben Noordhuis) [#18656](https://github.com/nodejs/node/pull/18656) <ide> Fixes for the following CVEs are included in this release: <ide> * [[`23107ba7b1`](https://github.com/nodejs/node/commit/23107ba7b1)] - **test**: remove assert message and add block scope (wuweiweiwu) [#19054](https://github.com/nodejs/node/pull/19054) <ide> * [[`cc90bbd0f4`](https://github.com/nodejs/node/commit/cc90bbd0f4)] - **test**: fix flaky inspector-stop-profile-after-done (Rich Trott) [#18126](https://github.com/nodejs/node/pull/18126) <ide> * [[`8d595bb25c`](https://github.com/nodejs/node/commit/8d595bb25c)] - **test**: check endless loop while writing empty string (XadillaX) [#18924](https://github.com/nodejs/node/pull/18924) <del>* [[`a4550069ca`](https://github.com/nodejs/node/commit/a4550069ca)] - **test**: allow running with `NODE\_PENDING\_DEPRECATION` (Anna Henningsen) [#18991](https://github.com/nodejs/node/pull/18991) <add>* [[`a4550069ca`](https://github.com/nodejs/node/commit/a4550069ca)] - **test**: allow running with `NODE_PENDING_DEPRECATION` (Anna Henningsen) [#18991](https://github.com/nodejs/node/pull/18991) <ide> * [[`fd27165f73`](https://github.com/nodejs/node/commit/fd27165f73)] - **test**: specify 'dir' for directory symlinks (Kyle Farnung) [#19049](https://github.com/nodejs/node/pull/19049) <ide> * [[`eca333a6e8`](https://github.com/nodejs/node/commit/eca333a6e8)] - **test**: refactor test after review (Andrew Johnston) [#18999](https://github.com/nodejs/node/pull/18999) <ide> * [[`c943cd09a7`](https://github.com/nodejs/node/commit/c943cd09a7)] - **test**: fix repl-tab-complete --without-ssl (Daniel Bevenius) [#17867](https://github.com/nodejs/node/pull/17867) <ide> This is a special release to fix potentially Semver-Major regression that was re <ide> * [[`fb3ea4c4dc`](https://github.com/nodejs/node/commit/fb3ea4c4dc)] - **src**: fix missing handlescope bug in inspector (Ben Noordhuis) [#17539](https://github.com/nodejs/node/pull/17539) <ide> * [[`40acda2e6b`](https://github.com/nodejs/node/commit/40acda2e6b)] - **src**: use uv_os_getpid() to get process id (cjihrig) [#17415](https://github.com/nodejs/node/pull/17415) <ide> * [[`9b41c0b021`](https://github.com/nodejs/node/commit/9b41c0b021)] - **src**: node_http2_state.h should not be executable (Jon Moss) [#17408](https://github.com/nodejs/node/pull/17408) <del>* [[`419cde79b1`](https://github.com/nodejs/node/commit/419cde79b1)] - **src**: use non-deprecated versions of `-\>To*()` utils (Leko) [#17343](https://github.com/nodejs/node/pull/17343) <add>* [[`419cde79b1`](https://github.com/nodejs/node/commit/419cde79b1)] - **src**: use non-deprecated versions of `->To*()` utils (Leko) [#17343](https://github.com/nodejs/node/pull/17343) <ide> * [[`ceda8c57aa`](https://github.com/nodejs/node/commit/ceda8c57aa)] - **src**: use nullptr instead of NULL (Daniel Bevenius) [#17373](https://github.com/nodejs/node/pull/17373) <ide> * [[`7f55f98a84`](https://github.com/nodejs/node/commit/7f55f98a84)] - **src**: fix typo in NODE_OPTIONS whitelist (Evan Lucas) [#17369](https://github.com/nodejs/node/pull/17369) <ide> * [[`9b27bc85ae`](https://github.com/nodejs/node/commit/9b27bc85ae)] - **src**: introduce USE() for silencing compiler warnings (Anna Henningsen) [#17333](https://github.com/nodejs/node/pull/17333)
7
Javascript
Javascript
ensure plugins array in addplugin method
183e649e8d404ef82abf2f21664d115a906599a7
<ide><path>bin/convert-argv.js <ide> module.exports = function(yargs, argv, convertOptions) { <ide> } <ide> <ide> function addPlugin(options, plugin) { <add> ensureArray(options, "plugins"); <ide> options.plugins.unshift(plugin); <ide> } <ide> <ide> module.exports = function(yargs, argv, convertOptions) { <ide> }, function() { <ide> defineObject = {}; <ide> }, function() { <del> ensureArray(options, "plugins"); <ide> var DefinePlugin = require("../lib/DefinePlugin"); <ide> addPlugin(options, new DefinePlugin(defineObject)); <ide> }); <ide> module.exports = function(yargs, argv, convertOptions) { <ide> mapArgToBoolean("cache"); <ide> <ide> ifBooleanArg("hot", function() { <del> ensureArray(options, "plugins"); <ide> var HotModuleReplacementPlugin = require("../lib/HotModuleReplacementPlugin"); <ide> addPlugin(options, new HotModuleReplacementPlugin()); <ide> }); <ide> <ide> ifBooleanArg("debug", function() { <del> ensureArray(options, "plugins"); <ide> var LoaderOptionsPlugin = require("../lib/LoaderOptionsPlugin"); <ide> addPlugin(options, new LoaderOptionsPlugin({ <ide> debug: true <ide> module.exports = function(yargs, argv, convertOptions) { <ide> }); <ide> <ide> ifArg("optimize-max-chunks", function(value) { <del> ensureArray(options, "plugins"); <ide> var LimitChunkCountPlugin = require("../lib/optimize/LimitChunkCountPlugin"); <ide> addPlugin(options, new LimitChunkCountPlugin({ <ide> maxChunks: parseInt(value, 10) <ide> })); <ide> }); <ide> <ide> ifArg("optimize-min-chunk-size", function(value) { <del> ensureArray(options, "plugins"); <ide> var MinChunkSizePlugin = require("../lib/optimize/MinChunkSizePlugin"); <ide> addPlugin(options, new MinChunkSizePlugin({ <ide> minChunkSize: parseInt(value, 10) <ide> })); <ide> }); <ide> <ide> ifBooleanArg("optimize-minimize", function() { <del> ensureArray(options, "plugins"); <ide> var UglifyJsPlugin = require("../lib/optimize/UglifyJsPlugin"); <ide> var LoaderOptionsPlugin = require("../lib/LoaderOptionsPlugin"); <ide> addPlugin(options, new UglifyJsPlugin({ <ide> module.exports = function(yargs, argv, convertOptions) { <ide> }); <ide> <ide> ifArg("prefetch", function(request) { <del> ensureArray(options, "plugins"); <ide> var PrefetchPlugin = require("../lib/PrefetchPlugin"); <ide> addPlugin(options, new PrefetchPlugin(request)); <ide> }); <ide> <ide> ifArg("provide", function(value) { <del> ensureArray(options, "plugins"); <ide> var idx = value.indexOf("="); <ide> var name; <ide> if(idx >= 0) { <ide> module.exports = function(yargs, argv, convertOptions) { <ide> }); <ide> <ide> ifArg("plugin", function(value) { <del> ensureArray(options, "plugins"); <ide> addPlugin(options, loadPlugin(value)); <ide> }); <ide>
1
Python
Python
add tests for conversions to builtin scalar types
939985d0859bbce349c8cccf866679eb113aeab3
<ide><path>numpy/typing/tests/data/fail/scalars.py <ide> def __float__(self): <ide> <ide> np.bytes_(b"hello", encoding='utf-8') # E: No overload variant <ide> np.str_("hello", encoding='utf-8') # E: No overload variant <add> <add>complex(np.bytes_("1")) # E: No overload variant <ide><path>numpy/typing/tests/data/pass/scalars.py <ide> import sys <ide> import datetime as dt <ide> <add>import pytest <ide> import numpy as np <ide> <ide> <ide> def __float__(self) -> float: <ide> np.str_(b"hello", 'utf-8') <ide> np.str_(b"hello", encoding='utf-8') <ide> <del># Protocols <del>float(np.int8(4)) <del>int(np.int16(5)) <del>np.int8(np.float32(6)) <del> <del># TODO(alan): test after https://github.com/python/typeshed/pull/2004 <del># complex(np.int32(8)) <del> <del>abs(np.int8(4)) <del> <ide> # Array-ish semantics <ide> np.int8().real <ide> np.int16().imag <ide> def __float__(self) -> float: <ide> np.void(np.bool_(True)) <ide> np.void(b"test") <ide> np.void(np.bytes_("test")) <add> <add># Protocols <add>i8 = np.int64() <add>u8 = np.uint64() <add>f8 = np.float64() <add>c16 = np.complex128() <add>b_ = np.bool_() <add>td = np.timedelta64() <add>U = np.str_("1") <add>S = np.bytes_("1") <add>AR = np.array(1, dtype=np.float64) <add> <add>int(i8) <add>int(u8) <add>int(f8) <add>int(b_) <add>int(td) <add>int(U) <add>int(S) <add>int(AR) <add>with pytest.warns(np.ComplexWarning): <add> int(c16) <add> <add>float(i8) <add>float(u8) <add>float(f8) <add>float(b_) <add>float(td) <add>float(U) <add>float(S) <add>float(AR) <add>with pytest.warns(np.ComplexWarning): <add> float(c16) <add> <add>complex(i8) <add>complex(u8) <add>complex(f8) <add>complex(c16) <add>complex(b_) <add>complex(td) <add>complex(U) <add>complex(AR)
2
PHP
PHP
fix pluralization of objective
7b5122adb19615e8e740b688164d0d259aff668f
<ide><path>lib/Cake/Test/Case/Utility/InflectorTest.php <ide> public function testInflectingSingulars() { <ide> $this->assertEquals(Inflector::singularize('teeth'), 'tooth'); <ide> $this->assertEquals(Inflector::singularize('geese'), 'goose'); <ide> $this->assertEquals(Inflector::singularize('feet'), 'foot'); <add> $this->assertEquals(Inflector::singularize('objectives'), 'objective'); <ide> <ide> $this->assertEquals(Inflector::singularize(''), ''); <ide> } <ide> public function testInflectingPlurals() { <ide> $this->assertEquals(Inflector::pluralize('tooth'), 'teeth'); <ide> $this->assertEquals(Inflector::pluralize('goose'), 'geese'); <ide> $this->assertEquals(Inflector::pluralize('foot'), 'feet'); <add> $this->assertEquals(Inflector::pluralize('objective'), 'objectives'); <ide> $this->assertEquals(Inflector::pluralize(''), ''); <ide> } <ide> <ide><path>lib/Cake/Utility/Inflector.php <ide> class Inflector { <ide> '/(m)ovies$/i' => '\1\2ovie', <ide> '/(s)eries$/i' => '\1\2eries', <ide> '/([^aeiouy]|qu)ies$/i' => '\1y', <add> '/(tive)s$/i' => '\1', <ide> '/([lre])ves$/i' => '\1f', <ide> '/([^fo])ves$/i' => '\1fe', <del> '/(tive)s$/i' => '\1', <ide> '/(hive)s$/i' => '\1', <ide> '/(drive)s$/i' => '\1', <ide> '/(^analy)ses$/i' => '\1sis',
2
Javascript
Javascript
improve observable icu behaviour coverage
edcc542996bdecf6d5dd78e268403824e503c7e0
<ide><path>test/parallel/test-icu-env.js <add>'use strict'; <add>const common = require('../common'); <add>const assert = require('assert'); <add>const { execFileSync } = require('child_process'); <add> <add>// system-icu should not be tested <add>const hasBuiltinICU = process.config.variables.icu_gyp_path === 'tools/icu/icu-generic.gyp'; <add>if (!hasBuiltinICU) <add> common.skip('system ICU'); <add> <add>// small-icu doesn't support non-English locales <add>const hasFullICU = (() => { <add> try { <add> const january = new Date(9e8); <add> const spanish = new Intl.DateTimeFormat('es', { month: 'long' }); <add> return spanish.format(january) === 'enero'; <add> } catch { <add> return false; <add> } <add>})(); <add>if (!hasFullICU) <add> common.skip('small ICU'); <add> <add>const icuVersionMajor = Number(process.config.variables.icu_ver_major ?? 0); <add>if (icuVersionMajor < 71) <add> common.skip('ICU too old'); <add> <add> <add>function runEnvOutside(addEnv, code, ...args) { <add> return execFileSync( <add> process.execPath, <add> ['-e', `process.stdout.write(String(${code}));`], <add> { env: { ...process.env, ...addEnv }, encoding: 'utf8' } <add> ); <add>} <add> <add>function runEnvInside(addEnv, func, ...args) { <add> Object.assign(process.env, addEnv); // side effects! <add> return func(...args); <add>} <add> <add>function isPack(array) { <add> const firstItem = array[0]; <add> return array.every((item) => item === firstItem); <add>} <add> <add>function isSet(array) { <add> const deduped = new Set(array); <add> return array.length === deduped.size; <add>} <add> <add> <add>const localesISO639 = [ <add> 'eng', 'cmn', 'hin', 'spa', <add> 'fra', 'arb', 'ben', 'rus', <add> 'por', 'urd', 'ind', 'deu', <add> 'jpn', 'pcm', 'mar', 'tel', <add>]; <add> <add>const locales = [ <add> 'en', 'zh', 'hi', 'es', <add> 'fr', 'ar', 'bn', 'ru', <add> 'pt', 'ur', 'id', 'de', <add> 'ja', 'pcm', 'mr', 'te', <add>]; <add> <add>// These must not overlap <add>const zones = [ <add> 'America/New_York', <add> 'UTC', <add> 'Asia/Irkutsk', <add> 'Australia/North', <add> 'Antarctica/South_Pole', <add>]; <add> <add> <add>assert.deepStrictEqual(Intl.getCanonicalLocales(localesISO639), locales); <add> <add> <add>// On some platforms these keep original locale (for example, 'January') <add>const enero = runEnvOutside( <add> { LANG: 'es' }, <add> 'new Intl.DateTimeFormat(undefined, { month: "long" } ).format(new Date(9e8))' <add>); <add>const janvier = runEnvOutside( <add> { LANG: 'fr' }, <add> 'new Intl.DateTimeFormat(undefined, { month: "long" } ).format(new Date(9e8))' <add>); <add>const isMockable = enero !== janvier; <add> <add>// Tests with mocked env <add>if (isMockable) { <add> assert.strictEqual( <add> isSet(zones.map((TZ) => runEnvOutside({ TZ }, 'new Date(333333333333).toString()'))), <add> true <add> ); <add> assert.strictEqual( <add> isSet(zones.map((TZ) => runEnvOutside({ TZ }, 'new Date(333333333333).toLocaleString()'))), <add> true <add> ); <add> assert.deepStrictEqual( <add> locales.map((LANG) => runEnvOutside({ LANG, TZ: 'Europe/Zurich' }, 'new Date(333333333333).toString()')), <add> [ <add> 'Fri Jul 25 1980 01:35:33 GMT+0100 (Central European Standard Time)', <add> 'Fri Jul 25 1980 01:35:33 GMT+0100 (中欧标准时间)', <add> 'Fri Jul 25 1980 01:35:33 GMT+0100 (मध्य यूरोपीय मानक समय)', <add> 'Fri Jul 25 1980 01:35:33 GMT+0100 (hora estándar de Europa central)', <add> 'Fri Jul 25 1980 01:35:33 GMT+0100 (heure normale d’Europe centrale)', <add> 'Fri Jul 25 1980 01:35:33 GMT+0100 (توقيت وسط أوروبا الرسمي)', <add> 'Fri Jul 25 1980 01:35:33 GMT+0100 (মধ্য ইউরোপীয় মানক সময়)', <add> 'Fri Jul 25 1980 01:35:33 GMT+0100 (Центральная Европа, стандартное время)', <add> 'Fri Jul 25 1980 01:35:33 GMT+0100 (Horário Padrão da Europa Central)', <add> 'Fri Jul 25 1980 01:35:33 GMT+0100 (وسطی یورپ کا معیاری وقت)', <add> 'Fri Jul 25 1980 01:35:33 GMT+0100 (Waktu Standar Eropa Tengah)', <add> 'Fri Jul 25 1980 01:35:33 GMT+0100 (Mitteleuropäische Normalzeit)', <add> 'Fri Jul 25 1980 01:35:33 GMT+0100 (中央ヨーロッパ標準時)', <add> 'Fri Jul 25 1980 01:35:33 GMT+0100 (Mídúl Yúrop Fíksd Taim)', <add> 'Fri Jul 25 1980 01:35:33 GMT+0100 (मध्‍य युरोपियन प्रमाण वेळ)', <add> 'Fri Jul 25 1980 01:35:33 GMT+0100 (సెంట్రల్ యూరోపియన్ ప్రామాణిక సమయం)', <add> ] <add> ); <add> assert.deepStrictEqual( <add> locales.map((LANG) => runEnvOutside({ LANG, TZ: 'Europe/Zurich' }, 'new Date(333333333333).toLocaleString()')), <add> [ <add> '7/25/1980, 1:35:33 AM', <add> '1980/7/25 01:35:33', <add> '25/7/1980, 1:35:33 am', <add> '25/7/1980, 1:35:33', <add> '25/07/1980 01:35:33', <add> '٢٥‏/٧‏/١٩٨٠, ١:٣٥:٣٣ ص', <add> '২৫/৭/১৯৮০ ১:৩৫:৩৩ AM', <add> '25.07.1980, 01:35:33', <add> '25/07/1980 01:35:33', <add> '25/7/1980 1:35:33 AM', <add> '25/7/1980 01.35.33', <add> '25.7.1980, 01:35:33', <add> '1980/7/25 1:35:33', <add> '25/7/1980 01:35:33', <add> '२५/७/१९८०, १:३५:३३ AM', <add> '25/7/1980 1:35:33 AM', <add> ] <add> ); <add> assert.strictEqual( <add> runEnvOutside({ LANG: 'en' }, '["z", "ä"].sort(new Intl.Collator().compare)'), <add> 'ä,z' <add> ); <add> assert.strictEqual( <add> runEnvOutside({ LANG: 'sv' }, '["z", "ä"].sort(new Intl.Collator().compare)'), <add> 'z,ä' <add> ); <add> assert.deepStrictEqual( <add> locales.map( <add> (LANG) => runEnvOutside({ LANG, TZ: 'Europe/Zurich' }, 'new Intl.DateTimeFormat().format(333333333333)') <add> ), <add> [ <add> '7/25/1980', '1980/7/25', <add> '25/7/1980', '25/7/1980', <add> '25/07/1980', '٢٥‏/٧‏/١٩٨٠', <add> '২৫/৭/১৯৮০', '25.07.1980', <add> '25/07/1980', '25/7/1980', <add> '25/7/1980', '25.7.1980', <add> '1980/7/25', '25/7/1980', <add> '२५/७/१९८०', '25/7/1980', <add> ] <add> ); <add> assert.deepStrictEqual( <add> locales.map((LANG) => runEnvOutside({ LANG }, 'new Intl.DisplayNames(undefined, { type: "region" }).of("CH")')), <add> [ <add> 'Switzerland', '瑞士', <add> 'स्विट्ज़रलैंड', 'Suiza', <add> 'Suisse', 'سويسرا', <add> 'সুইজারল্যান্ড', 'Швейцария', <add> 'Suíça', 'سوئٹزر لینڈ', <add> 'Swiss', 'Schweiz', <add> 'スイス', 'Swítsaland', <add> 'स्वित्झर्लंड', 'స్విట్జర్లాండ్', <add> ] <add> ); <add> assert.deepStrictEqual( <add> locales.map((LANG) => runEnvOutside({ LANG }, 'new Intl.NumberFormat().format(275760.913)')), <add> [ <add> '275,760.913', '275,760.913', <add> '2,75,760.913', '275.760,913', <add> '275 760,913', '٢٧٥٬٧٦٠٫٩١٣', <add> '২,৭৫,৭৬০.৯১৩', '275 760,913', <add> '275.760,913', '275,760.913', <add> '275.760,913', '275.760,913', <add> '275,760.913', '275,760.913', <add> '२,७५,७६०.९१३', '2,75,760.913', <add> ] <add> ); <add> assert.deepStrictEqual( <add> locales.map((LANG) => runEnvOutside({ LANG }, 'new Intl.PluralRules().select(0)')), <add> [ <add> 'other', 'other', 'one', 'other', <add> 'one', 'zero', 'one', 'many', <add> 'one', 'other', 'other', 'other', <add> 'other', 'one', 'other', 'other', <add> ] <add> ); <add> assert.deepStrictEqual( <add> locales.map((LANG) => runEnvOutside({ LANG }, 'new Intl.RelativeTimeFormat().format(-586920.617, "hour")')), <add> [ <add> '586,920.617 hours ago', <add> '586,920.617小时前', <add> '5,86,920.617 घंटे पहले', <add> 'hace 586.920,617 horas', <add> 'il y a 586 920,617 heures', <add> 'قبل ٥٨٦٬٩٢٠٫٦١٧ ساعة', <add> '৫,৮৬,৯২০.৬১৭ ঘন্টা আগে', <add> '586 920,617 часа назад', <add> 'há 586.920,617 horas', <add> '586,920.617 گھنٹے پہلے', <add> '586.920,617 jam yang lalu', <add> 'vor 586.920,617 Stunden', <add> '586,920.617 時間前', <add> '586,920.617 áwa wé dọ́n pas', <add> '५,८६,९२०.६१७ तासांपूर्वी', <add> '5,86,920.617 గంటల క్రితం', <add> ] <add> ); <add>} <add> <add> <add>// Tests with process.env mutated inside <add>{ <add> // process.env.TZ is not intercepted in Workers <add> if (common.isMainThread) { <add> assert.strictEqual( <add> isSet(zones.map((TZ) => runEnvInside({ TZ }, () => new Date(333333333333).toString()))), <add> true <add> ); <add> assert.strictEqual( <add> isSet(zones.map((TZ) => runEnvInside({ TZ }, () => new Date(333333333333).toLocaleString()))), <add> true <add> ); <add> } else { <add> assert.strictEqual( <add> isPack(zones.map((TZ) => runEnvInside({ TZ }, () => new Date(333333333333).toString()))), <add> true <add> ); <add> assert.strictEqual( <add> isPack(zones.map((TZ) => runEnvInside({ TZ }, () => new Date(333333333333).toLocaleString()))), <add> true <add> ); <add> } <add> <add> assert.strictEqual( <add> isPack(locales.map((LANG) => runEnvInside({ LANG, TZ: 'Europe/Zurich' }, () => new Date(333333333333).toString()))), <add> true <add> ); <add> assert.strictEqual( <add> isPack(locales.map( <add> (LANG) => runEnvInside({ LANG, TZ: 'Europe/Zurich' }, () => new Date(333333333333).toLocaleString()) <add> )), <add> true <add> ); <add> assert.deepStrictEqual( <add> runEnvInside({ LANG: 'en' }, () => ['z', 'ä'].sort(new Intl.Collator().compare)), <add> runEnvInside({ LANG: 'sv' }, () => ['z', 'ä'].sort(new Intl.Collator().compare)) <add> ); <add> assert.strictEqual( <add> isPack(locales.map( <add> (LANG) => runEnvInside({ LANG, TZ: 'Europe/Zurich' }, () => new Intl.DateTimeFormat().format(333333333333)) <add> )), <add> true <add> ); <add> assert.strictEqual( <add> isPack(locales.map( <add> (LANG) => runEnvInside({ LANG }, () => new Intl.DisplayNames(undefined, { type: 'region' }).of('CH')) <add> )), <add> true <add> ); <add> assert.strictEqual( <add> isPack(locales.map((LANG) => runEnvInside({ LANG }, () => new Intl.NumberFormat().format(275760.913)))), <add> true <add> ); <add> assert.strictEqual( <add> isPack(locales.map((LANG) => runEnvInside({ LANG }, () => new Intl.PluralRules().select(0)))), <add> true <add> ); <add> assert.strictEqual( <add> isPack(locales.map( <add> (LANG) => runEnvInside({ LANG }, () => new Intl.RelativeTimeFormat().format(-586920.617, 'hour')) <add> )), <add> true <add> ); <add>} <ide><path>test/parallel/test-process-env-tz.js <ide> 'use strict'; <del> <del>// Set the locale to a known good value because it affects ICU's date string <del>// formatting. Setting LC_ALL needs to happen before the first call to <del>// `icu::Locale::getDefault()` because ICU caches the result. <del>process.env.LC_ALL = 'C'; <del> <ide> const common = require('../common'); <ide> const assert = require('assert'); <ide> <ide> if (date.toString().includes('(Central European Time)') || <ide> common.skip('tzdata too old'); <ide> } <ide> <add>// Text representation of timezone depends on locale in environment <ide> assert.match( <ide> date.toString(), <ide> /^Sat Apr 14 2018 14:34:56 GMT\+0200 \(.+\)$/);
2
Java
Java
clarify use of @bean with @enableasync executors
63ca14c33ee746734fe27b37712a53d78afcce74
<ide><path>spring-context/src/main/java/org/springframework/scheduling/annotation/EnableAsync.java <ide> * the examples are equivalent save the setting of the <em>thread name prefix</em> of the <ide> * Executor; this is because the the {@code task:} namespace {@code executor} element does <ide> * not expose such an attribute. This demonstrates how the code-based approach allows for <del> * maximum configurability through direct access to actual componentry.<p> <add> * maximum configurability through direct access to actual componentry. <add> * <add> * <p>Note: In the above example the {@code ThreadPoolTaskExecutor} is not a fully managed <add> * Spring Bean. Add the {@code @Bean} annotation to the {@code getAsyncExecutor()} method <add> * if you want a fully managed bean. In such circumstances it is no longer necessary to <add> * manually call the {@code executor.initialize()} method as this will be invoked <add> * automatically when the bean is initialized. <ide> * <ide> * @author Chris Beams <ide> * @since 3.1
1
PHP
PHP
fix deprecation with empty rules
6741fa8ffb5ec4339eff98132518d6f6c501eca6
<ide><path>src/Illuminate/Validation/ValidationRuleParser.php <ide> protected function explodeExplicitRule($rule, $attribute) <ide> return array_map( <ide> [$this, 'prepareRule'], <ide> $rule, <del> array_fill(array_key_first($rule), count($rule), $attribute) <add> array_fill((int) array_key_first($rule), count($rule), $attribute) <ide> ); <ide> } <ide> <ide><path>tests/Validation/ValidationRuleParserTest.php <ide> public function testEmptyRulesArePreserved() <ide> ], $rules); <ide> } <ide> <add> public function testEmptyRulesCanBeExploded() <add> { <add> $parser = new ValidationRuleParser(['foo' => 'bar']); <add> <add> $this->assertIsObject($parser->explode(['foo' => []])); <add> } <add> <ide> public function testConditionalRulesWithDefault() <ide> { <ide> $rules = ValidationRuleParser::filterConditionalRules([
2
Text
Text
add solution using regexp
cf721281ca62d0610e54178e2b170af5a5327210
<ide><path>guide/english/certifications/javascript-algorithms-and-data-structures/basic-algorithm-scripting/confirm-the-ending/index.md <ide> confirmEnding("He has to give me a new name", "name"); <ide> <ide> ### Relevant Links <ide> - [String.prototype.slice()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) <add> <add> <add># ![:rotating_light:](https://forum.freecodecamp.com/images/emoji/emoji_one/rotating_light.png?v=3 ":rotating_light:")Advanced Code Solution: <add> (using Regular Expression) <add> <add> ```javascript <add>function confirmEnding(str, target) { <add> // "Never give up and good luck will find you." <add> // -- Falcor <add> <add> let re = new RegExp(target+'$','i'); <add> <add> return re.test(str); <add>} <add> <add>console.log(confirmEnding("Bastian", "n")); <add>``` <add> <add>## Code Explanation: <add> - We need to make a pattern from the `target` variable that exists at the end of the string `str`. <add> - Since we will use a variable that will change the pattern each time the function is called, we will use the constructor of the regular expression object `new RegExp(pattern[, flags])`, so we start with: `new RegExp(target)`. <add> - Then we have to check at the end of the string, so we concatenate to the `target` variable the `$` character to match the end: `new RegExp(target+'$')`. <add> - We use the flag `i` to ignore the case of the pattern and we have our completed RegExp: `new RegExp(target+'$','i')`, or we can ommit the flag entirely. <add> - Finally, we are using our regular expression with the `test` method to the given string, to check if the string ends with the pattern and return true or false accordingly. <add> <add> ### Relevant Links <add> - [RegExp](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) <add> - [RegExp.prototype.test()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/test)
1
Javascript
Javascript
add test for fs.promises.lchmod
6558dcbf75c0b4b749d42ec8678af0a8a728201f
<ide><path>test/parallel/test-fs-promises.js <ide> const { <ide> chmod, <ide> copyFile, <ide> link, <add> lchmod, <ide> lstat, <ide> mkdir, <ide> mkdtemp, <ide> function verifyStatObject(stat) { <ide> if (common.canCreateSymLink()) { <ide> const newLink = path.resolve(tmpDir, 'baz3.js'); <ide> await symlink(newPath, newLink); <del> <ide> stats = await lstat(newLink); <ide> verifyStatObject(stats); <ide> <ide> assert.strictEqual(newPath.toLowerCase(), <ide> (await realpath(newLink)).toLowerCase()); <ide> assert.strictEqual(newPath.toLowerCase(), <ide> (await readlink(newLink)).toLowerCase()); <add> if (common.isOSX) { <add> // lchmod is only available on macOS <add> const newMode = 0o666; <add> await lchmod(newLink, newMode); <add> stats = await lstat(newLink); <add> assert.strictEqual(stats.mode & 0o777, newMode); <add> } <add> <ide> <ide> await unlink(newLink); <ide> }
1
Javascript
Javascript
name anonymous functions
115bb04c0113907e625ee21b8b5b1a5625c6074c
<ide><path>lib/dns.js <ide> function onlookupservice(err, host, service) { <ide> <ide> <ide> // lookupService(address, port, callback) <del>exports.lookupService = function(host, port, callback) { <add>exports.lookupService = function lookupService(host, port, callback) { <ide> if (arguments.length !== 3) <ide> throw new Error('Invalid arguments'); <ide> <ide> exports.resolveSoa = resolveMap.SOA = resolver('querySoa'); <ide> exports.reverse = resolver('getHostByAddr'); <ide> <ide> <del>exports.resolve = function(hostname, type_, callback_) { <add>exports.resolve = function resolve(hostname, type_, callback_) { <ide> var resolver, callback; <ide> if (typeof type_ === 'string') { <ide> resolver = resolveMap[type_]; <ide> exports.resolve = function(hostname, type_, callback_) { <ide> }; <ide> <ide> <del>exports.getServers = function() { <add>exports.getServers = function getServers() { <ide> return cares.getServers(); <ide> }; <ide> <ide> <del>exports.setServers = function(servers) { <add>exports.setServers = function setServers(servers) { <ide> // cache the original servers because in the event of an error setting the <ide> // servers cares won't have any servers available for resolution <ide> const orig = cares.getServers();
1
Java
Java
add missing `@test` annotation
ca222c2909bd8e1958c1241df4412bea1fbc543d
<ide><path>src/test/java/io/reactivex/rxjava3/subjects/ReplaySubjectTest.java <ide> public void getValuesUnbounded() { <ide> <ide> } <ide> <add> @Test <ide> public void createInvalidCapacity() { <ide> try { <ide> ReplaySubject.create(-99);
1
Javascript
Javascript
implement the `uniquesort` chainable method
5266f23cf49c9329bddce4d4af6cb5fbbd1e0383
<ide><path>src/selector/uniqueSort.js <ide> import jQuery from "../core.js"; <ide> import document from "../var/document.js"; <ide> import sort from "../var/sort.js"; <ide> import splice from "../var/splice.js"; <add>import slice from "../var/slice.js"; <ide> <ide> var hasDuplicate; <ide> <ide> jQuery.uniqueSort = function( results ) { <ide> <ide> return results; <ide> }; <add> <add>jQuery.fn.uniqueSort = function() { <add> return this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) ); <add>}; <ide><path>test/unit/selector.js <ide> QUnit.test( "find in document fragments", function( assert ) { <ide> assert.strictEqual( elem.length, 1, "Selection works" ); <ide> } ); <ide> <del>QUnit.test( "jQuery.uniqueSort", function( assert ) { <del> assert.expect( 14 ); <del> <del> function Arrayish( arr ) { <del> var i = this.length = arr.length; <del> while ( i-- ) { <del> this[ i ] = arr[ i ]; <del> } <del> } <del> Arrayish.prototype = { <del> sliceForTestOnly: [].slice <del> }; <del> <del> var i, tests, <add>function getUniqueSortFixtures() { <add> var i, <ide> detached = [], <ide> body = document.body, <ide> fixture = document.getElementById( "qunit-fixture" ), <ide> QUnit.test( "jQuery.uniqueSort", function( assert ) { <ide> detached2.appendChild( document.createElement( "li" ) ).id = "detachedChild" + i; <ide> } <ide> <del> tests = { <add> return { <ide> "Empty": { <ide> input: [], <ide> expected: [] <ide> QUnit.test( "jQuery.uniqueSort", function( assert ) { <ide> length: 3 <ide> } <ide> }; <add>} <add> <add>QUnit.test( "jQuery.uniqueSort", function( assert ) { <add> assert.expect( 14 ); <ide> <del> jQuery.each( tests, function( label, test ) { <del> var length = test.length || test.input.length; <del> // We duplicate `test.input` because otherwise it is modified by `uniqueSort` <add> var fixtures = getUniqueSortFixtures(); <add> <add> function Arrayish( arr ) { <add> var i = this.length = arr.length; <add> while ( i-- ) { <add> this[ i ] = arr[ i ]; <add> } <add> } <add> Arrayish.prototype = { <add> sliceForTestOnly: [].slice <add> }; <add> <add> jQuery.each( fixtures, function( label, fixture ) { <add> var length = fixture.length || fixture.input.length; <add> <add> // We duplicate `fixture.input` because otherwise it is modified by `uniqueSort` <ide> // and the second test becomes worthless. <del> assert.deepEqual( jQuery.uniqueSort( test.input.slice( 0 ) ).slice( 0, length ), <del> test.expected, label + " (array)" ); <del> assert.deepEqual( jQuery.uniqueSort( new Arrayish( test.input ) ).sliceForTestOnly( 0, length ), <del> test.expected, label + " (quasi-array)" ); <add> assert.deepEqual( <add> jQuery.uniqueSort( fixture.input.slice( 0 ) ) <add> .slice( 0, length ), <add> fixture.expected, <add> label + " (array)" <add> ); <add> <add> assert.deepEqual( <add> jQuery.uniqueSort( new Arrayish( fixture.input ) ) <add> .sliceForTestOnly( 0, length ), <add> fixture.expected, <add> label + " (quasi-array)" <add> ); <add> } ); <add>} ); <add> <add>QUnit.test( "uniqueSort()", function( assert ) { <add> assert.expect( 28 ); <add> <add> var fixtures = getUniqueSortFixtures(); <add> <add> jQuery.each( fixtures, function( label, fixture ) { <add> var length = fixture.length || fixture.input.length, <add> fixtureInputCopy = fixture.input.slice( 0 ), <add> sortedElem = jQuery( fixture.input ).uniqueSort(); <add> <add> assert.deepEqual( fixture.input, fixtureInputCopy, "Fixture not modified (" + label + ")" ); <add> <add> assert.deepEqual( sortedElem.slice( 0, length ).toArray(), fixture.expected, label ); <add> <add> // Chaining <add> assert.ok( sortedElem instanceof jQuery, "chaining" ); <add> assert.deepEqual( sortedElem.end().toArray(), fixture.input, label ); <ide> } ); <ide> } ); <ide>
2
Text
Text
modify the link for config.json
4e970c1e5a2b16f9408f530037e65595810cc5d7
<ide><path>docs/reference/commandline/plugin_create.md <ide> Options: <ide> ``` <ide> <ide> Creates a plugin. Before creating the plugin, prepare the plugin's root filesystem as well as <del>the config.json (https://github.com/docker/docker/blob/master/docs/extend/config.md) <add>[the config.json](../../extend/config.md) <ide> <ide> <ide> The following example shows how to create a sample `plugin`.
1
Ruby
Ruby
add version number to cask json option
22b3102fbe126be7f58e4d4a70214bf62d07bc09
<ide><path>Library/Homebrew/cask/lib/hbc/cli/info.rb <ide> module Hbc <ide> class CLI <ide> class Info < AbstractCommand <del> option "--json", :json, false <add> option "--json-v1", :json, false <ide> <ide> def initialize(*) <ide> super
1
Python
Python
add support for rabbitmq priority queues
1d4cbbcc921aa34975bde4b503b8df9c2f1816e0
<ide><path>celery/app/amqp.py <ide> class Queues(dict): <ide> the occurrence of unknown queues <ide> in `wanted` will raise :exc:`KeyError`. <ide> :keyword ha_policy: Default HA policy for queues with none set. <add> :keyword max_priority: Default x-max-priority for queues with none set. <ide> <ide> <ide> """ <ide> class Queues(dict): <ide> _consume_from = None <ide> <ide> def __init__(self, queues=None, default_exchange=None, <del> create_missing=True, ha_policy=None, autoexchange=None): <add> create_missing=True, ha_policy=None, autoexchange=None, <add> max_priority=None): <ide> dict.__init__(self) <ide> self.aliases = WeakValueDictionary() <ide> self.default_exchange = default_exchange <ide> self.create_missing = create_missing <ide> self.ha_policy = ha_policy <ide> self.autoexchange = Exchange if autoexchange is None else autoexchange <add> self.max_priority = max_priority <ide> if isinstance(queues, (tuple, list)): <ide> queues = {q.name: q for q in queues} <ide> for name, q in items(queues or {}): <ide> def add(self, queue, **kwargs): <ide> if queue.queue_arguments is None: <ide> queue.queue_arguments = {} <ide> self._set_ha_policy(queue.queue_arguments) <add> if self.max_priority is not None: <add> if queue.queue_arguments is None: <add> queue.queue_arguments = {} <add> self._set_max_priority(queue.queue_arguments) <ide> self[queue.name] = queue <ide> return queue <ide> <ide> def add_compat(self, name, **options): <ide> options['routing_key'] = name <ide> if self.ha_policy is not None: <ide> self._set_ha_policy(options.setdefault('queue_arguments', {})) <add> if self.max_priority is not None: <add> self._set_max_priority(options.setdefault('queue_arguments', {})) <ide> q = self[name] = Queue.from_dict(name, **options) <ide> return q <ide> <ide> def _set_ha_policy(self, args): <ide> 'x-ha-policy-params': list(policy)}) <ide> args['x-ha-policy'] = policy <ide> <add> def _set_max_priority(self, args): <add> if 'x-max-priority' not in args and self.max_priority is not None: <add> return args.update({'x-max-priority': self.max_priority}) <add> <ide> def format(self, indent=0, indent_first=True): <ide> """Format routing table into string for log dumps.""" <ide> active = self.consume_from <ide> def send_task_message(self): <ide> return self._create_task_sender() <ide> <ide> def Queues(self, queues, create_missing=None, ha_policy=None, <del> autoexchange=None): <add> autoexchange=None, max_priority=None): <ide> """Create new :class:`Queues` instance, using queue defaults <ide> from the current configuration.""" <ide> conf = self.app.conf <ide> if create_missing is None: <ide> create_missing = conf.CELERY_CREATE_MISSING_QUEUES <ide> if ha_policy is None: <ide> ha_policy = conf.CELERY_QUEUE_HA_POLICY <add> if max_priority is None: <add> max_priority = conf.CELERY_QUEUE_MAX_PRIORITY <ide> if not queues and conf.CELERY_DEFAULT_QUEUE: <ide> queues = (Queue(conf.CELERY_DEFAULT_QUEUE, <ide> exchange=self.default_exchange, <ide> def Queues(self, queues, create_missing=None, ha_policy=None, <ide> else autoexchange) <ide> return self.queues_cls( <ide> queues, self.default_exchange, create_missing, <del> ha_policy, autoexchange, <add> ha_policy, autoexchange, max_priority, <ide> ) <ide> <ide> def Router(self, queues=None, create_missing=None): <ide><path>celery/app/defaults.py <ide> def __repr__(self): <ide> 'REDIRECT_STDOUTS_LEVEL': Option('WARNING'), <ide> 'QUEUES': Option(type='dict'), <ide> 'QUEUE_HA_POLICY': Option(None, type='string'), <add> 'QUEUE_MAX_PRIORITY': Option(None, type='int'), <ide> 'SECURITY_KEY': Option(type='string'), <ide> 'SECURITY_CERTIFICATE': Option(type='string'), <ide> 'SECURITY_CERT_STORE': Option(type='string'), <ide><path>celery/tests/app/test_amqp.py <ide> def test_alias(self): <ide> q = Queues() <ide> q.add(Queue('foo', alias='barfoo')) <ide> self.assertIs(q['barfoo'], q['foo']) <add> <add> def test_with_max_priority(self): <add> qs1 = Queues(max_priority=10) <add> qs1.add('foo') <add> self.assertEqual(qs1['foo'].queue_arguments, {'x-max-priority': 10}) <add> <add> q1 = Queue('xyx', queue_arguments={'x-max-priority': 3}) <add> qs1.add(q1) <add> self.assertEqual(qs1['xyx'].queue_arguments, { <add> 'x-max-priority': 3, <add> }) <add> <add> qs2 = Queues(ha_policy='all', max_priority=5) <add> qs2.add('bar') <add> self.assertEqual(qs2['bar'].queue_arguments, { <add> 'x-ha-policy': 'all', <add> 'x-max-priority': 5 <add> }) <add> <add> q2 = Queue('xyx2', queue_arguments={'x-max-priority': 2}) <add> qs2.add(q2) <add> self.assertEqual(qs2['xyx2'].queue_arguments, { <add> 'x-ha-policy': 'all', <add> 'x-max-priority': 2, <add> }) <add> <add> qs3 = Queues(max_priority=None) <add> qs3.add('foo2') <add> self.assertEqual(qs3['foo2'].queue_arguments, None) <add> <add> q3 = Queue('xyx3', queue_arguments={'x-max-priority': 7}) <add> qs3.add(q3) <add> self.assertEqual(qs3['xyx3'].queue_arguments, { <add> 'x-max-priority': 7, <add> })
3
Javascript
Javascript
add focusable attribute to svg whitelist
6882c7ca40fd8f96ede132e1e0313d33edc33c01
<ide><path>src/renderers/dom/shared/SVGDOMPropertyConfig.js <ide> var ATTRS = { <ide> filterUnits: 'filterUnits', <ide> floodColor: 'flood-color', <ide> floodOpacity: 'flood-opacity', <add> focusable: 0, <ide> fontFamily: 'font-family', <ide> fontSize: 'font-size', <ide> fontSizeAdjust: 'font-size-adjust',
1
Javascript
Javascript
extract symbolicatestacktrace into its own module
2ef533352fcccf82c6bd82ce7facb2c92403ba22
<ide><path>Libraries/JavaScriptAppEngine/Initialization/ExceptionsManager.js <ide> let exceptionID = 0; <ide> */ <ide> function reportException(e: Error, isFatal: bool) { <ide> const parseErrorStack = require('parseErrorStack'); <add> const symbolicateStackTrace = require('symbolicateStackTrace'); <ide> const RCTExceptionsManager = require('NativeModules').ExceptionsManager; <ide> <ide> const currentExceptionID = ++exceptionID; <ide> function reportException(e: Error, isFatal: bool) { <ide> RCTExceptionsManager.reportSoftException(e.message, stack, currentExceptionID); <ide> } <ide> if (__DEV__) { <del> symbolicateAndUpdateStack(currentExceptionID, e.message, stack); <add> symbolicateStackTrace(stack).then( <add> (prettyStack) => <add> RCTExceptionsManager.updateExceptionMessage(e.message, prettyStack, currentExceptionID), <add> (error) => <add> console.warn('Unable to symbolicate stack trace: ' + error.message) <add> ); <ide> } <ide> } <ide> } <ide> <del>function symbolicateAndUpdateStack(id, message, stack) { <del> const getDevServer = require('getDevServer'); <del> const {fetch} = require('fetch'); <del> const {ExceptionsManager} = require('NativeModules'); <del> const devServer = getDevServer(); <del> if (!devServer.bundleLoadedFromServer) { <del> return; <del> } <del> <del> fetch(devServer.url + 'symbolicate', { method: 'POST', body: JSON.stringify({stack}) }) <del> .then(response => response.json()) <del> .then(response => <del> ExceptionsManager.updateExceptionMessage(message, response.stack, id)) <del> .catch(error => { <del> // This can happen in a variety of normal situations, such as <del> // Network module not being available, or when running locally <del> console.warn('Unable to symbolicate stack trace: ' + error.message); <del> }); <del>} <del> <ide> /** <ide> * Logs exceptions to the (native) console and displays them <ide> */ <ide><path>Libraries/JavaScriptAppEngine/Initialization/parseErrorStack.js <ide> * of patent rights can be found in the PATENTS file in the same directory. <ide> * <ide> * @providesModule parseErrorStack <add> * @flow <ide> */ <ide> 'use strict'; <ide> <del>var stacktraceParser = require('stacktrace-parser'); <add>export type StackFrame = { <add> file: string; <add> lineNumber: number; <add> column: number; <add>}; <ide> <del>function resolveSourceMaps(sourceMapInstance, stackFrame) { <del> try { <del> var orig = sourceMapInstance.originalPositionFor({ <del> line: stackFrame.lineNumber, <del> column: stackFrame.column, <del> }); <del> if (orig) { <del> // remove query string if any <del> const queryStringStartIndex = orig.source.indexOf('?'); <del> stackFrame.file = queryStringStartIndex === -1 <del> ? orig.source <del> : orig.source.substring(0, queryStringStartIndex); <del> stackFrame.lineNumber = orig.line; <del> stackFrame.column = orig.column; <del> } <del> } catch (innerEx) { <del> } <del>} <add>var stacktraceParser = require('stacktrace-parser'); <ide> <del>function parseErrorStack(e, sourceMaps) { <add>function parseErrorStack(e: Error): Array<StackFrame> { <ide> if (!e || !e.stack) { <ide> return []; <ide> } <ide> function parseErrorStack(e, sourceMaps) { <ide> stack.shift(); <ide> } <ide> <del> if (sourceMaps) { <del> sourceMaps.forEach((sourceMap, index) => { <del> stack.forEach(frame => { <del> if (frame.file.indexOf(sourceMap.file) !== -1 || <del> frame.file.replace('.map', '.bundle').indexOf( <del> sourceMap.file <del> ) !== -1) { <del> resolveSourceMaps(sourceMap, frame); <del> } <del> }); <del> }); <del> } <del> <ide> return stack; <ide> } <ide> <ide><path>Libraries/JavaScriptAppEngine/Initialization/symbolicateStackTrace.js <add>/** <add> * Copyright (c) 2015-present, Facebook, Inc. <add> * All rights reserved. <add> * <add> * This source code is licensed under the BSD-style license found in the <add> * LICENSE file in the root directory of this source tree. An additional grant <add> * of patent rights can be found in the PATENTS file in the same directory. <add> * <add> * @providesModule symbolicateStackTrace <add> * @flow <add> */ <add>'use strict'; <add> <add>const {fetch} = require('fetch'); <add>const getDevServer = require('getDevServer'); <add> <add>import type {StackFrame} from 'parseErrorStack'; <add> <add>async function symbolicateStackTrace(stack: Array<StackFrame>): Promise<Array<StackFrame>> { <add> const devServer = getDevServer(); <add> if (!devServer.bundleLoadedFromServer) { <add> throw new Error('Bundle was not loaded from the packager'); <add> } <add> const response = await fetch(devServer.url + 'symbolicate', { <add> method: 'POST', <add> body: JSON.stringify({stack}), <add> }); <add> const json = await response.json(); <add> return json.stack; <add>} <add> <add>module.exports = symbolicateStackTrace;
3
Python
Python
remove unnecessary comment
278c6355623f664ccf9ae9c9bd9b64a1df716753
<ide><path>libcloud/compute/drivers/dimensiondata.py <ide> def create_node(self, name, <ide> >>> # Get dimension data driver <ide> >>> libcloud.security.VERIFY_SSL_CERT = True <ide> >>> cls = get_driver(Provider.DIMENSIONDATA) <del> >>> driver = cls('schong_platcaas', 'T3stst@r!', region='dd-au') <del> >>> # driver = cls('myusername','mypassword', region='dd-au') <add> >>> driver = cls('myusername','mypassword', region='dd-au') <ide> >>> <ide> >>> # Password <ide> >>> root_pw = NodeAuthPassword('password123')
1
Python
Python
fix deep learning example
213027a1a16507f29d57faf594b2be9924224c9b
<ide><path>examples/deep_learning_keras.py <ide> import numpy <ide> from keras.models import Sequential, model_from_json <ide> from keras.layers import LSTM, Dense, Embedding, Dropout, Bidirectional <add>from keras.optimizers import Adam <ide> import cPickle as pickle <ide> <ide> import spacy <ide> def train(train_texts, train_labels, dev_texts, dev_labels, <ide> model = compile_lstm(embeddings, lstm_shape, lstm_settings) <ide> train_X = get_features(nlp.pipe(train_texts), lstm_shape['max_length']) <ide> dev_X = get_features(nlp.pipe(dev_texts), lstm_shape['max_length']) <del> model.fit(train_X, train_labels, dev_X, dev_labels, <add> model.fit(train_X, train_labels, validation_data=(dev_X, dev_labels), <ide> nb_epoch=nb_epoch, batch_size=batch_size) <ide> return model <ide> <ide> def compile_lstm(embeddings, shape, settings): <ide> model.add(Bidirectional(LSTM(shape['nr_hidden']))) <ide> model.add(Dropout(settings['dropout'])) <ide> model.add(Dense(shape['nr_class'], activation='sigmoid')) <add> model.compile(optimizer=Adam(lr=settings['lr']), loss='binary_crossentropy', <add> metrics=['accuracy']) <ide> return model <ide> <ide> <ide> def read_data(data_dir, limit=0): <ide> nr_hidden=("Number of hidden units", "option", "H", int), <ide> max_length=("Maximum sentence length", "option", "L", int), <ide> dropout=("Dropout", "option", "d", float), <add> learn_rate=("Learn rate", "option", "e", float), <ide> nb_epoch=("Number of training epochs", "option", "i", int), <ide> batch_size=("Size of minibatches for training LSTM", "option", "b", int), <ide> nr_examples=("Limit to N examples", "option", "n", int) <ide> ) <ide> def main(model_dir, train_dir, dev_dir, <ide> is_runtime=False, <ide> nr_hidden=64, max_length=100, # Shape <del> dropout=0.5, # General NN config <add> dropout=0.5, learn_rate=0.001, # General NN config <ide> nb_epoch=5, batch_size=100, nr_examples=-1): # Training params <ide> model_dir = pathlib.Path(model_dir) <ide> train_dir = pathlib.Path(train_dir) <ide> def main(model_dir, train_dir, dev_dir, <ide> else: <ide> train_texts, train_labels = read_data(train_dir, limit=nr_examples) <ide> dev_texts, dev_labels = read_data(dev_dir) <add> train_labels = numpy.asarray(train_labels, dtype='int32') <add> dev_labels = numpy.asarray(dev_labels, dtype='int32') <ide> lstm = train(train_texts, train_labels, dev_texts, dev_labels, <ide> {'nr_hidden': nr_hidden, 'max_length': max_length, 'nr_class': 1}, <del> {'dropout': 0.5}, <add> {'dropout': 0.5, 'lr': learn_rate}, <ide> {}, <ide> nb_epoch=nb_epoch, batch_size=batch_size) <ide> weights = lstm.get_weights()
1
Text
Text
fix typo in flux todomvc tutorial
330fa30141014a0ddafbaae81a6236dd223e7324
<ide><path>docs/docs/flux-todo-list.md <ide> module.exports = TodoStore; <ide> <ide> There are a few important things to note in the above code. To start, we are maintaining a private data structure called _todos. This object contains all the individual to-do items. Because this variable lives outside the class, but within the closure of the module, it remains private — it cannot be directly changed from the outside. This helps us preserve a distinct input/output interface for the flow of data by making it impossible to update the store without using an action. <ide> <del>Another important part is the registration of the store's callback with the dispatcher. We pass in our payload handling callback to the dispatcher and preserve the index that this store has in the dispatcher's registry. The callback function currently only handles one actionType, but later we can add as many as we need. <add>Another important part is the registration of the store's callback with the dispatcher. We pass in our payload handling callback to the dispatcher and preserve the index that this store has in the dispatcher's registry. The callback function currently only handles two actionTypes, but later we can add as many as we need. <ide> <ide> <ide> Listening to Changes with a Controller-View
1
Ruby
Ruby
allow resolution with --resolve
2d67c5ee8f7bfe1ac68bde638af852c67816cb7f
<ide><path>Library/Homebrew/cmd/pull.rb <ide> def pull_url url <ide> begin <ide> safe_system 'git', 'am', *patch_args <ide> rescue ErrorDuringExecution <del> system 'git', 'am', '--abort' <del> odie 'Patch failed to apply: aborted.' <add> if ARGV.include? "--resolve" <add> odie "Patch failed to apply: try to resolve it." <add> else <add> system 'git', 'am', '--abort' <add> odie 'Patch failed to apply: aborted.' <add> end <ide> ensure <ide> patchpath.unlink <ide> end
1
Python
Python
preserve the task priority in case of a retry
927d112a9a7601ff9c53e990db6b7f35a6b7a6e0
<ide><path>celery/app/task.py <ide> def signature_from_request(self, request=None, args=None, kwargs=None, <ide> args = request.args if args is None else args <ide> kwargs = request.kwargs if kwargs is None else kwargs <ide> options = request.as_execution_options() <add> delivery_info = request.delivery_info or {} <add> priority = delivery_info.get('priority') <add> if priority is not None: <add> options['priority'] = priority <ide> if queue: <ide> options['queue'] = queue <ide> else: <del> delivery_info = request.delivery_info or {} <ide> exchange = delivery_info.get('exchange') <ide> routing_key = delivery_info.get('routing_key') <ide> if exchange == '' and routing_key: <ide><path>t/integration/tasks.py <ide> def retry_once(self, *args, expires=60.0, max_retries=1, countdown=0.1): <ide> max_retries=max_retries) <ide> <ide> <add>@shared_task(bind=True, expires=60.0, max_retries=1) <add>def retry_once_priority(self, *args, expires=60.0, max_retries=1, countdown=0.1): <add> """Task that fails and is retried. Returns the priority.""" <add> if self.request.retries: <add> return self.request.delivery_info['priority'] <add> raise self.retry(countdown=countdown, <add> max_retries=max_retries) <add> <add> <ide> @shared_task <ide> def redis_echo(message): <ide> """Task that appends the message to a redis list.""" <ide><path>t/integration/test_tasks.py <ide> from celery import group <ide> <ide> from .conftest import get_active_redis_channels <del>from .tasks import add, add_ignore_result, print_unicode, retry_once, sleeping <add>from .tasks import add, add_ignore_result, print_unicode, retry_once, retry_once_priority, sleeping <ide> <ide> <ide> class test_tasks: <ide> def test_task_retried(self): <ide> res = retry_once.delay() <ide> assert res.get(timeout=10) == 1 # retried once <ide> <add> @pytest.mark.flaky(reruns=5, reruns_delay=2) <add> def test_task_retried_priority(self): <add> res = retry_once_priority.apply_async(priority=7) <add> assert res.get(timeout=10) == 7 # retried once with priority 7 <add> <ide> @pytest.mark.flaky(reruns=5, reruns_delay=2) <ide> def test_unicode_task(self, manager): <ide> manager.join( <ide><path>t/unit/tasks/test_tasks.py <ide> def test_retry(self): <ide> self.retry_task.apply([0xFF, 0xFFFF], {'max_retries': 10}) <ide> assert self.retry_task.iterations == 11 <ide> <add> def test_retry_priority(self): <add> priority = 7 <add> <add> # Technically, task.priority doesn't need to be set here <add> # since push_request() doesn't populate the delivery_info <add> # with it. However, setting task.priority here also doesn't <add> # cause any problems. <add> self.retry_task.priority = priority <add> <add> self.retry_task.push_request() <add> self.retry_task.request.delivery_info = { <add> 'priority': priority <add> } <add> sig = self.retry_task.signature_from_request() <add> assert sig.options['priority'] == priority <add> <ide> def test_retry_no_args(self): <ide> self.retry_task_noargs.max_retries = 3 <ide> self.retry_task_noargs.iterations = 0
4
Javascript
Javascript
create activate and deactivate hooks for router
e7ea6a3d0d2c1f74c0dbe8f75430ec04cecb8a49
<ide><path>packages/ember-routing/lib/system/route.js <ide> var get = Ember.get, set = Ember.set, <ide> <ide> Ember.Route = Ember.Object.extend({ <ide> exit: function() { <add> this.deactivate(); <ide> teardownView(this); <ide> }, <ide> <add> enter: function() { <add> this.activate(); <add> }, <add> <add> /** <add> This hook is executed when the router completely exits this route. It is <add> not executed when the model for the route changes. <add> */ <add> deactivate: Ember.K, <add> <add> /** <add> This hook is executed when the router enters the route for the first time. <add> It is not executed when the model for the route changes. <add> */ <add> activate: Ember.K, <add> <ide> /** <ide> Transition into another route. Optionally supply a model for the <ide> route in question. The model will be serialized into the URL
1
Go
Go
read the stdin line properly
ce53e21ea6790cf7c2e96f8c5f0725bdf41a80f0
<ide><path>commands.go <ide> func (cli *DockerCli) CmdLogin(args ...string) error { <ide> <ide> readInput := func(in io.Reader, out io.Writer) string { <ide> reader := bufio.NewReader(in) <del> line, err := reader.ReadString('\n') <add> line, _, err := reader.ReadLine() <ide> if err != nil { <ide> fmt.Fprintln(out, err.Error()) <ide> os.Exit(1) <ide> } <del> return line <add> return string(line) <ide> } <ide> <add> cli.LoadConfigFile() <ide> authconfig, ok := cli.configFile.Configs[auth.IndexServerAddress()] <ide> if !ok { <ide> authconfig = auth.AuthConfig{}
1
Ruby
Ruby
enable named route tests
e296ea056e87027933c7d37e1e8c1f6ef73bc447
<ide><path>actionpack/test/dispatch/routing_test.rb <ide> def self.new(*args) <ide> } <ide> end <ide> end <add> <ide> old_dispatcher = ActionDispatch::Routing::RouteSet::Dispatcher <ide> ActionDispatch::Routing::RouteSet.module_eval { remove_const :Dispatcher } <ide> ActionDispatch::Routing::RouteSet.module_eval { const_set :Dispatcher, Dispatcher } <del> <ide> Routes = ActionDispatch::Routing::RouteSet.new <del> Routes.draw do <add> Routes.draw do |map| <ide> controller :sessions do <ide> get 'login', :to => :new, :as => :login <ide> post 'login', :to => :create <ide> def app <ide> Routes <ide> end <ide> <del> def setup <del> Routes.install_helpers(metaclass) <del> end <del> <ide> def test_logout <del> delete '/logout' <del> assert_equal 'sessions#destroy', @response.body <add> with_test_routes do <add> delete '/logout' <add> assert_equal 'sessions#destroy', @response.body <ide> <del> # assert_equal '/logout', logout_path <add> assert_equal '/logout', logout_path <add> end <ide> end <ide> <ide> def test_login <del> get '/login' <del> assert_equal 'sessions#new', @response.body <add> with_test_routes do <add> get '/login' <add> assert_equal 'sessions#new', @response.body <ide> <del> post '/login' <del> assert_equal 'sessions#create', @response.body <add> post '/login' <add> assert_equal 'sessions#create', @response.body <ide> <del> # assert_equal '/login', app.login_path <add> assert_equal '/login', login_path <add> end <ide> end <ide> <ide> def test_login_redirect <del> get '/account/login' <del> assert_equal 301, @response.status <del> assert_equal 'http://www.example.com/login', @response.headers['Location'] <del> assert_equal 'Moved Permanently', @response.body <add> with_test_routes do <add> get '/account/login' <add> assert_equal 301, @response.status <add> assert_equal 'http://www.example.com/login', @response.headers['Location'] <add> assert_equal 'Moved Permanently', @response.body <add> end <ide> end <ide> <ide> def test_openid <del> get '/openid/login' <del> assert_equal 'openid#login', @response.body <add> with_test_routes do <add> get '/openid/login' <add> assert_equal 'openid#login', @response.body <ide> <del> post '/openid/login' <del> assert_equal 'openid#login', @response.body <add> post '/openid/login' <add> assert_equal 'openid#login', @response.body <add> end <ide> end <ide> <add> # TODO: rackmount is broken <ide> # def test_admin <del> # get '/admin', {}, {'REMOTE_ADDR' => '192.168.1.100'} <del> # assert_equal 'queenbee#index', @response.body <add> # with_test_routes do <add> # get '/admin', {}, {'REMOTE_ADDR' => '192.168.1.100'} <add> # assert_equal 'queenbee#index', @response.body <ide> # <del> # assert_raise(ActionController::RoutingError) { get '/admin', {}, {'REMOTE_ADDR' => '10.0.0.100'} } <add> # assert_raise(ActionController::RoutingError) { get '/admin', {}, {'REMOTE_ADDR' => '10.0.0.100'} } <ide> # <del> # get '/admin/accounts', {}, {'REMOTE_ADDR' => '192.168.1.100'} <del> # assert_equal 'queenbee#accounts', @response.body <add> # get '/admin/accounts', {}, {'REMOTE_ADDR' => '192.168.1.100'} <add> # assert_equal 'queenbee#accounts', @response.body <ide> # <del> # assert_raise(ActionController::RoutingError) { get '/admin/accounts', {}, {'REMOTE_ADDR' => '10.0.0.100'} } <add> # assert_raise(ActionController::RoutingError) { get '/admin/accounts', {}, {'REMOTE_ADDR' => '10.0.0.100'} } <add> # end <ide> # end <ide> <ide> def test_global <del> get '/global/dashboard' <del> assert_equal 'global#dashboard', @response.body <add> with_test_routes do <add> get '/global/dashboard' <add> assert_equal 'global#dashboard', @response.body <ide> <del> get '/global/export' <del> assert_equal 'global#export', @response.body <add> get '/global/export' <add> assert_equal 'global#export', @response.body <ide> <del> get '/global/hide_notice' <del> assert_equal 'global#hide_notice', @response.body <add> get '/global/hide_notice' <add> assert_equal 'global#hide_notice', @response.body <ide> <del> get '/export/123/foo.txt' <del> assert_equal 'global#export', @response.body <add> get '/export/123/foo.txt' <add> assert_equal 'global#export', @response.body <ide> <del> # assert_equal '/global/export', app.export_request_path <del> # assert_equal '/global/hide_notice', app.hide_notice_path <del> # assert_equal '/export/123/foo.txt', app.export_download_path(:id => 123, :file => 'foo.txt') <add> assert_equal '/global/export', export_request_path <add> assert_equal '/global/hide_notice', hide_notice_path <add> assert_equal '/export/123/foo.txt', export_download_path(:id => 123, :file => 'foo.txt') <add> end <ide> end <ide> <ide> def test_projects <del> get '/projects/1' <del> assert_equal 'projects#show', @response.body <add> with_test_routes do <add> get '/projects/1' <add> assert_equal 'projects#show', @response.body <add> end <ide> end <ide> <ide> def test_projects_involvements <del> get '/projects/1/involvements' <del> assert_equal 'involvements#index', @response.body <add> with_test_routes do <add> get '/projects/1/involvements' <add> assert_equal 'involvements#index', @response.body <ide> <del> get '/projects/1/involvements/1' <del> assert_equal 'involvements#show', @response.body <add> get '/projects/1/involvements/1' <add> assert_equal 'involvements#show', @response.body <add> end <ide> end <ide> <ide> def test_projects_attachments <del> get '/projects/1/attachments' <del> assert_equal 'attachments#index', @response.body <add> with_test_routes do <add> get '/projects/1/attachments' <add> assert_equal 'attachments#index', @response.body <add> end <ide> end <ide> <ide> def test_projects_participants <del> get '/projects/1/participants' <del> assert_equal 'participants#index', @response.body <add> with_test_routes do <add> get '/projects/1/participants' <add> assert_equal 'participants#index', @response.body <ide> <del> put '/projects/1/participants/update_all' <del> assert_equal 'participants#update_all', @response.body <add> put '/projects/1/participants/update_all' <add> assert_equal 'participants#update_all', @response.body <add> end <ide> end <ide> <ide> def test_projects_companies <del> get '/projects/1/companies' <del> assert_equal 'companies#index', @response.body <add> with_test_routes do <add> get '/projects/1/companies' <add> assert_equal 'companies#index', @response.body <ide> <del> get '/projects/1/companies/1/people' <del> assert_equal 'people#index', @response.body <add> get '/projects/1/companies/1/people' <add> assert_equal 'people#index', @response.body <ide> <del> get '/projects/1/companies/1/avatar' <del> assert_equal 'avatar#show', @response.body <add> get '/projects/1/companies/1/avatar' <add> assert_equal 'avatar#show', @response.body <add> end <ide> end <ide> <ide> def test_project_images <del> get '/projects/1/images' <del> assert_equal 'images#index', @response.body <add> with_test_routes do <add> get '/projects/1/images' <add> assert_equal 'images#index', @response.body <ide> <del> post '/projects/1/images/1/revise' <del> assert_equal 'images#revise', @response.body <add> post '/projects/1/images/1/revise' <add> assert_equal 'images#revise', @response.body <add> end <ide> end <ide> <ide> def test_projects_people <del> get '/projects/1/people' <del> assert_equal 'people#index', @response.body <add> with_test_routes do <add> get '/projects/1/people' <add> assert_equal 'people#index', @response.body <ide> <del> get '/projects/1/people/1' <del> assert_equal 'people#show', @response.body <add> get '/projects/1/people/1' <add> assert_equal 'people#show', @response.body <ide> <del> get '/projects/1/people/1/7a2dec8/avatar' <del> assert_equal 'avatar#show', @response.body <add> get '/projects/1/people/1/7a2dec8/avatar' <add> assert_equal 'avatar#show', @response.body <ide> <del> put '/projects/1/people/1/accessible_projects' <del> assert_equal 'people#accessible_projects', @response.body <add> put '/projects/1/people/1/accessible_projects' <add> assert_equal 'people#accessible_projects', @response.body <ide> <del> post '/projects/1/people/1/resend' <del> assert_equal 'people#resend', @response.body <add> post '/projects/1/people/1/resend' <add> assert_equal 'people#resend', @response.body <ide> <del> post '/projects/1/people/1/generate_new_password' <del> assert_equal 'people#generate_new_password', @response.body <add> post '/projects/1/people/1/generate_new_password' <add> assert_equal 'people#generate_new_password', @response.body <add> end <ide> end <ide> <ide> def test_projects_posts <del> get '/projects/1/posts' <del> assert_equal 'posts#index', @response.body <add> with_test_routes do <add> get '/projects/1/posts' <add> assert_equal 'posts#index', @response.body <ide> <del> get '/projects/1/posts/archive' <del> assert_equal 'posts#archive', @response.body <add> get '/projects/1/posts/archive' <add> assert_equal 'posts#archive', @response.body <ide> <del> get '/projects/1/posts/toggle_view' <del> assert_equal 'posts#toggle_view', @response.body <add> get '/projects/1/posts/toggle_view' <add> assert_equal 'posts#toggle_view', @response.body <ide> <del> post '/projects/1/posts/1/preview' <del> assert_equal 'posts#preview', @response.body <add> post '/projects/1/posts/1/preview' <add> assert_equal 'posts#preview', @response.body <ide> <del> get '/projects/1/posts/1/subscription' <del> assert_equal 'subscription#show', @response.body <add> get '/projects/1/posts/1/subscription' <add> assert_equal 'subscription#show', @response.body <ide> <del> get '/projects/1/posts/1/comments' <del> assert_equal 'comments#index', @response.body <add> get '/projects/1/posts/1/comments' <add> assert_equal 'comments#index', @response.body <ide> <del> post '/projects/1/posts/1/comments/preview' <del> assert_equal 'comments#preview', @response.body <add> post '/projects/1/posts/1/comments/preview' <add> assert_equal 'comments#preview', @response.body <add> end <ide> end <ide> <ide> def test_sprockets <del> get '/sprockets.js' <del> assert_equal 'javascripts', @response.body <add> with_test_routes do <add> get '/sprockets.js' <add> assert_equal 'javascripts', @response.body <add> end <ide> end <ide> <ide> def test_update_person_route <del> get '/people/1/update' <del> assert_equal 'people#update', @response.body <add> with_test_routes do <add> get '/people/1/update' <add> assert_equal 'people#update', @response.body <ide> <del> # assert_equal '/people/1/update', app.update_person_path(:id => 1) <add> assert_equal '/people/1/update', update_person_path(:id => 1) <add> end <ide> end <ide> <ide> def test_update_project_person <del> get '/projects/1/people/2/update' <del> assert_equal 'people#update', @response.body <add> with_test_routes do <add> get '/projects/1/people/2/update' <add> assert_equal 'people#update', @response.body <ide> <del> # assert_equal '/projects/1/people/2/update', app.update_project_person_path(:project_id => 1, :id => 2) <add> assert_equal '/projects/1/people/2/update', update_project_person_path(:project_id => 1, :id => 2) <add> end <ide> end <ide> <ide> def test_articles_perma <del> get '/articles/2009/08/18/rails-3' <del> assert_equal 'articles#show', @response.body <add> with_test_routes do <add> get '/articles/2009/08/18/rails-3' <add> assert_equal 'articles#show', @response.body <ide> <del> # assert_equal '/articles/2009/8/18/rails-3', app.article_path(:year => 2009, :month => 8, :day => 18, :title => 'rails-3') <add> assert_equal '/articles/2009/8/18/rails-3', article_path(:year => 2009, :month => 8, :day => 18, :title => 'rails-3') <add> end <ide> end <ide> <ide> def test_account_namespace <del> get '/account/subscription' <del> assert_equal 'subscription#show', @response.body <add> with_test_routes do <add> get '/account/subscription' <add> assert_equal 'subscription#show', @response.body <ide> <del> get '/account/credit' <del> assert_equal 'credit#show', @response.body <add> get '/account/credit' <add> assert_equal 'credit#show', @response.body <ide> <del> get '/account/credit_card' <del> assert_equal 'credit_card#show', @response.body <add> get '/account/credit_card' <add> assert_equal 'credit_card#show', @response.body <add> end <ide> end <ide> <ide> def test_articles_with_id <del> get '/articles/rails/1' <del> assert_equal 'articles#with_id', @response.body <add> with_test_routes do <add> get '/articles/rails/1' <add> assert_equal 'articles#with_id', @response.body <ide> <del> assert_raise(ActionController::RoutingError) { get '/articles/123/1' } <add> assert_raise(ActionController::RoutingError) { get '/articles/123/1' } <ide> <del> # assert_equal '/articles/rails/1', app.with_title_path(:title => 'rails', :id => 1) <add> assert_equal '/articles/rails/1', with_title_path(:title => 'rails', :id => 1) <add> end <ide> end <ide> <ide> def test_access_token_rooms <del> get '/12345/rooms' <del> assert_equal 'rooms#index', @response.body <add> with_test_routes do <add> get '/12345/rooms' <add> assert_equal 'rooms#index', @response.body <ide> <del> get '/12345/rooms/1' <del> assert_equal 'rooms#show', @response.body <add> get '/12345/rooms/1' <add> assert_equal 'rooms#show', @response.body <ide> <del> get '/12345/rooms/1/edit' <del> assert_equal 'rooms#edit', @response.body <add> get '/12345/rooms/1/edit' <add> assert_equal 'rooms#edit', @response.body <add> end <ide> end <add> <add> private <add> def with_test_routes <add> real_routes, temp_routes = ActionController::Routing::Routes, Routes <add> <add> ActionController::Routing.module_eval { remove_const :Routes } <add> ActionController::Routing.module_eval { const_set :Routes, temp_routes } <add> <add> yield <add> ensure <add> ActionController::Routing.module_eval { remove_const :Routes } <add> ActionController::Routing.const_set(:Routes, real_routes) <add> end <ide> end
1
Javascript
Javascript
add automatic loading of built-in libs
b72277183f9cb79274d6f8915e02b895c56b2288
<ide><path>lib/repl.js <ide> module.paths = require('module')._nodeModulePaths(module.filename); <ide> // Can overridden with custom print functions, such as `probe` or `eyes.js` <ide> exports.writer = util.inspect; <ide> <add>var builtinLibs = ['assert', 'buffer', 'child_process', 'cluster', <add> 'crypto', 'dgram', 'dns', 'events', 'fs', 'http', 'https', 'net', <add> 'os', 'path', 'punycode', 'querystring', 'readline', 'repl', <add> 'string_decoder', 'tls', 'tty', 'url', 'util', 'vm', 'zlib']; <add> <ide> <ide> function REPLServer(prompt, stream, eval, useGlobal, ignoreUndefined) { <ide> var self = this; <ide> function REPLServer(prompt, stream, eval, useGlobal, ignoreUndefined) { <ide> } <ide> } <ide> <add> // Check if a builtin module name was used and then include it <add> // if there's no conflict. <add> if (~builtinLibs.indexOf(cmd)) { <add> var lib = require(cmd); <add> if (cmd in self.context && lib !== self.context[cmd]) { <add> self.outputStream.write('A different "' + cmd + <add> '" already exists globally\n'); <add> } else { <add> self.context._ = self.context[cmd] = lib; <add> self.outputStream.write(exports.writer(lib) + '\n'); <add> } <add> self.displayPrompt(); <add> return; <add> } <add> <ide> if (!skipCatchall) { <ide> var evalCmd = self.bufferedCommand + cmd + '\n'; <ide> <ide> REPLServer.prototype.complete = function(line, callback) { <ide> } <ide> <ide> if (!subdir) { <del> // Kind of lame that this needs to be updated manually. <del> // Intentionally excluding moved modules: posix, utils. <del> var builtinLibs = ['assert', 'buffer', 'child_process', 'crypto', 'dgram', <del> 'dns', 'events', 'file', 'freelist', 'fs', 'http', 'net', 'os', 'path', <del> 'querystring', 'readline', 'repl', 'string_decoder', 'util', 'tcp', <del> 'url']; <ide> completionGroups.push(builtinLibs); <ide> } <ide> <ide><path>test/simple/test-repl-autolibs.js <add>// Copyright Joyent, Inc. and other Node contributors. <add>// <add>// Permission is hereby granted, free of charge, to any person obtaining a <add>// copy of this software and associated documentation files (the <add>// "Software"), to deal in the Software without restriction, including <add>// without limitation the rights to use, copy, modify, merge, publish, <add>// distribute, sublicense, and/or sell copies of the Software, and to permit <add>// persons to whom the Software is furnished to do so, subject to the <add>// following conditions: <add>// <add>// The above copyright notice and this permission notice shall be included <add>// in all copies or substantial portions of the Software. <add>// <add>// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS <add>// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF <add>// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN <add>// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, <add>// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR <add>// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE <add>// USE OR OTHER DEALINGS IN THE SOFTWARE. <add> <add>var assert = require('assert'); <add>var util = require('util'); <add>var repl = require('repl'); <add> <add>// A stream to push an array into a REPL <add>function ArrayStream() { <add> this.run = function (data) { <add> var self = this; <add> data.forEach(function (line) { <add> self.emit('data', line); <add> }); <add> } <add>} <add>util.inherits(ArrayStream, require('stream').Stream); <add>ArrayStream.prototype.readable = true; <add>ArrayStream.prototype.writable = true; <add>ArrayStream.prototype.resume = function () {}; <add>ArrayStream.prototype.write = function () {}; <add> <add>var putIn = new ArrayStream; <add>var testMe = repl.start('', putIn, null, true); <add> <add>test1(); <add> <add>function test1(){ <add> putIn.write = function (data) { <add> if (data.length) { <add> // inspect output matches repl output <add> assert.equal(data, util.inspect(require('fs'), null, null, false) + '\n'); <add> // globally added lib matches required lib <add> assert.equal(global.fs, require('fs')); <add> test2(); <add> } <add> }; <add> putIn.run(['fs']); <add>} <add> <add>function test2(){ <add> putIn.write = function(data) { <add> if (data.length) { <add> // repl response error message <add> assert.equal(data.indexOf('A different'), 0); <add> // original value wasn't overwritten <add> assert.equal(val, global.url); <add> } <add> }; <add> var val = {}; <add> global.url = val; <add> putIn.run(['url']); <add>}
2
Text
Text
add speed comparison to docs
a071279bc763811347ae02a798ac76788d0335db
<ide><path>website/docs/usage/facts-figures.md <ide> results. Project template: <ide> <ide> </figure> <ide> <add>### Speed comparison {#benchmarks-speed} <add> <add>We compare the speed of different NLP libraries, measured in words per second. <add>The evaluation was run on 10,000 Reddit comments. <add> <add><figure> <add> <add>| Library | Pipeline | WPS CPU <Help>words per second on CPU, higher is better</Help> | WPS GPU <Help>words per second on GPU, higher is better</Help> | <add>| ------- | ----------------------------------------------- | -------------------------------------------------------------: | -------------------------------------------------------------: | <add>| spaCy | [`en_core_web_lg`](/models/en#en_core_web_lg) | 10,014 | 14,954 | <add>| spaCy | [`en_core_web_trf`](/models/en#en_core_web_trf) | 684 | 3,768 | <add>| Stanza | `en_ewt` | 878 | 2,180 | <add>| Flair | `pos`(`-fast`) & `ner`(`-fast`) | 323 | 1,184 | <add>| UDPipe | `english-ewt-ud-2.5` | 1,101 | NA | <add> <add><figcaption class="caption"> <add> <add>**End-to-end processing speed** on raw unannotated text. Project template: <add>[`benchmarks/speed`](%%GITHUB_PROJECTS/benchmarks/speed). <add> <add></figcaption> <add> <add></figure> <add> <ide> <!-- TODO: ## Citing spaCy {#citation} <ide> <ide> -->
1
Javascript
Javascript
fix lint errors
ec774e143adee8d7bafe4dcb4124a76a1f31bf0a
<ide><path>src/text-editor-component.js <ide> class LineNumberGutterComponent { <ide> <ide> render () { <ide> const { <del> rootComponent, nodePool, showLineNumbers, height, width, lineHeight, startRow, endRow, rowsPerTile, <add> rootComponent, showLineNumbers, height, width, lineHeight, startRow, endRow, rowsPerTile, <ide> maxDigits, keys, bufferRows, softWrappedFlags, foldableFlags, decorations <ide> } = this.props <ide> <ide> class NodePool { <ide> getElement (type, className, style) { <ide> var element <ide> var elementsByDepth = this.elementsByType[type] <del> while (elementsByDepth && elementsByDepth.length > 0) { <del> var elements = elementsByDepth[elementsByDepth.length - 1] <del> if (elements && elements.length > 0) { <del> element = elements.pop() <del> if (elements.length === 0) elementsByDepth.pop() <del> break <del> } else { <del> elementsByDepth.pop() <add> if (elementsByDepth) { <add> while (elementsByDepth.length > 0) { <add> var elements = elementsByDepth[elementsByDepth.length - 1] <add> if (elements && elements.length > 0) { <add> element = elements.pop() <add> if (elements.length === 0) elementsByDepth.pop() <add> break <add> } else { <add> elementsByDepth.pop() <add> } <ide> } <ide> } <ide>
1
Javascript
Javascript
add d3.timer.immediate() for immediate transitions
8e0bc6342ff11025f6a74fdc918420c625b6f1bc
<ide><path>d3.chart.js <ide> d3.chart.box = function() { <ide> .style("opacity", 1e-6) <ide> .remove(); <ide> }); <add> d3.timer.immediate(); <ide> } <ide> <ide> box.width = function(x) { <ide> d3.chart.bullet = function() { <ide> .attr("opacity", 1e-6) <ide> .remove(); <ide> }); <add> d3.timer.immediate(); <ide> } <ide> <ide> // left, right, top, bottom <ide><path>d3.chart.min.js <del>(function(){function g(a){var b=a(0);return function(c){return Math.abs(a(c)-b)}}function f(a){return function(b){return"translate("+a(b)+",0)"}}function e(a){return a.measures}function d(a){return a.markers}function c(a){return a.ranges}function b(a){var b=a.length;return[.25,.5,.75].map(function(c){c*=b;return~~c===c?(a[c]+a[c+1])/2:a[Math.round(c)]})}function a(a){return[0,a.length-1]}d3.chart={},d3.chart.box=function(){function k(a){a.each(function(a,b){a=a.map(g).sort(d3.ascending);var k=d3.select(this),l=a.length,m=a[0],n=a[l-1],o=a.quartiles=i(a),p=h&&h.call(this,a,b),q=p&&p.map(function(b){return a[b]}),r=p?d3.range(0,p[0]).concat(d3.range(p[1]+1,l)):d3.range(l),s=d3.scale.linear().domain(f&&f.call(this,a,b)||[m,n]).range([d,0]),t=this.__chart__||d3.scale.linear().domain([0,Infinity]).range(s.range());this.__chart__=s;var u=k.selectAll("line.center").data(q?[q]:[]);u.enter().insert("svg:line","rect").attr("class","center").attr("x1",c/2).attr("y1",function(a){return t(a[0])}).attr("x2",c/2).attr("y2",function(a){return t(a[1])}).style("opacity",1e-6).transition().duration(e).style("opacity",1).attr("y1",function(a){return s(a[0])}).attr("y2",function(a){return s(a[1])}),u.transition().duration(e).style("opacity",1).attr("y1",function(a){return s(a[0])}).attr("y2",function(a){return s(a[1])}),u.exit().transition().duration(e).style("opacity",1e-6).attr("y1",function(a){return s(a[0])}).attr("y2",function(a){return s(a[1])}).remove();var v=k.selectAll("rect.box").data([o]);v.enter().append("svg:rect").attr("class","box").attr("x",0).attr("y",function(a){return t(a[2])}).attr("width",c).attr("height",function(a){return t(a[0])-t(a[2])}).transition().duration(e).attr("y",function(a){return s(a[2])}).attr("height",function(a){return s(a[0])-s(a[2])}),v.transition().duration(e).attr("y",function(a){return s(a[2])}).attr("height",function(a){return s(a[0])-s(a[2])});var w=k.selectAll("line.median").data([o[1]]);w.enter().append("svg:line").attr("class","median").attr("x1",0).attr("y1",t).attr("x2",c).attr("y2",t).transition().duration(e).attr("y1",s).attr("y2",s),w.transition().duration(e).attr("y1",s).attr("y2",s);var x=k.selectAll("line.whisker").data(q||[]);x.enter().insert("svg:line","circle, text").attr("class","whisker").attr("x1",0).attr("y1",t).attr("x2",c).attr("y2",t).style("opacity",1e-6).transition().duration(e).attr("y1",s).attr("y2",s).style("opacity",1),x.transition().duration(e).attr("y1",s).attr("y2",s).style("opacity",1),x.exit().transition().duration(e).attr("y1",s).attr("y2",s).style("opacity",1e-6).remove();var y=k.selectAll("circle.outlier").data(r,Number);y.enter().insert("svg:circle","text").attr("class","outlier").attr("r",5).attr("cx",c/2).attr("cy",function(b){return t(a[b])}).style("opacity",1e-6).transition().duration(e).attr("cy",function(b){return s(a[b])}).style("opacity",1),y.transition().duration(e).attr("cy",function(b){return s(a[b])}).style("opacity",1),y.exit().transition().duration(e).attr("cy",function(b){return s(a[b])}).style("opacity",1e-6).remove();var z=j||s.tickFormat(8),A=k.selectAll("text.box").data(o);A.enter().append("svg:text").attr("class","box").attr("dy",".3em").attr("dx",function(a,b){return b&1?6:-6}).attr("x",function(a,b){return b&1?c:0}).attr("y",t).attr("text-anchor",function(a,b){return b&1?"start":"end"}).text(z).transition().duration(e).attr("y",s),A.transition().duration(e).text(z).attr("y",s);var B=k.selectAll("text.whisker").data(q||[]);B.enter().append("svg:text").attr("class","whisker").attr("dy",".3em").attr("dx",6).attr("x",c).attr("y",t).text(z).style("opacity",1e-6).transition().duration(e).attr("y",s).style("opacity",1),B.transition().duration(e).text(z).attr("y",s).style("opacity",1),B.exit().transition().duration(e).attr("y",s).style("opacity",1e-6).remove()})}var c=1,d=1,e=0,f=null,g=Number,h=a,i=b,j=null;k.width=function(a){if(!arguments.length)return c;c=a;return k},k.height=function(a){if(!arguments.length)return d;d=a;return k},k.tickFormat=function(a){if(!arguments.length)return j;j=a;return k},k.duration=function(a){if(!arguments.length)return e;e=a;return k},k.domain=function(a){if(!arguments.length)return f;f=a==null?a:d3.functor(a);return k},k.value=function(a){if(!arguments.length)return g;g=a;return k},k.whiskers=function(a){if(!arguments.length)return h;h=a;return k},k.quartiles=function(a){if(!arguments.length)return i;i=a;return k};return k},d3.chart.bullet=function(){function o(a){a.each(function(a,c){var d=i.call(this,a,c).slice().sort(d3.descending),e=j.call(this,a,c).slice().sort(d3.descending),o=k.call(this,a,c).slice().sort(d3.descending),p=d3.select(this),q=d3.scale.linear().domain([0,Math.max(d[0],e[0],o[0])]).range(b?[l,0]:[0,l]),r=this.__chart__||d3.scale.linear().domain([0,Infinity]).range(q.range());this.__chart__=q;var s=g(r),t=g(q),u=p.selectAll("rect.range").data(d);u.enter().append("svg:rect").attr("class",function(a,b){return"range s"+b}).attr("width",s).attr("height",m).attr("x",b?r:0).transition().duration(h).attr("width",t).attr("x",b?q:0),u.transition().duration(h).attr("x",b?q:0).attr("width",t).attr("height",m);var v=p.selectAll("rect.measure").data(o);v.enter().append("svg:rect").attr("class",function(a,b){return"measure s"+b}).attr("width",s).attr("height",m/3).attr("x",b?r:0).attr("y",m/3).transition().duration(h).attr("width",t).attr("x",b?q:0),v.transition().duration(h).attr("width",t).attr("height",m/3).attr("x",b?q:0).attr("y",m/3);var w=p.selectAll("line.marker").data(e);w.enter().append("svg:line").attr("class","marker").attr("x1",r).attr("x2",r).attr("y1",m/6).attr("y2",m*5/6).transition().duration(h).attr("x1",q).attr("x2",q),w.transition().duration(h).attr("x1",q).attr("x2",q).attr("y1",m/6).attr("y2",m*5/6);var x=n||q.tickFormat(8),y=p.selectAll("g.tick").data(q.ticks(8),function(a){return this.textContent||x(a)}),z=y.enter().append("svg:g").attr("class","tick").attr("transform",f(r)).attr("opacity",1e-6);z.append("svg:line").attr("y1",m).attr("y2",m*7/6),z.append("svg:text").attr("text-anchor","middle").attr("dy","1em").attr("y",m*7/6).text(x),z.transition().duration(h).attr("transform",f(q)).attr("opacity",1);var A=y.transition().duration(h).attr("transform",f(q)).attr("opacity",1);A.select("line").attr("y1",m).attr("y2",m*7/6),A.select("text").attr("y",m*7/6),y.exit().transition().duration(h).attr("transform",f(q)).attr("opacity",1e-6).remove()})}var a="left",b=!1,h=0,i=c,j=d,k=e,l=380,m=30,n=null;o.orient=function(c){if(!arguments.length)return a;a=c,b=a=="right"||a=="bottom";return o},o.ranges=function(a){if(!arguments.length)return i;i=a;return o},o.markers=function(a){if(!arguments.length)return j;j=a;return o},o.measures=function(a){if(!arguments.length)return k;k=a;return o},o.width=function(a){if(!arguments.length)return l;l=a;return o},o.height=function(a){if(!arguments.length)return m;m=a;return o},o.tickFormat=function(a){if(!arguments.length)return n;n=a;return o},o.duration=function(a){if(!arguments.length)return h;h=a;return o};return o}})() <ide>\ No newline at end of file <add>(function(){function g(a){var b=a(0);return function(c){return Math.abs(a(c)-b)}}function f(a){return function(b){return"translate("+a(b)+",0)"}}function e(a){return a.measures}function d(a){return a.markers}function c(a){return a.ranges}function b(a){var b=a.length;return[.25,.5,.75].map(function(c){c*=b;return~~c===c?(a[c]+a[c+1])/2:a[Math.round(c)]})}function a(a){return[0,a.length-1]}d3.chart={},d3.chart.box=function(){function k(a){a.each(function(a,b){a=a.map(g).sort(d3.ascending);var k=d3.select(this),l=a.length,m=a[0],n=a[l-1],o=a.quartiles=i(a),p=h&&h.call(this,a,b),q=p&&p.map(function(b){return a[b]}),r=p?d3.range(0,p[0]).concat(d3.range(p[1]+1,l)):d3.range(l),s=d3.scale.linear().domain(f&&f.call(this,a,b)||[m,n]).range([d,0]),t=this.__chart__||d3.scale.linear().domain([0,Infinity]).range(s.range());this.__chart__=s;var u=k.selectAll("line.center").data(q?[q]:[]);u.enter().insert("svg:line","rect").attr("class","center").attr("x1",c/2).attr("y1",function(a){return t(a[0])}).attr("x2",c/2).attr("y2",function(a){return t(a[1])}).style("opacity",1e-6).transition().duration(e).style("opacity",1).attr("y1",function(a){return s(a[0])}).attr("y2",function(a){return s(a[1])}),u.transition().duration(e).style("opacity",1).attr("y1",function(a){return s(a[0])}).attr("y2",function(a){return s(a[1])}),u.exit().transition().duration(e).style("opacity",1e-6).attr("y1",function(a){return s(a[0])}).attr("y2",function(a){return s(a[1])}).remove();var v=k.selectAll("rect.box").data([o]);v.enter().append("svg:rect").attr("class","box").attr("x",0).attr("y",function(a){return t(a[2])}).attr("width",c).attr("height",function(a){return t(a[0])-t(a[2])}).transition().duration(e).attr("y",function(a){return s(a[2])}).attr("height",function(a){return s(a[0])-s(a[2])}),v.transition().duration(e).attr("y",function(a){return s(a[2])}).attr("height",function(a){return s(a[0])-s(a[2])});var w=k.selectAll("line.median").data([o[1]]);w.enter().append("svg:line").attr("class","median").attr("x1",0).attr("y1",t).attr("x2",c).attr("y2",t).transition().duration(e).attr("y1",s).attr("y2",s),w.transition().duration(e).attr("y1",s).attr("y2",s);var x=k.selectAll("line.whisker").data(q||[]);x.enter().insert("svg:line","circle, text").attr("class","whisker").attr("x1",0).attr("y1",t).attr("x2",c).attr("y2",t).style("opacity",1e-6).transition().duration(e).attr("y1",s).attr("y2",s).style("opacity",1),x.transition().duration(e).attr("y1",s).attr("y2",s).style("opacity",1),x.exit().transition().duration(e).attr("y1",s).attr("y2",s).style("opacity",1e-6).remove();var y=k.selectAll("circle.outlier").data(r,Number);y.enter().insert("svg:circle","text").attr("class","outlier").attr("r",5).attr("cx",c/2).attr("cy",function(b){return t(a[b])}).style("opacity",1e-6).transition().duration(e).attr("cy",function(b){return s(a[b])}).style("opacity",1),y.transition().duration(e).attr("cy",function(b){return s(a[b])}).style("opacity",1),y.exit().transition().duration(e).attr("cy",function(b){return s(a[b])}).style("opacity",1e-6).remove();var z=j||s.tickFormat(8),A=k.selectAll("text.box").data(o);A.enter().append("svg:text").attr("class","box").attr("dy",".3em").attr("dx",function(a,b){return b&1?6:-6}).attr("x",function(a,b){return b&1?c:0}).attr("y",t).attr("text-anchor",function(a,b){return b&1?"start":"end"}).text(z).transition().duration(e).attr("y",s),A.transition().duration(e).text(z).attr("y",s);var B=k.selectAll("text.whisker").data(q||[]);B.enter().append("svg:text").attr("class","whisker").attr("dy",".3em").attr("dx",6).attr("x",c).attr("y",t).text(z).style("opacity",1e-6).transition().duration(e).attr("y",s).style("opacity",1),B.transition().duration(e).text(z).attr("y",s).style("opacity",1),B.exit().transition().duration(e).attr("y",s).style("opacity",1e-6).remove()}),d3.timer.immediate()}var c=1,d=1,e=0,f=null,g=Number,h=a,i=b,j=null;k.width=function(a){if(!arguments.length)return c;c=a;return k},k.height=function(a){if(!arguments.length)return d;d=a;return k},k.tickFormat=function(a){if(!arguments.length)return j;j=a;return k},k.duration=function(a){if(!arguments.length)return e;e=a;return k},k.domain=function(a){if(!arguments.length)return f;f=a==null?a:d3.functor(a);return k},k.value=function(a){if(!arguments.length)return g;g=a;return k},k.whiskers=function(a){if(!arguments.length)return h;h=a;return k},k.quartiles=function(a){if(!arguments.length)return i;i=a;return k};return k},d3.chart.bullet=function(){function o(a){a.each(function(a,c){var d=i.call(this,a,c).slice().sort(d3.descending),e=j.call(this,a,c).slice().sort(d3.descending),o=k.call(this,a,c).slice().sort(d3.descending),p=d3.select(this),q=d3.scale.linear().domain([0,Math.max(d[0],e[0],o[0])]).range(b?[l,0]:[0,l]),r=this.__chart__||d3.scale.linear().domain([0,Infinity]).range(q.range());this.__chart__=q;var s=g(r),t=g(q),u=p.selectAll("rect.range").data(d);u.enter().append("svg:rect").attr("class",function(a,b){return"range s"+b}).attr("width",s).attr("height",m).attr("x",b?r:0).transition().duration(h).attr("width",t).attr("x",b?q:0),u.transition().duration(h).attr("x",b?q:0).attr("width",t).attr("height",m);var v=p.selectAll("rect.measure").data(o);v.enter().append("svg:rect").attr("class",function(a,b){return"measure s"+b}).attr("width",s).attr("height",m/3).attr("x",b?r:0).attr("y",m/3).transition().duration(h).attr("width",t).attr("x",b?q:0),v.transition().duration(h).attr("width",t).attr("height",m/3).attr("x",b?q:0).attr("y",m/3);var w=p.selectAll("line.marker").data(e);w.enter().append("svg:line").attr("class","marker").attr("x1",r).attr("x2",r).attr("y1",m/6).attr("y2",m*5/6).transition().duration(h).attr("x1",q).attr("x2",q),w.transition().duration(h).attr("x1",q).attr("x2",q).attr("y1",m/6).attr("y2",m*5/6);var x=n||q.tickFormat(8),y=p.selectAll("g.tick").data(q.ticks(8),function(a){return this.textContent||x(a)}),z=y.enter().append("svg:g").attr("class","tick").attr("transform",f(r)).attr("opacity",1e-6);z.append("svg:line").attr("y1",m).attr("y2",m*7/6),z.append("svg:text").attr("text-anchor","middle").attr("dy","1em").attr("y",m*7/6).text(x),z.transition().duration(h).attr("transform",f(q)).attr("opacity",1);var A=y.transition().duration(h).attr("transform",f(q)).attr("opacity",1);A.select("line").attr("y1",m).attr("y2",m*7/6),A.select("text").attr("y",m*7/6),y.exit().transition().duration(h).attr("transform",f(q)).attr("opacity",1e-6).remove()}),d3.timer.immediate()}var a="left",b=!1,h=0,i=c,j=d,k=e,l=380,m=30,n=null;o.orient=function(c){if(!arguments.length)return a;a=c,b=a=="right"||a=="bottom";return o},o.ranges=function(a){if(!arguments.length)return i;i=a;return o},o.markers=function(a){if(!arguments.length)return j;j=a;return o},o.measures=function(a){if(!arguments.length)return k;k=a;return o},o.width=function(a){if(!arguments.length)return l;l=a;return o},o.height=function(a){if(!arguments.length)return m;m=a;return o},o.tickFormat=function(a){if(!arguments.length)return n;n=a;return o},o.duration=function(a){if(!arguments.length)return h;h=a;return o};return o}})() <ide>\ No newline at end of file <ide><path>d3.js <ide> d3.timer = function(callback) { <ide> d3_timer(callback, 0); <ide> }; <ide> <add>d3.timer.immediate = function() { <add> d3_timer_step(true); <add>}; <add> <ide> function d3_timer(callback, delay) { <ide> var now = Date.now(), <ide> found = false, <ide> function d3_timer(callback, delay) { <ide> } <ide> } <ide> <del>function d3_timer_step() { <add>function d3_timer_step(immediateOnly) { <ide> var elapsed, <ide> now = Date.now(), <del> t0 = null, <ide> t1 = d3_timer_queue; <ide> <ide> while (t1) { <ide> elapsed = now - t1.then; <del> if (elapsed > t1.delay) t1.flush = t1.callback(elapsed); <del> t1 = (t0 = t1).next; <add> if (immediateOnly && t1.delay === 0 || <add> !immediateOnly && elapsed > t1.delay) <add> t1.flush = t1.callback(elapsed); <add> t1 = t1.next; <add> } <add> <add> if (immediateOnly) { <add> d3_timer_flush(); <add> return; <ide> } <ide> <ide> var delay = d3_timer_flush() - now; <ide><path>d3.min.js <del>(function(){function bS(){return"circle"}function bR(){return 64}function bP(a){return[a.x,a.y]}function bO(a){return a.endAngle}function bN(a){return a.startAngle}function bM(a){return a.radius}function bL(a){return a.target}function bK(a){return a.source}function bJ(){return 0}function bI(a,b,c){a.push("C",bE(bF,b),",",bE(bF,c),",",bE(bG,b),",",bE(bG,c),",",bE(bH,b),",",bE(bH,c))}function bE(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]}function bD(a){var b,c=-1,d=a.length,e=d+4,f,g=[],h=[];while(++c<4)f=a[c%d],g.push(f[0]),h.push(f[1]);b=[bE(bH,g),",",bE(bH,h)],--c;while(++c<e)f=a[c%d],g.shift(),g.push(f[0]),h.shift(),h.push(f[1]),bI(b,g,h);return b.join("")}function bC(a){if(a.length<3)return bv(a);var b=[],c=1,d=a.length,e=a[0],f=e[0],g=e[1],h=[f,f,f,(e=a[1])[0]],i=[g,g,g,e[1]];b.push(f,",",g),bI(b,h,i);while(++c<d)e=a[c],h.shift(),h.push(e[0]),i.shift(),i.push(e[1]),bI(b,h,i);c=-1;while(++c<2)h.shift(),h.push(e[0]),i.shift(),i.push(e[1]),bI(b,h,i);return b.join("")}function bB(a,b){var c=[],d=(1-b)/2,e,f=a[0],g=a[1],h=1,i=a.length;while(++h<i)e=f,f=g,g=a[h],c.push([d*(g[0]-e[0]),d*(g[1]-e[1])]);return c}function bA(a,b){if(b.length<1||a.length!=b.length&&a.length!=b.length+2)return bv(a);var c=a.length!=b.length,d="",e=a[0],f=a[1],g=b[0],h=g,i=1;c&&(d+="Q"+(f[0]-g[0]*2/3)+","+(f[1]-g[1]*2/3)+","+f[0]+","+f[1],e=a[1],i=2);if(b.length>1){h=b[1],f=a[i],i++,d+="C"+(e[0]+g[0])+","+(e[1]+g[1])+","+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1];for(var j=2;j<b.length;j++,i++)f=a[i],h=b[j],d+="S"+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1]}if(c){var k=a[i];d+="Q"+(f[0]+h[0]*2/3)+","+(f[1]+h[1]*2/3)+","+k[0]+","+k[1]}return d}function bz(a,b,c){return a.length<3?bv(a):a[0]+bA(a,bB(a,b))}function by(a,b){return a.length<3?bv(a):a[0]+bA((a.push(a[0]),a),bB([a[a.length-2]].concat(a,[a[1]]),b))}function bx(a){var b=[],c=0,d=a.length,e=a[0];b.push(e[0],",",e[1]);while(++c<d)b.push("H",(e=a[c])[0],"V",e[1]);return b.join("")}function bw(a){var b=[],c=0,d=a.length,e=a[0];b.push(e[0],",",e[1]);while(++c<d)b.push("V",(e=a[c])[1],"H",e[0]);return b.join("")}function bv(a){var b=[],c=0,d=a.length,e=a[0];b.push(e[0],",",e[1]);while(++c<d)b.push("L",(e=a[c])[0],",",e[1]);return b.join("")}function bt(a){return a[1]}function bs(a){return a[0]}function br(a,b,c,d){var e=[],f=-1,g=b.length,h=typeof c=="function",i=typeof d=="function",j;if(h&&i)while(++f<g)e.push([c.call(a,j=b[f],f),d.call(a,j,f)]);else if(h)while(++f<g)e.push([c.call(a,b[f],f),d]);else if(i)while(++f<g)e.push([c,d.call(a,b[f],f)]);else while(++f<g)e.push([c,d]);return e}function bq(a){return a.endAngle}function bp(a){return a.startAngle}function bo(a){return a.outerRadius}function bn(a){return a.innerRadius}function bg(a){return function(b){return-Math.pow(-b,a)}}function bf(a){return function(b){return Math.pow(b,a)}}function be(a){return-Math.log(-a)/Math.LN10}function bd(a){return Math.log(a)/Math.LN10}function bb(){var a=null,b=Y,c=Infinity;while(b)b.flush?b=a?a.next=b.next:Y=b.next:(c=Math.min(c,b.then+b.delay),b=(a=b).next);return c}function ba(){var a,b=Date.now(),c=null,d=Y;while(d)a=b-d.then,a>d.delay&&(d.flush=d.callback(a)),d=(c=d).next;var e=bb()-b;e>24?(isFinite(e)&&(clearTimeout($),$=setTimeout(ba,e)),Z=0):(Z=1,bc(ba))}function _(a,b){var c=Date.now(),d=!1,e,f=Y;if(!!isFinite(b)){while(f){if(f.callback===a){f.then=c,f.delay=b,d=!0;break}e=f,f=f.next}d||(Y={callback:a,then:c,delay:b,next:Y}),Z||($=clearTimeout($),Z=1,bc(ba))}}function X(a){return typeof a=="function"?function(b,c,d){return d3.interpolate(d,String(a.call(this,b,c)))}:(a=String(a),function(b,c,d){return d3.interpolate(d,a)})}function W(a){function n(b){var g=!0,l=-1;a.each(function(){if(i[++l]!=2){var a=(b-j[l])/k[l],n=this.__transition__,o,p,q=e[l];if(a<1){g=!1;if(a<0)return}else a=1;if(i[l]){if(!n||n.active!=c){i[l]=2;return}}else{if(!n||n.active>c){i[l]=2;return}i[l]=1,h.start.dispatch.apply(this,arguments),q=e[l]={},n.active=c;for(p in d)if(o=d[p].apply(this,arguments))q[p]=o}o=m(a);for(p in q)q[p].call(this,o);if(a==1){i[l]=2;if(n.active==c){var r=n.owner;r==c&&(delete this.__transition__,f&&this.parentNode.removeChild(this)),V=c,h.end.dispatch.apply(this,arguments),V=0,n.owner=r}}}});return g}var b={},c=V||++U,d={},e=[],f=!1,h=d3.dispatch("start","end"),i=[],j=[],k=[],l,m=d3.ease("cubic-in-out");a.each(function(){(this.__transition__||(this.__transition__={})).owner=c}),b.delay=function(c){var d=Infinity,e=-1;typeof c=="function"?a.each(function(a,b){var f=j[++e]=+c.apply(this,arguments);f<d&&(d=f)}):(d=+c,a.each(function(a,b){j[++e]=d})),_(n,d);return b},b.duration=function(c){var d=-1;typeof c=="function"?(l=0,a.each(function(a,b){var e=k[++d]=+c.apply(this,arguments);e>l&&(l=e)})):(l=+c,a.each(function(a,b){k[++d]=l}));return b},b.ease=function(a){m=typeof a=="function"?a:d3.ease.apply(d3,arguments);return b},b.attrTween=function(a,c){function f(b,d){var e=c.call(this,b,d,this.getAttributeNS(a.space,a.local));return function(b){this.setAttributeNS(a.space,a.local,e(b))}}function e(b,d){var e=c.call(this,b,d,this.getAttribute(a));return function(b){this.setAttribute(a,e(b))}}d["attr."+a]=a.local?f:e;return b},b.attr=function(a,c){return b.attrTween(a,X(c))},b.styleTween=function(a,c,e){function f(b,d){var f=c.call(this,b,d,window.getComputedStyle(this,null).getPropertyValue(a));return function(b){this.style.setProperty(a,f(b),e)}}arguments.length<3&&(e=null),d["style."+a]=f;return b},b.style=function(a,c,d){arguments.length<3&&(d=null);return b.styleTween(a,X(c),d)},b.text=function(a){d.text=function(b,c){this.textContent=typeof a=="function"?a.call(this,b,c):a};return b},b.select=function(b){var c,d=W(a.select(b)).ease(m);c=-1,d.delay(function(a,b){return j[++c]}),c=-1,d.duration(function(a,b){return k[++c]});return d},b.selectAll=function(b){var c,d=W(a.selectAll(b)).ease(m);c=-1,d.delay(function(a,b){return j[b?c:++c]}),c=-1,d.duration(function(a,b){return k[b?c:++c]});return d},b.remove=function(){f=!0;return b},b.each=function(a,c){h[a].add(c);return b},b.call=g;return b.delay(0).duration(250)}function T(a){return{__data__:a}}function S(a){arguments.length||(a=d3.ascending);return function(b,c){return a(b&&b.__data__,c&&c.__data__)}}function R(a){function b(b){var c=[],d,e,f,g;for(var h=0,i=a.length;h<i;h++){f=a[h],c.push(d=[]),d.parentNode=f.parentNode;for(var j=0,k=f.length;j<k;j++)(g=f[j])?(d.push(e=b(f.parentNode)),e.__data__=g.__data__):d.push(null)}return Q(c)}a.append=function(a){function d(b){return b.appendChild(document.createElementNS(a.space,a.local))}function c(b){return b.appendChild(document.createElement(a))}a=d3.ns.qualify(a);return b(a.local?d:c)},a.insert=function(a,c){function e(b){return b.insertBefore(document.createElementNS(a.space,a.local),N(c,b))}function d(b){return b.insertBefore(document.createElement(a),N(c,b))}a=d3.ns.qualify(a);return b(a.local?e:d)};return a}function Q(a){function d(b){for(var c=0,d=a.length;c<d;c++){var e=a[c];for(var f=0,g=e.length;f<g;f++){var h=e[f];if(h)return b.call(h,h.__data__,f)}}return null}function c(b){var c=[],d,e,f;for(var g=0,h=a.length;g<h;g++){e=a[g];for(var i=0,j=e.length;i<j;i++)if(f=e[i])c.push(d=b(f)),d.parentNode=f}return Q(c)}function b(b){var c=[],d,e,f,g;for(var h=0,i=a.length;h<i;h++){f=a[h],c.push(d=[]),d.parentNode=f.parentNode;for(var j=0,k=f.length;j<k;j++)(g=f[j])?(d.push(e=b(g)),e&&"__data__"in g&&(e.__data__=g.__data__)):d.push(null)}return Q(c)}a.select=function(a){return b(function(b){return N(a,b)})},a.selectAll=function(a){return c(function(b){return O(a,b)})},a.filter=function(b){var c=[],d,e,f;for(var g=0,h=a.length;g<h;g++){e=a[g],c.push(d=[]),d.parentNode=e.parentNode;for(var i=0,j=e.length;i<j;i++)(f=e[i])&&b.call(f,f.__data__,i)&&d.push(f)}return Q(c)},a.map=function(b){var c,d;for(var e=0,f=a.length;e<f;e++){c=a[e];for(var g=0,h=c.length;g<h;g++)if(d=c[g])d.__data__=b.call(d,d.__data__,g)}return a},a.data=function(b,c){function g(a,b){var g=0,h=a.length,i=b.length,j=Math.min(h,i),k=Math.max(h,i),l=[],m=[],n=[],o,p;if(c){var q={},r=[],s,t=b.length;for(g=0;g<h;g++)s=c.call(o=a[g],o.__data__,g),s in q?n[t++]=a[g]:q[s]=o,r.push(s);for(g=0;g<i;g++)o=q[s=c.call(b,p=b[g],g)],o?(o.__data__=p,l[g]=o,m[g]=n[g]=null):(m[g]=T(p),l[g]=n[g]=null),delete q[s];for(g=0;g<h;g++)r[g]in q&&(n[g]=a[g])}else{for(;g<j;g++)o=a[g],p=b[g],o?(o.__data__=p,l[g]=o,m[g]=n[g]=null):(m[g]=T(p),l[g]=n[g]=null);for(;g<i;g++)m[g]=T(b[g]),l[g]=n[g]=null;for(;g<k;g++)n[g]=a[g],m[g]=l[g]=null}m.parentNode=l.parentNode=n.parentNode=a.parentNode,d.push(m),e.push(l),f.push(n)}var d=[],e=[],f=[],h=-1,i=a.length,j;if(typeof b=="function")while(++h<i)g(j=a[h],b.call(j,j.parentNode.__data__,h));else while(++h<i)g(j=a[h],b);var k=Q(e);k.enter=function(){return R(d)},k.exit=function(){return Q(f)};return k},a.each=function(b){for(var c=0,d=a.length;c<d;c++){var e=a[c];for(var f=0,g=e.length;f<g;f++){var h=e[f];h&&b.call(h,h.__data__,f)}}return a},a.empty=function(){return!d(function(){return!0})},a.node=function(){return d(function(){return this})},a.attr=function(b,c){function j(){var a=c.apply(this,arguments);a==null?this.removeAttributeNS(b.space,b.local):this.setAttributeNS(b.space,b.local,a)}function i(){var a=c.apply(this,arguments);a==null?this.removeAttribute(b):this.setAttribute(b,a)}function h(){this.setAttributeNS(b.space,b.local,c)}function g(){this.setAttribute(b,c)}function f(){this.removeAttributeNS(b.space,b.local)}function e(){this.removeAttribute(b)}b=d3.ns.qualify(b);if(arguments.length<2)return d(b.local?function(){return this.getAttributeNS(b.space,b.local)}:function(){return this.getAttribute(b)});return a.each(c==null?b.local?f:e:typeof c=="function"?b.local?j:i:b.local?h:g)},a.classed=function(b,c){function i(){(c.apply(this,arguments)?g:h).call(this)}function h(){var a=f(this.className.replace(e," "));this.className=a.length?a:null}function g(){var a=this.className;e.lastIndex=0,e.test(a)||(this.className=f(a+" "+b))}var e=new RegExp("(^|\\s+)"+d3.requote(b)+"(\\s+|$)","g");if(arguments.length<2)return d(function(){e.lastIndex=0;return e.test(this.className)});return a.each(typeof c=="function"?i:c?g:h)},a.style=function(b,c,e){function h(){var a=c.apply(this,arguments);a==null?this.style.removeProperty(b):this.style.setProperty(b,a,e)}function g(){this.style.setProperty(b,c,e)}function f(){this.style.removeProperty(b)}arguments.length<3&&(e="");if(arguments.length<2)return d(function(){return window.getComputedStyle(this,null).getPropertyValue(b)});return a.each(c==null?f:typeof c=="function"?h:g)},a.property=function(b,c){function g(){var a=c.apply(this,arguments);a==null?delete this[b]:this[b]=a}function f(){this[b]=c}function e(){delete this[b]}b=d3.ns.qualify(b);if(arguments.length<2)return d(function(){return this[b]});return a.each(c==null?e:typeof c=="function"?g:f)},a.text=function(b){function e(){this.textContent=b.apply(this,arguments)}function c(){this.textContent=b}if(arguments.length<1)return d(function(){return this.textContent});return a.each(typeof b=="function"?e:c)},a.html=function(b){function e(){this.innerHTML=b.apply(this,arguments)}function c(){this.innerHTML=b}if(arguments.length<1)return d(function(){return this.innerHTML});return a.each(typeof b=="function"?e:c)},a.append=function(a){function d(b){return b.appendChild(document.createElementNS(a.space,a.local))}function c(b){return b.appendChild(document.createElement(a))}a=d3.ns.qualify(a);return b(a.local?d:c)},a.insert=function(a,c){function e(b){return b.insertBefore(document.createElementNS(a.space,a.local),N(c,b))}function d(b){return b.insertBefore(document.createElement(a),N(c,b))}a=d3.ns.qualify(a);return b(a.local?e:d)},a.remove=function(){return a.each(function(){var a=this.parentNode;a&&a.removeChild(this)})},a.sort=function(b){b=S.apply(this,arguments);for(var c=0,d=a.length;c<d;c++){var e=a[c];e.sort(b);for(var f=1,g=e.length,h=e[0];f<g;f++){var i=e[f];i&&(h&&h.parentNode.insertBefore(i,h.nextSibling),h=i)}}return a},a.on=function(b,c,d){arguments.length<3&&(d=!1);var e=b.indexOf("."),f=e==-1?b:b.substring(0,e),g="__on"+b;return a.each(function(a,b){function e(d){var e=d3.event;d3.event=d;try{c.call(this,a,b)}finally{d3.event=e}}this[g]&&this.removeEventListener(f,this[g],d),c&&this.addEventListener(f,this[g]=e,d)})},a.transition=function(){return W(a)},a.call=g;return a}function M(a,b,c){function g(a){return Math.round(f(a)*255)}function f(a){a>360?a-=360:a<0&&(a+=360);if(a<60)return d+(e-d)*a/60;if(a<180)return e;if(a<240)return d+(e-d)*(240-a)/60;return d}var d,e;a=a%360,a<0&&(a+=360),b=b<0?0:b>1?1:b,c=c<0?0:c>1?1:c,e=c<=.5?c*(1+b):c+b-c*b,d=2*c-e;return C(g(a+120),g(a),g(a-120))}function L(){return"hsl("+this.h+","+this.s*100+"%,"+this.l*100+"%)"}function K(a,b,c){return{h:a,s:b,l:c,toString:L}}function H(a){var b=parseFloat(a);return a.charAt(a.length-1)=="%"?Math.round(b*2.55):b}function G(a,b,c){var d=Math.min(a/=255,b/=255,c/=255),e=Math.max(a,b,c),f=e-d,g,h,i=(e+d)/2;f?(h=i<.5?f/(e+d):f/(2-e-d),a==e?g=(b-c)/f+(b<c?6:0):b==e?g=(c-a)/f+2:g=(a-b)/f+4,g*=60):h=g=0;return K(g,h,i)}function F(a,b,c){var d=0,e=0,f=0,g,h,i;g=/([a-z]+)\((.*)\)/i.exec(a);if(g){h=g[2].split(",");switch(g[1]){case"hsl":return c(parseFloat(h[0]),parseFloat(h[1])/100,parseFloat(h[2])/100);case"rgb":return b(H(h[0]),H(h[1]),H(h[2]))}}if(i=I[a])return b(i.r,i.g,i.b);a!=null&&a.charAt(0)=="#"&&(a.length==4?(d=a.charAt(1),d+=d,e=a.charAt(2),e+=e,f=a.charAt(3),f+=f):a.length==7&&(d=a.substring(1,3),e=a.substring(3,5),f=a.substring(5,7)),d=parseInt(d,16),e=parseInt(e,16),f=parseInt(f,16));return b(d,e,f)}function E(a){return a<16?"0"+a.toString(16):a.toString(16)}function D(){return"#"+E(this.r)+E(this.g)+E(this.b)}function C(a,b,c){return{r:a,g:b,b:c,toString:D}}function B(a){return a in A||/\bcolor\b/.test(a)?d3.interpolateRgb:d3.interpolate}function y(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}function x(a){a||(a=1.70158);return function(b){return b*b*((a+1)*b-a)}}function w(a,b){var c;arguments.length<2&&(b=.45),arguments.length<1?(a=1,c=b/4):c=b/(2*Math.PI)*Math.asin(1/a);return function(d){return 1+a*Math.pow(2,10*-d)*Math.sin((d-c)*2*Math.PI/b)}}function v(a){return 1-Math.sqrt(1-a*a)}function u(a){return a?Math.pow(2,10*(a-1))-.001:0}function t(a){return 1-Math.cos(a*Math.PI/2)}function s(a){return function(b){return Math.pow(b,a)}}function r(a){return a}function q(a){return function(b){return.5*(b<.5?a(2*b):2-a(2-2*b))}}function p(a){return function(b){return 1-a(1-b)}}function k(a){var b=a.lastIndexOf("."),c=b>=0?a.substring(b):(b=a.length,""),d=[];while(b>0)d.push(a.substring(b-=3,b+3));return d.reverse().join(",")+c}function i(a){var b={},c=[];b.add=function(a){for(var d=0;d<c.length;d++)if(c[d].listener==a)return b;c.push({listener:a,on:!0});return b},b.remove=function(a){for(var d=0;d<c.length;d++){var e=c[d];if(e.listener==a){e.on=!1,c=c.slice(0,d).concat(c.slice(d+1));break}}return b},b.dispatch=function(){var a=c;for(var b=0,d=a.length;b<d;b++){var e=a[b];e.on&&e.listener.apply(this,arguments)}};return b}function g(a){a.apply(this,(arguments[0]=this,arguments));return this}function f(a){return a.replace(/(^\s+)|(\s+$)/g,"").replace(/\s+/g," ")}function e(a){return a==null}function c(a){return Array.prototype.slice.call(a)}function b(a){var b=-1,c=a.length,d=[];while(++b<c)d.push(a[b]);return d}d3={version:"1.13.1"},Date.now||(Date.now=function(){return+(new Date)}),Object.create||(Object.create=function(a){function b(){}b.prototype=a;return new b});var a=c;try{a(document.documentElement.childNodes)[0].nodeType}catch(d){a=b}d3.functor=function(a){return typeof a=="function"?a:function(){return a}},d3.rebind=function(a,b){return function(){var c=b.apply(a,arguments);return arguments.length?a:c}},d3.ascending=function(a,b){return a<b?-1:a>b?1:0},d3.descending=function(a,b){return b<a?-1:b>a?1:0},d3.min=function(a,b){var c=0,d=a.length,e=a[0],f;if(arguments.length==1)while(++c<d)e>(f=a[c])&&(e=f);else{e=b(a[0]);while(++c<d)e>(f=b(a[c]))&&(e=f)}return e},d3.max=function(a,b){var c=0,d=a.length,e=a[0],f;if(arguments.length==1)while(++c<d)e<(f=a[c])&&(e=f);else{e=b(e);while(++c<d)e<(f=b(a[c]))&&(e=f)}return e},d3.nest=function(){function g(a,d){if(d>=b.length)return a;var e=[],f=c[d++],h;for(h in a)e.push({key:h,values:g(a[h],d)});f&&e.sort(function(a,b){return f(a.key,b.key)});return e}function f(c,g){if(g>=b.length)return e?e.call(a,c):d?c.sort(d):c;var h=-1,i=c.length,j=b[g++],k,l,m={};while(++h<i)(k=j(l=c[h]))in m?m[k].push(l):m[k]=[l];for(k in m)m[k]=f(m[k],g);return m}var a={},b=[],c=[],d,e;a.map=function(a){return f(a,0)},a.entries=function(a){return g(f(a,0),0)},a.key=function(c){b.push(c);return a},a.sortKeys=function(d){c[b.length-1]=d;return a},a.sortValues=function(b){d=b;return a},a.rollup=function(b){e=b;return a};return a},d3.keys=function(a){var b=[];for(var c in a)b.push(c);return b},d3.values=function(a){var b=[];for(var c in a)b.push(a[c]);return b},d3.entries=function(a){var b=[];for(var c in a)b.push({key:c,value:a[c]});return b},d3.merge=function(a){return Array.prototype.concat.apply([],a)},d3.split=function(a,b){var c=[],d=[],f,g=-1,h=a.length;arguments.length<2&&(b=e);while(++g<h)b.call(d,f=a[g],g)?d=[]:(d.length||c.push(d),d.push(f));return c},d3.range=function(a,b,c){arguments.length==1&&(b=a,a=0),c==null&&(c=1);if((b-a)/c==Infinity)throw new Error("infinite range");var d=[],e=-1,f;if(c<0)while((f=a+c*++e)>b)d.push(f);else while((f=a+c*++e)<b)d.push(f);return d},d3.requote=function(a){return a.replace(h,"\\$&")};var h=/[\\\^\$\*\+\?\[\]\(\)\.\{\}]/g;d3.xhr=function(a,b,c){var d=new XMLHttpRequest;arguments.length<3?c=b:b&&d.overrideMimeType&&d.overrideMimeType(b),d.open("GET",a,!0),d.onreadystatechange=function(){d.readyState==4&&c(d.status<300?d:null)},d.send(null)},d3.text=function(a,b,c){function d(a){c(a&&a.responseText)}arguments.length<3&&(c=b,b=null),d3.xhr(a,b,d)},d3.json=function(a,b){d3.text(a,"application/json",function(a){b(a?JSON.parse(a):null)})},d3.html=function(a,b){d3.text(a,"text/html",function(a){if(a!=null){var c=document.createRange();c.selectNode(document.body),a=c.createContextualFragment(a)}b(a)})},d3.xml=function(a,b,c){function d(a){c(a&&a.responseXML)}arguments.length<3&&(c=b,b=null),d3.xhr(a,b,d)},d3.ns={prefix:{svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},qualify:function(a){var b=a.indexOf(":");return b<0?a:{space:d3.ns.prefix[a.substring(0,b)],local:a.substring(b+1)}}},d3.dispatch=function(a){var b={},c;for(var d=0,e=arguments.length;d<e;d++)c=arguments[d],b[c]=i(c);return b},d3.format=function(a){var b=j.exec(a),c=b[1]||" ",d=b[3]||"",e=b[5],f=+b[6],g=b[7],h=b[8],i=b[9];h&&(h=h.substring(1)),e&&(c="0",g&&(f-=Math.floor((f-1)/4))),i=="d"&&(h="0");return function(a){var b=+a,j=b<0&&(b=-b)?"−":d;if(i=="d"&&b%1)return"";h?a=b.toFixed(h):a=""+b;if(e){var l=a.length+j.length;l<f&&(a=Array(f-l+1).join(c)+a),g&&(a=k(a)),a=j+a}else{g&&(a=k(a)),a=j+a;var l=a.length;l<f&&(a=Array(f-l+1).join(c)+a)}return a}};var j=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/,l=s(2),m=s(3),n={linear:function(){return r},poly:s,quad:function(){return l},cubic:function(){return m},sin:function(){return t},exp:function(){return u},circle:function(){return v},elastic:w,back:x,bounce:function(){return y}},o={"in":function(a){return a},out:p,"in-out":q,"out-in":function(a){return q(p(a))}};d3.ease=function(a){var b=a.indexOf("-"),c=b>=0?a.substring(0,b):a,d=b>=0?a.substring(b+1):"in";return o[d](n[c].apply(null,Array.prototype.slice.call(arguments,1)))},d3.event=null,d3.interpolate=function(a,b){if(typeof b=="number")return d3.interpolateNumber(+a,b);if(typeof b=="string")return b in I||/^(#|rgb\(|hsl\()/.test(b)?d3.interpolateRgb(String(a),b):d3.interpolateString(String(a),b);if(b instanceof Array)return d3.interpolateArray(a,b);return d3.interpolateObject(a,b)},d3.interpolateNumber=function(a,b){b-=a;return function(c){return a+b*c}},d3.interpolateRound=function(a,b){b-=a;return function(c){return Math.round(a+b*c)}},d3.interpolateString=function(a,b){var c,d,e,f=0,g=0,h=[],i=[],j,k;z.lastIndex=0;for(d=0;c=z.exec(b);++d)c.index&&h.push(b.substring(f,g=c.index)),i.push({i:h.length,x:c[0]}),h.push(null),f=z.lastIndex;f<b.length&&h.push(b.substring(f));for(d=0,j=i.length;(c=z.exec(a))&&d<j;++d){k=i[d];if(k.x==c[0]){if(k.i)if(h[k.i+1]==null){h[k.i-1]+=k.x,h.splice(k.i,1);for(e=d+1;e<j;++e)i[e].i--}else{h[k.i-1]+=k.x+h[k.i+1],h.splice(k.i,2);for(e=d+1;e<j;++e)i[e].i-=2}else if(h[k.i+1]==null)h[k.i]=k.x;else{h[k.i]=k.x+h[k.i+1],h.splice(k.i+1,1);for(e=d+1;e<j;++e)i[e].i--}i.splice(d,1),j--,d--}else k.x=d3.interpolateNumber(parseFloat(c[0]),parseFloat(k.x))}while(d<j)k=i.pop(),h[k.i+1]==null?h[k.i]=k.x:(h[k.i]=k.x+h[k.i+1],h.splice(k.i+1,1)),j--;if(h.length==1)return h[0]==null?i[0].x:function(){return b};return function(a){for(d=0;d<j;++d)h[(k=i[d]).i]=k.x(a);return h.join("")}},d3.interpolateRgb=function(a,b){a=d3.rgb(a),b=d3.rgb(b);var c=a.r,d=a.g,e=a.b,f=b.r-c,g=b.g-d,h=b.b-e;return function(a){return"rgb("+Math.round(c+f*a)+","+Math.round(d+g*a)+","+Math.round(e+h*a)+")"}},d3.interpolateHsl=function(a,b){a=d3.hsl(a),b=d3.hsl(b);var c=a.h,d=a.s,e=a.l,f=b.h-c,g=b.s-d,h=b.l-e;return function(a){return M(c+f*a,d+g*a,e+h*a).toString()}},d3.interpolateArray=function(a,b){var c=[],d=[],e=a.length,f=b.length,g=Math.min(a.length,b.length),h;for(h=0;h<g;++h)c.push(d3.interpolate(a[h],b[h]));for(;h<e;++h)d[h]=a[h];for(;h<f;++h)d[h]=b[h];return function(a){for(h=0;h<g;++h)d[h]=c[h](a);return d}},d3.interpolateObject=function(a,b){var c={},d={},e;for(e in a)e in b?c[e]=B(e)(a[e],b[e]):d[e]=a[e];for(e in b)e in a||(d[e]=b[e]);return function(a){for(e in c)d[e]=c[e](a);return d}};var z=/[-+]?(?:\d+\.\d+|\d+\.|\.\d+|\d+)(?:[eE][-]?\d+)?/g,A={background:1,fill:1,stroke:1};d3.rgb=function(a,b,c){return arguments.length==1?F(""+a,C,M):C(~~a,~~b,~~c)};var I={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};for(var J in I)I[J]=F(I[J],C,M);d3.hsl=function(a,b,c){return arguments.length==1?F(""+a,G,K):K(+a,+b,+c)};var N=function(a,b){return b.querySelector(a)},O=function(b,c){return a(c.querySelectorAll(b))};typeof Sizzle=="function"&&(N=function(a,b){return Sizzle(a,b)[0]},O=function(a,b){return Sizzle.uniqueSort(Sizzle(a,b))});var P=Q([[document]]);P[0].parentNode=document.documentElement,d3.select=function(a){return typeof a=="string"?P.select(a):Q([[a]])},d3.selectAll=function(b){return typeof b=="string"?P.selectAll(b):Q([a(b)])},d3.transition=P.transition;var U=0,V=0,Y=null,Z,$;d3.timer=function(a){_(a,0)};var bc=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,17)};d3.scale={},d3.scale.linear=function(){function k(c){var d=Math.min(a,b),e=Math.max(a,b),f=e-d,g=Math.pow(10,Math.floor(Math.log(f/c)/Math.LN10)),h=c/(f/g);h<=.15?g*=10:h<=.35?g*=5:h<=.75&&(g*=2);return{start:Math.ceil(d/g)*g,stop:Math.floor(e/g)*g+g*.5,step:g}}function j(b){b=(b-a)*e;return h(i?Math.max(0,Math.min(1,b)):b)}var a=0,b=1,c=0,d=1,e=1,f=1,g=d3.interpolate,h=g(c,d),i=!1;j.invert=function(b){return(b-c)*f+a},j.domain=function(g){if(!arguments.length)return[a,b];a=+g[0],b=+g[1],e=1/(b-a),f=(b-a)/(d-c);return j},j.range=function(e){if(!arguments.length)return[c,d];c=e[0],d=e[1],f=(b-a)/(d-c),h=g(c,d);return j},j.rangeRound=function(a){return j.range(a).interpolate(d3.interpolateRound)},j.clamp=function(a){if(!arguments.length)return i;i=a;return j},j.interpolate=function(a){if(!arguments.length)return g;h=(g=a)(c,d);return j},j.ticks=function(a){var b=k(a);return d3.range(b.start,b.stop,b.step)},j.tickFormat=function(a){var b=Math.max(0,-Math.floor(Math.log(k(a).step)/Math.LN10+.01));return d3.format(",."+b+"f")};return j},d3.scale.log=function(){function d(c){return a(b(c))}var a=d3.scale.linear(),b=bd,c=b.pow;d.invert=function(b){return c(a.invert(b))},d.domain=function(e){if(!arguments.length)return a.domain().map(c);b=(e[0]||e[1])<0?be:bd,c=b.pow,a.domain(e.map(b));return d},d.range=d3.rebind(d,a.range),d.rangeRound=d3.rebind(d,a.rangeRound),d.interpolate=d3.rebind(d,a.interpolate),d.clamp=d3.rebind(d,a.clamp),d.ticks=function(){var d=a.domain(),e=[];if(d.every(isFinite)){var f=Math.floor(d[0]),g=Math.ceil(d[1]),h=c(d[0]),i=c(d[1]);if(b===be){e.push(c(f));for(;f++<g;)for(var j=9;j>0;j--)e.push(c(f)*j)}else{for(;f<g;f++)for(var j=1;j<10;j++)e.push(c(f)*j);e.push(c(f))}for(f=0;e[f]<h;f++);for(g=e.length;e[g-1]>i;g--);e=e.slice(f,g)}return e},d.tickFormat=function(){return function(a){return a.toPrecision(1)}};return d},bd.pow=function(a){return Math.pow(10,a)},be.pow=function(a){return-Math.pow(10,-a)},d3.scale.pow=function(){function f(b){return a(d(b))}var a=d3.scale.linear(),b=d3.scale.linear(),c=1,d=Number,e=d;f.invert=function(b){return e(a.invert(b))},f.domain=function(g){if(!arguments.length)return a.domain().map(e);var h=(g[0]||g[1])<0?bg:bf;d=h(c),e=h(1/c),a.domain(g.map(d)),b.domain(g);return f},f.range=d3.rebind(f,a.range),f.rangeRound=d3.rebind(f,a.rangeRound),f.interpolate=d3.rebind(f,a.interpolate),f.clamp=d3.rebind(f,a.clamp),f.ticks=b.ticks,f.tickFormat=b.tickFormat,f.exponent=function(a){if(!arguments.length)return c;var b=f.domain();c=a;return f.domain(b)};return f},d3.scale.sqrt=function(){return d3.scale.pow().exponent(.5)},d3.scale.ordinal=function(){function e(d){var e=d in b?b[d]:b[d]=a.push(d)-1;return c[e%c.length]}var a=[],b={},c=[],d=0;e.domain=function(c){if(!arguments.length)return a;a=c,b={};var d=-1,f=-1,g=a.length;while(++d<g)c=a[d],c in b||(b[c]=++f);return e},e.range=function(a){if(!arguments.length)return c;c=a;return e},e.rangePoints=function(b,f){arguments.length<2&&(f=0);var g=b[0],h=b[1],i=(h-g)/(a.length-1+f);c=a.length==1?[(g+h)/2]:d3.range(g+i*f/2,h+i/2,i),d=0;return e},e.rangeBands=function(b,f){arguments.length<2&&(f=0);var g=b[0],h=b[1],i=(h-g)/(a.length+f);c=d3.range(g+i*f,h,i),d=i*(1-f);return e},e.rangeRoundBands=function(b,f){arguments.length<2&&(f=0);var g=b[0],h=b[1],i=h-g,j=Math.floor(i/(a.length+f)),k=i-(a.length-f)*j;c=d3.range(g+Math.round(k/2),h,j),d=Math.round(j*(1-f));return e},e.rangeBand=function(){return d};return e},d3.scale.category10=function(){return d3.scale.ordinal().range(bh)},d3.scale.category20=function(){return d3.scale.ordinal().range(bi)},d3.scale.category20b=function(){return d3.scale.ordinal().range(bj)},d3.scale.category20c=function(){return d3.scale.ordinal().range(bk)};var bh=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],bi=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],bj=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],bk=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];d3.scale.quantile=function(){function f(a){return b[e(a)]}function e(a){if(isNaN(a=+a))return NaN;var b=0,d=c.length-1;while(b<=d){var e=b+d>>1,f=c[e];if(f<a)b=e+1;else if(f>a)d=e-1;else return e}return d<0?0:d}function d(){var d=-1,e=c.length=b.length,f=a.length/e;while(++d<e)c[d]=a[~~(d*f)]}var a=[],b=[],c=[];f.domain=function(b){if(!arguments.length)return a;a=b.filter(function(a){return!isNaN(a)}).sort(d3.ascending),d();return f},f.range=function(a){if(!arguments.length)return b;b=a,d();return f},f.quantiles=function(){return c};return f},d3.scale.quantize=function(){function f(b){return e[Math.max(0,Math.min(d,Math.floor(c*(b-a))))]}var a=0,b=1,c=2,d=1,e=[0,1];f.domain=function(d){if(!arguments.length)return[a,b];a=d[0],b=d[1],c=e.length/(b-a);return f},f.range=function(g){if(!arguments.length)return e;e=g,c=e.length/(b-a),d=e.length-1;return f};return f},d3.svg={},d3.svg.arc=function(){function e(){var e=a.apply(this,arguments),f=b.apply(this,arguments),g=c.apply(this,arguments)+bl,h=d.apply(this,arguments)+bl,i=h-g,j=i<Math.PI?"0":"1",k=Math.cos(g),l=Math.sin(g),m=Math.cos(h),n=Math.sin(h);return i>=bm?e?"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+ -f+"A"+f+","+f+" 0 1,1 0,"+f+"M0,"+e+"A"+e+","+e+" 0 1,1 0,"+ -e+"A"+e+","+e+" 0 1,1 0,"+e+"Z":"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+ -f+"A"+f+","+f+" 0 1,1 0,"+f+"Z":e?"M"+f*k+","+f*l+"A"+f+","+f+" 0 "+j+",1 "+f*m+","+f*n+"L"+e*m+","+e*n+"A"+e+","+e+" 0 "+j+",0 "+e*k+","+e*l+"Z":"M"+f*k+","+f*l+"A"+f+","+f+" 0 "+j+",1 "+f*m+","+f*n+"L0,0"+"Z"}var a=bn,b=bo,c=bp,d=bq;e.innerRadius=function(b){if(!arguments.length)return a;a=d3.functor(b);return e},e.outerRadius=function(a){if(!arguments.length)return b;b=d3.functor(a);return e},e.startAngle=function(a){if(!arguments.length)return c;c=d3.functor(a);return e},e.endAngle=function(a){if(!arguments.length)return d;d=d3.functor(a);return e},e.centroid=function(){var e=(a.apply(this,arguments)+b.apply(this,arguments))/2,f=(c.apply(this,arguments)+d.apply(this,arguments))/2+bl;return[Math.cos(f)*e,Math.sin(f)*e]};return e};var bl=-Math.PI/2,bm=2*Math.PI-1e-6;d3.svg.line=function(){function f(c){return c.length<1?null:"M"+d(br(this,c,a,b),e)}var a=bs,b=bt,c="linear",d=bu[c],e=.7;f.x=function(b){if(!arguments.length)return a;a=b;return f},f.y=function(a){if(!arguments.length)return b;b=a;return f},f.interpolate=function(a){if(!arguments.length)return c;d=bu[c=a];return f},f.tension=function(a){if(!arguments.length)return e;e=a;return f};return f};var bu={linear:bv,"step-before":bw,"step-after":bx,basis:bC,"basis-closed" <del>:bD,cardinal:bz,"cardinal-closed":by},bF=[0,2/3,1/3,0],bG=[0,1/3,2/3,0],bH=[0,1/6,2/3,1/6];d3.svg.area=function(){function g(d){return d.length<1?null:"M"+e(br(this,d,a,c),f)+"L"+e(br(this,d,a,b).reverse(),f)+"Z"}var a=bs,b=bJ,c=bt,d="linear",e=bu[d],f=.7;g.x=function(b){if(!arguments.length)return a;a=b;return g},g.y0=function(a){if(!arguments.length)return b;b=a;return g},g.y1=function(a){if(!arguments.length)return c;c=a;return g},g.interpolate=function(a){if(!arguments.length)return d;e=bu[d=a];return g},g.tension=function(a){if(!arguments.length)return f;f=a;return g};return g},d3.svg.chord=function(){function j(a,b,c,d){return"Q 0,0 "+d}function i(a,b){return"A"+a+","+a+" 0 0,1 "+b}function h(a,b){return a.a0==b.a0&&a.a1==b.a1}function g(a,b,f,g){var h=b.call(a,f,g),i=c.call(a,h,g),j=d.call(a,h,g)+bl,k=e.call(a,h,g)+bl;return{r:i,a0:j,a1:k,p0:[i*Math.cos(j),i*Math.sin(j)],p1:[i*Math.cos(k),i*Math.sin(k)]}}function f(c,d){var e=g(this,a,c,d),f=g(this,b,c,d);return"M"+e.p0+i(e.r,e.p1)+(h(e,f)?j(e.r,e.p1,e.r,e.p0):j(e.r,e.p1,f.r,f.p0)+i(f.r,f.p1)+j(f.r,f.p1,e.r,e.p0))+"Z"}var a=bK,b=bL,c=bM,d=bp,e=bq;f.radius=function(a){if(!arguments.length)return c;c=d3.functor(a);return f},f.source=function(b){if(!arguments.length)return a;a=d3.functor(b);return f},f.target=function(a){if(!arguments.length)return b;b=d3.functor(a);return f},f.startAngle=function(a){if(!arguments.length)return d;d=d3.functor(a);return f},f.endAngle=function(a){if(!arguments.length)return e;e=d3.functor(a);return f};return f},d3.svg.diagonal=function(){function d(d,e){var f=a.call(this,d,e),g=b.call(this,d,e),h=(f.y+g.y)/2,i=[f,{x:f.x,y:h},{x:g.x,y:h},g];i=i.map(c);return"M"+i[0]+"C"+i[1]+" "+i[2]+" "+i[3]}var a=bK,b=bL,c=bP;d.source=function(b){if(!arguments.length)return a;a=d3.functor(b);return d},d.target=function(a){if(!arguments.length)return b;b=d3.functor(a);return d},d.projection=function(a){if(!arguments.length)return c;c=a;return d};return d},d3.svg.mouse=function(a){var b=(a.ownerSVGElement||a).createSVGPoint();if(bQ<0&&(window.scrollX||window.scrollY)){var c=d3.select(document.body).append("svg:svg").style("position","absolute").style("top",0).style("left",0),d=c[0][0].getScreenCTM();bQ=!d.f&&!d.e,c.remove()}bQ?(b.x=d3.event.pageX,b.y=d3.event.pageY):(b.x=d3.event.clientX,b.y=d3.event.clientY),b=b.matrixTransform(a.getScreenCTM().inverse());return[b.x,b.y]};var bQ=/WebKit/.test(navigator.userAgent)?-1:0;d3.svg.symbol=function(){function c(c,d){return(bT[a.call(this,c,d)]||bT.circle)(b.call(this,c,d))}var a=bS,b=bR;c.type=function(b){if(!arguments.length)return a;a=d3.functor(b);return c},c.size=function(a){if(!arguments.length)return b;b=d3.functor(a);return c};return c},d3.svg.symbolTypes=["circle","cross","diamond","square","triangle-down","triangle-up"];var bT={circle:function(a){var b=Math.sqrt(a/Math.PI);return"M0,"+b+"A"+b+","+b+" 0 1,1 0,"+ -b+"A"+b+","+b+" 0 1,1 0,"+b+"Z"},cross:function(a){var b=Math.sqrt(a/5)/2;return"M"+ -3*b+","+ -b+"H"+ -b+"V"+ -3*b+"H"+b+"V"+ -b+"H"+3*b+"V"+b+"H"+b+"V"+3*b+"H"+ -b+"V"+b+"H"+ -3*b+"Z"},diamond:function(a){var b=Math.sqrt(a/(2*bV)),c=b*bV;return"M0,"+ -b+"L"+c+",0"+" 0,"+b+" "+ -c+",0"+"Z"},square:function(a){var b=Math.sqrt(a)/2;return"M"+ -b+","+ -b+"L"+b+","+ -b+" "+b+","+b+" "+ -b+","+b+"Z"},"triangle-down":function(a){var b=Math.sqrt(a/bU),c=b*bU/2;return"M0,"+c+"L"+b+","+ -c+" "+ -b+","+ -c+"Z"},"triangle-up":function(a){var b=Math.sqrt(a/bU),c=b*bU/2;return"M0,"+ -c+"L"+b+","+c+" "+ -b+","+c+"Z"}},bU=Math.sqrt(3),bV=Math.tan(30*Math.PI/180)})() <ide>\ No newline at end of file <add>(function(){function bS(){return"circle"}function bR(){return 64}function bP(a){return[a.x,a.y]}function bO(a){return a.endAngle}function bN(a){return a.startAngle}function bM(a){return a.radius}function bL(a){return a.target}function bK(a){return a.source}function bJ(){return 0}function bI(a,b,c){a.push("C",bE(bF,b),",",bE(bF,c),",",bE(bG,b),",",bE(bG,c),",",bE(bH,b),",",bE(bH,c))}function bE(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]+a[3]*b[3]}function bD(a){var b,c=-1,d=a.length,e=d+4,f,g=[],h=[];while(++c<4)f=a[c%d],g.push(f[0]),h.push(f[1]);b=[bE(bH,g),",",bE(bH,h)],--c;while(++c<e)f=a[c%d],g.shift(),g.push(f[0]),h.shift(),h.push(f[1]),bI(b,g,h);return b.join("")}function bC(a){if(a.length<3)return bv(a);var b=[],c=1,d=a.length,e=a[0],f=e[0],g=e[1],h=[f,f,f,(e=a[1])[0]],i=[g,g,g,e[1]];b.push(f,",",g),bI(b,h,i);while(++c<d)e=a[c],h.shift(),h.push(e[0]),i.shift(),i.push(e[1]),bI(b,h,i);c=-1;while(++c<2)h.shift(),h.push(e[0]),i.shift(),i.push(e[1]),bI(b,h,i);return b.join("")}function bB(a,b){var c=[],d=(1-b)/2,e,f=a[0],g=a[1],h=1,i=a.length;while(++h<i)e=f,f=g,g=a[h],c.push([d*(g[0]-e[0]),d*(g[1]-e[1])]);return c}function bA(a,b){if(b.length<1||a.length!=b.length&&a.length!=b.length+2)return bv(a);var c=a.length!=b.length,d="",e=a[0],f=a[1],g=b[0],h=g,i=1;c&&(d+="Q"+(f[0]-g[0]*2/3)+","+(f[1]-g[1]*2/3)+","+f[0]+","+f[1],e=a[1],i=2);if(b.length>1){h=b[1],f=a[i],i++,d+="C"+(e[0]+g[0])+","+(e[1]+g[1])+","+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1];for(var j=2;j<b.length;j++,i++)f=a[i],h=b[j],d+="S"+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1]}if(c){var k=a[i];d+="Q"+(f[0]+h[0]*2/3)+","+(f[1]+h[1]*2/3)+","+k[0]+","+k[1]}return d}function bz(a,b,c){return a.length<3?bv(a):a[0]+bA(a,bB(a,b))}function by(a,b){return a.length<3?bv(a):a[0]+bA((a.push(a[0]),a),bB([a[a.length-2]].concat(a,[a[1]]),b))}function bx(a){var b=[],c=0,d=a.length,e=a[0];b.push(e[0],",",e[1]);while(++c<d)b.push("H",(e=a[c])[0],"V",e[1]);return b.join("")}function bw(a){var b=[],c=0,d=a.length,e=a[0];b.push(e[0],",",e[1]);while(++c<d)b.push("V",(e=a[c])[1],"H",e[0]);return b.join("")}function bv(a){var b=[],c=0,d=a.length,e=a[0];b.push(e[0],",",e[1]);while(++c<d)b.push("L",(e=a[c])[0],",",e[1]);return b.join("")}function bt(a){return a[1]}function bs(a){return a[0]}function br(a,b,c,d){var e=[],f=-1,g=b.length,h=typeof c=="function",i=typeof d=="function",j;if(h&&i)while(++f<g)e.push([c.call(a,j=b[f],f),d.call(a,j,f)]);else if(h)while(++f<g)e.push([c.call(a,b[f],f),d]);else if(i)while(++f<g)e.push([c,d.call(a,b[f],f)]);else while(++f<g)e.push([c,d]);return e}function bq(a){return a.endAngle}function bp(a){return a.startAngle}function bo(a){return a.outerRadius}function bn(a){return a.innerRadius}function bg(a){return function(b){return-Math.pow(-b,a)}}function bf(a){return function(b){return Math.pow(b,a)}}function be(a){return-Math.log(-a)/Math.LN10}function bd(a){return Math.log(a)/Math.LN10}function bb(){var a=null,b=Y,c=Infinity;while(b)b.flush?b=a?a.next=b.next:Y=b.next:(c=Math.min(c,b.then+b.delay),b=(a=b).next);return c}function ba(a){var b,c=Date.now(),d=Y;while(d){b=c-d.then;if(a&&d.delay===0||!a&&b>d.delay)d.flush=d.callback(b);d=d.next}if(a)bb();else{var e=bb()-c;e>24?(isFinite(e)&&(clearTimeout($),$=setTimeout(ba,e)),Z=0):(Z=1,bc(ba))}}function _(a,b){var c=Date.now(),d=!1,e,f=Y;if(!!isFinite(b)){while(f){if(f.callback===a){f.then=c,f.delay=b,d=!0;break}e=f,f=f.next}d||(Y={callback:a,then:c,delay:b,next:Y}),Z||($=clearTimeout($),Z=1,bc(ba))}}function X(a){return typeof a=="function"?function(b,c,d){return d3.interpolate(d,String(a.call(this,b,c)))}:(a=String(a),function(b,c,d){return d3.interpolate(d,a)})}function W(a){function n(b){var g=!0,l=-1;a.each(function(){if(i[++l]!=2){var a=(b-j[l])/k[l],n=this.__transition__,o,p,q=e[l];if(a<1){g=!1;if(a<0)return}else a=1;if(i[l]){if(!n||n.active!=c){i[l]=2;return}}else{if(!n||n.active>c){i[l]=2;return}i[l]=1,h.start.dispatch.apply(this,arguments),q=e[l]={},n.active=c;for(p in d)if(o=d[p].apply(this,arguments))q[p]=o}o=m(a);for(p in q)q[p].call(this,o);if(a==1){i[l]=2;if(n.active==c){var r=n.owner;r==c&&(delete this.__transition__,f&&this.parentNode.removeChild(this)),V=c,h.end.dispatch.apply(this,arguments),V=0,n.owner=r}}}});return g}var b={},c=V||++U,d={},e=[],f=!1,h=d3.dispatch("start","end"),i=[],j=[],k=[],l,m=d3.ease("cubic-in-out");a.each(function(){(this.__transition__||(this.__transition__={})).owner=c}),b.delay=function(c){var d=Infinity,e=-1;typeof c=="function"?a.each(function(a,b){var f=j[++e]=+c.apply(this,arguments);f<d&&(d=f)}):(d=+c,a.each(function(a,b){j[++e]=d})),_(n,d);return b},b.duration=function(c){var d=-1;typeof c=="function"?(l=0,a.each(function(a,b){var e=k[++d]=+c.apply(this,arguments);e>l&&(l=e)})):(l=+c,a.each(function(a,b){k[++d]=l}));return b},b.ease=function(a){m=typeof a=="function"?a:d3.ease.apply(d3,arguments);return b},b.attrTween=function(a,c){function f(b,d){var e=c.call(this,b,d,this.getAttributeNS(a.space,a.local));return function(b){this.setAttributeNS(a.space,a.local,e(b))}}function e(b,d){var e=c.call(this,b,d,this.getAttribute(a));return function(b){this.setAttribute(a,e(b))}}d["attr."+a]=a.local?f:e;return b},b.attr=function(a,c){return b.attrTween(a,X(c))},b.styleTween=function(a,c,e){function f(b,d){var f=c.call(this,b,d,window.getComputedStyle(this,null).getPropertyValue(a));return function(b){this.style.setProperty(a,f(b),e)}}arguments.length<3&&(e=null),d["style."+a]=f;return b},b.style=function(a,c,d){arguments.length<3&&(d=null);return b.styleTween(a,X(c),d)},b.text=function(a){d.text=function(b,c){this.textContent=typeof a=="function"?a.call(this,b,c):a};return b},b.select=function(b){var c,d=W(a.select(b)).ease(m);c=-1,d.delay(function(a,b){return j[++c]}),c=-1,d.duration(function(a,b){return k[++c]});return d},b.selectAll=function(b){var c,d=W(a.selectAll(b)).ease(m);c=-1,d.delay(function(a,b){return j[b?c:++c]}),c=-1,d.duration(function(a,b){return k[b?c:++c]});return d},b.remove=function(){f=!0;return b},b.each=function(a,c){h[a].add(c);return b},b.call=g;return b.delay(0).duration(250)}function T(a){return{__data__:a}}function S(a){arguments.length||(a=d3.ascending);return function(b,c){return a(b&&b.__data__,c&&c.__data__)}}function R(a){function b(b){var c=[],d,e,f,g;for(var h=0,i=a.length;h<i;h++){f=a[h],c.push(d=[]),d.parentNode=f.parentNode;for(var j=0,k=f.length;j<k;j++)(g=f[j])?(d.push(e=b(f.parentNode)),e.__data__=g.__data__):d.push(null)}return Q(c)}a.append=function(a){function d(b){return b.appendChild(document.createElementNS(a.space,a.local))}function c(b){return b.appendChild(document.createElement(a))}a=d3.ns.qualify(a);return b(a.local?d:c)},a.insert=function(a,c){function e(b){return b.insertBefore(document.createElementNS(a.space,a.local),N(c,b))}function d(b){return b.insertBefore(document.createElement(a),N(c,b))}a=d3.ns.qualify(a);return b(a.local?e:d)};return a}function Q(a){function d(b){for(var c=0,d=a.length;c<d;c++){var e=a[c];for(var f=0,g=e.length;f<g;f++){var h=e[f];if(h)return b.call(h,h.__data__,f)}}return null}function c(b){var c=[],d,e,f;for(var g=0,h=a.length;g<h;g++){e=a[g];for(var i=0,j=e.length;i<j;i++)if(f=e[i])c.push(d=b(f)),d.parentNode=f}return Q(c)}function b(b){var c=[],d,e,f,g;for(var h=0,i=a.length;h<i;h++){f=a[h],c.push(d=[]),d.parentNode=f.parentNode;for(var j=0,k=f.length;j<k;j++)(g=f[j])?(d.push(e=b(g)),e&&"__data__"in g&&(e.__data__=g.__data__)):d.push(null)}return Q(c)}a.select=function(a){return b(function(b){return N(a,b)})},a.selectAll=function(a){return c(function(b){return O(a,b)})},a.filter=function(b){var c=[],d,e,f;for(var g=0,h=a.length;g<h;g++){e=a[g],c.push(d=[]),d.parentNode=e.parentNode;for(var i=0,j=e.length;i<j;i++)(f=e[i])&&b.call(f,f.__data__,i)&&d.push(f)}return Q(c)},a.map=function(b){var c,d;for(var e=0,f=a.length;e<f;e++){c=a[e];for(var g=0,h=c.length;g<h;g++)if(d=c[g])d.__data__=b.call(d,d.__data__,g)}return a},a.data=function(b,c){function g(a,b){var g=0,h=a.length,i=b.length,j=Math.min(h,i),k=Math.max(h,i),l=[],m=[],n=[],o,p;if(c){var q={},r=[],s,t=b.length;for(g=0;g<h;g++)s=c.call(o=a[g],o.__data__,g),s in q?n[t++]=a[g]:q[s]=o,r.push(s);for(g=0;g<i;g++)o=q[s=c.call(b,p=b[g],g)],o?(o.__data__=p,l[g]=o,m[g]=n[g]=null):(m[g]=T(p),l[g]=n[g]=null),delete q[s];for(g=0;g<h;g++)r[g]in q&&(n[g]=a[g])}else{for(;g<j;g++)o=a[g],p=b[g],o?(o.__data__=p,l[g]=o,m[g]=n[g]=null):(m[g]=T(p),l[g]=n[g]=null);for(;g<i;g++)m[g]=T(b[g]),l[g]=n[g]=null;for(;g<k;g++)n[g]=a[g],m[g]=l[g]=null}m.parentNode=l.parentNode=n.parentNode=a.parentNode,d.push(m),e.push(l),f.push(n)}var d=[],e=[],f=[],h=-1,i=a.length,j;if(typeof b=="function")while(++h<i)g(j=a[h],b.call(j,j.parentNode.__data__,h));else while(++h<i)g(j=a[h],b);var k=Q(e);k.enter=function(){return R(d)},k.exit=function(){return Q(f)};return k},a.each=function(b){for(var c=0,d=a.length;c<d;c++){var e=a[c];for(var f=0,g=e.length;f<g;f++){var h=e[f];h&&b.call(h,h.__data__,f)}}return a},a.empty=function(){return!d(function(){return!0})},a.node=function(){return d(function(){return this})},a.attr=function(b,c){function j(){var a=c.apply(this,arguments);a==null?this.removeAttributeNS(b.space,b.local):this.setAttributeNS(b.space,b.local,a)}function i(){var a=c.apply(this,arguments);a==null?this.removeAttribute(b):this.setAttribute(b,a)}function h(){this.setAttributeNS(b.space,b.local,c)}function g(){this.setAttribute(b,c)}function f(){this.removeAttributeNS(b.space,b.local)}function e(){this.removeAttribute(b)}b=d3.ns.qualify(b);if(arguments.length<2)return d(b.local?function(){return this.getAttributeNS(b.space,b.local)}:function(){return this.getAttribute(b)});return a.each(c==null?b.local?f:e:typeof c=="function"?b.local?j:i:b.local?h:g)},a.classed=function(b,c){function i(){(c.apply(this,arguments)?g:h).call(this)}function h(){var a=f(this.className.replace(e," "));this.className=a.length?a:null}function g(){var a=this.className;e.lastIndex=0,e.test(a)||(this.className=f(a+" "+b))}var e=new RegExp("(^|\\s+)"+d3.requote(b)+"(\\s+|$)","g");if(arguments.length<2)return d(function(){e.lastIndex=0;return e.test(this.className)});return a.each(typeof c=="function"?i:c?g:h)},a.style=function(b,c,e){function h(){var a=c.apply(this,arguments);a==null?this.style.removeProperty(b):this.style.setProperty(b,a,e)}function g(){this.style.setProperty(b,c,e)}function f(){this.style.removeProperty(b)}arguments.length<3&&(e="");if(arguments.length<2)return d(function(){return window.getComputedStyle(this,null).getPropertyValue(b)});return a.each(c==null?f:typeof c=="function"?h:g)},a.property=function(b,c){function g(){var a=c.apply(this,arguments);a==null?delete this[b]:this[b]=a}function f(){this[b]=c}function e(){delete this[b]}b=d3.ns.qualify(b);if(arguments.length<2)return d(function(){return this[b]});return a.each(c==null?e:typeof c=="function"?g:f)},a.text=function(b){function e(){this.textContent=b.apply(this,arguments)}function c(){this.textContent=b}if(arguments.length<1)return d(function(){return this.textContent});return a.each(typeof b=="function"?e:c)},a.html=function(b){function e(){this.innerHTML=b.apply(this,arguments)}function c(){this.innerHTML=b}if(arguments.length<1)return d(function(){return this.innerHTML});return a.each(typeof b=="function"?e:c)},a.append=function(a){function d(b){return b.appendChild(document.createElementNS(a.space,a.local))}function c(b){return b.appendChild(document.createElement(a))}a=d3.ns.qualify(a);return b(a.local?d:c)},a.insert=function(a,c){function e(b){return b.insertBefore(document.createElementNS(a.space,a.local),N(c,b))}function d(b){return b.insertBefore(document.createElement(a),N(c,b))}a=d3.ns.qualify(a);return b(a.local?e:d)},a.remove=function(){return a.each(function(){var a=this.parentNode;a&&a.removeChild(this)})},a.sort=function(b){b=S.apply(this,arguments);for(var c=0,d=a.length;c<d;c++){var e=a[c];e.sort(b);for(var f=1,g=e.length,h=e[0];f<g;f++){var i=e[f];i&&(h&&h.parentNode.insertBefore(i,h.nextSibling),h=i)}}return a},a.on=function(b,c,d){arguments.length<3&&(d=!1);var e=b.indexOf("."),f=e==-1?b:b.substring(0,e),g="__on"+b;return a.each(function(a,b){function e(d){var e=d3.event;d3.event=d;try{c.call(this,a,b)}finally{d3.event=e}}this[g]&&this.removeEventListener(f,this[g],d),c&&this.addEventListener(f,this[g]=e,d)})},a.transition=function(){return W(a)},a.call=g;return a}function M(a,b,c){function g(a){return Math.round(f(a)*255)}function f(a){a>360?a-=360:a<0&&(a+=360);if(a<60)return d+(e-d)*a/60;if(a<180)return e;if(a<240)return d+(e-d)*(240-a)/60;return d}var d,e;a=a%360,a<0&&(a+=360),b=b<0?0:b>1?1:b,c=c<0?0:c>1?1:c,e=c<=.5?c*(1+b):c+b-c*b,d=2*c-e;return C(g(a+120),g(a),g(a-120))}function L(){return"hsl("+this.h+","+this.s*100+"%,"+this.l*100+"%)"}function K(a,b,c){return{h:a,s:b,l:c,toString:L}}function H(a){var b=parseFloat(a);return a.charAt(a.length-1)=="%"?Math.round(b*2.55):b}function G(a,b,c){var d=Math.min(a/=255,b/=255,c/=255),e=Math.max(a,b,c),f=e-d,g,h,i=(e+d)/2;f?(h=i<.5?f/(e+d):f/(2-e-d),a==e?g=(b-c)/f+(b<c?6:0):b==e?g=(c-a)/f+2:g=(a-b)/f+4,g*=60):h=g=0;return K(g,h,i)}function F(a,b,c){var d=0,e=0,f=0,g,h,i;g=/([a-z]+)\((.*)\)/i.exec(a);if(g){h=g[2].split(",");switch(g[1]){case"hsl":return c(parseFloat(h[0]),parseFloat(h[1])/100,parseFloat(h[2])/100);case"rgb":return b(H(h[0]),H(h[1]),H(h[2]))}}if(i=I[a])return b(i.r,i.g,i.b);a!=null&&a.charAt(0)=="#"&&(a.length==4?(d=a.charAt(1),d+=d,e=a.charAt(2),e+=e,f=a.charAt(3),f+=f):a.length==7&&(d=a.substring(1,3),e=a.substring(3,5),f=a.substring(5,7)),d=parseInt(d,16),e=parseInt(e,16),f=parseInt(f,16));return b(d,e,f)}function E(a){return a<16?"0"+a.toString(16):a.toString(16)}function D(){return"#"+E(this.r)+E(this.g)+E(this.b)}function C(a,b,c){return{r:a,g:b,b:c,toString:D}}function B(a){return a in A||/\bcolor\b/.test(a)?d3.interpolateRgb:d3.interpolate}function y(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}function x(a){a||(a=1.70158);return function(b){return b*b*((a+1)*b-a)}}function w(a,b){var c;arguments.length<2&&(b=.45),arguments.length<1?(a=1,c=b/4):c=b/(2*Math.PI)*Math.asin(1/a);return function(d){return 1+a*Math.pow(2,10*-d)*Math.sin((d-c)*2*Math.PI/b)}}function v(a){return 1-Math.sqrt(1-a*a)}function u(a){return a?Math.pow(2,10*(a-1))-.001:0}function t(a){return 1-Math.cos(a*Math.PI/2)}function s(a){return function(b){return Math.pow(b,a)}}function r(a){return a}function q(a){return function(b){return.5*(b<.5?a(2*b):2-a(2-2*b))}}function p(a){return function(b){return 1-a(1-b)}}function k(a){var b=a.lastIndexOf("."),c=b>=0?a.substring(b):(b=a.length,""),d=[];while(b>0)d.push(a.substring(b-=3,b+3));return d.reverse().join(",")+c}function i(a){var b={},c=[];b.add=function(a){for(var d=0;d<c.length;d++)if(c[d].listener==a)return b;c.push({listener:a,on:!0});return b},b.remove=function(a){for(var d=0;d<c.length;d++){var e=c[d];if(e.listener==a){e.on=!1,c=c.slice(0,d).concat(c.slice(d+1));break}}return b},b.dispatch=function(){var a=c;for(var b=0,d=a.length;b<d;b++){var e=a[b];e.on&&e.listener.apply(this,arguments)}};return b}function g(a){a.apply(this,(arguments[0]=this,arguments));return this}function f(a){return a.replace(/(^\s+)|(\s+$)/g,"").replace(/\s+/g," ")}function e(a){return a==null}function c(a){return Array.prototype.slice.call(a)}function b(a){var b=-1,c=a.length,d=[];while(++b<c)d.push(a[b]);return d}d3={version:"1.13.1"},Date.now||(Date.now=function(){return+(new Date)}),Object.create||(Object.create=function(a){function b(){}b.prototype=a;return new b});var a=c;try{a(document.documentElement.childNodes)[0].nodeType}catch(d){a=b}d3.functor=function(a){return typeof a=="function"?a:function(){return a}},d3.rebind=function(a,b){return function(){var c=b.apply(a,arguments);return arguments.length?a:c}},d3.ascending=function(a,b){return a<b?-1:a>b?1:0},d3.descending=function(a,b){return b<a?-1:b>a?1:0},d3.min=function(a,b){var c=0,d=a.length,e=a[0],f;if(arguments.length==1)while(++c<d)e>(f=a[c])&&(e=f);else{e=b(a[0]);while(++c<d)e>(f=b(a[c]))&&(e=f)}return e},d3.max=function(a,b){var c=0,d=a.length,e=a[0],f;if(arguments.length==1)while(++c<d)e<(f=a[c])&&(e=f);else{e=b(e);while(++c<d)e<(f=b(a[c]))&&(e=f)}return e},d3.nest=function(){function g(a,d){if(d>=b.length)return a;var e=[],f=c[d++],h;for(h in a)e.push({key:h,values:g(a[h],d)});f&&e.sort(function(a,b){return f(a.key,b.key)});return e}function f(c,g){if(g>=b.length)return e?e.call(a,c):d?c.sort(d):c;var h=-1,i=c.length,j=b[g++],k,l,m={};while(++h<i)(k=j(l=c[h]))in m?m[k].push(l):m[k]=[l];for(k in m)m[k]=f(m[k],g);return m}var a={},b=[],c=[],d,e;a.map=function(a){return f(a,0)},a.entries=function(a){return g(f(a,0),0)},a.key=function(c){b.push(c);return a},a.sortKeys=function(d){c[b.length-1]=d;return a},a.sortValues=function(b){d=b;return a},a.rollup=function(b){e=b;return a};return a},d3.keys=function(a){var b=[];for(var c in a)b.push(c);return b},d3.values=function(a){var b=[];for(var c in a)b.push(a[c]);return b},d3.entries=function(a){var b=[];for(var c in a)b.push({key:c,value:a[c]});return b},d3.merge=function(a){return Array.prototype.concat.apply([],a)},d3.split=function(a,b){var c=[],d=[],f,g=-1,h=a.length;arguments.length<2&&(b=e);while(++g<h)b.call(d,f=a[g],g)?d=[]:(d.length||c.push(d),d.push(f));return c},d3.range=function(a,b,c){arguments.length==1&&(b=a,a=0),c==null&&(c=1);if((b-a)/c==Infinity)throw new Error("infinite range");var d=[],e=-1,f;if(c<0)while((f=a+c*++e)>b)d.push(f);else while((f=a+c*++e)<b)d.push(f);return d},d3.requote=function(a){return a.replace(h,"\\$&")};var h=/[\\\^\$\*\+\?\[\]\(\)\.\{\}]/g;d3.xhr=function(a,b,c){var d=new XMLHttpRequest;arguments.length<3?c=b:b&&d.overrideMimeType&&d.overrideMimeType(b),d.open("GET",a,!0),d.onreadystatechange=function(){d.readyState==4&&c(d.status<300?d:null)},d.send(null)},d3.text=function(a,b,c){function d(a){c(a&&a.responseText)}arguments.length<3&&(c=b,b=null),d3.xhr(a,b,d)},d3.json=function(a,b){d3.text(a,"application/json",function(a){b(a?JSON.parse(a):null)})},d3.html=function(a,b){d3.text(a,"text/html",function(a){if(a!=null){var c=document.createRange();c.selectNode(document.body),a=c.createContextualFragment(a)}b(a)})},d3.xml=function(a,b,c){function d(a){c(a&&a.responseXML)}arguments.length<3&&(c=b,b=null),d3.xhr(a,b,d)},d3.ns={prefix:{svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},qualify:function(a){var b=a.indexOf(":");return b<0?a:{space:d3.ns.prefix[a.substring(0,b)],local:a.substring(b+1)}}},d3.dispatch=function(a){var b={},c;for(var d=0,e=arguments.length;d<e;d++)c=arguments[d],b[c]=i(c);return b},d3.format=function(a){var b=j.exec(a),c=b[1]||" ",d=b[3]||"",e=b[5],f=+b[6],g=b[7],h=b[8],i=b[9];h&&(h=h.substring(1)),e&&(c="0",g&&(f-=Math.floor((f-1)/4))),i=="d"&&(h="0");return function(a){var b=+a,j=b<0&&(b=-b)?"−":d;if(i=="d"&&b%1)return"";h?a=b.toFixed(h):a=""+b;if(e){var l=a.length+j.length;l<f&&(a=Array(f-l+1).join(c)+a),g&&(a=k(a)),a=j+a}else{g&&(a=k(a)),a=j+a;var l=a.length;l<f&&(a=Array(f-l+1).join(c)+a)}return a}};var j=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/,l=s(2),m=s(3),n={linear:function(){return r},poly:s,quad:function(){return l},cubic:function(){return m},sin:function(){return t},exp:function(){return u},circle:function(){return v},elastic:w,back:x,bounce:function(){return y}},o={"in":function(a){return a},out:p,"in-out":q,"out-in":function(a){return q(p(a))}};d3.ease=function(a){var b=a.indexOf("-"),c=b>=0?a.substring(0,b):a,d=b>=0?a.substring(b+1):"in";return o[d](n[c].apply(null,Array.prototype.slice.call(arguments,1)))},d3.event=null,d3.interpolate=function(a,b){if(typeof b=="number")return d3.interpolateNumber(+a,b);if(typeof b=="string")return b in I||/^(#|rgb\(|hsl\()/.test(b)?d3.interpolateRgb(String(a),b):d3.interpolateString(String(a),b);if(b instanceof Array)return d3.interpolateArray(a,b);return d3.interpolateObject(a,b)},d3.interpolateNumber=function(a,b){b-=a;return function(c){return a+b*c}},d3.interpolateRound=function(a,b){b-=a;return function(c){return Math.round(a+b*c)}},d3.interpolateString=function(a,b){var c,d,e,f=0,g=0,h=[],i=[],j,k;z.lastIndex=0;for(d=0;c=z.exec(b);++d)c.index&&h.push(b.substring(f,g=c.index)),i.push({i:h.length,x:c[0]}),h.push(null),f=z.lastIndex;f<b.length&&h.push(b.substring(f));for(d=0,j=i.length;(c=z.exec(a))&&d<j;++d){k=i[d];if(k.x==c[0]){if(k.i)if(h[k.i+1]==null){h[k.i-1]+=k.x,h.splice(k.i,1);for(e=d+1;e<j;++e)i[e].i--}else{h[k.i-1]+=k.x+h[k.i+1],h.splice(k.i,2);for(e=d+1;e<j;++e)i[e].i-=2}else if(h[k.i+1]==null)h[k.i]=k.x;else{h[k.i]=k.x+h[k.i+1],h.splice(k.i+1,1);for(e=d+1;e<j;++e)i[e].i--}i.splice(d,1),j--,d--}else k.x=d3.interpolateNumber(parseFloat(c[0]),parseFloat(k.x))}while(d<j)k=i.pop(),h[k.i+1]==null?h[k.i]=k.x:(h[k.i]=k.x+h[k.i+1],h.splice(k.i+1,1)),j--;if(h.length==1)return h[0]==null?i[0].x:function(){return b};return function(a){for(d=0;d<j;++d)h[(k=i[d]).i]=k.x(a);return h.join("")}},d3.interpolateRgb=function(a,b){a=d3.rgb(a),b=d3.rgb(b);var c=a.r,d=a.g,e=a.b,f=b.r-c,g=b.g-d,h=b.b-e;return function(a){return"rgb("+Math.round(c+f*a)+","+Math.round(d+g*a)+","+Math.round(e+h*a)+")"}},d3.interpolateHsl=function(a,b){a=d3.hsl(a),b=d3.hsl(b);var c=a.h,d=a.s,e=a.l,f=b.h-c,g=b.s-d,h=b.l-e;return function(a){return M(c+f*a,d+g*a,e+h*a).toString()}},d3.interpolateArray=function(a,b){var c=[],d=[],e=a.length,f=b.length,g=Math.min(a.length,b.length),h;for(h=0;h<g;++h)c.push(d3.interpolate(a[h],b[h]));for(;h<e;++h)d[h]=a[h];for(;h<f;++h)d[h]=b[h];return function(a){for(h=0;h<g;++h)d[h]=c[h](a);return d}},d3.interpolateObject=function(a,b){var c={},d={},e;for(e in a)e in b?c[e]=B(e)(a[e],b[e]):d[e]=a[e];for(e in b)e in a||(d[e]=b[e]);return function(a){for(e in c)d[e]=c[e](a);return d}};var z=/[-+]?(?:\d+\.\d+|\d+\.|\.\d+|\d+)(?:[eE][-]?\d+)?/g,A={background:1,fill:1,stroke:1};d3.rgb=function(a,b,c){return arguments.length==1?F(""+a,C,M):C(~~a,~~b,~~c)};var I={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};for(var J in I)I[J]=F(I[J],C,M);d3.hsl=function(a,b,c){return arguments.length==1?F(""+a,G,K):K(+a,+b,+c)};var N=function(a,b){return b.querySelector(a)},O=function(b,c){return a(c.querySelectorAll(b))};typeof Sizzle=="function"&&(N=function(a,b){return Sizzle(a,b)[0]},O=function(a,b){return Sizzle.uniqueSort(Sizzle(a,b))});var P=Q([[document]]);P[0].parentNode=document.documentElement,d3.select=function(a){return typeof a=="string"?P.select(a):Q([[a]])},d3.selectAll=function(b){return typeof b=="string"?P.selectAll(b):Q([a(b)])},d3.transition=P.transition;var U=0,V=0,Y=null,Z,$;d3.timer=function(a){_(a,0)},d3.timer.immediate=function(){ba(!0)};var bc=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,17)};d3.scale={},d3.scale.linear=function(){function k(c){var d=Math.min(a,b),e=Math.max(a,b),f=e-d,g=Math.pow(10,Math.floor(Math.log(f/c)/Math.LN10)),h=c/(f/g);h<=.15?g*=10:h<=.35?g*=5:h<=.75&&(g*=2);return{start:Math.ceil(d/g)*g,stop:Math.floor(e/g)*g+g*.5,step:g}}function j(b){b=(b-a)*e;return h(i?Math.max(0,Math.min(1,b)):b)}var a=0,b=1,c=0,d=1,e=1,f=1,g=d3.interpolate,h=g(c,d),i=!1;j.invert=function(b){return(b-c)*f+a},j.domain=function(g){if(!arguments.length)return[a,b];a=+g[0],b=+g[1],e=1/(b-a),f=(b-a)/(d-c);return j},j.range=function(e){if(!arguments.length)return[c,d];c=e[0],d=e[1],f=(b-a)/(d-c),h=g(c,d);return j},j.rangeRound=function(a){return j.range(a).interpolate(d3.interpolateRound)},j.clamp=function(a){if(!arguments.length)return i;i=a;return j},j.interpolate=function(a){if(!arguments.length)return g;h=(g=a)(c,d);return j},j.ticks=function(a){var b=k(a);return d3.range(b.start,b.stop,b.step)},j.tickFormat=function(a){var b=Math.max(0,-Math.floor(Math.log(k(a).step)/Math.LN10+.01));return d3.format(",."+b+"f")};return j},d3.scale.log=function(){function d(c){return a(b(c))}var a=d3.scale.linear(),b=bd,c=b.pow;d.invert=function(b){return c(a.invert(b))},d.domain=function(e){if(!arguments.length)return a.domain().map(c);b=(e[0]||e[1])<0?be:bd,c=b.pow,a.domain(e.map(b));return d},d.range=d3.rebind(d,a.range),d.rangeRound=d3.rebind(d,a.rangeRound),d.interpolate=d3.rebind(d,a.interpolate),d.clamp=d3.rebind(d,a.clamp),d.ticks=function(){var d=a.domain(),e=[];if(d.every(isFinite)){var f=Math.floor(d[0]),g=Math.ceil(d[1]),h=c(d[0]),i=c(d[1]);if(b===be){e.push(c(f));for(;f++<g;)for(var j=9;j>0;j--)e.push(c(f)*j)}else{for(;f<g;f++)for(var j=1;j<10;j++)e.push(c(f)*j);e.push(c(f))}for(f=0;e[f]<h;f++);for(g=e.length;e[g-1]>i;g--);e=e.slice(f,g)}return e},d.tickFormat=function(){return function(a){return a.toPrecision(1)}};return d},bd.pow=function(a){return Math.pow(10,a)},be.pow=function(a){return-Math.pow(10,-a)},d3.scale.pow=function(){function f(b){return a(d(b))}var a=d3.scale.linear(),b=d3.scale.linear(),c=1,d=Number,e=d;f.invert=function(b){return e(a.invert(b))},f.domain=function(g){if(!arguments.length)return a.domain().map(e);var h=(g[0]||g[1])<0?bg:bf;d=h(c),e=h(1/c),a.domain(g.map(d)),b.domain(g);return f},f.range=d3.rebind(f,a.range),f.rangeRound=d3.rebind(f,a.rangeRound),f.interpolate=d3.rebind(f,a.interpolate),f.clamp=d3.rebind(f,a.clamp),f.ticks=b.ticks,f.tickFormat=b.tickFormat,f.exponent=function(a){if(!arguments.length)return c;var b=f.domain();c=a;return f.domain(b)};return f},d3.scale.sqrt=function(){return d3.scale.pow().exponent(.5)},d3.scale.ordinal=function(){function e(d){var e=d in b?b[d]:b[d]=a.push(d)-1;return c[e%c.length]}var a=[],b={},c=[],d=0;e.domain=function(c){if(!arguments.length)return a;a=c,b={};var d=-1,f=-1,g=a.length;while(++d<g)c=a[d],c in b||(b[c]=++f);return e},e.range=function(a){if(!arguments.length)return c;c=a;return e},e.rangePoints=function(b,f){arguments.length<2&&(f=0);var g=b[0],h=b[1],i=(h-g)/(a.length-1+f);c=a.length==1?[(g+h)/2]:d3.range(g+i*f/2,h+i/2,i),d=0;return e},e.rangeBands=function(b,f){arguments.length<2&&(f=0);var g=b[0],h=b[1],i=(h-g)/(a.length+f);c=d3.range(g+i*f,h,i),d=i*(1-f);return e},e.rangeRoundBands=function(b,f){arguments.length<2&&(f=0);var g=b[0],h=b[1],i=h-g,j=Math.floor(i/(a.length+f)),k=i-(a.length-f)*j;c=d3.range(g+Math.round(k/2),h,j),d=Math.round(j*(1-f));return e},e.rangeBand=function(){return d};return e},d3.scale.category10=function(){return d3.scale.ordinal().range(bh)},d3.scale.category20=function(){return d3.scale.ordinal().range(bi)},d3.scale.category20b=function(){return d3.scale.ordinal().range(bj)},d3.scale.category20c=function(){return d3.scale.ordinal().range(bk)};var bh=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],bi=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],bj=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],bk=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];d3.scale.quantile=function(){function f(a){return b[e(a)]}function e(a){if(isNaN(a=+a))return NaN;var b=0,d=c.length-1;while(b<=d){var e=b+d>>1,f=c[e];if(f<a)b=e+1;else if(f>a)d=e-1;else return e}return d<0?0:d}function d(){var d=-1,e=c.length=b.length,f=a.length/e;while(++d<e)c[d]=a[~~(d*f)]}var a=[],b=[],c=[];f.domain=function(b){if(!arguments.length)return a;a=b.filter(function(a){return!isNaN(a)}).sort(d3.ascending),d();return f},f.range=function(a){if(!arguments.length)return b;b=a,d();return f},f.quantiles=function(){return c};return f},d3.scale.quantize=function(){function f(b){return e[Math.max(0,Math.min(d,Math.floor(c*(b-a))))]}var a=0,b=1,c=2,d=1,e=[0,1];f.domain=function(d){if(!arguments.length)return[a,b];a=d[0],b=d[1],c=e.length/(b-a);return f},f.range=function(g){if(!arguments.length)return e;e=g,c=e.length/(b-a),d=e.length-1;return f};return f},d3.svg={},d3.svg.arc=function(){function e(){var e=a.apply(this,arguments),f=b.apply(this,arguments),g=c.apply(this,arguments)+bl,h=d.apply(this,arguments)+bl,i=h-g,j=i<Math.PI?"0":"1",k=Math.cos(g),l=Math.sin(g),m=Math.cos(h),n=Math.sin(h);return i>=bm?e?"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+ -f+"A"+f+","+f+" 0 1,1 0,"+f+"M0,"+e+"A"+e+","+e+" 0 1,1 0,"+ -e+"A"+e+","+e+" 0 1,1 0,"+e+"Z":"M0,"+f+"A"+f+","+f+" 0 1,1 0,"+ -f+"A"+f+","+f+" 0 1,1 0,"+f+"Z":e?"M"+f*k+","+f*l+"A"+f+","+f+" 0 "+j+",1 "+f*m+","+f*n+"L"+e*m+","+e*n+"A"+e+","+e+" 0 "+j+",0 "+e*k+","+e*l+"Z":"M"+f*k+","+f*l+"A"+f+","+f+" 0 "+j+",1 "+f*m+","+f*n+"L0,0"+"Z"}var a=bn,b=bo,c=bp,d=bq;e.innerRadius=function(b){if(!arguments.length)return a;a=d3.functor(b);return e},e.outerRadius=function(a){if(!arguments.length)return b;b=d3.functor(a);return e},e.startAngle=function(a){if(!arguments.length)return c;c=d3.functor(a);return e},e.endAngle=function(a){if(!arguments.length)return d;d=d3.functor(a);return e},e.centroid=function(){var e=(a.apply(this,arguments)+b.apply(this,arguments))/2,f=(c.apply(this,arguments)+d.apply(this,arguments))/2+bl;return[Math.cos(f)*e,Math.sin(f)*e]};return e};var bl=-Math.PI/2,bm=2*Math.PI-1e-6;d3.svg.line=function(){function f(c){return c.length<1?null:"M"+d(br(this,c,a,b),e)}var a=bs,b=bt,c="linear",d=bu[c],e=.7;f.x=function(b){if(!arguments.length)return a;a=b;return f},f.y=function(a){if(!arguments.length)return b;b=a;return f},f.interpolate=function(a){if(!arguments.length)return c;d=bu[c=a];return f},f.tension=function(a){if(!arguments.length)return e;e=a;return f};return f};var bu= <add>{linear:bv,"step-before":bw,"step-after":bx,basis:bC,"basis-closed":bD,cardinal:bz,"cardinal-closed":by},bF=[0,2/3,1/3,0],bG=[0,1/3,2/3,0],bH=[0,1/6,2/3,1/6];d3.svg.area=function(){function g(d){return d.length<1?null:"M"+e(br(this,d,a,c),f)+"L"+e(br(this,d,a,b).reverse(),f)+"Z"}var a=bs,b=bJ,c=bt,d="linear",e=bu[d],f=.7;g.x=function(b){if(!arguments.length)return a;a=b;return g},g.y0=function(a){if(!arguments.length)return b;b=a;return g},g.y1=function(a){if(!arguments.length)return c;c=a;return g},g.interpolate=function(a){if(!arguments.length)return d;e=bu[d=a];return g},g.tension=function(a){if(!arguments.length)return f;f=a;return g};return g},d3.svg.chord=function(){function j(a,b,c,d){return"Q 0,0 "+d}function i(a,b){return"A"+a+","+a+" 0 0,1 "+b}function h(a,b){return a.a0==b.a0&&a.a1==b.a1}function g(a,b,f,g){var h=b.call(a,f,g),i=c.call(a,h,g),j=d.call(a,h,g)+bl,k=e.call(a,h,g)+bl;return{r:i,a0:j,a1:k,p0:[i*Math.cos(j),i*Math.sin(j)],p1:[i*Math.cos(k),i*Math.sin(k)]}}function f(c,d){var e=g(this,a,c,d),f=g(this,b,c,d);return"M"+e.p0+i(e.r,e.p1)+(h(e,f)?j(e.r,e.p1,e.r,e.p0):j(e.r,e.p1,f.r,f.p0)+i(f.r,f.p1)+j(f.r,f.p1,e.r,e.p0))+"Z"}var a=bK,b=bL,c=bM,d=bp,e=bq;f.radius=function(a){if(!arguments.length)return c;c=d3.functor(a);return f},f.source=function(b){if(!arguments.length)return a;a=d3.functor(b);return f},f.target=function(a){if(!arguments.length)return b;b=d3.functor(a);return f},f.startAngle=function(a){if(!arguments.length)return d;d=d3.functor(a);return f},f.endAngle=function(a){if(!arguments.length)return e;e=d3.functor(a);return f};return f},d3.svg.diagonal=function(){function d(d,e){var f=a.call(this,d,e),g=b.call(this,d,e),h=(f.y+g.y)/2,i=[f,{x:f.x,y:h},{x:g.x,y:h},g];i=i.map(c);return"M"+i[0]+"C"+i[1]+" "+i[2]+" "+i[3]}var a=bK,b=bL,c=bP;d.source=function(b){if(!arguments.length)return a;a=d3.functor(b);return d},d.target=function(a){if(!arguments.length)return b;b=d3.functor(a);return d},d.projection=function(a){if(!arguments.length)return c;c=a;return d};return d},d3.svg.mouse=function(a){var b=(a.ownerSVGElement||a).createSVGPoint();if(bQ<0&&(window.scrollX||window.scrollY)){var c=d3.select(document.body).append("svg:svg").style("position","absolute").style("top",0).style("left",0),d=c[0][0].getScreenCTM();bQ=!d.f&&!d.e,c.remove()}bQ?(b.x=d3.event.pageX,b.y=d3.event.pageY):(b.x=d3.event.clientX,b.y=d3.event.clientY),b=b.matrixTransform(a.getScreenCTM().inverse());return[b.x,b.y]};var bQ=/WebKit/.test(navigator.userAgent)?-1:0;d3.svg.symbol=function(){function c(c,d){return(bT[a.call(this,c,d)]||bT.circle)(b.call(this,c,d))}var a=bS,b=bR;c.type=function(b){if(!arguments.length)return a;a=d3.functor(b);return c},c.size=function(a){if(!arguments.length)return b;b=d3.functor(a);return c};return c},d3.svg.symbolTypes=["circle","cross","diamond","square","triangle-down","triangle-up"];var bT={circle:function(a){var b=Math.sqrt(a/Math.PI);return"M0,"+b+"A"+b+","+b+" 0 1,1 0,"+ -b+"A"+b+","+b+" 0 1,1 0,"+b+"Z"},cross:function(a){var b=Math.sqrt(a/5)/2;return"M"+ -3*b+","+ -b+"H"+ -b+"V"+ -3*b+"H"+b+"V"+ -b+"H"+3*b+"V"+b+"H"+b+"V"+3*b+"H"+ -b+"V"+b+"H"+ -3*b+"Z"},diamond:function(a){var b=Math.sqrt(a/(2*bV)),c=b*bV;return"M0,"+ -b+"L"+c+",0"+" 0,"+b+" "+ -c+",0"+"Z"},square:function(a){var b=Math.sqrt(a)/2;return"M"+ -b+","+ -b+"L"+b+","+ -b+" "+b+","+b+" "+ -b+","+b+"Z"},"triangle-down":function(a){var b=Math.sqrt(a/bU),c=b*bU/2;return"M0,"+c+"L"+b+","+ -c+" "+ -b+","+ -c+"Z"},"triangle-up":function(a){var b=Math.sqrt(a/bU),c=b*bU/2;return"M0,"+ -c+"L"+b+","+c+" "+ -b+","+c+"Z"}},bU=Math.sqrt(3),bV=Math.tan(30*Math.PI/180)})() <ide>\ No newline at end of file <ide><path>src/chart/box.js <ide> d3.chart.box = function() { <ide> .style("opacity", 1e-6) <ide> .remove(); <ide> }); <add> d3.timer.immediate(); <ide> } <ide> <ide> box.width = function(x) { <ide><path>src/chart/bullet.js <ide> d3.chart.bullet = function() { <ide> .attr("opacity", 1e-6) <ide> .remove(); <ide> }); <add> d3.timer.immediate(); <ide> } <ide> <ide> // left, right, top, bottom <ide><path>src/core/timer.js <ide> d3.timer = function(callback) { <ide> d3_timer(callback, 0); <ide> }; <ide> <add>d3.timer.immediate = function() { <add> d3_timer_step(true); <add>}; <add> <ide> function d3_timer(callback, delay) { <ide> var now = Date.now(), <ide> found = false, <ide> function d3_timer(callback, delay) { <ide> } <ide> } <ide> <del>function d3_timer_step() { <add>function d3_timer_step(immediateOnly) { <ide> var elapsed, <ide> now = Date.now(), <del> t0 = null, <ide> t1 = d3_timer_queue; <ide> <ide> while (t1) { <ide> elapsed = now - t1.then; <del> if (elapsed > t1.delay) t1.flush = t1.callback(elapsed); <del> t1 = (t0 = t1).next; <add> if (immediateOnly && t1.delay === 0 || <add> !immediateOnly && elapsed > t1.delay) <add> t1.flush = t1.callback(elapsed); <add> t1 = t1.next; <add> } <add> <add> if (immediateOnly) { <add> d3_timer_flush(); <add> return; <ide> } <ide> <ide> var delay = d3_timer_flush() - now;
7
Ruby
Ruby
avoid nil in possible_javas
ea28c79031b157e7604ac905e7a09fbe2e603778
<ide><path>Library/Homebrew/extend/os/mac/requirements/java_requirement.rb <ide> def possible_javas <ide> javas << java_home_cmd <ide> javas << which("java") <ide> javas.delete(Pathname.new("/usr/bin/java")) # /usr/bin/java is a stub on macOS <del> javas <add> javas.compact <ide> end <ide> <ide> def java_home_cmd
1
Javascript
Javascript
add test for trailing slash on api route
66a03bf1ffe53bce24553ee40bdbdf4f674a2965
<ide><path>test/integration/api-support/test/index.test.js <ide> function runTests (serverless = false) { <ide> expect(data).toEqual([{ title: 'Nextjs' }]) <ide> }) <ide> <del> it('shuld return error with invalid JSON', async () => { <add> it('should return error with invalid JSON', async () => { <ide> const data = await fetchViaHTTP(appPort, '/api/parse', null, { <ide> method: 'POST', <ide> headers: { <ide><path>test/integration/serverless/test/index.test.js <ide> import { <ide> findPort, <ide> nextBuild, <ide> nextStart, <add> fetchViaHTTP, <ide> renderViaHTTP <ide> } from 'next-test-utils' <ide> import fetch from 'node-fetch' <ide> describe('Serverless', () => { <ide> expect(post).toBe('post-1') <ide> }) <ide> <add> it('should 404 on API request with trailing slash', async () => { <add> const res = await fetchViaHTTP(appPort, '/api/hello/') <add> expect(res.status).toBe(404) <add> }) <add> <ide> describe('With basic usage', () => { <ide> it('should allow etag header support', async () => { <ide> const url = `http://localhost:${appPort}/`
2
Go
Go
fix typo in err msg from ambigious to ambiguous
c6cbdad7296a09afd6f2c5e5a7572d64fda5bf6e
<ide><path>daemon/cluster/cluster.go <ide> func getNetwork(ctx context.Context, c swarmapi.ControlClient, input string) (*s <ide> } <ide> <ide> if l := len(rl.Networks); l > 1 { <del> return nil, fmt.Errorf("network %s is ambigious (%d matches found)", input, l) <add> return nil, fmt.Errorf("network %s is ambiguous (%d matches found)", input, l) <ide> } <ide> <ide> return rl.Networks[0], nil <ide><path>daemon/cluster/helpers.go <ide> func getNode(ctx context.Context, c swarmapi.ControlClient, input string) (*swar <ide> } <ide> <ide> if l := len(rl.Nodes); l > 1 { <del> return nil, fmt.Errorf("node %s is ambigious (%d matches found)", input, l) <add> return nil, fmt.Errorf("node %s is ambiguous (%d matches found)", input, l) <ide> } <ide> <ide> return rl.Nodes[0], nil <ide> func getService(ctx context.Context, c swarmapi.ControlClient, input string) (*s <ide> } <ide> <ide> if l := len(rl.Services); l > 1 { <del> return nil, fmt.Errorf("service %s is ambigious (%d matches found)", input, l) <add> return nil, fmt.Errorf("service %s is ambiguous (%d matches found)", input, l) <ide> } <ide> <ide> return rl.Services[0], nil <ide> func getTask(ctx context.Context, c swarmapi.ControlClient, input string) (*swar <ide> } <ide> <ide> if l := len(rl.Tasks); l > 1 { <del> return nil, fmt.Errorf("task %s is ambigious (%d matches found)", input, l) <add> return nil, fmt.Errorf("task %s is ambiguous (%d matches found)", input, l) <ide> } <ide> <ide> return rl.Tasks[0], nil
2
Python
Python
fix error messages related to model saving
ff89e2de51e5ccdb7a68510d5539365002881b61
<ide><path>keras/engine/saving.py <ide> def get_json_type(obj): <ide> if type(obj).__name__ == type.__name__: <ide> return obj.__name__ <ide> <del> raise TypeError('Not JSON Serializable:', obj) <add> raise TypeError('Not JSON Serializable: %s' % (obj,)) <ide> <ide> from .. import __version__ as keras_version <ide> <ide><path>keras/utils/io_utils.py <ide> def __init__(self, path, mode='a'): <ide> # Flag to check if a dict is user defined data or a sub group: <ide> self.data['_is_group'] = True <ide> else: <del> raise TypeError('Required Group, str or dict.' <del> ' Received {}.'.format(type(path))) <add> raise TypeError('Required Group, str or dict. ' <add> 'Received: {}.'.format(type(path))) <ide> self.read_only = mode == 'r' <ide> <ide> def __setitem__(self, attr, val): <ide> if self.read_only: <del> raise ValueError('Can not set item in read only mode.') <add> raise ValueError('Cannot set item in read only mode.') <ide> is_np = type(val).__module__ == np.__name__ <ide> if isinstance(self.data, dict): <ide> if isinstance(attr, bytes): <ide> def __setitem__(self, attr, val): <ide> self.data[attr] = val <ide> return <ide> if attr in self: <del> raise KeyError('Can not set attribute.' <del> ' Group with name {} exists.'.format(attr)) <add> raise KeyError('Cannot set attribute. ' <add> 'Group with name "{}" exists.'.format(attr)) <ide> if is_np: <ide> dataset = self.data.create_dataset(attr, val.shape, dtype=val.dtype) <ide> if not val.shape: <ide> def __getitem__(self, attr): <ide> return val <ide> else: <ide> if self.read_only: <del> raise ValueError('Can not create group in read only mode.') <add> raise ValueError('Cannot create group in read only mode.') <ide> val = {'_is_group': True} <ide> self.data[attr] = val <ide> return H5Dict(val) <ide> def __getitem__(self, attr): <ide> chunk_attr = '%s%d' % (attr, chunk_id) <ide> else: <ide> if self.read_only: <del> raise ValueError('Can not create group in read only mode.') <add> raise ValueError('Cannot create group in read only mode.') <ide> val = H5Dict(self.data.create_group(attr)) <ide> return val <ide>
2
Python
Python
fix state tests a little
38a8cf1cdccb937297c7735aa73f6c02d468e7df
<ide><path>django/db/migrations/state.py <ide> def __init__(self, models=None): <ide> self.models = models or {} <ide> self.app_cache = None <ide> <add> def add_model_state(self, model_state): <add> self.models[(model_state.app_label, model_state.name.lower())] = model_state <add> <ide> def clone(self): <ide> "Returns an exact copy of this ProjectState" <ide> return ProjectState( <ide> def render(self): <ide> "Turns the project state into actual models in a new AppCache" <ide> if self.app_cache is None: <ide> self.app_cache = BaseAppCache() <del> for model in self.model.values: <add> for model in self.models.values(): <ide> model.render(self.app_cache) <ide> return self.app_cache <ide> <ide> def render(self, app_cache): <ide> meta = type("Meta", tuple(), meta_contents) <ide> # Then, work out our bases <ide> # TODO: Use the actual bases <del> if self.bases: <del> raise NotImplementedError("Custom bases not quite done yet!") <del> else: <del> bases = [models.Model] <ide> # Turn fields into a dict for the body, add other bits <ide> body = dict(self.fields) <ide> body['Meta'] = meta <ide> body['__module__'] = "__fake__" <ide> # Then, make a Model object <ide> return type( <ide> self.name, <del> tuple(bases), <add> tuple(self.bases), <ide> body, <ide> ) <ide><path>tests/migrations/test_state.py <ide> from django.test import TestCase <ide> from django.db import models <ide> from django.db.models.loading import BaseAppCache <del>from django.db.migrations.state import ProjectState <add>from django.db.migrations.state import ProjectState, ModelState <ide> <ide> <ide> class StateTests(TestCase): <ide> def test_create(self): <ide> """ <ide> Tests making a ProjectState from an AppCache <ide> """ <add> <ide> new_app_cache = BaseAppCache() <ide> <ide> class Author(models.Model): <ide> class Meta: <ide> self.assertEqual(author_state.fields[2][1].null, False) <ide> self.assertEqual(author_state.fields[3][1].null, True) <ide> self.assertEqual(author_state.bases, (models.Model, )) <add> <add> self.assertEqual(book_state.app_label, "migrations") <add> self.assertEqual(book_state.name, "Book") <add> self.assertEqual([x for x, y in book_state.fields], ["id", "title", "author"]) <add> self.assertEqual(book_state.fields[1][1].max_length, 1000) <add> self.assertEqual(book_state.fields[2][1].null, False) <add> self.assertEqual(book_state.bases, (models.Model, )) <add> <add> def test_render(self): <add> """ <add> Tests rendering a ProjectState into an AppCache. <add> """ <add> project_state = ProjectState() <add> project_state.add_model_state(ModelState( <add> "migrations", <add> "Tag", <add> [ <add> ("id", models.AutoField(primary_key=True)), <add> ("name", models.CharField(max_length=100)), <add> ("hidden", models.BooleanField()), <add> ], <add> {}, <add> None, <add> )) <add> <add> new_app_cache = project_state.render() <add> self.assertEqual(new_app_cache.get_model("migrations", "Tag")._meta.get_field_by_name("name")[0].max_length, 100) <add> self.assertEqual(new_app_cache.get_model("migrations", "Tag")._meta.get_field_by_name("hidden")[0].null, False)
2
Python
Python
reuse _validate_axis in ma
539d4f7ef561ac86ea4f3b81bf1eb9b3ac03b67f
<ide><path>numpy/ma/core.py <ide> ) <ide> from numpy import expand_dims as n_expand_dims <ide> from numpy.core.multiarray import normalize_axis_index <add>from numpy.core.numeric import _validate_axis <ide> <ide> <ide> if sys.version_info[0] >= 3: <ide> def count(self, axis=None, keepdims=np._NoValue): <ide> return np.array(self.size, dtype=np.intp, ndmin=self.ndim) <ide> return self.size <ide> <del> axes = axis if isinstance(axis, tuple) else (axis,) <del> axes = tuple(normalize_axis_index(a, self.ndim) for a in axes) <del> if len(axes) != len(set(axes)): <del> raise ValueError("duplicate value in 'axis'") <add> axes = _validate_axis(axis, self.ndim) <ide> items = 1 <ide> for ax in axes: <ide> items *= self.shape[ax] <ide><path>numpy/ma/extras.py <ide> from numpy import ndarray, array as nxarray <ide> import numpy.core.umath as umath <ide> from numpy.core.multiarray import normalize_axis_index <add>from numpy.core.numeric import _validate_axis <ide> from numpy.lib.function_base import _ureduce <ide> from numpy.lib.index_tricks import AxisConcatenator <ide> <ide> def compress_nd(x, axis=None): <ide> x = asarray(x) <ide> m = getmask(x) <ide> # Set axis to tuple of ints <del> if isinstance(axis, int): <del> axis = (axis,) <del> elif axis is None: <add> if axis is None: <ide> axis = tuple(range(x.ndim)) <del> elif not isinstance(axis, tuple): <del> raise ValueError('Invalid type for axis argument') <del> # Check axis input <del> axis = [ax + x.ndim if ax < 0 else ax for ax in axis] <del> if not all(0 <= ax < x.ndim for ax in axis): <del> raise ValueError("'axis' entry is out of bounds") <del> if len(axis) != len(set(axis)): <del> raise ValueError("duplicate value in 'axis'") <add> else: <add> axis = _validate_axis(axis, x.ndim) <add> <ide> # Nothing is masked: return x <ide> if m is nomask or not m.any(): <ide> return x._data
2
Go
Go
fix downlevel regression
f9b2a20819e7b29ce4dee46d87e8c32ae7ca9899
<ide><path>api/types/types.go <ide> import ( <ide> "github.com/docker/docker/api/types/registry" <ide> "github.com/docker/docker/api/types/swarm" <ide> "github.com/docker/go-connections/nat" <del> specs "github.com/opencontainers/image-spec/specs-go/v1" <ide> ) <ide> <ide> // RootFS returns Image's RootFS description including the layer IDs. <ide> type ContainerJSONBase struct { <ide> Name string <ide> RestartCount int <ide> Driver string <del> Platform specs.Platform <add> Platform string <ide> MountLabel string <ide> ProcessLabel string <ide> AppArmorProfile string <ide><path>daemon/inspect.go <ide> import ( <ide> "github.com/docker/docker/daemon/network" <ide> volumestore "github.com/docker/docker/volume/store" <ide> "github.com/docker/go-connections/nat" <del> specs "github.com/opencontainers/image-spec/specs-go/v1" <ide> ) <ide> <ide> // ContainerInspect returns low-level information about a <ide> func (daemon *Daemon) getInspectData(container *container.Container) (*types.Con <ide> Name: container.Name, <ide> RestartCount: container.RestartCount, <ide> Driver: container.Driver, <del> Platform: specs.Platform{OS: container.OS}, <add> Platform: container.OS, <ide> MountLabel: container.MountLabel, <ide> ProcessLabel: container.ProcessLabel, <ide> ExecIDs: container.GetExecIDs(),
2
Text
Text
add place holder for scene graph article
7a9f54c29a9be43c63fa196d715f498bced2a16c
<ide><path>threejs/lessons/threejs-scenegraph.md <add>Title: Three.js Scenegraph <add>Description: What's a scene graph? <add> <add>TBD <add>
1
Javascript
Javascript
fix trailing spaces
9f9de12aa18590b67bb46252169a5be2daeff2eb
<ide><path>src/text-editor.js <ide> module.exports = class TextEditor { <ide> this.getCursorBufferPosition() <ide> ); <ide> } <del> <add> <ide> // Extended: Get the range in buffer coordinates of all tokens surrounding the <ide> // given position in buffer coordinates that match the given scope selector. <ide> //
1
Text
Text
add tests to the shortener microservice project
1d2ff7aef651c83bbeb50bd593f122506bbad669
<ide><path>curriculum/challenges/english/05-apis-and-microservices/apis-and-microservices-projects/url-shortener-microservice.md <ide> Start this project on Repl.it using <a href='https://repl.it/github/freeCodeCamp <ide> <ide> ```yml <ide> tests: <del> - text: I can provide my own project, not the example URL. <add> - text: You should provide your own project, not the example URL. <ide> testString: | <ide> getUserInput => { <ide> assert(!/.*\/url-shortener-microservice\.freecodecamp\.rocks/.test(getUserInput('url'))); <ide> } <del> - text: I can pass a URL as a parameter and I will receive a shortened URL in the JSON response. <del> testString: '' <del> - text: 'If I pass an invalid URL that doesn''t follow the valid http://www.example.com format, the JSON response will contain an error instead.' <del> testString: '' <del> - text: 'When I visit that shortened URL, it will redirect me to my original link.' <del> testString: '' <ide> <add> - text: "You can POST a URL to `/api/shorturl/new` and get a JSON response with `original_url` and `short_url` properties. Here's an example: `{ original_url : 'https://freeCodeCamp.org', short_url : 1}`" <add> testString: "async getUserInput => { <add> const url = getUserInput('url'); <add> const urlVariable = Date.now(); <add> const res = await fetch(url + '/api/shorturl/new/', { <add> method: 'POST', <add> headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, <add> body: `url=https://timestamp-microservice.freecodecamp.rocks/${urlVariable}` <add> }); <add> <add> if (res.ok) { <add> const { short_url, original_url } = await res.json(); <add> assert.isNotNull(short_url); <add> assert.match(original_url, new RegExp(`https://timestamp-microservice.freecodecamp.rocks/${urlVariable}`)); <add> } else { <add> throw new Error(`${res.status} ${res.statusText}`); <add> } <add> } <add> " <add> <add> - text: When you visit `/api/shorturl/<short_url>`, you will be redirected to the original URL. <add> testString: "async getUserInput => { <add> const url = getUserInput('url'); <add> const urlVariable = Date.now(); <add> let shortenedUrlVariable; <add> <add> const postResponse = await fetch(url + '/api/shorturl/new/', { <add> method: 'POST', <add> headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, <add> body: `url=https://timestamp-microservice.freecodecamp.rocks/${urlVariable}` <add> }); <add> <add> if (postResponse.ok) { <add> const { short_url } = await postResponse.json(); <add> shortenedUrlVariable = short_url; <add> } else { <add> throw new Error(`${postResponse.status} ${postResponse.statusText}`); <add> } <add> <add> const getResponse = await fetch(url + '/api/shorturl/' + shortenedUrlVariable); <add> <add> if (getResponse) { <add> const { redirected, url } = getResponse; <add> <add> assert.isTrue(redirected); <add> assert.strictEqual(url, `https://timestamp-microservice.freecodecamp.rocks/${urlVariable}`); <add> } else { <add> throw new Error(`${getResponse.status} ${getResponse.statusText}`); <add> } <add> } <add> " <add> <add> - text: "If you pass an invalid URL that doesn't follow the valid `http://www.example.com` format, the JSON response will contain `{ error: 'invalid url' }`" <add> testString: "async getUserInput => { <add> const url = getUserInput('url'); <add> const res = await fetch(url + '/api/shorturl/new/', { <add> method: 'POST', <add> headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, <add> body: `url=ftp:/john-doe.org` <add> }); <add> <add> if (res.ok) { <add> const { error } = await res.json(); <add> assert.isNotNull(error); <add> assert.strictEqual(error.toLowerCase(), 'invalid url'); <add> } else { <add> throw new Error(`${res.status} ${res.statusText}`); <add> } <add> } <add> " <ide> ``` <ide> <ide> </section>
1
Text
Text
add info about installing cakehp/cache package
87c13db7290e321aa6cb60b3fb4c09104116729e
<ide><path>src/ORM/README.md <ide> ConnectionManager::config('default', [ <ide> 'driver' => 'Cake\Database\Driver\Mysql', <ide> 'database' => 'test', <ide> 'username' => 'root', <del> 'password' => 'secret' <add> 'password' => 'secret', <add> 'cacheMetaData' => false // If set to `true` you need to install the optional "cakephp/cache" package. <ide> ]); <ide> ``` <ide>
1
Mixed
Javascript
add reusedsocket property on client request
8915b15f8c367ef3ebb1299a57f482146825545b
<ide><path>doc/api/http.md <ide> Removes a header that's already defined into headers object. <ide> request.removeHeader('Content-Type'); <ide> ``` <ide> <add>### request.reusedSocket <add> <add><!-- YAML <add>added: REPLACEME <add>--> <add> <add>* {boolean} Whether the request is send through a reused socket. <add> <add>When sending request through a keep-alive enabled agent, the underlying socket <add>might be reused. But if server closes connection at unfortunate time, client <add>may run into a 'ECONNRESET' error. <add> <add>```js <add>const http = require('http'); <add> <add>// Server has a 5 seconds keep-alive timeout by default <add>http <add> .createServer((req, res) => { <add> res.write('hello\n'); <add> res.end(); <add> }) <add> .listen(3000); <add> <add>setInterval(() => { <add> // Adapting a keep-alive agent <add> http.get('http://localhost:3000', { agent }, (res) => { <add> res.on('data', (data) => { <add> // Do nothing <add> }); <add> }); <add>}, 5000); // Sending request on 5s interval so it's easy to hit idle timeout <add>``` <add> <add>By marking a request whether it reused socket or not, we can do <add>automatic error retry base on it. <add> <add>```js <add>const http = require('http'); <add>const agent = new http.Agent({ keepAlive: true }); <add> <add>function retriableRequest() { <add> const req = http <add> .get('http://localhost:3000', { agent }, (res) => { <add> // ... <add> }) <add> .on('error', (err) => { <add> // Check if retry is needed <add> if (req.reusedSocket && err.code === 'ECONNRESET') { <add> retriableRequest(); <add> } <add> }); <add>} <add> <add>retriableRequest(); <add>``` <add> <ide> ### request.setHeader(name, value) <ide> <!-- YAML <ide> added: v1.6.0 <ide><path>lib/_http_agent.js <ide> Agent.prototype.keepSocketAlive = function keepSocketAlive(socket) { <ide> <ide> Agent.prototype.reuseSocket = function reuseSocket(socket, req) { <ide> debug('have free socket'); <add> req.reusedSocket = true; <ide> socket.ref(); <ide> }; <ide> <ide><path>lib/_http_client.js <ide> function ClientRequest(input, options, cb) { <ide> this.upgradeOrConnect = false; <ide> this.parser = null; <ide> this.maxHeadersCount = null; <add> this.reusedSocket = false; <ide> <ide> var called = false; <ide> <ide><path>test/parallel/test-http-agent-keepalive.js <ide> function checkDataAndSockets(body) { <ide> <ide> function second() { <ide> // Request second, use the same socket <del> get('/second', common.mustCall((res) => { <add> const req = get('/second', common.mustCall((res) => { <add> assert.strictEqual(req.reusedSocket, true); <ide> assert.strictEqual(res.statusCode, 200); <ide> res.on('data', checkDataAndSockets); <ide> res.on('end', common.mustCall(() => { <ide> function second() { <ide> <ide> function remoteClose() { <ide> // Mock remote server close the socket <del> get('/remote_close', common.mustCall((res) => { <add> const req = get('/remote_close', common.mustCall((res) => { <add> assert.deepStrictEqual(req.reusedSocket, true); <ide> assert.deepStrictEqual(res.statusCode, 200); <ide> res.on('data', checkDataAndSockets); <ide> res.on('end', common.mustCall(() => { <ide> function remoteError() { <ide> server.listen(0, common.mustCall(() => { <ide> name = `localhost:${server.address().port}:`; <ide> // Request first, and keep alive <del> get('/first', common.mustCall((res) => { <add> const req = get('/first', common.mustCall((res) => { <add> assert.strictEqual(req.reusedSocket, false); <ide> assert.strictEqual(res.statusCode, 200); <ide> res.on('data', checkDataAndSockets); <ide> res.on('end', common.mustCall(() => {
4
Text
Text
fix typo in template.md
f3eaa05e0b4bfac58b26e43a3891ff494831ba73
<ide><path>examples/multi-part-library/template.md <ide> This example demonstrates how to build a complex library with webpack. The libra <ide> <ide> When using this library with script tags it exports itself to the namespace `MyLibrary` and each part to a property in this namespace (`MyLibrary.alpha` and `MyLibrary.beta`). When consuming the library with CommonsJs or AMD it just export each part. <ide> <del>We are using mutliple entry points (`entry` option) to build every part of the library as separate output file. The `output.filename` option contains `[name]` to give each output file a different name. <add>We are using multiple entry points (`entry` option) to build every part of the library as separate output file. The `output.filename` option contains `[name]` to give each output file a different name. <ide> <ide> We are using the `libraryTarget` option to generate a UMD ([Universal Module Definition](https://github.com/umdjs/umd)) module that is consumable in CommonsJs, AMD and with script tags. The `library` option defines the namespace. We are using `[name]` in the `library` option to give every entry a different namespace. <ide> <ide> Note: When your library has dependencies that should not be included in the comp <ide> <ide> ``` <ide> {{min:stdout}} <del>``` <ide>\ No newline at end of file <add>```
1
Ruby
Ruby
skip complete urls
2cc9b21c074c99dad95cebfb0ae2ed787b482123
<ide><path>actionpack/lib/action_view/helpers/asset_tag_helper.rb <ide> def image_tag(source, options = {}) <ide> def compute_public_path(source, dir, ext) <ide> source = "/#{dir}/#{source}" unless source.first == "/" || source.include?(":") <ide> source << ".#{ext}" unless source.split("/").last.include?(".") <del> source << '?' + rails_asset_id(source) if defined?(RAILS_ROOT) <add> source << '?' + rails_asset_id(source) if defined?(RAILS_ROOT) && %r{^[-a-z]+://} !~ source <ide> source = "#{@controller.request.relative_url_root}#{source}" unless %r{^[-a-z]+://} =~ source <ide> source = ActionController::Base.asset_host + source unless source.include?(":") <ide> source <ide><path>actionpack/test/template/asset_tag_helper_test.rb <ide> def test_timebased_asset_id <ide> expected_time = File.stat(File.expand_path(File.dirname(__FILE__) + "/../fixtures/public/images/rails.png")).mtime.to_i.to_s <ide> assert_equal %(<img alt="Rails" src="/images/rails.png?#{expected_time}" />), image_tag("rails.png") <ide> end <add> <add> def test_skipping_asset_id_on_complete_url <add> Object.send(:const_set, :RAILS_ROOT, File.dirname(__FILE__) + "/../fixtures/") <add> assert_equal %(<img alt="Rails" src="http://www.example.com/rails.png" />), image_tag("http://www.example.com/rails.png") <add> end <ide> <ide> def test_preset_asset_id <ide> Object.send(:const_set, :RAILS_ROOT, File.dirname(__FILE__) + "/../fixtures/")
2
Ruby
Ruby
fix error message on comparison validator
f83dbe358ef2226daa10e9335c0d08e5a8f27984
<ide><path>activemodel/lib/active_model/validations/comparability.rb <ide> def error_options(value, option_value) <ide> value: value <ide> ) <ide> end <del> <del> def error_value(record, option_value) <del> case option_value <del> when Proc <del> option_value(record, option_value) <del> else <del> option_value <del> end <del> end <ide> end <ide> end <ide> end <ide><path>activemodel/lib/active_model/validations/comparison.rb <ide> def check_validity! <ide> <ide> def validate_each(record, attr_name, value) <ide> options.slice(*COMPARE_CHECKS.keys).each do |option, raw_option_value| <add> option_value = option_value(record, raw_option_value) <add> <ide> if value.nil? || value.blank? <del> return record.errors.add(attr_name, :blank, **error_options(value, error_value(record, raw_option_value))) <add> return record.errors.add(attr_name, :blank, **error_options(value, option_value)) <ide> end <ide> <del> unless value.send(COMPARE_CHECKS[option], option_value(record, raw_option_value)) <del> record.errors.add(attr_name, option, **error_options(value, error_value(record, raw_option_value))) <add> unless value.send(COMPARE_CHECKS[option], option_value) <add> record.errors.add(attr_name, option, **error_options(value, option_value)) <ide> end <ide> rescue ArgumentError => e <ide> record.errors.add(attr_name, e.message) <ide><path>activemodel/test/cases/validations/comparison_validation_test.rb <ide> def test_validates_comparison_with_proc <ide> Topic.define_method(:requested) { Date.new(2020, 8, 1) } <ide> Topic.validates_comparison_of :approved, greater_than_or_equal_to: Proc.new(&:requested) <ide> <del> assert_invalid_values([Date.new(2020, 7, 1), Date.new(2019, 7, 1), DateTime.new(2020, 7, 1, 22, 34)]) <add> assert_invalid_values([Date.new(2020, 7, 1), Date.new(2019, 7, 1), DateTime.new(2020, 7, 1, 22, 34)], "must be greater than or equal to 2020-08-01") <ide> assert_valid_values([Date.new(2020, 8, 2), DateTime.new(2021, 8, 1)]) <ide> ensure <ide> Topic.remove_method :requested <ide> def test_validates_comparison_with_method <ide> Topic.define_method(:requested) { Date.new(2020, 8, 1) } <ide> Topic.validates_comparison_of :approved, greater_than_or_equal_to: :requested <ide> <del> assert_invalid_values([Date.new(2020, 7, 1), Date.new(2019, 7, 1), DateTime.new(2020, 7, 1, 22, 34)]) <add> assert_invalid_values([Date.new(2020, 7, 1), Date.new(2019, 7, 1), DateTime.new(2020, 7, 1, 22, 34)], "must be greater than or equal to 2020-08-01") <ide> assert_valid_values([Date.new(2020, 8, 2), DateTime.new(2021, 8, 1)]) <ide> ensure <ide> Topic.remove_method :requested <ide><path>activemodel/test/cases/validations/numericality_validation_test.rb <ide> def test_validates_numericality_with_proc <ide> Topic.define_method(:min_approved) { 5 } <ide> Topic.validates_numericality_of :approved, greater_than_or_equal_to: Proc.new(&:min_approved) <ide> <del> assert_invalid_values([3, 4]) <add> assert_invalid_values([3, 4], "must be greater than or equal to 5") <ide> assert_valid_values([5, 6]) <ide> ensure <ide> Topic.remove_method :min_approved <ide> def test_validates_numericality_with_symbol <ide> Topic.define_method(:max_approved) { 5 } <ide> Topic.validates_numericality_of :approved, less_than_or_equal_to: :max_approved <ide> <del> assert_invalid_values([6]) <add> assert_invalid_values([6], "must be less than or equal to 5") <ide> assert_valid_values([4, 5]) <ide> ensure <ide> Topic.remove_method :max_approved
4
Javascript
Javascript
update fixt logo in showcase
5f7b2e4085ec4052af67128a5bba1fa7be409e41
<ide><path>website/src/react-native/showcase.js <ide> var featured = [ <ide> }, <ide> { <ide> name: 'Fixt', <del> icon: 'http://a5.mzstatic.com/us/r30/Purple69/v4/46/bc/66/46bc66a2-7775-4d24-235d-e1fe28d55d7f/icon175x175.png', <add> icon: 'http://a5.mzstatic.com/us/r30/Purple62/v4/7f/b3/66/7fb366c4-79fd-34e1-3037-ffc02d8a93f7/icon350x350.png', <ide> linkAppStore: 'https://itunes.apple.com/us/app/dropbot-phone-replacement/id1000855694?mt=8', <ide> linkPlayStore: 'https://play.google.com/store/apps/details?id=co.fixt', <ide> infoLink: 'http://www.phonearena.com/news/Fixt-is-an-app-that-promises-a-hassle-free-smartphone-repairy-service_id81069',
1
Text
Text
update copyright 2016
04b2f021a6ba98c750c0013f9c8ff062661c6918
<ide><path>docs/index.md <ide> Send a description of the issue via email to [rest-framework-security@googlegrou <ide> <ide> ## License <ide> <del>Copyright (c) 2011-2015, Tom Christie <add>Copyright (c) 2011-2016, Tom Christie <ide> All rights reserved. <ide> <ide> Redistribution and use in source and binary forms, with or without
1
Text
Text
add history entry for exports patterns
78f2b11ecd24ecd72930f668e5617116fbe57337
<ide><path>doc/api/packages.md <ide> changes: <ide> - v13.7.0 <ide> pr-url: https://github.com/nodejs/node/pull/31008 <ide> description: Implement logical conditional exports ordering. <add> - version: <add> - v14.13.0 <add> pr-url: https://github.com/nodejs/node/pull/34718 <add> description: Add support for `"exports"` patterns. <ide> --> <ide> <ide> * Type: {Object} | {string} | {string[]}
1
Text
Text
point people to the right repo
eb20f594a2729254fddd53b56b5d769d7e105801
<ide><path>.github/ISSUE_TEMPLATE.md <ide> If Homebrew was updated on Aug 10-11th 2016 and `brew update` always says `Alrea <ide> - [ ] Ran `brew update` and retried your prior step? <ide> - [ ] Ran `brew doctor`, fixed as many issues as possible and retried your prior step? <ide> - [ ] If you're seeing permission errors tried running `sudo chown -R $(whoami) $(brew --prefix)`? <add>- [ ] Confirmed this is problem with Homebrew/brew and not specific formulae? If it's a formulae-specific problem please file this issue at https://github.com/Homebrew/homebrew-core/issues/new <ide> <ide> _You can erase any parts of this template not applicable to your Issue._ <ide>
1
Python
Python
solve an issue when screen size < 80 columns
74323a392aa0593e79049bb81ce4ddc2643c3efc
<ide><path>glances/glances.py <ide> def getNow(self): <ide> <ide> <ide> class GlancesStatsServer(GlancesStats): <add> <ide> def __init__(self): <ide> GlancesStats.__init__(self) <ide> <ide> def __update__(self, input_stats): <ide> <ide> <ide> class GlancesStatsClient(GlancesStats): <add> <ide> def __init__(self): <ide> GlancesStats.__init__(self) <ide> # Cached informations (no need to be refreshed) <ide> def displayMem(self, mem, memswap, proclist, offset_x=0): <ide> return 0 <ide> screen_x = self.screen.getmaxyx()[1] <ide> screen_y = self.screen.getmaxyx()[0] <add> memblocksize = 46 <add> extblocksize = 18 <ide> if (screen_y > self.mem_y + 5 and <del> screen_x > self.mem_x + offset_x + 38): <add> screen_x > self.mem_x + offset_x + memblocksize - extblocksize): <add> <ide> # RAM <ide> self.term_window.addnstr(self.mem_y, <ide> self.mem_x + offset_x, _("Mem"), 8, <ide> def displayMem(self, mem, memswap, proclist, offset_x=0): <ide> self.mem_y + 3, self.mem_x + offset_x + 7, <ide> format(self.__autoUnit(mem['free']), '>5'), 5) <ide> <del> # active and inactive (only available for psutil >= 0.6) <del> if psutil_mem_vm: <del> # active <del> self.term_window.addnstr(self.mem_y, <add> if (screen_x > self.mem_x + offset_x + memblocksize): <add> # Display extended informations if space is available <add> <add> # active and inactive (only available for psutil >= 0.6) <add> if psutil_mem_vm: <add> # active <add> self.term_window.addnstr(self.mem_y, <add> self.mem_x + offset_x + 14, <add> _("active:"), 7) <add> self.term_window.addnstr( <add> self.mem_y, self.mem_x + offset_x + 24, <add> format(self.__autoUnit(mem['active']), '>5'), 5) <add> <add> # inactive <add> self.term_window.addnstr(self.mem_y + 1, <add> self.mem_x + offset_x + 14, <add> _("inactive:"), 9) <add> self.term_window.addnstr( <add> self.mem_y + 1, self.mem_x + offset_x + 24, <add> format(self.__autoUnit(mem['inactive']), '>5'), 5) <add> <add> # buffers (Linux, BSD) <add> self.term_window.addnstr(self.mem_y + 2, <ide> self.mem_x + offset_x + 14, <del> _("active:"), 7) <add> _("buffers:"), 8) <ide> self.term_window.addnstr( <del> self.mem_y, self.mem_x + offset_x + 24, <del> format(self.__autoUnit(mem['active']), '>5'), 5) <add> self.mem_y + 2, self.mem_x + offset_x + 24, <add> format(self.__autoUnit(mem['buffers']), '>5'), 5) <ide> <del> # inactive <del> self.term_window.addnstr(self.mem_y + 1, <add> # cached (Linux, BSD) <add> self.term_window.addnstr(self.mem_y + 3, <ide> self.mem_x + offset_x + 14, <del> _("inactive:"), 9) <add> _("cached:"), 7) <ide> self.term_window.addnstr( <del> self.mem_y + 1, self.mem_x + offset_x + 24, <del> format(self.__autoUnit(mem['inactive']), '>5'), 5) <del> <del> # buffers (Linux, BSD) <del> self.term_window.addnstr(self.mem_y + 2, <del> self.mem_x + offset_x + 14, <del> _("buffers:"), 8) <del> self.term_window.addnstr( <del> self.mem_y + 2, self.mem_x + offset_x + 24, <del> format(self.__autoUnit(mem['buffers']), '>5'), 5) <del> <del> # cached (Linux, BSD) <del> self.term_window.addnstr(self.mem_y + 3, <del> self.mem_x + offset_x + 14, <del> _("cached:"), 7) <del> self.term_window.addnstr( <del> self.mem_y + 3, self.mem_x + offset_x + 24, <del> format(self.__autoUnit(mem['cached']), '>5'), 5) <add> self.mem_y + 3, self.mem_x + offset_x + 24, <add> format(self.__autoUnit(mem['cached']), '>5'), 5) <ide> <add> else: <add> # If space is NOT available then mind the gap... <add> offset_x -= extblocksize <add> <ide> # Swap <ide> self.term_window.addnstr(self.mem_y, <ide> self.mem_x + offset_x + 32, _("Swap"), 4, <ide> def getAll(self): <ide> self.__update__() <ide> return json.dumps(stats.getAll()) <ide> <add> def getSystem(self): <add> # Return operating system info <add> # No need to update... <add> #~ self.__update__() <add> return json.dumps(stats.getSystem()) <add> <add> def getCore(self): <add> # Update and return number of Core <add> self.__update__() <add> return json.dumps(stats.getCore()) <add> <ide> def getCpu(self): <ide> # Update and return CPU stats <ide> self.__update__()
1
Text
Text
update line 7 to change 'an' with 'a'
b9cb03252fc9e4e6b64bde076aefed2f6e816e04
<ide><path>docs/how-to-catch-outgoing-emails-locally.md <ide> <ide> ## Introduction <ide> <del>Some of the email workflows, like updating an user's email, requires the back-end api-server to send out emails. While developing you can use a tool to catch these emails locally, instead of having to use an email provider and send an actual email. MailHog is one such email testing tool for developers, that will catch the emails your local freeCodeCamp instance is sending. <add>Some of the email workflows, like updating a user's email, requires the back-end api-server to send out emails. While developing you can use a tool to catch these emails locally, instead of having to use an email provider and send an actual email. MailHog is one such email testing tool for developers, that will catch the emails your local freeCodeCamp instance is sending. <ide> <ide> ## Installing MailHog <ide> <ide> Any links in the email should be clickable. <ide> <ide> ## Useful Links <ide> <del>- For any other questions related to MailHog or for instructions on custom configurations, check out the [MailHog](https://github.com/mailhog/MailHog) repository. <ide>\ No newline at end of file <add>- For any other questions related to MailHog or for instructions on custom configurations, check out the [MailHog](https://github.com/mailhog/MailHog) repository.
1
Ruby
Ruby
update layout docs. closes [cheah chu yeow]
a3bfb661e3e8f8f03948cfc23f7dcc743cd06ab4
<ide><path>actionpack/lib/action_controller/layout.rb <ide> class << self <ide> # <ide> # // The header part of this layout <ide> # <%= yield %> <del> # // The footer part of this layout --> <add> # // The footer part of this layout <ide> # <ide> # And then you have content pages that look like this: <ide> # <ide> # hello world <ide> # <del> # Not a word about common structures. At rendering time, the content page is computed and then inserted in the layout, <del> # like this: <add> # At rendering time, the content page is computed and then inserted in the layout, like this: <ide> # <ide> # // The header part of this layout <ide> # hello world <del> # // The footer part of this layout --> <add> # // The footer part of this layout <add> # <add> # NOTE: The old notation for rendering the view from a layout was to expose the magic <tt>@content_for_layout</tt> instance <add> # variable. The preferred notation now is to use <tt>yield</tt>, as documented above. <ide> # <ide> # == Accessing shared variables <ide> # <ide> class << self <ide> # class WeblogController < ActionController::Base <ide> # layout "weblog_standard" <ide> # <del> # If no directory is specified for the template name, the template will by default be looked for in +app/views/layouts/+. <add> # If no directory is specified for the template name, the template will by default be looked for in <tt>app/views/layouts/</tt>. <ide> # Otherwise, it will be looked up relative to the template root. <ide> # <ide> # == Conditional layouts <ide> class << self <ide> # == Using a different layout in the action render call <ide> # <ide> # If most of your actions use the same layout, it makes perfect sense to define a controller-wide layout as described above. <del> # Some times you'll have exceptions, though, where one action wants to use a different layout than the rest of the controller. <del> # This is possible using the <tt>render</tt> method. It's just a bit more manual work as you'll have to supply fully <del> # qualified template and layout names as this example shows: <add> # Sometimes you'll have exceptions where one action wants to use a different layout than the rest of the controller. <add> # You can do this by passing a <tt>:layout</tt> option to the <tt>render</tt> call. For example: <ide> # <ide> # class WeblogController < ActionController::Base <add> # layout "weblog_standard" <add> # <ide> # def help <del> # render :action => "help/index", :layout => "help" <add> # render :action => "help", :layout => "help" <ide> # end <ide> # end <ide> # <del> # As you can see, you pass the template as the first parameter, the status code as the second ("200" is OK), and the layout <del> # as the third. <del> # <del> # NOTE: The old notation for rendering the view from a layout was to expose the magic <tt>@content_for_layout</tt> instance <del> # variable. The preferred notation now is to use <tt>yield</tt>, as documented above. <add> # This will render the help action with the "help" layout instead of the controller-wide "weblog_standard" layout. <ide> module ClassMethods <del> # If a layout is specified, all rendered actions will have their result rendered <add> # If a layout is specified, all rendered actions will have their result rendered <ide> # when the layout <tt>yield</tt>s. This layout can itself depend on instance variables assigned during action <ide> # performance and have access to them as any normal template would. <ide> def layout(template_name, conditions = {}, auto = false)
1