author
int64 4.98k
943k
| date
stringdate 2017-04-15 16:45:02
2022-02-25 15:32:15
| timezone
int64 -46,800
39.6k
| hash
stringlengths 40
40
| message
stringlengths 8
468
| mods
listlengths 1
16
| language
stringclasses 9
values | license
stringclasses 2
values | repo
stringclasses 119
values | original_message
stringlengths 12
491
| is_CCS
int64 1
1
| commit_type
stringclasses 129
values | commit_scope
stringlengths 1
44
⌀ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
448,095
|
16.10.2017 18:55:31
| 18,000
|
c0af605d7c68c86c6a1141374086fb558f3749c4
|
feat: allow empty package.json for 2ndary entries
|
[
{
"change_type": "MODIFY",
"diff": "@@ -3,6 +3,7 @@ import { NgPackageConfig } from '../../ng-package.schema';\nimport { NgPackageData, DEFAULT_BUILD_FOLDER } from '../model/ng-package-data';\nimport { NgArtifacts } from '../model/ng-artifacts';\nimport { copyFiles } from '../util/copy';\n+import { tryReadJson } from '../util/json';\nimport { readJson, writeJson, readdir, lstat, Stats } from 'fs-extra';\nimport { merge, isArray } from 'lodash';\nimport * as log from '../util/log';\n@@ -172,9 +173,13 @@ async function readSecondaryPackage(rootPackage: NgPackageData, filePath: string\nconst packageJsonFile = path.resolve(baseDirectory, 'package.json');\nlet ngPackage: NgPackageConfig = await readNgPackageFile(ngPackageFile);\n- const packageJson = await readJson(packageJsonFile);\n+ const packageJson: any = await tryReadJson(packageJsonFile);\nngPackage = merge(ngPackage, packageJson.ngPackage, arrayMergeLogic);\n+ if (!ngPackage.lib) {\n+ ngPackage.lib = {};\n+ }\n+\nngPackage.lib.externals = rootPackage.libExternals;\nreturn new NgPackageData(\n@@ -182,7 +187,7 @@ async function readSecondaryPackage(rootPackage: NgPackageData, filePath: string\nrootPackage.fullPackageName,\nrootPackage.destinationPath,\nbaseDirectory,\n- ngPackage\n+ rootPackage.libExternals\n);\n}\n",
"new_path": "src/lib/steps/package.ts",
"old_path": "src/lib/steps/package.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -18,9 +18,23 @@ export async function modifyJsonFiles(globPattern: string, modifyFn: (jsonObj: a\nawait Promise.all(\nfileNames.map(async (fileName: string): Promise<void> => {\n- const fileContent: any = await readJson(fileName);\n+ const fileContent: any = await tryReadJson(fileName);\nconst modified = modifyFn(fileContent);\nawait writeJson(fileName, modified);\n}\n));\n}\n+\n+/**\n+ * Read json and don't throw if json parsing fails.\n+ *\n+ * @param filePath Path to the file which is parsed.\n+ */\n+export async function tryReadJson(filePath: string): Promise<any> {\n+ try {\n+ return await readJson(filePath);\n+ } catch {\n+ // this means the file was empty or not json, which is fine\n+ return {};\n+ }\n+}\n",
"new_path": "src/lib/util/json.ts",
"old_path": "src/lib/util/json.ts"
}
] |
TypeScript
|
MIT License
|
ng-packagr/ng-packagr
|
feat: allow empty package.json for 2ndary entries
| 1
|
feat
| null |
448,095
|
16.10.2017 19:16:43
| 18,000
|
1c37efb8503930f33b218268a366983182769544
|
docs: document secondary empty package.json
|
[
{
"change_type": "MODIFY",
"diff": "@@ -109,10 +109,10 @@ src\nThe contents of the secondary `package.json` can be as simple as:\n```json\n-{}\n```\n-No, that is not a typo. No name is required. No version is required. It's all handled for you by ng-packagr!\n+No, that is not a typo. No name is required. No version is required. Not even a json object is required.\n+It's all handled for you by ng-packagr!\nWhen built, the secondary bundles would be accessible as `$(your-primary-package-name)/testing`.\n##### What if I don't like `public_api.ts`?\n",
"new_path": "README.md",
"old_path": "README.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -158,6 +158,7 @@ async function readRootPackage(filePath: string): Promise<NgPackageData> {\n// make sure we provide default values for src and dest\nfinalPackageConfig.src = finalPackageConfig.src || packageConfigurationDirectory;\nfinalPackageConfig.dest = finalPackageConfig.dest || path.resolve(packageConfigurationDirectory,'dist');\n+\nreturn new NgPackageData(\nfinalPackageConfig.src,\npkg.name,\n",
"new_path": "src/lib/steps/package.ts",
"old_path": "src/lib/steps/package.ts"
}
] |
TypeScript
|
MIT License
|
ng-packagr/ng-packagr
|
docs: document secondary empty package.json
| 1
|
docs
| null |
743,863
|
17.10.2017 23:21:04
| 25,200
|
4b8cfa9d307ec331bb01333fb9b157085da94fc4
|
docs: slight tweaks to CHANGELOG
|
[
{
"change_type": "MODIFY",
"diff": "@@ -8,14 +8,13 @@ All notable changes to this project will be documented in this file. See [standa\n### Bug Fixes\n-* config and normalise can be disabled with false ([#952](https://github.com/yargs/yargs/issues/952)) ([3bb8771](https://github.com/yargs/yargs/commit/3bb8771))\n+* config and normalize can be disabled with false ([#952](https://github.com/yargs/yargs/issues/952)) ([3bb8771](https://github.com/yargs/yargs/commit/3bb8771))\n* less eager help command execution ([#972](https://github.com/yargs/yargs/issues/972)) ([8c1d7bf](https://github.com/yargs/yargs/commit/8c1d7bf))\n* the positional argument parse was clobbering global flag arguments ([#984](https://github.com/yargs/yargs/issues/984)) ([7e58453](https://github.com/yargs/yargs/commit/7e58453))\n### Features\n-* **translation:** Update pl-PL translations ([#985](https://github.com/yargs/yargs/issues/985)) ([5a9c986](https://github.com/yargs/yargs/commit/5a9c986))\n* .usage() can now be used to configure a default command ([#975](https://github.com/yargs/yargs/issues/975)) ([7269531](https://github.com/yargs/yargs/commit/7269531))\n* hidden options are now explicitly indicated using \"hidden\" flag ([#962](https://github.com/yargs/yargs/issues/962)) ([280d0d6](https://github.com/yargs/yargs/commit/280d0d6))\n* introduce .positional() for configuring positional arguments ([#967](https://github.com/yargs/yargs/issues/967)) ([cb16460](https://github.com/yargs/yargs/commit/cb16460))\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
}
] |
JavaScript
|
MIT License
|
yargs/yargs
|
docs: slight tweaks to CHANGELOG
| 1
|
docs
| null |
743,863
|
17.10.2017 23:22:47
| 25,200
|
8515e4f5683fb783e6f6f994973207b553e527d5
|
docs: nit in CHANGELOG
|
[
{
"change_type": "MODIFY",
"diff": "@@ -18,7 +18,7 @@ All notable changes to this project will be documented in this file. See [standa\n* .usage() can now be used to configure a default command ([#975](https://github.com/yargs/yargs/issues/975)) ([7269531](https://github.com/yargs/yargs/commit/7269531))\n* hidden options are now explicitly indicated using \"hidden\" flag ([#962](https://github.com/yargs/yargs/issues/962)) ([280d0d6](https://github.com/yargs/yargs/commit/280d0d6))\n* introduce .positional() for configuring positional arguments ([#967](https://github.com/yargs/yargs/issues/967)) ([cb16460](https://github.com/yargs/yargs/commit/cb16460))\n-* replace /bin/bash with file basename ([#983](https://github.com/yargs/yargs/issues/983)) ([20bb99b](https://github.com/yargs/yargs/commit/20bb99b))\n+* replace $0 with file basename ([#983](https://github.com/yargs/yargs/issues/983)) ([20bb99b](https://github.com/yargs/yargs/commit/20bb99b))\n### BREAKING CHANGES\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
}
] |
JavaScript
|
MIT License
|
yargs/yargs
|
docs: nit in CHANGELOG
| 1
|
docs
| null |
791,887
|
18.10.2017 01:15:05
| -7,200
|
487bee6652fb3780f54bd05c4767fbd72eaca7cf
|
core(errors-in-console): include runtime exceptions
|
[
{
"change_type": "MODIFY",
"diff": "<!-- FAIL: block rendering -->\n<script src=\"./dbw_tester.js\"></script>\n+<!-- FAIL(errors-in-console): exception thrown -->\n+<script type=\"text/javascript\">throw new Error('An error');</script>\n+\n<style>\nbody {\ncolor: #000;\n",
"new_path": "lighthouse-cli/test/fixtures/dobetterweb/dbw_tester.html",
"old_path": "lighthouse-cli/test/fixtures/dobetterweb/dbw_tester.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -15,11 +15,11 @@ module.exports = [\naudits: {\n'errors-in-console': {\nscore: false,\n- rawValue: 3,\n- displayValue: '3',\n+ rawValue: 4,\n+ displayValue: '4',\ndetails: {\nitems: {\n- length: 3,\n+ length: 4,\n},\n},\n},\n",
"new_path": "lighthouse-cli/test/smokehouse/dobetterweb/dbw-expectations.js",
"old_path": "lighthouse-cli/test/smokehouse/dobetterweb/dbw-expectations.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -24,7 +24,7 @@ class ErrorLogs extends Audit {\nhelpText: 'Errors logged to the console indicate unresolved problems. ' +\n'They can come from network request failures and other browser concerns.',\nfailureDescription: 'Browser errors were logged to the console',\n- requiredArtifacts: ['ChromeConsoleMessages'],\n+ requiredArtifacts: ['ChromeConsoleMessages', 'RuntimeExceptions'],\n};\n}\n@@ -33,8 +33,11 @@ class ErrorLogs extends Audit {\n* @return {!AuditResult}\n*/\nstatic audit(artifacts) {\n- const entries = artifacts.ChromeConsoleMessages;\n- const tableRows = entries.filter(log => log.entry.level === 'error').map(item => {\n+ const consoleEntries = artifacts.ChromeConsoleMessages;\n+ const runtimeExceptions = artifacts.RuntimeExceptions;\n+ const consoleRows =\n+ consoleEntries.filter(log => log.entry && log.entry.level === 'error')\n+ .map(item => {\nreturn {\nsource: item.entry.source,\ndescription: item.entry.text,\n@@ -42,6 +45,18 @@ class ErrorLogs extends Audit {\n};\n});\n+ const runtimeExRows =\n+ runtimeExceptions.filter(entry => entry.exceptionDetails !== undefined)\n+ .map(entry => {\n+ return {\n+ source: 'Runtime.exception',\n+ description: entry.exceptionDetails.exception.description,\n+ url: entry.exceptionDetails.url,\n+ };\n+ });\n+\n+ const tableRows = consoleRows.concat(runtimeExRows);\n+\nconst headings = [\n{key: 'url', itemType: 'url', text: 'URL'},\n{key: 'description', itemType: 'text', text: 'Description'},\n",
"new_path": "lighthouse-core/audits/errors-in-console.js",
"old_path": "lighthouse-core/audits/errors-in-console.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -22,6 +22,7 @@ module.exports = {\n'viewport-dimensions',\n'theme-color',\n'manifest',\n+ 'runtime-exceptions',\n'chrome-console-messages',\n'image-usage',\n'accessibility',\n",
"new_path": "lighthouse-core/config/default.js",
"old_path": "lighthouse-core/config/default.js"
},
{
"change_type": "ADD",
"diff": "+/**\n+ * @license Copyright 2017 Google Inc. All Rights Reserved.\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n+ */\n+\n+/**\n+ * @fileoverview Gathers runtime exceptions.\n+ */\n+\n+'use strict';\n+\n+const Gatherer = require('./gatherer');\n+\n+class RuntimeExceptions extends Gatherer {\n+ constructor() {\n+ super();\n+ this._exceptions = [];\n+ this._onRuntimeExceptionThrown = this.onRuntimeExceptionThrown.bind(this);\n+ }\n+\n+ onRuntimeExceptionThrown(entry) {\n+ this._exceptions.push(entry);\n+ }\n+\n+ beforePass(options) {\n+ const driver = options.driver;\n+ driver.on('Runtime.exceptionThrown', this._onRuntimeExceptionThrown);\n+ }\n+\n+ afterPass(options) {\n+ return Promise.resolve()\n+ .then(_ => options.driver.off('Runtime.exceptionThrown', this._onRuntimeExceptionThrown))\n+ .then(_ => this._exceptions);\n+ }\n+}\n+\n+module.exports = RuntimeExceptions;\n",
"new_path": "lighthouse-core/gather/gatherers/runtime-exceptions.js",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -14,6 +14,7 @@ describe('Console error logs audit', () => {\nit('passes when no console messages were found', () => {\nconst auditResult = ErrorLogsAudit.audit({\nChromeConsoleMessages: [],\n+ RuntimeExceptions: [],\n});\nassert.equal(auditResult.rawValue, 0);\nassert.equal(auditResult.score, true);\n@@ -32,6 +33,7 @@ describe('Console error logs audit', () => {\n},\n},\n],\n+ RuntimeExceptions: [],\n});\nassert.equal(auditResult.rawValue, 0);\nassert.equal(auditResult.score, true);\n@@ -57,10 +59,31 @@ describe('Console error logs audit', () => {\n},\n},\n],\n+ RuntimeExceptions: [{\n+ 'timestamp': 1506535813608.003,\n+ 'exceptionDetails': {\n+ 'url': 'http://example.com/fancybox.js',\n+ 'stackTrace': {\n+ 'callFrames': [\n+ {\n+ 'url': 'http://example.com/fancybox.js',\n+ 'lineNumber': 28,\n+ 'columnNumber': 20,\n+ },\n+ ],\n+ },\n+ 'exception': {\n+ 'className': 'TypeError',\n+ 'description': 'TypeError: Cannot read property \\'msie\\' of undefined',\n+ },\n+ 'executionContextId': 3,\n+ },\n+ }],\n});\n- assert.equal(auditResult.rawValue, 2);\n+\n+ assert.equal(auditResult.rawValue, 3);\nassert.equal(auditResult.score, false);\n- assert.equal(auditResult.details.items.length, 2);\n+ assert.equal(auditResult.details.items.length, 3);\nassert.equal(auditResult.details.items[0][0].type, 'url');\nassert.equal(auditResult.details.items[0][0].text, 'http://www.example.com/favicon.ico');\nassert.equal(auditResult.details.items[0][1].type, 'text');\n@@ -71,6 +94,12 @@ describe('Console error logs audit', () => {\nassert.equal(auditResult.details.items[1][1].type, 'text');\nassert.equal(auditResult.details.items[1][1].text,\n'WebSocket connection failed: Unexpected response code: 500');\n+ assert.equal(auditResult.details.items[2][0].type, 'url');\n+ assert.equal(auditResult.details.items[2][0].text,\n+ 'http://example.com/fancybox.js');\n+ assert.equal(auditResult.details.items[2][1].type, 'text');\n+ assert.equal(auditResult.details.items[2][1].text,\n+ 'TypeError: Cannot read property \\'msie\\' of undefined');\n});\nit('handle the case when some logs fields are undefined', () => {\n@@ -82,6 +111,7 @@ describe('Console error logs audit', () => {\n},\n},\n],\n+ RuntimeExceptions: [],\n});\nassert.equal(auditResult.rawValue, 1);\nassert.equal(auditResult.score, false);\n",
"new_path": "lighthouse-core/test/audits/errors-in-console-test.js",
"old_path": "lighthouse-core/test/audits/errors-in-console-test.js"
},
{
"change_type": "ADD",
"diff": "+/**\n+* @license Copyright 2017 Google Inc. All Rights Reserved.\n+* Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n+ */\n+'use strict';\n+\n+/* eslint-env mocha */\n+\n+const RuntimeExceptionsGatherer = require('../../../gather/gatherers/runtime-exceptions');\n+const assert = require('assert');\n+\n+const mockDriver = {\n+ off() {},\n+};\n+\n+const wrapSendCommand = (mockDriver, runtimeEx) => {\n+ mockDriver = Object.assign({}, mockDriver);\n+\n+ mockDriver.on = (name, cb) => {\n+ if (name === 'Runtime.exceptionThrown') {\n+ cb(runtimeEx);\n+ }\n+ };\n+\n+ mockDriver.sendCommand = () => {\n+ return Promise.resolve();\n+ };\n+\n+ return mockDriver;\n+};\n+\n+describe('RuntimeExceptions', () => {\n+ it('captures the exceptions raised', () => {\n+ const runtimeExceptionsGatherer = new RuntimeExceptionsGatherer();\n+ const runtimeEx =\n+ {\n+ 'timestamp': 1506535813608.003,\n+ 'exceptionDetails': {\n+ 'url': 'http://www.example.com/fancybox.js',\n+ 'stackTrace': {\n+ 'callFrames': [\n+ {\n+ 'url': 'http://www.example.com/fancybox.js',\n+ 'lineNumber': 28,\n+ 'columnNumber': 20,\n+ },\n+ ],\n+ },\n+ 'exception': {\n+ 'className': 'TypeError',\n+ 'description': 'TypeError: Cannot read property \\'msie\\' of undefined',\n+ },\n+ 'executionContextId': 3,\n+ },\n+ };\n+\n+ const options = {\n+ driver: wrapSendCommand(mockDriver, runtimeEx),\n+ };\n+\n+ return Promise.resolve(\n+ runtimeExceptionsGatherer.beforePass(options))\n+ .then(_ => runtimeExceptionsGatherer.afterPass(options))\n+ .then((artifact) => {\n+ assert.equal(artifact[0].exceptionDetails.exception.description,\n+ `TypeError: Cannot read property 'msie' of undefined`);\n+ assert.equal(artifact[0].exceptionDetails.url,\n+ 'http://www.example.com/fancybox.js');\n+ });\n+ });\n+});\n",
"new_path": "lighthouse-core/test/gather/gatherers/runtime-exceptions-test.js",
"old_path": null
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(errors-in-console): include runtime exceptions (#3494)
| 1
|
core
|
errors-in-console
|
743,987
|
18.10.2017 06:41:55
| -7,200
|
47b3078e4f7c5a73ba06b37b3c2e2003a4384734
|
chore: update Dutch Translation
|
[
{
"change_type": "MODIFY",
"diff": "\"Path to JSON config file\": \"Pad naar JSON configuratiebestand\",\n\"Show help\": \"Toon help\",\n\"Show version number\": \"Toon versie nummer\",\n- \"Did you mean %s?\": \"Bedoelde u misschien %s?\"\n+ \"Did you mean %s?\": \"Bedoelde u misschien %s?\",\n+ \"Arguments %s and %s are mutually exclusive\": \"Argumenten %s en %s zijn onderling uitsluitend\",\n+ \"Positionals:\": \"Positie-afhankelijke argumenten\",\n+ \"command\": \"commando\"\n}\n",
"new_path": "locales/nl.json",
"old_path": "locales/nl.json"
}
] |
JavaScript
|
MIT License
|
yargs/yargs
|
chore: update Dutch Translation (#981)
| 1
|
chore
| null |
448,039
|
18.10.2017 09:17:57
| -7,200
|
60305f71da463f6fd7db9085dfbb2d82b2c7bcc9
|
chore: cut release for v1.5.0-rc.0
|
[
{
"change_type": "MODIFY",
"diff": "All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.\n+<a name=\"1.5.0-rc.0\"></a>\n+# [1.5.0-rc.0](https://github.com/dherges/ng-packagr/compare/v1.4.1...v1.5.0-rc.0) (2017-10-18)\n+\n+\n+### Bug Fixes\n+\n+* regression in cli defaults ([18515af](https://github.com/dherges/ng-packagr/commit/18515af))\n+\n+\n+### Features\n+\n+* allow empty package.json for 2ndary entries ([c0af605](https://github.com/dherges/ng-packagr/commit/c0af605))\n+* dynamic secondary entry points ([5922cb1](https://github.com/dherges/ng-packagr/commit/5922cb1))\n+* help command on cli ([c68a190](https://github.com/dherges/ng-packagr/commit/c68a190))\n+\n+\n+\n<a name=\"1.4.1\"></a>\n## [1.4.1](https://github.com/dherges/ng-packagr/compare/v1.4.0...v1.4.1) (2017-10-11)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"ng-packagr\",\n- \"version\": \"1.4.1\",\n+ \"version\": \"1.5.0-rc.0\",\n\"description\": \"Compile and package a TypeScript library to Angular Package Format\",\n\"keywords\": [\n\"angular\",\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
TypeScript
|
MIT License
|
ng-packagr/ng-packagr
|
chore: cut release for v1.5.0-rc.0
| 1
|
chore
| null |
573,208
|
18.10.2017 16:58:45
| -7,200
|
a43aa60f090d29b8e66a58a9656126cb37bf2ef9
|
fix(npm): remove unleash dependency
|
[
{
"change_type": "MODIFY",
"diff": "@@ -49,6 +49,6 @@ Cutting a release is currently a manual process. We use a [Conventional Changelo\n```\n$ git fetch\n$ git pull origin master # ensure you have the latest changes\n-$ unleash [-p for patch, -m for minor, -M for major] -d # do a dry run to verify\n-$ unleash [-p for patch, -m for minor, -M for major]\n+$ npx unleash [-p for patch, -m for minor, -M for major] -d # do a dry run to verify\n+$ npx unleash [-p for patch, -m for minor, -M for major]\n```\n",
"new_path": "CONTRIBUTING.md",
"old_path": "CONTRIBUTING.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"restify\",\n- \"version\": \"6.0.1\",\n+ \"version\": \"6.2.0\",\n\"lockfileVersion\": 1,\n\"requires\": true,\n\"dependencies\": {\n\"moment\": {\n\"version\": \"2.18.1\",\n\"resolved\": \"https://artifacts.netflix.com/api/npm/npm-netflix/moment/-/moment-2.18.1.tgz\",\n- \"integrity\": \"sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8=\",\n- \"optional\": true\n+ \"integrity\": \"sha1-w2GT3Tzhwu7SrbfIAtu8d6gbHA8=\"\n},\n\"ms\": {\n\"version\": \"2.0.0\",\n\"version\": \"0.3.1\",\n\"resolved\": \"https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz\",\n\"integrity\": \"sha1-9TsFJmqLGguTSz0IIebi3FkUriM=\",\n- \"dev\": true,\n- \"requires\": {\n- \"colors\": \"1.0.3\"\n- }\n+ \"dev\": true\n},\n\"cvss\": {\n\"version\": \"1.0.2\",\n\"integrity\": \"sha1-NffabEjOTdv6JkiRrFk+5f+GceY=\",\n\"dev\": true,\n\"requires\": {\n- \"agent-base\": \"2.1.1\",\n- \"debug\": \"2.6.9\",\n+ \"debug\": \"2.6.8\",\n\"extend\": \"3.0.1\"\n}\n},\n\"integrity\": \"sha1-TVDDGAeRIgAP5fFq8f+OGRe3fgY=\",\n\"dev\": true,\n\"requires\": {\n- \"hoek\": \"2.16.3\",\n- \"isemail\": \"1.2.0\",\n- \"moment\": \"2.18.1\",\n- \"topo\": \"1.1.0\"\n+ \"moment\": \"2.18.1\"\n}\n},\n\"nodesecurity-npm-utils\": {\n\"version\": \"6.3.0\",\n\"resolved\": \"https://registry.npmjs.org/wreck/-/wreck-6.3.0.tgz\",\n\"integrity\": \"sha1-oTaXafB7u2LWo3gzanhx/Hc8dAs=\",\n- \"dev\": true,\n- \"requires\": {\n- \"boom\": \"2.10.1\",\n- \"hoek\": \"2.16.3\"\n- }\n+ \"dev\": true\n}\n}\n},\n",
"new_path": "package-lock.json",
"old_path": "package-lock.json"
},
{
"change_type": "MODIFY",
"diff": "\"restify-errors\": \"^5.0.0\",\n\"semver\": \"^5.0.1\",\n\"spdy\": \"^3.3.3\",\n- \"unleash\": \"^1.6.1\",\n\"uuid\": \"^3.0.0\",\n\"vasync\": \"^1.6.4\",\n\"verror\": \"^1.9.0\"\n\"filed\": \"^0.1.0\",\n\"istanbul\": \"^0.4.1\",\n\"jscs\": \"^3.0.0\",\n- \"lodash\": \"^4.17.4\",\n\"mkdirp\": \"^0.5.1\",\n\"mocha\": \"^3.2.0\",\n\"nodeunit\": \"^0.11.0\",\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
JavaScript
|
MIT License
|
restify/node-restify
|
fix(npm): remove unleash dependency (#1522)
| 1
|
fix
|
npm
|
573,227
|
18.10.2017 20:57:22
| -7,200
|
082baef205af52772d91cd9a09db69e999969c07
|
chore(docs): remove watch
|
[
{
"change_type": "MODIFY",
"diff": "@@ -31,7 +31,6 @@ NODE := node\n#\n# Files\n#\n-DOC_FILES_TO_WATCH = ./lib/index.js ./lib/server.js ./lib/plugins/audit.js ./lib/plugins/metrics.js ./lib/plugins/jsonp.js\nJS_FILES = '.'\nCLEAN_FILES += node_modules cscope.files\n@@ -72,9 +71,5 @@ nsp: node_modules $(NSP)\ndocs-build:\n@($(NODE) $(DOCS_BUILD))\n-.PHONY: docs-watch\n-docs-watch:\n- @($(DOCUMENTATION) serve $(DOC_FILES_TO_WATCH) --shallow --config docs/config/watch.yaml --watch)\n-\ninclude ./tools/mk/Makefile.deps\ninclude ./tools/mk/Makefile.targ\n",
"new_path": "Makefile",
"old_path": "Makefile"
},
{
"change_type": "DELETE",
"diff": "-toc:\n- - createServer\n- - Server\n- - name: Events\n- file: ../api/server-events.md\n- - name: Errors\n- file: ../api/server-errors.md\n- - name: Plugins\n- description: |\n- Restify comes bundled with a selection of useful plugins. These are accessible\n- off of `restify.plugins` and `restify.pre`.\n- - auditLogger\n- - createMetrics\n- - jsonp\n- - name: Types\n- - Server~methodOpts\n- - createMetrics~callback\n",
"new_path": null,
"old_path": "docs/config/watch.yaml"
}
] |
JavaScript
|
MIT License
|
restify/node-restify
|
chore(docs): remove watch
| 1
|
chore
|
docs
|
791,690
|
19.10.2017 14:22:20
| 25,200
|
74ae043c6d4c4a5b22522a5bb824386cc21da4a2
|
core(dependency-graph): add acyclic check
|
[
{
"change_type": "MODIFY",
"diff": "@@ -231,6 +231,10 @@ class PageDependencyGraphArtifact extends ComputedArtifact {\nPageDependencyGraphArtifact.linkNetworkNodes(rootNode, networkNodeOutput, networkRecords);\nPageDependencyGraphArtifact.linkCPUNodes(rootNode, networkNodeOutput, cpuNodes);\n+ if (NetworkNode.hasCycle(rootNode)) {\n+ throw new Error('Invalid dependency graph created, cycle detected');\n+ }\n+\nreturn rootNode;\n}\n",
"new_path": "lighthouse-core/gather/computed/page-dependency-graph.js",
"old_path": "lighthouse-core/gather/computed/page-dependency-graph.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -81,14 +81,8 @@ class Node {\n*/\ngetRootNode() {\nlet rootNode = this;\n- let maxDepth = 1000;\n- while (rootNode._dependencies.length && maxDepth) {\n+ while (rootNode._dependencies.length) {\nrootNode = rootNode._dependencies[0];\n- maxDepth--;\n- }\n-\n- if (!maxDepth) {\n- throw new Error('Maximum depth exceeded: getRootNode');\n}\nreturn rootNode;\n@@ -211,6 +205,45 @@ class Node {\nthis._traversePaths(iterator, getNext);\n}\n+\n+ /**\n+ * Returns whether the given node has a cycle in its dependent graph by performing a DFS.\n+ * @param {!Node} node\n+ * @return {boolean}\n+ */\n+ static hasCycle(node) {\n+ const visited = new Set();\n+ const currentPath = [];\n+ const toVisit = [node];\n+ const depthAdded = new Map([[node, 0]]);\n+\n+ // Keep going while we have nodes to visit in the stack\n+ while (toVisit.length) {\n+ // Get the last node in the stack (DFS uses stack, not queue)\n+ const currentNode = toVisit.pop();\n+\n+ // We've hit a cycle if the node we're visiting is in our current dependency path\n+ if (currentPath.includes(currentNode)) return true;\n+ // If we've already visited the node, no need to revisit it\n+ if (visited.has(currentNode)) continue;\n+\n+ // Since we're visiting this node, clear out any nodes in our path that we had to backtrack\n+ while (currentPath.length > depthAdded.get(currentNode)) currentPath.pop();\n+\n+ // Update our data structures to reflect that we're adding this node to our path\n+ visited.add(currentNode);\n+ currentPath.push(currentNode);\n+\n+ // Add all of its dependents to our toVisit stack\n+ for (const dependent of currentNode._dependents) {\n+ if (toVisit.includes(dependent)) continue;\n+ toVisit.push(dependent);\n+ depthAdded.set(dependent, currentPath.length);\n+ }\n+ }\n+\n+ return false;\n+ }\n}\nNode.TYPES = {\n",
"new_path": "lighthouse-core/lib/dependency-graph/node.js",
"old_path": "lighthouse-core/lib/dependency-graph/node.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -365,7 +365,6 @@ class Simulator {\nconst rootNode = this._graph.getRootNode();\nrootNode.traverse(node => nodesNotReadyToStart.add(node));\n- let depth = 0;\nlet totalElapsedTime = 0;\n// root node is always ready to start\n@@ -373,8 +372,6 @@ class Simulator {\n// loop as long as we have nodes in the queue or currently in progress\nwhile (nodesReadyToStart.size || nodesInProgress.size) {\n- depth++;\n-\n// move all possible queued nodes to in progress\nfor (const node of nodesReadyToStart) {\nthis._startNodeIfPossible(node, totalElapsedTime);\n@@ -391,14 +388,6 @@ class Simulator {\nfor (const node of nodesInProgress) {\nthis._updateProgressMadeInTimePeriod(node, minimumTime, totalElapsedTime);\n}\n-\n- if (depth > 10000) {\n- throw new Error('Maximum depth exceeded: estimate');\n- }\n- }\n-\n- if (nodesNotReadyToStart.size !== 0) {\n- throw new Error(`Cycle detected: ${nodesNotReadyToStart.size} unused nodes`);\n}\nreturn {\n",
"new_path": "lighthouse-core/lib/dependency-graph/simulator/simulator.js",
"old_path": "lighthouse-core/lib/dependency-graph/simulator/simulator.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -218,4 +218,78 @@ describe('DependencyGraph/Node', () => {\nassert.deepEqual(ids, ['F', 'E', 'D', 'B', 'C', 'A']);\n});\n});\n+\n+ describe('#hasCycle', () => {\n+ it('should return false for DAGs', () => {\n+ const graph = createComplexGraph();\n+ assert.equal(Node.hasCycle(graph.nodeA), false);\n+ });\n+\n+ it('should return false for triangular DAGs', () => {\n+ // B\n+ // / \\\n+ // A - C\n+ const nodeA = new Node('A');\n+ const nodeB = new Node('B');\n+ const nodeC = new Node('C');\n+\n+ nodeA.addDependent(nodeC);\n+ nodeA.addDependent(nodeB);\n+ nodeB.addDependent(nodeC);\n+\n+ assert.equal(Node.hasCycle(nodeA), false);\n+ });\n+\n+ it('should return true for basic cycles', () => {\n+ const nodeA = new Node('A');\n+ const nodeB = new Node('B');\n+ const nodeC = new Node('C');\n+\n+ nodeA.addDependent(nodeB);\n+ nodeB.addDependent(nodeC);\n+ nodeC.addDependent(nodeA);\n+\n+ assert.equal(Node.hasCycle(nodeA), true);\n+ });\n+\n+ it('should return true for complex cycles', () => {\n+ // B - D - F - G - C!\n+ // / /\n+ // A - - C - E - H\n+ const nodeA = new Node('A');\n+ const nodeB = new Node('B');\n+ const nodeC = new Node('C');\n+ const nodeD = new Node('D');\n+ const nodeE = new Node('E');\n+ const nodeF = new Node('F');\n+ const nodeG = new Node('G');\n+ const nodeH = new Node('H');\n+\n+ nodeA.addDependent(nodeB);\n+ nodeA.addDependent(nodeC);\n+ nodeB.addDependent(nodeD);\n+ nodeC.addDependent(nodeE);\n+ nodeC.addDependent(nodeF);\n+ nodeD.addDependent(nodeF);\n+ nodeE.addDependent(nodeH);\n+ nodeF.addDependent(nodeG);\n+ nodeG.addDependent(nodeC);\n+\n+ assert.equal(Node.hasCycle(nodeA), true);\n+ });\n+\n+ it('works for very large graphs', () => {\n+ const root = new Node('root');\n+\n+ let lastNode = root;\n+ for (let i = 0; i < 10000; i++) {\n+ const nextNode = new Node(`child${i}`);\n+ lastNode.addDependent(nextNode);\n+ lastNode = nextNode;\n+ }\n+\n+ lastNode.addDependent(root);\n+ assert.equal(Node.hasCycle(root), true);\n+ });\n+ });\n});\n",
"new_path": "lighthouse-core/test/lib/dependency-graph/node-test.js",
"old_path": "lighthouse-core/test/lib/dependency-graph/node-test.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(dependency-graph): add acyclic check (#3592)
| 1
|
core
|
dependency-graph
|
573,204
|
19.10.2017 19:52:35
| -7,200
|
2d0d3c12d000acfa454b01bd68a848c9b64b7179
|
docs(FEATURE_REQUESTS.md): spelling fix
|
[
{
"change_type": "MODIFY",
"diff": "@@ -52,7 +52,7 @@ start!\n* [Document all client options][1326]\n* [Client tunneling vs. proxying][1327]\n* [Explain why Restify is great!][927]\n-* [`BasicAut` examples][1099]\n+* [`BasicAuth` examples][1099]\n* [Document `next` behaviour][1068]\n* [Remove defaultResponseHeaders][1040]\n* [Properly document req.accepts][957]\n",
"new_path": "FEATURE_REQUESTS.md",
"old_path": "FEATURE_REQUESTS.md"
}
] |
JavaScript
|
MIT License
|
restify/node-restify
|
docs(FEATURE_REQUESTS.md): spelling fix (#1534)
| 1
|
docs
|
FEATURE_REQUESTS.md
|
743,863
|
20.10.2017 15:56:48
| 25,200
|
4043c16865cca959c7fc984630c7772de9a793d4
|
docs: add note about options
|
[
{
"change_type": "MODIFY",
"diff": "@@ -1095,6 +1095,7 @@ Valid `opt` keys include:\n- `alias`: string or array of strings, see [`alias()`](#alias)\n- `choices`: value or array of values, limit valid option arguments to a predefined set, see [`choices()`](#choices)\n- `coerce`: function, coerce or transform parsed command line values into another value, see [`coerce()`](#coerce)\n+ - `hidden`: don't display option in help output.\n- `conflicts`: string or object, require certain keys not to be set, see [`conflicts()`](#conflicts)\n- `default`: value, set a default value for the option, see [`default()`](#default)\n- `desc`/`describe`/`description`: string, the option description for help content, see [`describe()`](#describe)\n",
"new_path": "docs/api.md",
"old_path": "docs/api.md"
}
] |
JavaScript
|
MIT License
|
yargs/yargs
|
docs: add note about options
| 1
|
docs
| null |
743,863
|
20.10.2017 16:10:31
| 25,200
|
532c60ebc2067a13daa0cd178108cf5ee630e90f
|
docs: describe hidden option in right place
|
[
{
"change_type": "MODIFY",
"diff": "@@ -1002,6 +1002,7 @@ Valid `opt` keys include:\n- `desc`/`describe`/`description`: string, the option description for help content, see [`describe()`](#describe)\n- `global`: boolean, indicate that this key should not be [reset](#reset) when a command is invoked, see [`global()`](#global)\n- `group`: string, when displaying usage instructions place the option under an alternative group heading, see [`group()`](#group)\n+- `hidden`: don't display option in help output.\n- `implies`: string or object, require certain keys to be set, see [`implies()`](#implies)\n- `nargs`: number, specify how many arguments should be consumed for the option, see [`nargs()`](#nargs)\n- `normalize`: boolean, apply `path.normalize()` to the option, see [`normalize()`](#normalize)\n@@ -1095,7 +1096,6 @@ Valid `opt` keys include:\n- `alias`: string or array of strings, see [`alias()`](#alias)\n- `choices`: value or array of values, limit valid option arguments to a predefined set, see [`choices()`](#choices)\n- `coerce`: function, coerce or transform parsed command line values into another value, see [`coerce()`](#coerce)\n- - `hidden`: don't display option in help output.\n- `conflicts`: string or object, require certain keys not to be set, see [`conflicts()`](#conflicts)\n- `default`: value, set a default value for the option, see [`default()`](#default)\n- `desc`/`describe`/`description`: string, the option description for help content, see [`describe()`](#describe)\n",
"new_path": "docs/api.md",
"old_path": "docs/api.md"
}
] |
JavaScript
|
MIT License
|
yargs/yargs
|
docs: describe hidden option in right place
| 1
|
docs
| null |
743,863
|
20.10.2017 17:55:36
| 25,200
|
d1cbc75c6491e52c1236a7b67b1718a0017f00ea
|
docs: be more shameless about gratipay
|
[
{
"change_type": "MODIFY",
"diff": "# Yargs\n+_Yargs is developed on evenings and weekends by\n+volunteers. Why not grab them dinner or a drink?_\n+\n+[](https://gratipay.com/yargs/)\n+\n[![Build Status][travis-image]][travis-url]\n[![Coverage Status][coveralls-image]][coveralls-url]\n[![NPM version][npm-image]][npm-url]\n",
"new_path": "README.md",
"old_path": "README.md"
}
] |
JavaScript
|
MIT License
|
yargs/yargs
|
docs: be more shameless about gratipay
| 1
|
docs
| null |
815,745
|
20.10.2017 21:40:53
| -10,800
|
4149375dcccaa7e860c8542e92bb4c78d9042e86
|
feat(tagging): allow creating new options
closes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -85,7 +85,7 @@ map: {\n- [x] Good base functionality test coverage\n- [x] Multiselect support\n- [x] Autocomplete\n-- [ ] Custom tags\n+- [x] Custom tags\n- [ ] Accessibility\n## API\n@@ -95,6 +95,8 @@ map: {\n| bindLabel | string | `label` | no | Object property to use for label. Default `label` |\n| bindValue | string | `-` | no | Object property to use for selected model. By default binds to whole object. |\n| [clearable] | boolean | `true` | no | Allow to clear selected value. Default `true`|\n+| multiple | boolean | `false` | no | Allows to select multiple items. |\n+| [addTag] | Function or boolean | `false` | no | Using boolean simply adds tag with value as bindLabel. If you want custom properties add function which returns object. |\n| placeholder | string | `-` | no | Placeholder text. |\n| notFoundText | string | `No items found` | no | Set custom text when filter returns empty result |\n| typeToSearchText | string | `Type to search` | no | Set custom text when using Typeahead |\n@@ -108,7 +110,7 @@ map: {\n| (open) | Fired on select dropdown open |\n| (close) | Fired on select dropdown close |\n-# Change Detection\n+## Change Detection\nNg-select component implements `OnPush` change detection which means the dirty checking checks for immutable\ndata types. That means if you do object mutations like:\n",
"new_path": "README.md",
"old_path": "README.md"
},
{
"change_type": "MODIFY",
"diff": "<a class=\"nav-link\" routerLink=\"/forms\" routerLinkActive=\"active\">Reactive forms</a>\n</li>\n<li class=\"nav-item\">\n- <a class=\"nav-link\" routerLink=\"/filter-client\" routerLinkActive=\"active\">Filter <small>(client side)</small></a>\n+ <a class=\"nav-link\" routerLink=\"/filter\" routerLinkActive=\"active\">Filter and autocomplete</a>\n</li>\n<li class=\"nav-item\">\n- <a class=\"nav-link\" routerLink=\"/filter-server\" routerLinkActive=\"active\">Filter <small>(server side)</small></a>\n+ <a class=\"nav-link\" routerLink=\"/tags\" routerLinkActive=\"active\">Tags</a>\n</li>\n<li class=\"nav-item\">\n<a class=\"nav-link\" routerLink=\"/multiselect\" routerLinkActive=\"active\">Multiselect</a>\n",
"new_path": "src/demo/app/app.component.html",
"old_path": "src/demo/app/app.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -2,6 +2,10 @@ import '../style/styles.scss';\nimport { Component } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\n+import 'rxjs/add/operator/distinctUntilChanged';\n+import 'rxjs/add/operator/switchMap';\n+import 'rxjs/add/operator/debounceTime';\n+import 'rxjs/add/operator/map';\n@Component({\nselector: 'demo-app',\n",
"new_path": "src/demo/app/app.component.ts",
"old_path": "src/demo/app/app.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -14,7 +14,7 @@ import { SelectSearchComponent } from './examples/search.component';\nimport { ReactiveFormsComponent } from './examples/reactive-forms.component';\nimport { SelectEventsComponent } from './examples/events.component';\nimport { SelectMultiComponent } from './examples/multi.component';\n-import { SelectAutocompleteComponent } from './examples/autocomplete.component';\n+import { SelectTagsComponent } from './examples/tags.component';\nimport { LayoutHeaderComponent } from './layout/header.component';\n@@ -26,8 +26,8 @@ const appRoutes: Routes = [\n},\n{ path: 'forms', component: ReactiveFormsComponent, data: { title: 'Reactive forms' } },\n{ path: 'bindings', component: SelectBindingsComponent, data: { title: 'Custom bindings' } },\n- { path: 'filter-client', component: SelectSearchComponent },\n- { path: 'filter-server', component: SelectAutocompleteComponent },\n+ { path: 'filter', component: SelectSearchComponent },\n+ { path: 'tags', component: SelectTagsComponent },\n{ path: 'templates', component: SelectWithTemplatesComponent },\n{ path: 'multiselect', component: SelectMultiComponent },\n{ path: 'events', component: SelectEventsComponent },\n@@ -36,7 +36,7 @@ const appRoutes: Routes = [\n@NgModule({\nimports: [\nBrowserModule,\n- NgSelectModule.forRoot({ notFoundText: 'No items found', typeToSearchText: 'Type to search' }),\n+ NgSelectModule.forRoot({ notFoundText: 'No items found', typeToSearchText: 'Type to search', addTagText: 'Add item' }),\nCommonModule,\nFormsModule,\nReactiveFormsModule,\n@@ -57,8 +57,7 @@ const appRoutes: Routes = [\nReactiveFormsComponent,\nSelectEventsComponent,\nSelectMultiComponent,\n- SelectAutocompleteComponent,\n-\n+ SelectTagsComponent,\nLayoutHeaderComponent\n],\nbootstrap: [AppComponent]\n",
"new_path": "src/demo/app/app.module.ts",
"old_path": "src/demo/app/app.module.ts"
},
{
"change_type": "DELETE",
"diff": "-import { Component, EventEmitter } from '@angular/core';\n-import { HttpClient } from '@angular/common/http';\n-import { Observable } from 'rxjs/Observable';\n-\n-@Component({\n- selector: 'select-autocomplete',\n- template: `\n- <label>Search with autocomplete in Github accounts</label>\n- <ng-select [items]=\"items\"\n- notFoundText=\"No results found\"\n- typeToSearchText=\"Search for github account\"\n- bindLabel=\"login\"\n- [placeholder]=\"placeholder\"\n- [multiple]=\"multiple\"\n- [typeahead]=\"typeahead\"\n- [(ngModel)]=\"githubAccount\">\n-\n- <ng-template ng-option-tmp let-item=\"item\">\n- <img [src]=\"item.avatar_url\" width=\"20px\" height=\"20px\"> {{item.login}}\n- </ng-template>\n-\n- </ng-select>\n- <br>\n- <button class=\"btn btn-secondary btn-sm\" (click)=\"toggleMultiple()\">Toggle multiple</button>\n- <p>\n- Selected github account:\n- <span *ngIf=\"githubAccount\">\n- <img [src]=\"githubAccount.avatar_url\" width=\"20px\" height=\"20px\"> {{githubAccount.login}}\n- </span>\n- </p>\n- `\n-})\n-export class SelectAutocompleteComponent {\n-\n- githubAccount: any;\n- items = [];\n- typeahead = new EventEmitter<string>();\n- placeholder = 'Type in me. I am single';\n-\n- multiple = false;\n-\n- constructor(private http: HttpClient) {\n- this.typeahead\n- .distinctUntilChanged()\n- .debounceTime(200)\n- .switchMap(term => this.loadGithubUsers(term))\n- .subscribe(items => {\n- this.items = items;\n- }, (err) => {\n- console.log(err);\n- this.items = [];\n- });\n- }\n-\n- loadGithubUsers(term: string): Observable<any[]> {\n- if (term) {\n- return this.http.get<any>(`https://api.github.com/search/users?q=${term}`).map(rsp => rsp.items);\n- } else {\n- return Observable.of([]);\n- }\n- }\n-\n- toggleMultiple() {\n- this.multiple = !this.multiple;\n- this.placeholder = this.multiple ? 'Type in me. I am multiple.' : 'Type in me. I am single.';\n- }\n-}\n-\n-\n",
"new_path": null,
"old_path": "src/demo/app/examples/autocomplete.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -59,6 +59,12 @@ export class ItemsList {\nthis._selected.splice(this._selected.length - 1, 1);\n}\n+ addTag(item: NgOption) {\n+ item.index = this.items.length;\n+ this.items.push(item);\n+ this.filteredItems.push(item);\n+ }\n+\nclearSelected() {\nthis._selected.forEach((item) => {\nitem.selected = false;\n",
"new_path": "src/lib/src/items-list.ts",
"old_path": "src/lib/src/items-list.ts"
},
{
"change_type": "MODIFY",
"diff": "[ngTemplateOutletContext]=\"{ item: item, index: item.index }\">\n</ng-template>\n</div>\n+ <div class=\"ng-option marked\" role=\"option\" (click)=\"selectTag()\" *ngIf=\"addTag && itemsList.filteredItems.length === 0\">\n+ <span><span class=\"ng-tag-label\">{{addTagText}}</span>{{filterValue}}</span>\n+ </div>\n</virtual-scroll>\n- <div class=\"ng-menu\" *ngIf=\"showNoItemsFound()\">\n+ <div class=\"ng-menu\" *ngIf=\"showNoItemsFound() && !addTag\">\n<div class=\"ng-option disabled\">\n{{notFoundText}}\n</div>\n",
"new_path": "src/lib/src/ng-select.component.html",
"old_path": "src/lib/src/ng-select.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -243,6 +243,12 @@ ng-select {\ncolor: #cccccc;\ncursor: default;\n}\n+\n+ .ng-tag-label {\n+ padding-right: 5px;\n+ font-size: 80%;\n+ font-weight: 400;\n+ }\n}\n.ng-clear-zone {\n-webkit-animation: Select-animation-fadeIn 200ms;\n",
"new_path": "src/lib/src/ng-select.component.scss",
"old_path": "src/lib/src/ng-select.component.scss"
},
{
"change_type": "MODIFY",
"diff": "@@ -519,6 +519,44 @@ describe('NgSelectComponent', function () {\n});\n});\n+ describe('tagging', () => {\n+ it('should select default tag', fakeAsync(() => {\n+ let fixture = createTestingModule(\n+ NgSelectBasicTestCmp,\n+ `<ng-select [items]=\"cities\"\n+ bindLabel=\"name\"\n+ [addTag]=\"true\"\n+ placeholder=\"select value\"\n+ [(ngModel)]=\"selectedCity\">\n+ </ng-select>`);\n+\n+ tickAndDetectChanges(fixture);\n+ fixture.componentInstance.select.onFilter({ target: { value: 'new tag' } });\n+ tickAndDetectChanges(fixture);\n+ triggerKeyDownEvent(getNgSelectElement(fixture), KeyCode.Enter);\n+ expect(fixture.componentInstance.selectedCity.name).toBe('new tag');\n+ }));\n+\n+ it('should select custom tag', fakeAsync(() => {\n+ let fixture = createTestingModule(\n+ NgSelectBasicTestCmp,\n+ `<ng-select [items]=\"cities\"\n+ bindLabel=\"name\"\n+ [addTag]=\"tagFunc\"\n+ placeholder=\"select value\"\n+ [(ngModel)]=\"selectedCity\">\n+ </ng-select>`);\n+\n+ tickAndDetectChanges(fixture);\n+ fixture.componentInstance.select.onFilter({ target: { value: 'custom tag' } });\n+ tickAndDetectChanges(fixture);\n+ triggerKeyDownEvent(getNgSelectElement(fixture), KeyCode.Enter);\n+ expect(<any>fixture.componentInstance.selectedCity).toEqual(jasmine.objectContaining({\n+ id: 'custom tag', name: 'custom tag', custom: true\n+ }));\n+ }));\n+ });\n+\ndescribe('Placeholder', () => {\nlet fixture: ComponentFixture<NgSelectBasicTestCmp>;\nbeforeEach(() => {\n@@ -849,6 +887,9 @@ class NgSelectBasicTestCmp {\n{ id: 2, name: 'Kaunas' },\n{ id: 3, name: 'Pabrade' },\n];\n+ tagFunc(term) {\n+ return { id: term, name: term, custom: true }\n+ }\n}\n@Component({\n",
"new_path": "src/lib/src/ng-select.component.spec.ts",
"old_path": "src/lib/src/ng-select.component.spec.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -62,13 +62,16 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, ControlV\n@Input() placeholder: string;\n@Input() notFoundText = 'No items found';\n@Input() typeToSearchText = 'Type to search';\n-\n+ @Input() addTagText = 'Add item';\n@HostBinding('class.typeahead')\n@Input() typeahead: Subject<string>;\n@Input()\n@HostBinding('class.ng-multiple') multiple = false;\n+ @Input()\n+ @HostBinding('class.taggable') addTag: boolean | ((term) => NgOption) = false;\n+\n// output events\n@Output('blur') blurEvent = new EventEmitter();\n@Output('focus') focusEvent = new EventEmitter();\n@@ -270,6 +273,19 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, ControlV\nthis.updateModel();\n}\n+ selectTag() {\n+ let tag = {}\n+\n+ if (this.addTag instanceof Function) {\n+ tag = this.addTag(this.filterValue);\n+ } else {\n+ tag[this.bindLabel] = this.filterValue;\n+ }\n+\n+ this.itemsList.addTag(tag);\n+ this.select(tag);\n+ }\n+\nshowPlaceholder() {\nreturn this.placeholder && !this.isValueSet(this.selectedItems) && !this.filterValue;\n}\n@@ -440,7 +456,11 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, ControlV\nprivate handleEnter($event: KeyboardEvent) {\nif (this.isOpen) {\n+ if (this.itemsList.markedItem) {\nthis.toggle(this.itemsList.markedItem);\n+ } else if (this.addTag) {\n+ this.selectTag();\n+ }\n}\n$event.preventDefault();\n}\n@@ -531,5 +551,6 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, ControlV\n}\nthis.notFoundText = config.notFoundText || this.notFoundText;\nthis.typeToSearchText = config.typeToSearchText || this.typeToSearchText;\n+ this.addTagText = config.addTagText || this.addTagText;\n}\n}\n",
"new_path": "src/lib/src/ng-select.component.ts",
"old_path": "src/lib/src/ng-select.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -21,4 +21,5 @@ export enum KeyCode {\nexport class NgSelectConfig {\nnotFoundText = '';\ntypeToSearchText = '';\n+ addTagText = '';\n}\n",
"new_path": "src/lib/src/ng-select.types.ts",
"old_path": "src/lib/src/ng-select.types.ts"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
feat(tagging): allow creating new options
closes #34
| 1
|
feat
|
tagging
|
448,039
|
23.10.2017 10:00:00
| -7,200
|
d9f7d332f129a300fc0278a7d5ee96d5c6239b13
|
chore: commit release cut w/ 'release:' prefix
|
[
{
"change_type": "MODIFY",
"diff": "@@ -3,6 +3,24 @@ module.exports = {\nrules: {\n'subject-max-length': [2, 'always', 120],\n'scope-enum': [2, 'always', []],\n- 'scope-empty': [2, 'always']\n+ 'scope-empty': [2, 'always'],\n+ 'type-enum': [\n+ 2,\n+ 'always',\n+ [\n+ 'build',\n+ 'chore',\n+ 'ci',\n+ 'docs',\n+ 'feat',\n+ 'fix',\n+ 'perf',\n+ 'refactor',\n+ 'release',\n+ 'revert',\n+ 'style',\n+ 'test'\n+ ]\n+ ]\n}\n};\n",
"new_path": "commitlint.config.js",
"old_path": "commitlint.config.js"
},
{
"change_type": "MODIFY",
"diff": "\"postbuild\": \"node scripts/postbuild.js\",\n\"schema\": \"json2ts --input src/ng-package.schema.json --output src/ng-package.schema.ts\",\n\"prerelease\": \"yarn build\",\n- \"release\": \"standard-version --message 'chore: cut release for v%s'\",\n+ \"release\": \"standard-version --message 'release: cut v%s'\",\n\"postrelease\": \"node scripts/prepublish.js\",\n\"publish:ci\": \"yarn prerelease && yarn postrelease\",\n\"samples\": \"integration/samples.sh\",\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
TypeScript
|
MIT License
|
ng-packagr/ng-packagr
|
chore: commit release cut w/ 'release:' prefix
| 1
|
chore
| null |
448,039
|
23.10.2017 10:03:09
| -7,200
|
3b42f558ad364436db16d5af46f95492c9e0f5d6
|
release: cut v1.5.0-rc.1
|
[
{
"change_type": "MODIFY",
"diff": "All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.\n+<a name=\"1.5.0-rc.1\"></a>\n+# [1.5.0-rc.1](https://github.com/dherges/ng-packagr/compare/v1.5.0-rc.0...v1.5.0-rc.1) (2017-10-23)\n+\n+\n+### Bug Fixes\n+\n+* produce correct secondary package paths ([#197](https://github.com/dherges/ng-packagr/issues/197)) ([4ca213e](https://github.com/dherges/ng-packagr/commit/4ca213e))\n+* respect secondary entry file customizations ([#198](https://github.com/dherges/ng-packagr/issues/198)) ([9de7524](https://github.com/dherges/ng-packagr/commit/9de7524))\n+\n+\n+### Features\n+\n+* bump angular/[@tsc-wrapped](https://github.com/tsc-wrapped) to ^4.4.5 and [@typescript](https://github.com/typescript) to ^2.3.4 ([#200](https://github.com/dherges/ng-packagr/issues/200)) ([b2b369a](https://github.com/dherges/ng-packagr/commit/b2b369a))\n+* minify UMD bundles ([#205](https://github.com/dherges/ng-packagr/issues/205)) ([c58689b](https://github.com/dherges/ng-packagr/commit/c58689b))\n+\n+\n+\n<a name=\"1.5.0-rc.0\"></a>\n# [1.5.0-rc.0](https://github.com/dherges/ng-packagr/compare/v1.4.1...v1.5.0-rc.0) (2017-10-18)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"ng-packagr\",\n- \"version\": \"1.5.0-rc.0\",\n+ \"version\": \"1.5.0-rc.1\",\n\"description\": \"Compile and package a TypeScript library to Angular Package Format\",\n\"keywords\": [\n\"angular\",\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
TypeScript
|
MIT License
|
ng-packagr/ng-packagr
|
release: cut v1.5.0-rc.1
| 1
|
release
| null |
791,906
|
23.10.2017 17:09:01
| 25,200
|
63beebe1d652ecc8ded41ca1223a9427dbf4d8ef
|
core: Fix minor grammatical error
_Noticed this during the ChromeDevSummit talk this morning._
|
[
{
"change_type": "MODIFY",
"diff": "@@ -113,7 +113,7 @@ class LoadFastEnough4Pwa extends Audit {\nreturn {\nrawValue: true,\n// eslint-disable-next-line max-len\n- debugString: `First Interactive was found at ${Util.formatMilliseconds(timeToFirstInteractive)}, however, the network request latencies were not sufficiently realistic, so the performance measurements cannot be trusted.`,\n+ debugString: `First Interactive was found at ${Util.formatMilliseconds(timeToFirstInteractive)}; however, the network request latencies were not sufficiently realistic, so the performance measurements cannot be trusted.`,\nextendedInfo,\ndetails,\n};\n",
"new_path": "lighthouse-core/audits/load-fast-enough-for-pwa.js",
"old_path": "lighthouse-core/audits/load-fast-enough-for-pwa.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core: Fix minor grammatical error (#3638)
http://www.grammarbook.com/punctuation/semicolons.asp
_Noticed this during the ChromeDevSummit talk this morning._
| 1
|
core
| null |
573,227
|
24.10.2017 10:24:00
| -7,200
|
542fb6363bec578ec6e575a10f97025e0437a65b
|
test(audit): fix flaky test
|
[
{
"change_type": "MODIFY",
"diff": "@@ -16,10 +16,15 @@ var helper = require('../lib/helper');\nvar vasync = require('vasync');\n// local globals\n+var MILLISECOND_IN_MICROSECONDS = 1000;\n+var TOLERATED_MICROSECONDS = MILLISECOND_IN_MICROSECONDS;\nvar SERVER;\nvar CLIENT;\nvar PORT;\n+function assertIsAtLeastWithTolerate (num1, num2, tolerate, msg) {\n+ assert.isAtLeast(num1, num2 - tolerate, msg + 'should be >= ' + num2);\n+}\ndescribe('audit logger', function () {\n@@ -152,6 +157,7 @@ describe('audit logger', function () {\nit('should log handler timers', function (done) {\n// Dirty hack to capture the log record using a ring buffer.\nvar ringbuffer = new bunyan.RingBuffer({ limit: 1 });\n+ var WAIT_IN_MILLISECONDS = 1100;\nSERVER.once('after', restify.plugins.auditLogger({\nlog: bunyan.createLogger({\n@@ -172,7 +178,7 @@ describe('audit logger', function () {\nreq.endHandlerTimer('audit-sub');\nres.send('');\nreturn (next());\n- }, 1100);\n+ }, WAIT_IN_MILLISECONDS);\n// this really should be 1000 but make it 1100 so that the tests\n// don't sporadically fail due to timing issues.\n});\n@@ -188,13 +194,17 @@ describe('audit logger', function () {\nringbuffer.records.length, 1,\n'should only have 1 log record'\n);\n- assert.ok(\n- record.req.timers.aTestHandler > 1000000,\n- 'atestHandler should be > 1000000'\n+ assertIsAtLeastWithTolerate(\n+ record.req.timers.aTestHandler,\n+ WAIT_IN_MILLISECONDS * MILLISECOND_IN_MICROSECONDS,\n+ TOLERATED_MICROSECONDS,\n+ 'atestHandler'\n);\n- assert.ok(\n- record.req.timers['aTestHandler-audit-sub'] > 1000000,\n- 'aTestHandler-audit-sub should be > 1000000'\n+ assertIsAtLeastWithTolerate(\n+ record.req.timers['aTestHandler-audit-sub'],\n+ WAIT_IN_MILLISECONDS * MILLISECOND_IN_MICROSECONDS,\n+ TOLERATED_MICROSECONDS,\n+ 'aTestHandler-audit-sub'\n);\nvar handlers = Object.keys(record.req.timers);\n@@ -218,6 +228,7 @@ describe('audit logger', function () {\n// Dirty hack to capture the log record using a ring buffer.\nvar ringbuffer = new bunyan.RingBuffer({ limit: 1 });\n+ var WAIT_IN_MILLISECONDS = 1000;\nSERVER.once('after', restify.plugins.auditLogger({\nlog: bunyan.createLogger({\n@@ -234,7 +245,7 @@ describe('audit logger', function () {\nSERVER.get('/audit', function (req, res, next) {\nsetTimeout(function () {\nreturn (next());\n- }, 1000);\n+ }, WAIT_IN_MILLISECONDS);\n}, function (req, res, next) {\nreq.startHandlerTimer('audit-sub');\n@@ -242,7 +253,7 @@ describe('audit logger', function () {\nreq.endHandlerTimer('audit-sub');\nres.send('');\nreturn (next());\n- }, 1000);\n+ }, WAIT_IN_MILLISECONDS);\n});\nCLIENT.get('/audit', function (err, req, res) {\n@@ -255,17 +266,23 @@ describe('audit logger', function () {\nringbuffer.records.length, 1,\n'should only have 1 log record'\n);\n- assert.ok(\n- record.req.timers['handler-0'] > 1000000,\n- 'handler-0 should be > 1000000'\n+ assertIsAtLeastWithTolerate(\n+ record.req.timers['handler-0'],\n+ WAIT_IN_MILLISECONDS * MILLISECOND_IN_MICROSECONDS,\n+ TOLERATED_MICROSECONDS,\n+ 'handler-0'\n);\n- assert.ok(\n- record.req.timers['handler-1'] > 1000000,\n- 'handler-1 should be > 1000000'\n+ assertIsAtLeastWithTolerate(\n+ record.req.timers['handler-1'],\n+ WAIT_IN_MILLISECONDS * MILLISECOND_IN_MICROSECONDS,\n+ TOLERATED_MICROSECONDS,\n+ 'handler-1'\n);\n- assert.ok(\n- record.req.timers['handler-1-audit-sub'] > 1000000,\n- 'handler-0-audit-sub should be > 1000000'\n+ assertIsAtLeastWithTolerate(\n+ record.req.timers['handler-1-audit-sub'],\n+ WAIT_IN_MILLISECONDS * MILLISECOND_IN_MICROSECONDS,\n+ TOLERATED_MICROSECONDS,\n+ 'handler-0-audit-sub'\n);\nvar handlers = Object.keys(record.req.timers);\n@@ -281,6 +298,7 @@ describe('audit logger', function () {\nit('restify-GH-1435 should accumulate log handler timers', function (done) {\n// Dirty hack to capture the log record using a ring buffer.\nvar ringbuffer = new bunyan.RingBuffer({ limit: 1 });\n+ var WAIT_IN_MILLISECONDS = 1100;\nSERVER.once('after', restify.plugins.auditLogger({\nlog: bunyan.createLogger({\n@@ -304,7 +322,7 @@ describe('audit logger', function () {\nreq.endHandlerTimer('audit-acc');\nres.send('');\nreturn (next());\n- }, 1100);\n+ }, WAIT_IN_MILLISECONDS);\n// this really should be 1000 but make it 1100 so that the tests\n// don't sporadically fail due to timing issues.\n});\n@@ -320,13 +338,17 @@ describe('audit logger', function () {\nringbuffer.records.length, 1,\n'should only have 1 log record'\n);\n- assert.ok(\n- record.req.timers.aTestHandler > 1000000,\n- 'atestHandler should be > 1000000'\n+ assertIsAtLeastWithTolerate(\n+ record.req.timers.aTestHandler,\n+ WAIT_IN_MILLISECONDS * MILLISECOND_IN_MICROSECONDS,\n+ TOLERATED_MICROSECONDS,\n+ 'atestHandler'\n);\n- assert.ok(\n- record.req.timers['aTestHandler-audit-acc'] > 1000000,\n- 'aTestHandler-audit-acc should be > 1000000'\n+ assertIsAtLeastWithTolerate(\n+ record.req.timers['aTestHandler-audit-acc'],\n+ WAIT_IN_MILLISECONDS * MILLISECOND_IN_MICROSECONDS,\n+ TOLERATED_MICROSECONDS,\n+ 'aTestHandler-audit-acc'\n);\ndone();\n});\n",
"new_path": "test/plugins/audit.test.js",
"old_path": "test/plugins/audit.test.js"
}
] |
JavaScript
|
MIT License
|
restify/node-restify
|
test(audit): fix flaky test (#1536)
| 1
|
test
|
audit
|
815,743
|
25.10.2017 16:58:12
| -39,600
|
4b01b1373934d64227cf6eab55e5ca4e6a8375bf
|
fix: z-index for ng-outer-menu
Changed the z-index of ng-outer-menu to 3, so that it remains always visible when opened on top of a .input-group.form-control element. .input-group .form-control has a z-index of 2 and thus was visible on top of the dropdown
|
[
{
"change_type": "MODIFY",
"diff": "@@ -222,7 +222,7 @@ ng-select {\nposition: absolute;\ntop: 100%;\nwidth: 100%;\n- z-index: 1;\n+ z-index: 3;\n-webkit-overflow-scrolling: touch;\n}\n.ng-menu {\n",
"new_path": "src/ng-select/ng-select.component.scss",
"old_path": "src/ng-select/ng-select.component.scss"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
fix: z-index for ng-outer-menu (#105)
Changed the z-index of ng-outer-menu to 3, so that it remains always visible when opened on top of a .input-group.form-control element. .input-group .form-control has a z-index of 2 and thus was visible on top of the dropdown
| 1
|
fix
| null |
791,723
|
26.10.2017 00:45:18
| 25,200
|
21e25aa0dd240495549075cca747ac3d2621cc1b
|
misc(changelog): add commitlint config (for commitlintbot)
|
[
{
"change_type": "ADD",
"diff": "+/**\n+ * @license Copyright 2017 Google Inc. All Rights Reserved.\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n+ */\n+'use strict';\n+\n+module.exports = {\n+ extends: ['cz'],\n+ rules: {\n+ 'body-leading-blank': [1, 'always'],\n+ 'body-tense': [1, 'always', ['present-imperative']],\n+ 'footer-leading-blank': [1, 'always'],\n+ 'footer-tense': [1, 'always', ['present-imperative']],\n+ 'header-max-length': [2, 'always', 80],\n+ 'lang': [0, 'always', 'eng'],\n+ 'scope-case': [2, 'always', 'lowerCase'],\n+ 'scope-empty': [0, 'never'],\n+ 'subject-case': [1, 'always', 'lowerCase'],\n+ 'subject-empty': [0, 'never'],\n+ 'subject-full-stop': [2, 'never', '.'],\n+ 'subject-tense': [1, 'always', ['present-imperative']],\n+ 'type-case': [2, 'always', 'lowerCase'],\n+ 'type-empty': [2, 'never'],\n+ // The scope-enum : defined in the cz-config\n+ // The 'type-enum': defined in the cz-config\n+ },\n+};\n",
"new_path": "commitlint.config.js",
"old_path": null
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
misc(changelog): add commitlint config (for commitlintbot)
| 1
|
misc
|
changelog
|
448,039
|
27.10.2017 09:33:00
| -7,200
|
3f8e25c4ac05de3a4c2055b1d501a81737258ee7
|
fix: add description for `ngPackage` property in `package.json`
Motivation: IDE support
|
[
{
"change_type": "MODIFY",
"diff": "{\n+ \"$schema\": \"../../../src/package.schema.json\",\n\"name\": \"@sample/secondary-lib\",\n\"description\": \"A sample library with configuration in package.json\",\n\"version\": \"1.0.0-pre.0\",\n\"@angular/common\": \"^4.1.2\"\n},\n\"ngPackage\": {\n- \"$schema\": \"../../../src/lib/ng-package.schema.json\",\n\"lib\": {\n\"entryFile\": \"public_api.ts\"\n}\n",
"new_path": "integration/samples/secondary/package.json",
"old_path": "integration/samples/secondary/package.json"
},
{
"change_type": "MODIFY",
"diff": "{\n+ \"$schema\": \"../../../../src/package.schema.json\",\n\"name\": \"@sample/secondary/sub-module\",\n\"description\": \"A sub module library\",\n\"version\": \"1.0.0-pre.0\",\n",
"new_path": "integration/samples/secondary/sub-module/package.json",
"old_path": "integration/samples/secondary/sub-module/package.json"
},
{
"change_type": "MODIFY",
"diff": "{ \"$ref\": \"http://json.schemastore.org/package\" },\n{\n\"properties\": {\n- \"ngPackage\": { \"$ref\": \"./ng-package.schema.json\" }\n+ \"ngPackage\": {\n+ \"$ref\": \"./ng-package.schema.json\",\n+ \"description\": \"Angular Package description\"\n+ }\n},\n\"required\": []\n}\n",
"new_path": "src/package.schema.json",
"old_path": "src/package.schema.json"
}
] |
TypeScript
|
MIT License
|
ng-packagr/ng-packagr
|
fix: add description for `ngPackage` property in `package.json`
Motivation: IDE support
| 1
|
fix
| null |
815,745
|
27.10.2017 21:47:21
| -10,800
|
95505fe29f3d3c482a2f57003af0627b4c84954f
|
fix: don't clear selection on backspace when clearable false fixes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -398,6 +398,15 @@ describe('NgSelectComponent', function () {\nexpect(fixture.componentInstance.select.selectedItems).toEqual(result);\n}));\n+ it('should not remove selected value when clearable is false', fakeAsync(() => {\n+ fixture.componentInstance.select.clearable = false;\n+ fixture.componentInstance.selectedCity = fixture.componentInstance.cities[0];\n+ tickAndDetectChanges(fixture);\n+ triggerKeyDownEvent(getNgSelectElement(fixture), KeyCode.Backspace);\n+ const result = [jasmine.objectContaining(fixture.componentInstance.cities[0])];\n+ expect(fixture.componentInstance.select.selectedItems).toEqual(result);\n+ }));\n+\nit('should remove last selected value when multiple', fakeAsync(() => {\nfixture.componentInstance.multiple = true;\nfixture.componentInstance.cities = [...fixture.componentInstance.cities];\n",
"new_path": "src/ng-select/ng-select.component.spec.ts",
"old_path": "src/ng-select/ng-select.component.spec.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -490,7 +490,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, ControlV\n}\nprivate handleBackspace() {\n- if (this.filterValue) {\n+ if (this.filterValue || !this.clearable) {\nreturn;\n}\n",
"new_path": "src/ng-select/ng-select.component.ts",
"old_path": "src/ng-select/ng-select.component.ts"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
fix: don't clear selection on backspace when clearable false fixes #82
| 1
|
fix
| null |
815,745
|
27.10.2017 22:40:32
| -10,800
|
10999cb12501fa11af50d5223d466b2a6f825f0a
|
fix: don't fire change event when there is no selected value
fixes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -407,6 +407,13 @@ describe('NgSelectComponent', function () {\nexpect(fixture.componentInstance.select.selectedItems).toEqual(result);\n}));\n+ it('should do nothing when there is no selection', fakeAsync(() => {\n+ const clear = spyOn(fixture.componentInstance.select, 'clear');\n+ tickAndDetectChanges(fixture);\n+ triggerKeyDownEvent(getNgSelectElement(fixture), KeyCode.Backspace);\n+ expect(clear).not.toHaveBeenCalled();\n+ }));\n+\nit('should remove last selected value when multiple', fakeAsync(() => {\nfixture.componentInstance.multiple = true;\nfixture.componentInstance.cities = [...fixture.componentInstance.cities];\n",
"new_path": "src/ng-select/ng-select.component.spec.ts",
"old_path": "src/ng-select/ng-select.component.spec.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -287,11 +287,11 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, ControlV\n}\nshowPlaceholder() {\n- return this.placeholder && !this.isValueSet(this.selectedItems) && !this.filterValue;\n+ return this.placeholder && !this.isValueSet && !this.filterValue;\n}\nshowClear() {\n- return this.clearable && (this.isValueSet(this.selectedItems) || this.filterValue) && !this.isDisabled;\n+ return this.clearable && (this.isValueSet || this.filterValue) && !this.isDisabled;\n}\nshowFilter() {\n@@ -490,7 +490,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, ControlV\n}\nprivate handleBackspace() {\n- if (this.filterValue || !this.clearable) {\n+ if (this.filterValue || !this.clearable || !this.isValueSet) {\nreturn;\n}\n@@ -541,8 +541,8 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, ControlV\nreturn this.selectedItems[0] || null;\n}\n- private isValueSet(value: any): boolean {\n- return !!value && value.length > 0;\n+ private get isValueSet() {\n+ return this.selectedItems.length > 0;\n}\nprivate mergeConfig(config: NgSelectConfig) {\n",
"new_path": "src/ng-select/ng-select.component.ts",
"old_path": "src/ng-select/ng-select.component.ts"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
fix: don't fire change event when there is no selected value
fixes #91
| 1
|
fix
| null |
815,746
|
28.10.2017 23:25:47
| -10,800
|
0faef552b288e592fefc0a2f65764f5be8b5bfc3
|
fix: focus filter on clear
fixes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -9,7 +9,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';\ntemplate: `\n<form [formGroup]=\"heroForm\" novalidate>\n<div class=\"form-group\">\n- <label for=\"state\">Cities</label>\n+ <label for=\"state\">Multi select</label>\n<ng-select *ngIf=\"isCitiesControlVisible\"\n[items]=\"cities\"\nbindLabel=\"name\"\n@@ -24,7 +24,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n</div>\n<hr>\n<div class=\"form-group\">\n- <label for=\"state\">Age</label>\n+ <label for=\"state\">Single select</label>\n<ng-select [items]=\"ages\"\nbindValue=\"value\"\nplaceholder=\"Select age\"\n@@ -35,7 +35,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n</div>\n<hr>\n<div class=\"form-group\">\n- <label for=\"album\">Favorite album</label>\n+ <label for=\"album\">Loading async data</label>\n<ng-select [items]=\"albums\"\nbindLabel=\"title\"\nbindValue=\"id\"\n@@ -55,7 +55,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n<hr>\n<div class=\"form-group\">\n- <label for=\"album\">Favorite photo</label>\n+ <label for=\"album\">Custom templates</label>\n<ng-select [items]=\"photos\"\nbindLabel=\"title\"\nbindValue=\"thumbnailUrl\"\n",
"new_path": "demo/app/examples/reactive-forms.component.ts",
"old_path": "demo/app/examples/reactive-forms.component.ts"
},
{
"change_type": "MODIFY",
"diff": "<div *ngIf=\"showFilter()\" class=\"ng-input\">\n<input #filterInput\n+ type=\"text\"\n[value]=\"filterValue\"\n(input)=\"onFilter($event)\"\n(focus)=\"onInputFocus($event)\"\n(blur)=\"onInputBlur($event)\"\n(change)=\"$event.stopPropagation()\"\n- role=\"combobox\"\n- aria-expanded=\"false\"\n- aria-owns=\"\"\n- aria-haspopup=\"false\">\n+ role=\"combobox\">\n</div>\n</div>\n",
"new_path": "src/ng-select/ng-select.component.html",
"old_path": "src/ng-select/ng-select.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -45,18 +45,12 @@ ng-select {\nborder-width: 0 5px 5px;\n&:hover {\nborder-color: transparent transparent #666;\n- ;\n}\n}\n.ng-menu-outer {\nvisibility: visible;\n}\n}\n- &:not(.opened) {\n- .ng-control .ng-value-container .ng-input {\n- opacity: 0;\n- }\n- }\n&.focused {\n&:not(.opened)>.ng-control {\nborder-color: #007eff;\n",
"new_path": "src/ng-select/ng-select.component.scss",
"old_path": "src/ng-select/ng-select.component.scss"
},
{
"change_type": "MODIFY",
"diff": "@@ -180,6 +180,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, ControlV\nhandleClearClick($event: Event) {\n$event.stopPropagation();\nthis.clear();\n+ this.focusSearchInput();\n}\nclear() {\n@@ -190,7 +191,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, ControlV\nthis.clearSearch();\nthis.notifyModelChanged();\nif (this.isTypeahead()) {\n- this.typeahead.next(this.filterValue);\n+ this.typeahead.next(null);\n}\n}\n@@ -432,6 +433,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, ControlV\nprivate focusSearchInput() {\nsetTimeout(() => {\nthis.filterInput.nativeElement.focus();\n+ this.filterInput.nativeElement.select();\n});\n}\n",
"new_path": "src/ng-select/ng-select.component.ts",
"old_path": "src/ng-select/ng-select.component.ts"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
fix: focus filter on clear (#110)
fixes #93
| 1
|
fix
| null |
815,802
|
29.10.2017 14:42:16
| 0
|
4e211cb3cafc0fd8be77bfca9c08356b69535675
|
fix: remove unnecessary FormsModule.
|
[
{
"change_type": "MODIFY",
"diff": "import { NgModule, ModuleWithProviders } from '@angular/core';\n-import { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { NgSelectComponent } from './ng-select.component';\n@@ -16,7 +15,6 @@ import { NgSelectConfig } from './ng-select.types';\nSpinnerComponent\n],\nimports: [\n- FormsModule,\nCommonModule,\nVirtualScrollModule\n],\n",
"new_path": "src/ng-select/ng-select.module.ts",
"old_path": "src/ng-select/ng-select.module.ts"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
fix: remove unnecessary FormsModule. (#112)
| 1
|
fix
| null |
791,922
|
31.10.2017 01:11:50
| -3,600
|
6c9f71733e024205ba0d6ba3582cadd516bc1de5
|
docs(readme): add MagicLight WebBLE integration
|
[
{
"change_type": "MODIFY",
"diff": "@@ -252,6 +252,7 @@ This section details projects that have integrated Lighthouse. If you're working\n* **[lighthouse-mocha-example](https://github.com/justinribeiro/lighthouse-mocha-example)** - gather performance metrics via Lighthouse and tests them in Mocha\n* **[pwmetrics](https://github.com/paulirish/pwmetrics/)** - gather performance metrics\n* **[lighthouse-hue](https://github.com/ebidel/lighthouse-hue)** - set the color of Philips Hue lights based on a Lighthouse score\n+ * **[lighthouse-magic-light](https://github.com/manekinekko/lighthouse-magic-light)** set the color of the MagicLight Bluetooth Smart Light Bulb based on Lighthouse score\n* **[lighthouse-batch](https://www.npmjs.com/package/lighthouse-batch)** - run Lighthouse over a number of sites and generate a summary of their metrics/scores.\n* **[lighthouse-cron](https://github.com/thearegee/lighthouse-cron)** - Cron multiple batch Lighthouse audits and emit results for sending to remote server.\n* **[lightcrawler](https://github.com/github/lightcrawler)** - Crawl a website and run each page found through Lighthouse.\n",
"new_path": "readme.md",
"old_path": "readme.md"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
docs(readme): add MagicLight WebBLE integration (#3613)
| 1
|
docs
|
readme
|
815,746
|
31.10.2017 08:33:27
| -7,200
|
1ff9b536eedfb652dcd07be42067d6de5b27aa47
|
fix: add selected ng-option label font weight
|
[
{
"change_type": "MODIFY",
"diff": "[class.marked]=\"item === itemsList.markedItem\">\n<ng-template #defaultOptionTemplate>\n- <span>{{item[bindLabel]}}</span>\n+ <span class=\"ng-option-label\">{{item[bindLabel]}}</span>\n</ng-template>\n<ng-template\n",
"new_path": "src/ng-select/ng-select.component.html",
"old_path": "src/ng-select/ng-select.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -237,6 +237,10 @@ ng-select {\n&.selected {\nbackground-color: $color-selected;\ncolor: #333;\n+\n+ .ng-option-label {\n+ font-weight: 600;\n+ }\n}\n&.marked {\nbackground-color: #ebf5ff;\n",
"new_path": "src/ng-select/ng-select.component.scss",
"old_path": "src/ng-select/ng-select.component.scss"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
fix: add selected ng-option label font weight (#115)
| 1
|
fix
| null |
791,834
|
31.10.2017 11:30:52
| 25,200
|
efe0e4894c729da74a2432a49568472ca598112a
|
tests(smokehouse): disable multiple shadow root deprecation test
|
[
{
"change_type": "MODIFY",
"diff": "@@ -32,7 +32,9 @@ if (location.search === '' || params.has('passiveEvents')) {\nif (location.search === '' || params.has('deprecations')) {\nconst div = document.createElement('div');\ndiv.createShadowRoot();\n- div.createShadowRoot(); // FAIL - multiple shadow v0 roots.\n+ // FAIL(errors-in-console) - multiple shadow v0 roots.\n+ // TODO: disabled until m64 is stable (when moved from deprecation warning to error)\n+ // div.createShadowRoot();\n}\n})();\n",
"new_path": "lighthouse-cli/test/fixtures/dobetterweb/dbw_tester.js",
"old_path": "lighthouse-cli/test/fixtures/dobetterweb/dbw_tester.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -15,6 +15,7 @@ module.exports = [\naudits: {\n'errors-in-console': {\nscore: false,\n+ // TODO: should be 5 after m64 (see note in dbw_tester.js)\nrawValue: 4,\ndisplayValue: '4',\ndetails: {\n@@ -168,12 +169,12 @@ module.exports = [\nscore: false,\nextendedInfo: {\nvalue: {\n- length: 4,\n+ length: 3,\n},\n},\ndetails: {\nitems: {\n- length: 4,\n+ length: 3,\n},\n},\n},\n",
"new_path": "lighthouse-cli/test/smokehouse/dobetterweb/dbw-expectations.js",
"old_path": "lighthouse-cli/test/smokehouse/dobetterweb/dbw-expectations.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
tests(smokehouse): disable multiple shadow root deprecation test (#3695)
| 1
|
tests
|
smokehouse
|
815,746
|
31.10.2017 16:19:39
| -7,200
|
6d841ef47fe58c39e5598ccccc5a1ce4800be040
|
feat: ng-option support for simple dropdowns
|
[
{
"change_type": "MODIFY",
"diff": "@@ -25,7 +25,7 @@ const appRoutes: Routes = [\nredirectTo: '/forms',\npathMatch: 'full'\n},\n- { path: 'forms', component: ReactiveFormsComponent, data: { title: 'Real life example' } },\n+ { path: 'forms', component: ReactiveFormsComponent, data: { title: 'Reactive forms' } },\n{ path: 'bindings', component: SelectBindingsComponent, data: { title: 'Data bindings' } },\n{ path: 'filter', component: SelectSearchComponent, data: { title: 'Filter and autocomplete'} },\n{ path: 'tags', component: SelectTagsComponent, data: { title: 'Tags'} },\n",
"new_path": "demo/app/app.module.ts",
"old_path": "demo/app/app.module.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -8,6 +8,32 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';\nselector: 'reactive-forms',\ntemplate: `\n<form [formGroup]=\"heroForm\" novalidate>\n+\n+ <div class=\"form-row\">\n+ <div class=\"form-group col-md-6\">\n+ <label for=\"heroId\">Basic select</label>\n+ <ng-select formControlName=\"heroId\">\n+ <ng-option value=\"hero1\">\n+ <img src=\"{{basePath}}/assets/batman.png\" width=\"20px\" height=\"20px\" /> Batman\n+ </ng-option>\n+ <ng-option value=\"hero2\">\n+ <img src=\"{{basePath}}/assets/spidey.png\" width=\"20px\" height=\"20px\" /> Spider-Man\n+ </ng-option>\n+ <ng-option value=\"hero3\">\n+ <img src=\"{{basePath}}/assets/thor.png\" width=\"20px\" height=\"20px\" /> Thor\n+ </ng-option>\n+ </ng-select>\n+ </div>\n+ <div class=\"form-group col-md-6\">\n+ <label for=\"yesno\">Yes/No</label>\n+ <ng-select formControlName=\"agree\">\n+ <ng-option [value]=\"true\">Yes</ng-option>\n+ <ng-option [value]=\"false\">No</ng-option>\n+ </ng-select>\n+ </div>\n+ </div>\n+ <hr>\n+\n<div class=\"form-group\">\n<label for=\"state\">Multi select</label>\n<ng-select *ngIf=\"isCitiesControlVisible\"\n@@ -116,6 +142,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n})\nexport class ReactiveFormsComponent {\n+ basePath = window['basePath'] === '/' ? '' : window['basePath'];\nheroForm: FormGroup;\nisCitiesControlVisible = true;\n@@ -145,6 +172,8 @@ export class ReactiveFormsComponent {\nthis.loadPhotos();\nthis.heroForm = this.fb.group({\n+ heroId: 'hero1',\n+ agree: '',\nselectedCitiesIds: [],\nage: '',\nalbum: '',\n",
"new_path": "demo/app/examples/reactive-forms.component.ts",
"old_path": "demo/app/examples/reactive-forms.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -5,7 +5,7 @@ import { Component } from '@angular/core';\ntemplate: `\n<ul class=\"nav flex-column\">\n<li class=\"nav-item\" routerLinkActive=\"active\">\n- <a class=\"nav-link\" routerLink=\"/forms\">Real life example</a>\n+ <a class=\"nav-link\" routerLink=\"/forms\">Reactive forms</a>\n</li>\n<li class=\"nav-item\" routerLinkActive=\"active\">\n<a class=\"nav-link\" routerLink=\"/filter\">Filter and autocomplete</a>\n",
"new_path": "demo/app/layout/sidenav-component.ts",
"old_path": "demo/app/layout/sidenav-component.ts"
},
{
"change_type": "ADD",
"diff": "Binary files /dev/null and b/demo/assets/batman.png differ\n",
"new_path": "demo/assets/batman.png",
"old_path": "demo/assets/batman.png"
},
{
"change_type": "ADD",
"diff": "Binary files /dev/null and b/demo/assets/spidey.png differ\n",
"new_path": "demo/assets/spidey.png",
"old_path": "demo/assets/spidey.png"
},
{
"change_type": "ADD",
"diff": "Binary files /dev/null and b/demo/assets/thor.png differ\n",
"new_path": "demo/assets/thor.png",
"old_path": "demo/assets/thor.png"
},
{
"change_type": "MODIFY",
"diff": "<script async defer src=\"https://buttons.github.io/buttons.js\"></script>\n<script>\nvar ngSelectVersion = '<%= htmlWebpackPlugin.options.ngSelectVersion %>';\n+ var basePath = '<%= htmlWebpackPlugin.options.basePath %>';\n</script>\n</head>\n",
"new_path": "demo/index.ejs",
"old_path": "demo/index.ejs"
},
{
"change_type": "MODIFY",
"diff": "@@ -108,9 +108,6 @@ module.exports = function makeWebpackConfig() {\nemitErrors: false,\nfailOnHint: false\n},\n- sassLoader: {\n- //includePaths: [path.resolve(__dirname, \"node_modules/foundation-sites/scss\")]\n- },\npostcss: [\nautoprefixer({\nbrowsers: ['last 2 version']\n@@ -134,7 +131,7 @@ module.exports = function makeWebpackConfig() {\nnew CopyWebpackPlugin([\n{\n- from: root('./demo/assets')\n+ from: root('./demo/assets'), to: 'assets'\n}\n])\n],\n",
"new_path": "scripts/webpack.dev.js",
"old_path": "scripts/webpack.dev.js"
},
{
"change_type": "ADD",
"diff": "+import { Component, Input, Host, ElementRef } from '@angular/core';\n+import { NgOption } from './ng-select.types';\n+\n+@Component({\n+ selector: 'ng-option',\n+ template: `<ng-content></ng-content>`\n+})\n+export class NgOptionComponent {\n+ @Input() value: any;\n+\n+ constructor(public elementRef: ElementRef) {\n+ }\n+}\n",
"new_path": "src/ng-select/ng-option.component.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -22,6 +22,11 @@ ng-select {\n@include box-sizing;\n}\n+ ng-option{\n+ display: block;\n+ @include box-sizing;\n+ }\n+\nvirtual-scroll {\ndisplay: block;\nheight: auto;\n",
"new_path": "src/ng-select/ng-select.component.scss",
"old_path": "src/ng-select/ng-select.component.scss"
},
{
"change_type": "MODIFY",
"diff": "@@ -500,7 +500,7 @@ describe('NgSelectComponent', function () {\n});\ndescribe('Custom templates', () => {\n- it('display custom header template', async(() => {\n+ it('should display custom header template', async(() => {\nconst fixture = createTestingModule(\nNgSelectBasicTestCmp,\n`<ng-select [items]=\"cities\" [(ngModel)]=\"selectedCity\">\n@@ -519,8 +519,7 @@ describe('NgSelectComponent', function () {\n});\n}));\n- it('display custom dropdown option template', async(() => {\n-\n+ it('should display custom dropdown option template', async(() => {\nconst fixture = createTestingModule(\nNgSelectBasicTestCmp,\n`<ng-select [items]=\"cities\" [(ngModel)]=\"selectedCity\">\n@@ -536,6 +535,22 @@ describe('NgSelectComponent', function () {\nexpect(el).not.toBeNull();\n});\n}));\n+\n+ it('should create items from ng-option', fakeAsync(() => {\n+ const fixture = createTestingModule(\n+ NgSelectBasicTestCmp,\n+ `<ng-select [(ngModel)]=\"selectedCity\">\n+ <ng-option [value]=\"true\">Yes</ng-option>\n+ <ng-option [value]=\"false\">No</ng-option>\n+ </ng-select>`);\n+\n+ tickAndDetectChanges(fixture);\n+\n+ const items = fixture.componentInstance.select.itemsList.items;\n+ expect(items.length).toBe(2);\n+ expect(items[0]).toEqual(jasmine.objectContaining({label: 'Yes', value: true, index: 0}));\n+ expect(items[1]).toEqual(jasmine.objectContaining({label: 'No', value: false, index: 1}));\n+ }));\n});\ndescribe('Multiple', () => {\n",
"new_path": "src/ng-select/ng-select.component.spec.ts",
"old_path": "src/ng-select/ng-select.component.spec.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -3,6 +3,7 @@ import {\nOnInit,\nOnDestroy,\nOnChanges,\n+ AfterViewInit,\nforwardRef,\nChangeDetectorRef,\nInput,\n@@ -17,7 +18,7 @@ import {\nElementRef,\nChangeDetectionStrategy,\nOptional,\n- Renderer2\n+ Renderer2, ContentChildren, QueryList\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n@@ -26,6 +27,7 @@ import { VirtualScrollComponent } from './virtual-scroll.component';\nimport { NgOption, KeyCode, NgSelectConfig } from './ng-select.types';\nimport { ItemsList } from './items-list';\nimport { Subject } from 'rxjs/Subject';\n+import { NgOptionComponent } from './ng-option.component';\nconst NG_SELECT_VALUE_ACCESSOR = {\nprovide: NG_VALUE_ACCESSOR,\n@@ -44,12 +46,13 @@ const NG_SELECT_VALUE_ACCESSOR = {\n'role': 'dropdown'\n}\n})\n-export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, ControlValueAccessor {\n+export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterViewInit, ControlValueAccessor {\n@ContentChild(NgOptionTemplateDirective, { read: TemplateRef }) optionTemplate: TemplateRef<any>;\n@ContentChild(NgLabelTemplateDirective, { read: TemplateRef }) labelTemplate: TemplateRef<any>;\n@ViewChild(VirtualScrollComponent) dropdownList: VirtualScrollComponent;\n+ @ContentChildren(NgOptionComponent, { descendants: true }) ngOptions: QueryList<NgOptionComponent>;\n@ViewChild('filterInput') filterInput;\n// inputs\n@@ -117,6 +120,12 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, ControlV\nthis.handleDocumentClick();\n}\n+ ngAfterViewInit() {\n+ if (this.ngOptions.length > 0 && this.items.length === 0) {\n+ this.setItemsFromNgOptions();\n+ }\n+ }\n+\nngOnChanges(changes) {\nif (changes.bindLabel || changes.bindValue) {\nthis.itemsList.setBindOptions(this.bindLabel, this.bindValue);\n@@ -342,6 +351,30 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, ControlV\n}\n}\n+ private setItemsFromNgOptions() {\n+ if (!this.bindValue) {\n+ this.bindValue = 'value';\n+ this.itemsList.setBindOptions(this.bindLabel, this.bindValue);\n+ }\n+\n+ const handleNgOptions = (options) => {\n+ this.items = options.map(option => ({\n+ value: option.value,\n+ label: option.elementRef.nativeElement.innerHTML\n+ }));\n+ this.itemsList.setItems(this.items);\n+\n+ if (this._ngModel) {\n+ this.itemsList.clearSelected();\n+ this.selectWriteValue(this._ngModel);\n+ }\n+ this.detectChanges();\n+ };\n+\n+ this.ngOptions.changes.subscribe(options => handleNgOptions(options));\n+ handleNgOptions(this.ngOptions);\n+ }\n+\nprivate handleDocumentClick() {\nconst handler = ($event) => {\n// prevent close if clicked on select\n@@ -399,7 +432,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, ControlV\nif (item) {\nthis.itemsList.select(item);\n} else {\n- if (!this.bindValue) {\n+ if (val instanceof Object) {\nthis.itemsList.addItem(val);\nthis.itemsList.select(val);\n}\n",
"new_path": "src/ng-select/ng-select.component.ts",
"old_path": "src/ng-select/ng-select.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -6,10 +6,12 @@ import { NgOptionTemplateDirective, NgLabelTemplateDirective } from './ng-templa\nimport { VirtualScrollModule } from './virtual-scroll.component';\nimport { SpinnerComponent } from './spinner.component';\nimport { NgSelectConfig } from './ng-select.types';\n+import { NgOptionComponent } from './ng-option.component';\n@NgModule({\ndeclarations: [\nNgSelectComponent,\n+ NgOptionComponent,\nNgOptionTemplateDirective,\nNgLabelTemplateDirective,\nSpinnerComponent\n@@ -20,6 +22,7 @@ import { NgSelectConfig } from './ng-select.types';\n],\nexports: [\nNgSelectComponent,\n+ NgOptionComponent,\nNgOptionTemplateDirective,\nNgLabelTemplateDirective\n]\n",
"new_path": "src/ng-select/ng-select.module.ts",
"old_path": "src/ng-select/ng-select.module.ts"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
feat: ng-option support for simple dropdowns (#113)
| 1
|
feat
| null |
791,834
|
31.10.2017 16:26:58
| 25,200
|
6e8db9150241b5d1d207fdaefc118bedbca91462
|
core: record top-level warnings in LHR and display in report
|
[
{
"change_type": "MODIFY",
"diff": "@@ -99,7 +99,11 @@ class GatherRunner {\nconst resetStorage = !options.flags.disableStorageReset;\n// Enable emulation based on flags\nreturn driver.assertNoSameOriginServiceWorkerClients(options.url)\n- .then(_ => gathererResults.UserAgent = [driver.getUserAgent()])\n+ .then(_ => driver.getUserAgent())\n+ .then(userAgent => {\n+ gathererResults.UserAgent = [userAgent];\n+ GatherRunner.warnOnHeadless(userAgent, gathererResults);\n+ })\n.then(_ => driver.beginEmulation(options.flags))\n.then(_ => driver.enableRuntimeEvents())\n.then(_ => driver.cacheNatives())\n@@ -162,6 +166,19 @@ class GatherRunner {\n}\n}\n+ /**\n+ * Add run warning if running in Headless Chrome.\n+ * @param {string} userAgent\n+ * @param {!GathererResults} gathererResults\n+ */\n+ static warnOnHeadless(userAgent, gathererResults) {\n+ if (userAgent.startsWith('HeadlessChrome')) {\n+ gathererResults.LighthouseRunWarnings.push('Your site\\'s mobile performance may be ' +\n+ 'worse than the numbers presented in this report. Lighthouse could not test on a ' +\n+ 'mobile connection because Headless Chrome does not support network throttling.');\n+ }\n+ }\n+\n/**\n* Navigates to about:blank and calls beforePass() on gatherers before tracing\n* has started and before navigation to the target page.\n@@ -301,6 +318,9 @@ class GatherRunner {\nstatic collectArtifacts(gathererResults) {\nconst artifacts = {};\n+ // Nest LighthouseRunWarnings, if any, so they will be collected into artifact.\n+ gathererResults.LighthouseRunWarnings = [gathererResults.LighthouseRunWarnings];\n+\nreturn Object.keys(gathererResults).reduce((chain, gathererName) => {\nreturn chain.then(_ => {\nconst phaseResultsPromises = gathererResults[gathererName];\n@@ -349,7 +369,9 @@ class GatherRunner {\npasses = this.instantiateGatherers(passes, options.config.configDir);\n- const gathererResults = {};\n+ const gathererResults = {\n+ LighthouseRunWarnings: [],\n+ };\nreturn driver.connect()\n.then(_ => GatherRunner.loadBlank(driver))\n",
"new_path": "lighthouse-core/gather/gather-runner.js",
"old_path": "lighthouse-core/gather/gather-runner.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -114,6 +114,26 @@ class ReportRenderer {\nreturn leftNav;\n}\n+ /**\n+ * Returns a div with a list of top-level warnings, or an empty div if no warnings.\n+ * @param {!ReportRenderer.ReportJSON} report\n+ * @return {!Node}\n+ */\n+ _renderReportWarnings(report) {\n+ if (!report.runWarnings || report.runWarnings.length === 0) {\n+ return this._dom.createElement('div');\n+ }\n+\n+ const container = this._dom.cloneTemplate('#tmpl-lh-run-warnings', this._templateContext);\n+ const warnings = this._dom.find('ul', container);\n+ for (const warningString of report.runWarnings) {\n+ const warning = warnings.appendChild(this._dom.createElement('li'));\n+ warning.textContent = warningString;\n+ }\n+\n+ return container;\n+ }\n+\n/**\n* @param {!ReportRenderer.ReportJSON} report\n* @return {!Element}\n@@ -124,6 +144,8 @@ class ReportRenderer {\ncontainer.appendChild(this._renderReportNav(report));\nconst reportSection = container.appendChild(this._dom.createElement('div', 'lh-report'));\n+ reportSection.appendChild(this._renderReportWarnings(report));\n+\nlet scoreHeader;\nconst isSoloCategory = report.reportCategories.length === 1;\nif (!isSoloCategory) {\n@@ -202,6 +224,7 @@ ReportRenderer.GroupJSON; // eslint-disable-line no-unused-expressions\n* timing: {total: number},\n* initialUrl: string,\n* url: string,\n+ * runWarnings: (!Array<string>|undefined),\n* artifacts: {traces: !Object},\n* reportCategories: !Array<!ReportRenderer.CategoryJSON>,\n* reportGroups: !Object<string, !ReportRenderer.GroupJSON>,\n",
"new_path": "lighthouse-core/report/v2/renderer/report-renderer.js",
"old_path": "lighthouse-core/report/v2/renderer/report-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -754,6 +754,20 @@ span.lh-node:hover {\nmargin-top: 0;\n}\n+.lh-run-warnings {\n+ font-size: var(--body-font-size);\n+ margin: var(--section-padding);\n+ padding: var(--section-padding);\n+ background-color: hsla(40, 100%, 91%, 1);\n+ color: var(--secondary-text-color);\n+}\n+.lh-run-warnings li {\n+ margin-bottom: calc(var(--header-line-height) / 2);\n+}\n+.lh-run-warnings::before {\n+ display: inline-block;\n+}\n+\n.lh-scores-header {\ndisplay: flex;\njustify-content: center;\n",
"new_path": "lighthouse-core/report/v2/report-styles.css",
"old_path": "lighthouse-core/report/v2/report-styles.css"
},
{
"change_type": "MODIFY",
"diff": "+<!-- Lighthouse run warnings -->\n+<template id=\"tmpl-lh-run-warnings\">\n+ <div class=\"lh-run-warnings lh-debug\">\n+ <strong>There were issues affecting this run of Lighthouse:</strong>\n+ <ul></ul>\n+ </div>\n+</template>\n+\n<!-- Lighthouse category score -->\n<template id=\"tmpl-lh-category-score\">\n<div class=\"lh-score\">\n",
"new_path": "lighthouse-core/report/v2/templates.html",
"old_path": "lighthouse-core/report/v2/templates.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -23,6 +23,9 @@ class Runner {\nconst config = opts.config;\n+ // List of top-level warnings for this Lighthouse run.\n+ const lighthouseRunWarnings = [];\n+\n// save the initialUrl provided by the user\nopts.initialUrl = opts.url;\nif (typeof opts.initialUrl !== 'string' || opts.initialUrl.length === 0) {\n@@ -73,8 +76,13 @@ class Runner {\nrun = run.then(_ => config.artifacts);\n}\n- // Add computed artifacts.\nrun = run.then(artifacts => {\n+ // Bring in lighthouseRunWarnings from gathering stage.\n+ if (artifacts.LighthouseRunWarnings) {\n+ lighthouseRunWarnings.push(...artifacts.LighthouseRunWarnings);\n+ }\n+\n+ // And add computed artifacts.\nreturn Object.assign({}, artifacts, Runner.instantiateComputedArtifacts());\n});\n@@ -90,7 +98,6 @@ class Runner {\nreturn artifacts;\n});\n-\nrun = run.then(artifacts => {\nlog.log('status', 'Analyzing and running audits...');\nreturn artifacts;\n@@ -150,6 +157,7 @@ class Runner {\ngeneratedTime: (new Date()).toJSON(),\ninitialUrl: opts.initialUrl,\nurl: opts.url,\n+ runWarnings: lighthouseRunWarnings,\naudits: resultsById,\nartifacts: runResults.artifacts,\nruntimeConfig: Runner.getRuntimeConfig(opts.flags),\n",
"new_path": "lighthouse-core/runner.js",
"old_path": "lighthouse-core/runner.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -255,7 +255,7 @@ describe('GatherRunner', function() {\ncleanBrowserCaches: createCheck('calledCleanBrowserCaches'),\nclearDataForOrigin: createCheck('calledClearStorage'),\nblockUrlPatterns: asyncFunc,\n- getUserAgent: asyncFunc,\n+ getUserAgent: () => Promise.resolve('Fake user agent'),\n};\nreturn GatherRunner.setupDriver(driver, {}, {flags: {}}).then(_ => {\n@@ -313,7 +313,7 @@ describe('GatherRunner', function() {\ncleanBrowserCaches: createCheck('calledCleanBrowserCaches'),\nclearDataForOrigin: createCheck('calledClearStorage'),\nblockUrlPatterns: asyncFunc,\n- getUserAgent: asyncFunc,\n+ getUserAgent: () => Promise.resolve('Fake user agent'),\n};\nreturn GatherRunner.setupDriver(driver, {}, {\n@@ -739,6 +739,8 @@ describe('GatherRunner', function() {\nPromise.reject(someOtherError),\nPromise.resolve(1729),\n],\n+\n+ LighthouseRunWarnings: [],\n};\nreturn GatherRunner.collectArtifacts(gathererResults).then(artifacts => {\n@@ -749,6 +751,22 @@ describe('GatherRunner', function() {\n});\n});\n+ it('produces a LighthouseRunWarnings artifact from array of warnings', () => {\n+ const LighthouseRunWarnings = [\n+ 'warning0',\n+ 'warning1',\n+ 'warning2',\n+ ];\n+\n+ const gathererResults = {\n+ LighthouseRunWarnings,\n+ };\n+\n+ return GatherRunner.collectArtifacts(gathererResults).then(artifacts => {\n+ assert.deepStrictEqual(artifacts.LighthouseRunWarnings, LighthouseRunWarnings);\n+ });\n+ });\n+\nit('supports sync and async throwing of non-fatal errors from gatherers', () => {\nconst gatherers = [\n// sync\n@@ -923,4 +941,16 @@ describe('GatherRunner', function() {\n});\n});\n});\n+\n+ it('issues a lighthouseRunWarnings if running in Headless', () => {\n+ const userAgent = 'HeadlessChrome/64.0.3240.0';\n+ const gathererResults = {\n+ LighthouseRunWarnings: [],\n+ };\n+\n+ GatherRunner.warnOnHeadless(userAgent, gathererResults);\n+ assert.strictEqual(gathererResults.LighthouseRunWarnings.length, 1);\n+ const warning = gathererResults.LighthouseRunWarnings[0];\n+ assert.ok(/Headless Chrome/.test(warning));\n+ });\n});\n",
"new_path": "lighthouse-core/test/gather/gather-runner-test.js",
"old_path": "lighthouse-core/test/gather/gather-runner-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -115,6 +115,30 @@ describe('ReportRenderer V2', () => {\n});\n});\n+ it('renders no warning section when no lighthouseRunWarnings occur', () => {\n+ const container = renderer._dom._document.body;\n+ const output = renderer.renderReport(sampleResults, container);\n+ assert.strictEqual(output.querySelector('.lh-run-warnings'), null);\n+ });\n+\n+ it('renders a warning section', () => {\n+ const runWarnings = [\n+ 'Less bad thing',\n+ 'Really bad thing',\n+ 'LH should maybe just retire now',\n+ ];\n+ const warningResults = Object.assign({}, sampleResults, {runWarnings});\n+ const container = renderer._dom._document.body;\n+ const output = renderer.renderReport(warningResults, container);\n+\n+ const warningEls = output.querySelectorAll('.lh-run-warnings > ul > li');\n+ assert.strictEqual(warningEls.length, runWarnings.length);\n+ warningEls.forEach((warningEl, index) => {\n+ const warningText = warningEl.textContent;\n+ assert.strictEqual(warningText, runWarnings[index]);\n+ });\n+ });\n+\nit('renders a footer', () => {\nconst footer = renderer._renderReportFooter(sampleResults);\nconst footerContent = footer.querySelector('.lh-footer').textContent;\n",
"new_path": "lighthouse-core/test/report/v2/renderer/report-renderer-test.js",
"old_path": "lighthouse-core/test/report/v2/renderer/report-renderer-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -453,4 +453,22 @@ describe('Runner', () => {\n}\n});\n});\n+\n+ it('includes any LighthouseRunWarnings from artifacts in output', () => {\n+ const url = 'https://example.com';\n+ const LighthouseRunWarnings = [\n+ 'warning0',\n+ 'warning1',\n+ ];\n+ const config = new Config({\n+ artifacts: {\n+ LighthouseRunWarnings,\n+ },\n+ audits: [],\n+ });\n+\n+ return Runner.run(null, {url, config, driverMock}).then(results => {\n+ assert.deepStrictEqual(results.runWarnings, LighthouseRunWarnings);\n+ });\n+ });\n});\n",
"new_path": "lighthouse-core/test/runner-test.js",
"old_path": "lighthouse-core/test/runner-test.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core: record top-level warnings in LHR and display in report (#3692)
| 1
|
core
| null |
791,723
|
31.10.2017 16:31:07
| 25,200
|
fbe3fda0d7203039e378c101e482a7974c2f9949
|
report(redirects): reformat results, incl all requests and wasted time,
|
[
{
"change_type": "MODIFY",
"diff": "@@ -20,7 +20,7 @@ module.exports = [\nrawValue: '>=500',\ndetails: {\nitems: {\n- length: 2,\n+ length: 3,\n},\n},\n},\n@@ -32,10 +32,10 @@ module.exports = [\naudits: {\n'redirects': {\nscore: 100,\n- rawValue: 0,\n+ rawValue: '>=250',\ndetails: {\nitems: {\n- length: 1,\n+ length: 2,\n},\n},\n},\n",
"new_path": "lighthouse-cli/test/smokehouse/redirects/expectations.js",
"old_path": "lighthouse-cli/test/smokehouse/redirects/expectations.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -34,6 +34,7 @@ class GeolocationOnStart extends ViolationAudit {\n* @return {!AuditResult}\n*/\nstatic audit(artifacts) {\n+ // 'Only request geolocation information in response to a user gesture.'\nconst results = ViolationAudit.getViolationResults(artifacts, /geolocation/);\nconst headings = [\n",
"new_path": "lighthouse-core/audits/dobetterweb/geolocation-on-start.js",
"old_path": "lighthouse-core/audits/dobetterweb/geolocation-on-start.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -32,38 +32,45 @@ class Redirects extends Audit {\n.then(mainResource => {\n// redirects is only available when redirects happens\nconst redirectRequests = Array.from(mainResource.redirects || []);\n+\n// add main resource to redirectRequests so we can use it to calculate wastedMs\nredirectRequests.push(mainResource);\n- let totalWastedMs = 0;\n+ let totalWastedMs = 0;\nconst pageRedirects = [];\n+\n+ // Kickoff the results table (with the initial request) if there are > 1 redirects\n+ if (redirectRequests.length > 1) {\n+ pageRedirects.push({\n+ url: `(Initial: ${redirectRequests[0].url})`,\n+ wastedMs: 'n/a',\n+ });\n+ }\n+\nfor (let i = 1; i < redirectRequests.length; i++) {\n- const request = redirectRequests[i - 1];\n- const nextRequest = redirectRequests[i];\n- const wastedMs = (nextRequest.startTime - request.startTime) * 1000;\n+ const initialRequest = redirectRequests[i - 1];\n+ const redirectedRequest = redirectRequests[i];\n- // We skip the first redirect in our calculations but show it in the table below.\n- // We allow 1 redirect (www. => m.)\n- if (i > 1) {\n+ const wastedMs = (redirectedRequest.startTime - initialRequest.startTime) * 1000;\ntotalWastedMs += wastedMs;\n- }\npageRedirects.push({\n- url: request.url,\n- wastedMs: Util.formatMilliseconds(wastedMs),\n+ url: redirectedRequest.url,\n+ wastedMs: Util.formatMilliseconds(wastedMs, 1),\n});\n}\nconst headings = [\n- {key: 'url', itemType: 'text', text: 'URL'},\n+ {key: 'url', itemType: 'text', text: 'Redirected URL'},\n{key: 'wastedMs', itemType: 'text', text: 'Time for Redirect'},\n];\nconst details = Audit.makeTableDetails(headings, pageRedirects);\nreturn {\n- score: UnusedBytes.scoreForWastedMs(totalWastedMs),\n+ // We award a passing grade if you only have 1 redirect\n+ score: redirectRequests.length <= 2 ? 100 : UnusedBytes.scoreForWastedMs(totalWastedMs),\nrawValue: totalWastedMs,\n- displayValue: Util.formatMilliseconds(totalWastedMs),\n+ displayValue: Util.formatMilliseconds(totalWastedMs, 1),\nextendedInfo: {\nvalue: {\nwastedMs: totalWastedMs,\n",
"new_path": "lighthouse-core/audits/redirects.js",
"old_path": "lighthouse-core/audits/redirects.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -9,41 +9,54 @@ const Audit = require('../../audits/redirects.js');\nconst assert = require('assert');\n/* eslint-env mocha */\n-const FAILING_REDIRECTS = {\n+const FAILING_THREE_REDIRECTS = {\nstartTime: 17,\n+ url: 'http://exampel.com/',\nredirects: [\n{\n- endTime: 1,\n- responseReceivedTime: 5,\nstartTime: 0,\nurl: 'http://example.com/',\n},\n{\n- endTime: 16,\n- responseReceivedTime: 14,\nstartTime: 11,\nurl: 'https://example.com/',\n},\n{\n- endTime: 17,\n- responseReceivedTime: 15,\nstartTime: 12,\nurl: 'https://m.example.com/',\n},\n],\n};\n+const FAILING_TWO_REDIRECTS = {\n+ startTime: 446.286,\n+ url: 'http://lisairish.com/',\n+ redirects: [\n+ {\n+ startTime: 445.648,\n+ url: 'https://lisairish.com/',\n+ },\n+ {\n+ startTime: 445.757,\n+ url: 'https://www.lisairish.com/',\n+ },\n+ ],\n+};\n+\nconst SUCCESS_ONE_REDIRECT = {\n- startTime: 0.7,\n+ startTime: 136.383,\n+ url: 'https://lisairish.com/',\nredirects: [{\n- endTime: 0.7,\n- responseReceivedTime: 5,\n- startTime: 0,\n- url: 'https://example.com/',\n+ startTime: 135.873,\n+ url: 'https://www.lisairish.com/',\n}],\n};\n-const SUCCESS_NOREDIRECT = {};\n+const SUCCESS_NOREDIRECT = {\n+ startTime: 135.873,\n+ url: 'https://www.google.com/',\n+ redirects: [],\n+};\nconst mockArtifacts = (mockChain) => {\nreturn {\n@@ -60,19 +73,28 @@ const mockArtifacts = (mockChain) => {\n};\ndescribe('Performance: Redirects audit', () => {\n- it('fails when more than one redirect detected', () => {\n- return Audit.audit(mockArtifacts(FAILING_REDIRECTS)).then(output => {\n+ it('fails when 3 redirects detected', () => {\n+ return Audit.audit(mockArtifacts(FAILING_THREE_REDIRECTS)).then(output => {\nassert.equal(output.score, 0);\n+ assert.equal(output.details.items.length, 4);\n+ assert.equal(output.rawValue, 17000);\n+ });\n+ });\n+ it('fails when 2 redirects detected', () => {\n+ return Audit.audit(mockArtifacts(FAILING_TWO_REDIRECTS)).then(output => {\n+ assert.equal(output.score, 65);\nassert.equal(output.details.items.length, 3);\n- assert.equal(output.rawValue, 6000);\n+ assert.equal(Math.round(output.rawValue), 638);\n});\n});\nit('passes when one redirect detected', () => {\nreturn Audit.audit(mockArtifacts(SUCCESS_ONE_REDIRECT)).then(output => {\n+ // If === 1 redirect, perfect score is expected, regardless of latency\nassert.equal(output.score, 100);\n- assert.equal(output.details.items.length, 1);\n- assert.equal(output.rawValue, 0);\n+ // We will still generate a table and show wasted time\n+ assert.equal(output.details.items.length, 2);\n+ assert.equal(Math.round(output.rawValue), 510);\n});\n});\n",
"new_path": "lighthouse-core/test/audits/redirects-test.js",
"old_path": "lighthouse-core/test/audits/redirects-test.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
report(redirects): reformat results, incl all requests and wasted time, (#3492)
| 1
|
report
|
redirects
|
807,849
|
01.11.2017 13:49:55
| 25,200
|
b17585918a944cd0bbad5492b722b15024881744
|
refactor: share splitVersion() between NpmUtilities and AddCommand
|
[
{
"change_type": "MODIFY",
"diff": "@@ -5,14 +5,7 @@ import writePkg from \"write-pkg\";\nimport ChildProcessUtilities from \"./ChildProcessUtilities\";\nimport FileSystemUtilities from \"./FileSystemUtilities\";\n-\n-// Take a dep like \"foo@^1.0.0\".\n-// Return a tuple like [\"foo\", \"^1.0.0\"].\n-// Handles scoped packages.\n-// Returns undefined for version if none specified.\n-function splitVersion(dep) {\n- return dep.match(/^(@?[^@]+)(?:@(.+))?/).slice(1, 3);\n-}\n+import splitVersion from \"../utils/splitVersion\";\nfunction execInstall(directory, {\nregistry,\n",
"new_path": "src/NpmUtilities.js",
"old_path": "src/NpmUtilities.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -6,6 +6,7 @@ import semver from \"semver\";\nimport writePkg from \"write-pkg\";\nimport BootstrapCommand from \"./BootstrapCommand\";\nimport Command, { ValidationError } from \"../Command\";\n+import splitVersion from \"../utils/splitVersion\";\nexport const command = \"add [args..]\";\n@@ -129,7 +130,6 @@ export default class AddCommand extends Command {\nreturn results;\n}, {});\n-\nreturn readPkg(manifestPath, {normalize: false})\n.then(a => {\nconst previous = a[this.dependencyType] || {};\n@@ -201,10 +201,6 @@ function notSatisfiedMessage(unsatisfied) {\n`;\n}\n-function splitVersion(dep) {\n- return dep.match(/^(@?[^@]+)(?:@(.+))?/).slice(1, 3);\n-}\n-\nfunction getRangeToReference(current, available, requested) {\nconst resolved = requested === 'latest'\n? `^${available}`\n",
"new_path": "src/commands/AddCommand.js",
"old_path": "src/commands/AddCommand.js"
},
{
"change_type": "ADD",
"diff": "+// Take a dep like \"foo@^1.0.0\".\n+// Return a tuple like [\"foo\", \"^1.0.0\"].\n+// Handles scoped packages.\n+// Returns undefined for version if none specified.\n+export default function splitVersion(dep) {\n+ return dep.match(/^(@?[^@]+)(?:@(.+))?/).slice(1, 3);\n+}\n",
"new_path": "src/utils/splitVersion.js",
"old_path": null
}
] |
JavaScript
|
MIT License
|
lerna/lerna
|
refactor: share splitVersion() between NpmUtilities and AddCommand
| 1
|
refactor
| null |
807,849
|
01.11.2017 13:57:36
| 25,200
|
5d34a994be5a612d469f39dfd5e845aaa4d9b69d
|
fix(copypasta): use correct import path
|
[
{
"change_type": "MODIFY",
"diff": "@@ -5,7 +5,7 @@ import writePkg from \"write-pkg\";\nimport ChildProcessUtilities from \"./ChildProcessUtilities\";\nimport FileSystemUtilities from \"./FileSystemUtilities\";\n-import splitVersion from \"../utils/splitVersion\";\n+import splitVersion from \"./utils/splitVersion\";\nfunction execInstall(directory, {\nregistry,\n",
"new_path": "src/NpmUtilities.js",
"old_path": "src/NpmUtilities.js"
}
] |
JavaScript
|
MIT License
|
lerna/lerna
|
fix(copypasta): use correct import path
| 1
|
fix
|
copypasta
|
807,849
|
01.11.2017 16:06:05
| 25,200
|
106ffbc23e4939202a9dd253d23180a1ea27053a
|
test: cover missed conditionals in AddCommand
|
[
{
"change_type": "MODIFY",
"diff": "@@ -141,7 +141,7 @@ export default class AddCommand extends Command {\n})\n.then(({a, b}) => {\nconst changed = JSON.stringify(a) !== JSON.stringify(b);\n- const exec = changed ? () => writePkg(manifestPath, b) : () => Promise.resolve;\n+ const exec = changed ? () => writePkg(manifestPath, b) : () => Promise.resolve();\nreturn exec()\n.then(() => ({\n",
"new_path": "src/commands/AddCommand.js",
"old_path": "src/commands/AddCommand.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -155,7 +155,7 @@ describe(\"AddCommand\", () => {\nconst lernaAdd = run(testDir);\nawait lernaAdd(\"@test/package-2\");\n- expect(readPkg(testDir, 'packages/package-1')).toDependOn(\"foo\");\n+ expect(readPkg(testDir, 'packages/package-1')).toDependOn(\"pify\");\n});\nit(\"should retain existing devDependencies\", async () => {\n@@ -163,7 +163,7 @@ describe(\"AddCommand\", () => {\nconst lernaAdd = run(testDir);\nawait lernaAdd(\"@test/package-1\", \"--dev\");\n- expect(readPkg(testDir, 'packages/package-2')).toDevDependOn(\"bar\");\n+ expect(readPkg(testDir, 'packages/package-2')).toDevDependOn(\"file-url\");\n});\nit(\"should bootstrap changed packages\", async () => {\n@@ -203,4 +203,29 @@ describe(\"AddCommand\", () => {\nexpect(BootstrapCommand).not.toHaveBeenCalled();\n});\n+\n+ it(\"bootstraps mixed local and external dependencies\", async () => {\n+ const testDir = await initFixture(\"AddCommand/existing\");\n+ const lernaAdd = run(testDir);\n+ await lernaAdd(\"@test/package-2\", \"pify\");\n+\n+ const pkg1 = readPkg(testDir, 'packages/package-1');\n+ const pkg2 = readPkg(testDir, 'packages/package-2');\n+ const pkg3 = readPkg(testDir, 'packages/package-3');\n+\n+ expect(pkg1).toDependOn(\"pify\", \"^3.0.0\"); // overwrites ^2.0.0\n+ expect(pkg1).toDependOn(\"@test/package-2\");\n+\n+ expect(pkg2).toDependOn(\"pify\", \"^3.0.0\");\n+\n+ expect(pkg3).toDependOn(\"pify\", \"^3.0.0\");\n+ expect(pkg3).toDependOn(\"@test/package-2\"); // existing, but should stay\n+\n+ const flags = commandFlags(BootstrapCommand);\n+ expect(flags.scope).toEqual([\n+ '@test/package-1',\n+ '@test/package-2',\n+ '@test/package-3',\n+ ]);\n+ });\n});\n",
"new_path": "test/AddCommand.js",
"old_path": "test/AddCommand.js"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@test/package-1\",\n- \"version\": \"1.0.0\",\n- \"dependencies\": {\n- },\n- \"devDependencies\": {\n- }\n+ \"version\": \"1.0.0\"\n}\n",
"new_path": "test/fixtures/AddCommand/basic/packages/package-1/package.json",
"old_path": "test/fixtures/AddCommand/basic/packages/package-1/package.json"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"@test/package-2\",\n- \"version\": \"2.0.0\",\n- \"dependencies\": {\n- },\n- \"devDependencies\": {\n- }\n+ \"version\": \"2.0.0\"\n}\n",
"new_path": "test/fixtures/AddCommand/basic/packages/package-2/package.json",
"old_path": "test/fixtures/AddCommand/basic/packages/package-2/package.json"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"package-3\",\n- \"version\": \"1.0.0\",\n- \"dependencies\": {\n- },\n- \"devDependencies\": {\n- }\n+ \"version\": \"1.0.0\"\n}\n",
"new_path": "test/fixtures/AddCommand/basic/packages/package-3/package.json",
"old_path": "test/fixtures/AddCommand/basic/packages/package-3/package.json"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"package-4\",\n- \"version\": \"1.0.0\",\n- \"dependencies\": {\n- },\n- \"devDependencies\": {\n- }\n+ \"version\": \"1.0.0\"\n}\n",
"new_path": "test/fixtures/AddCommand/basic/packages/package-4/package.json",
"old_path": "test/fixtures/AddCommand/basic/packages/package-4/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"name\": \"@test/package-1\",\n\"version\": \"1.0.0\",\n\"dependencies\": {\n- \"foo\": \"1.0.0\"\n+ \"pify\": \"^2.0.0\"\n}\n}\n",
"new_path": "test/fixtures/AddCommand/existing/packages/package-1/package.json",
"old_path": "test/fixtures/AddCommand/existing/packages/package-1/package.json"
},
{
"change_type": "MODIFY",
"diff": "\"name\": \"@test/package-2\",\n\"version\": \"2.0.0\",\n\"devDependencies\": {\n- \"bar\": \"1.0.0\"\n+ \"file-url\": \"^1.0.0\"\n}\n}\n",
"new_path": "test/fixtures/AddCommand/existing/packages/package-2/package.json",
"old_path": "test/fixtures/AddCommand/existing/packages/package-2/package.json"
},
{
"change_type": "ADD",
"diff": "+{\n+ \"name\": \"@test/package-3\",\n+ \"version\": \"1.0.0\",\n+ \"dependencies\": {\n+ \"@test/package-2\": \"^1.0.0\",\n+ \"pify\": \"^3.0.0\"\n+ }\n+}\n",
"new_path": "test/fixtures/AddCommand/existing/packages/package-3/package.json",
"old_path": null
}
] |
JavaScript
|
MIT License
|
lerna/lerna
|
test: cover missed conditionals in AddCommand
| 1
|
test
| null |
807,849
|
01.11.2017 16:11:03
| 25,200
|
ffc9b30f8dba63111d616c5951033c4e3b22c144
|
chore: single -> double quotes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -14,7 +14,7 @@ export const describe = \"Add packages as dependency to matched packages\";\nexport const builder = {\ndev: {\n- describe: `Save as devDependency`\n+ describe: \"Save as to devDependencies\"\n},\n};\n@@ -30,10 +30,10 @@ export default class AddCommand extends Command {\ninitialize(callback) {\nconst pkgs = this.input\n- .filter(input => typeof input === 'string' && input.trim() !== '')\n- .map(input => splitVersion(input) || [input, 'latest'])\n+ .filter(input => typeof input === \"string\" && input.trim() !== \"\")\n+ .map(input => splitVersion(input) || [input, \"latest\"])\n.filter(split => Array.isArray(split))\n- .map(([name, versionRange = 'latest']) => ({name, versionRange}));\n+ .map(([name, versionRange = \"latest\"]) => ({name, versionRange}));\nif (pkgs.length === 0) {\nconst err = new ValidationError(\"EINPUT\", \"Missing list of packages to add to your project.\");\n@@ -57,7 +57,7 @@ export default class AddCommand extends Command {\nreturn callback(err);\n}\n- this.dependencyType = this.options.dev ? 'devDependencies' : 'dependencies';\n+ this.dependencyType = this.options.dev ? \"devDependencies\" : \"dependencies\";\nPromise.all(\npkgs.map(({name, versionRange}) =>\n@@ -95,7 +95,7 @@ export default class AddCommand extends Command {\n});\nif (this.packagesToChange.length === 0) {\n- const packagesToInstallList = this.packagesToInstall.map(pkg => pkg.name).join(', ');\n+ const packagesToInstallList = this.packagesToInstall.map(pkg => pkg.name).join(\", \");\nthis.logger.warn(`No packages found in scope where ${packagesToInstallList} can be added.`);\n}\n})\n@@ -187,7 +187,7 @@ export default class AddCommand extends Command {\nif (!pkg) {\nreturn false;\n}\n- if (versionRange === 'latest') {\n+ if (versionRange === \"latest\") {\nreturn true;\n}\nreturn semver.intersects(pkg.version, versionRange);\n@@ -197,12 +197,12 @@ export default class AddCommand extends Command {\nfunction notSatisfiedMessage(unsatisfied) {\nreturn dedent`\nRequested range not satisfiable:\n- ${unsatisfied.map(u => `${u.name}@${u.versionRange} (available: ${u.version})`).join(', ')}\n+ ${unsatisfied.map(u => `${u.name}@${u.versionRange} (available: ${u.version})`).join(\", \")}\n`;\n}\nfunction getRangeToReference(current, available, requested) {\n- const resolved = requested === 'latest'\n+ const resolved = requested === \"latest\"\n? `^${available}`\n: requested;\n",
"new_path": "src/commands/AddCommand.js",
"old_path": "src/commands/AddCommand.js"
},
{
"change_type": "MODIFY",
"diff": "-import path from 'path';\n+import path from \"path\";\nimport log from \"npmlog\";\nimport FileSystemUtilities from \"../src/FileSystemUtilities\";\n@@ -13,12 +13,12 @@ import yargsRunner from \"./helpers/yargsRunner\";\nimport * as commandModule from \"../src/commands/AddCommand\";\nimport pkgMatchers from \"./helpers/pkgMatchers\";\n-log.level = 'silent';\n+log.level = \"silent\";\nconst run = yargsRunner(commandModule);\nconst readPkg = (testDir, pkg) => {\n- return JSON.parse(FileSystemUtilities.readFileSync(path.join(testDir, pkg, 'package.json')));\n+ return JSON.parse(FileSystemUtilities.readFileSync(path.join(testDir, pkg, \"package.json\")));\n};\nconst expectError = async (fn) => {\n@@ -77,10 +77,10 @@ describe(\"AddCommand\", () => {\nconst lernaAdd = run(testDir);\nawait lernaAdd(\"lerna\");\n- expect(readPkg(testDir, 'packages/package-1')).toDependOn(\"lerna\");\n- expect(readPkg(testDir, 'packages/package-2')).toDependOn(\"lerna\");\n- expect(readPkg(testDir, 'packages/package-3')).toDependOn(\"lerna\");\n- expect(readPkg(testDir, 'packages/package-4')).toDependOn(\"lerna\");\n+ expect(readPkg(testDir, \"packages/package-1\")).toDependOn(\"lerna\");\n+ expect(readPkg(testDir, \"packages/package-2\")).toDependOn(\"lerna\");\n+ expect(readPkg(testDir, \"packages/package-3\")).toDependOn(\"lerna\");\n+ expect(readPkg(testDir, \"packages/package-4\")).toDependOn(\"lerna\");\n});\nit(\"should reference local dependencies\", async () => {\n@@ -88,9 +88,9 @@ describe(\"AddCommand\", () => {\nconst lernaAdd = run(testDir);\nawait lernaAdd(\"@test/package-1\");\n- expect(readPkg(testDir, 'packages/package-2')).toDependOn(\"@test/package-1\");\n- expect(readPkg(testDir, 'packages/package-3')).toDependOn(\"@test/package-1\");\n- expect(readPkg(testDir, 'packages/package-4')).toDependOn(\"@test/package-1\");\n+ expect(readPkg(testDir, \"packages/package-2\")).toDependOn(\"@test/package-1\");\n+ expect(readPkg(testDir, \"packages/package-3\")).toDependOn(\"@test/package-1\");\n+ expect(readPkg(testDir, \"packages/package-4\")).toDependOn(\"@test/package-1\");\n});\nit(\"should reference to multiple dependencies\", async () => {\n@@ -98,12 +98,12 @@ describe(\"AddCommand\", () => {\nconst lernaAdd = run(testDir);\nawait lernaAdd(\"@test/package-1\", \"@test/package-2\");\n- expect(readPkg(testDir, 'packages/package-1')).toDependOn(\"@test/package-2\");\n- expect(readPkg(testDir, 'packages/package-2')).toDependOn(\"@test/package-1\");\n- expect(readPkg(testDir, 'packages/package-3')).toDependOn(\"@test/package-1\");\n- expect(readPkg(testDir, 'packages/package-3')).toDependOn(\"@test/package-2\");\n- expect(readPkg(testDir, 'packages/package-4')).toDependOn(\"@test/package-1\");\n- expect(readPkg(testDir, 'packages/package-4')).toDependOn(\"@test/package-2\");\n+ expect(readPkg(testDir, \"packages/package-1\")).toDependOn(\"@test/package-2\");\n+ expect(readPkg(testDir, \"packages/package-2\")).toDependOn(\"@test/package-1\");\n+ expect(readPkg(testDir, \"packages/package-3\")).toDependOn(\"@test/package-1\");\n+ expect(readPkg(testDir, \"packages/package-3\")).toDependOn(\"@test/package-2\");\n+ expect(readPkg(testDir, \"packages/package-4\")).toDependOn(\"@test/package-1\");\n+ expect(readPkg(testDir, \"packages/package-4\")).toDependOn(\"@test/package-2\");\n});\nit(\"should reference current caret range if unspecified\", async () => {\n@@ -111,8 +111,8 @@ describe(\"AddCommand\", () => {\nconst lernaAdd = run(testDir);\nawait lernaAdd(\"@test/package-1\", \"@test/package-2\");\n- expect(readPkg(testDir, 'packages/package-1')).toDependOn(\"@test/package-2\", \"^2.0.0\");\n- expect(readPkg(testDir, 'packages/package-2')).toDependOn(\"@test/package-1\", \"^1.0.0\");\n+ expect(readPkg(testDir, \"packages/package-1\")).toDependOn(\"@test/package-2\", \"^2.0.0\");\n+ expect(readPkg(testDir, \"packages/package-2\")).toDependOn(\"@test/package-1\", \"^1.0.0\");\n});\nit(\"should reference specfied range\", async () => {\n@@ -120,7 +120,7 @@ describe(\"AddCommand\", () => {\nconst lernaAdd = run(testDir);\nawait lernaAdd(\"@test/package-1@~1\");\n- expect(readPkg(testDir, 'packages/package-2')).toDependOn(\"@test/package-1\", \"~1\");\n+ expect(readPkg(testDir, \"packages/package-2\")).toDependOn(\"@test/package-1\", \"~1\");\n});\nit(\"should reference to devDepdendencies\", async () => {\n@@ -128,16 +128,16 @@ describe(\"AddCommand\", () => {\nconst lernaAdd = run(testDir);\nawait lernaAdd(\"@test/package-1\", \"--dev\");\n- expect(readPkg(testDir, 'packages/package-2')).toDevDependOn(\"@test/package-1\");\n- expect(readPkg(testDir, 'packages/package-3')).toDevDependOn(\"@test/package-1\");\n- expect(readPkg(testDir, 'packages/package-4')).toDevDependOn(\"@test/package-1\");\n+ expect(readPkg(testDir, \"packages/package-2\")).toDevDependOn(\"@test/package-1\");\n+ expect(readPkg(testDir, \"packages/package-3\")).toDevDependOn(\"@test/package-1\");\n+ expect(readPkg(testDir, \"packages/package-4\")).toDevDependOn(\"@test/package-1\");\n});\nit(\"should not reference packages to themeselves\", async () => {\nconst testDir = await initFixture(\"AddCommand/basic\");\nconst lernaAdd = run(testDir);\nawait lernaAdd(\"@test/package-1\");\n- expect(readPkg(testDir, 'packages/package-1')).not.toDependOn(\"@test/package-1\");\n+ expect(readPkg(testDir, \"packages/package-1\")).not.toDependOn(\"@test/package-1\");\n});\nit(\"should respect scopes\", async () => {\n@@ -145,9 +145,9 @@ describe(\"AddCommand\", () => {\nconst lernaAdd = run(testDir);\nawait lernaAdd(\"@test/package-1\", \"--scope=@test/package-2\");\n- expect(readPkg(testDir, 'packages/package-2')).toDependOn(\"@test/package-1\");\n- expect(readPkg(testDir, 'packages/package-3')).not.toDevDependOn(\"@test/package-1\");\n- expect(readPkg(testDir, 'packages/package-4')).not.toDevDependOn(\"@test/package-1\");\n+ expect(readPkg(testDir, \"packages/package-2\")).toDependOn(\"@test/package-1\");\n+ expect(readPkg(testDir, \"packages/package-3\")).not.toDevDependOn(\"@test/package-1\");\n+ expect(readPkg(testDir, \"packages/package-4\")).not.toDevDependOn(\"@test/package-1\");\n});\nit(\"should retain existing dependencies\", async () => {\n@@ -155,7 +155,7 @@ describe(\"AddCommand\", () => {\nconst lernaAdd = run(testDir);\nawait lernaAdd(\"@test/package-2\");\n- expect(readPkg(testDir, 'packages/package-1')).toDependOn(\"pify\");\n+ expect(readPkg(testDir, \"packages/package-1\")).toDependOn(\"pify\");\n});\nit(\"should retain existing devDependencies\", async () => {\n@@ -163,7 +163,7 @@ describe(\"AddCommand\", () => {\nconst lernaAdd = run(testDir);\nawait lernaAdd(\"@test/package-1\", \"--dev\");\n- expect(readPkg(testDir, 'packages/package-2')).toDevDependOn(\"file-url\");\n+ expect(readPkg(testDir, \"packages/package-2\")).toDevDependOn(\"file-url\");\n});\nit(\"should bootstrap changed packages\", async () => {\n@@ -172,8 +172,8 @@ describe(\"AddCommand\", () => {\nawait lernaAdd(\"@test/package-1\");\nconst flags = commandFlags(BootstrapCommand);\n- expect(flags).toHaveProperty('scope');\n- expect(flags.scope).toEqual(['@test/package-2', 'package-3', 'package-4']);\n+ expect(flags).toHaveProperty(\"scope\");\n+ expect(flags.scope).toEqual([\"@test/package-2\", \"package-3\", \"package-4\"]);\n});\nit(\"should only bootstrap scoped packages\", async () => {\n@@ -182,8 +182,8 @@ describe(\"AddCommand\", () => {\nawait lernaAdd(\"@test/package-1\", \"--scope\", \"@test/package-2\", \"--scope\", \"package-3\");\nconst flags = commandFlags(BootstrapCommand);\n- expect(flags).toHaveProperty('scope');\n- expect(flags.scope).toEqual(['@test/package-2', 'package-3']);\n+ expect(flags).toHaveProperty(\"scope\");\n+ expect(flags.scope).toEqual([\"@test/package-2\", \"package-3\"]);\n});\nit(\"should not bootstrap ignored packages\", async () => {\n@@ -192,8 +192,8 @@ describe(\"AddCommand\", () => {\nawait lernaAdd(\"@test/package-1\", \"--ignore\", \"@test/package-2\");\nconst flags = commandFlags(BootstrapCommand);\n- expect(flags).toHaveProperty('scope');\n- expect(flags.scope).toEqual(['package-3', 'package-4']);\n+ expect(flags).toHaveProperty(\"scope\");\n+ expect(flags.scope).toEqual([\"package-3\", \"package-4\"]);\n});\nit(\"should not bootstrap unchanged packages\", async () => {\n@@ -209,9 +209,9 @@ describe(\"AddCommand\", () => {\nconst lernaAdd = run(testDir);\nawait lernaAdd(\"@test/package-2\", \"pify\");\n- const pkg1 = readPkg(testDir, 'packages/package-1');\n- const pkg2 = readPkg(testDir, 'packages/package-2');\n- const pkg3 = readPkg(testDir, 'packages/package-3');\n+ const pkg1 = readPkg(testDir, \"packages/package-1\");\n+ const pkg2 = readPkg(testDir, \"packages/package-2\");\n+ const pkg3 = readPkg(testDir, \"packages/package-3\");\nexpect(pkg1).toDependOn(\"pify\", \"^3.0.0\"); // overwrites ^2.0.0\nexpect(pkg1).toDependOn(\"@test/package-2\");\n@@ -223,9 +223,9 @@ describe(\"AddCommand\", () => {\nconst flags = commandFlags(BootstrapCommand);\nexpect(flags.scope).toEqual([\n- '@test/package-1',\n- '@test/package-2',\n- '@test/package-3',\n+ \"@test/package-1\",\n+ \"@test/package-2\",\n+ \"@test/package-3\",\n]);\n});\n});\n",
"new_path": "test/AddCommand.js",
"old_path": "test/AddCommand.js"
}
] |
JavaScript
|
MIT License
|
lerna/lerna
|
chore: single -> double quotes
| 1
|
chore
| null |
807,849
|
01.11.2017 16:13:56
| 25,200
|
b187fcf323054b49936e88d3aa466abced017f24
|
chore: Update CHANGELOG for v2.5.1
|
[
{
"change_type": "MODIFY",
"diff": "+## v2.5.1 (2017-11-01)\n+\n+A quick bugfix for an overlooked case in `lerna add`.\n+\n+#### :bug: Bug Fix\n+* [#1100](https://github.com/lerna/lerna/pull/1100) Preserve existing deps with lerna add. ([@marionebl](https://github.com/marionebl))\n+\n+#### Committers: 1\n+- Mario Nebl ([marionebl](https://github.com/marionebl))\n+\n## v2.5.0 (2017-11-01)\nA new command (`lerna add`), new flags for bootstrap and link commands, and a much-improved experience when publishing \"final\" releases after a series of prereleases!\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
}
] |
JavaScript
|
MIT License
|
lerna/lerna
|
chore: Update CHANGELOG for v2.5.1
| 1
|
chore
| null |
573,227
|
02.11.2017 17:24:50
| -3,600
|
92b8c53e3b3d096a104b4434c9f71c73198d3c2b
|
test(server): fix ERR_SERVER_ALREADY_LISTEN issue
|
[
{
"change_type": "MODIFY",
"diff": "@@ -225,14 +225,12 @@ describe('query parser', function() {\nres.send(req.params);\n});\n- SERVER.listen(8080, function() {\nCLIENT.get('/hello/foo/?bar=baz', function(err, _, __, obj) {\nassert.ifError(err);\nassert.deepEqual(obj, { name: 'foo', bar: 'baz' });\ndone();\n});\n});\n- });\nit('<url>/?<queryString> broken', function(done) {\nSERVER.pre(restify.plugins.pre.sanitizePath());\n@@ -245,7 +243,6 @@ describe('query parser', function() {\nres.send(req.params);\n});\n- SERVER.listen(8080, function() {\nCLIENT.get('/?bar=baz', function(err, _, __, obj) {\nassert.ifError(err);\nassert.deepEqual(obj, { bar: 'baz' });\n@@ -253,4 +250,3 @@ describe('query parser', function() {\n});\n});\n});\n-});\n",
"new_path": "test/plugins/query.test.js",
"old_path": "test/plugins/query.test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -1229,7 +1229,6 @@ test('GH-652 throw InvalidVersion on version mismatch', function(t) {\nreturn res.send(req.route.version);\n}\nSERVER.get({ path: '/ping', version: '1.0.1' }, response);\n- SERVER.listen(0, '127.0.0.1', function() {\nvar opts = {\npath: '/ping',\nheaders: {\n@@ -1242,14 +1241,12 @@ test('GH-652 throw InvalidVersion on version mismatch', function(t) {\nt.done();\n});\n});\n-});\ntest('GH-652 throw InvalidVersion on non-versioned route', function(t) {\nfunction response(req, res, next) {\nreturn res.send(req.route.version);\n}\nSERVER.get({ path: '/ping' }, response);\n- SERVER.listen(0, '127.0.0.1', function() {\nvar opts = {\npath: '/ping',\nheaders: {\n@@ -1262,7 +1259,6 @@ test('GH-652 throw InvalidVersion on non-versioned route', function(t) {\nt.done();\n});\n});\n-});\ntest('GH-959 matchedVersion() should return on cached routes', function(t) {\nSERVER.get(\n@@ -1380,7 +1376,6 @@ test('content-type routing vendor', function(t) {\n}\n);\n- SERVER.listen(8080, function() {\nvar _done = 0;\nfunction done() {\n@@ -1413,7 +1408,6 @@ test('content-type routing vendor', function(t) {\ndone();\n});\n});\n-});\ntest('content-type routing params only', function(t) {\nSERVER.post(\n",
"new_path": "test/server.test.js",
"old_path": "test/server.test.js"
}
] |
JavaScript
|
MIT License
|
restify/node-restify
|
test(server): fix ERR_SERVER_ALREADY_LISTEN issue (#1549)
| 1
|
test
|
server
|
573,227
|
02.11.2017 17:25:17
| -3,600
|
f58d4b0618d8a214542734a5bd22fdc74f1cc2d9
|
test(server): do not run IPv6 related tests with TEST_SKIP_IP_V6 env. variable
|
[
{
"change_type": "MODIFY",
"diff": "@@ -6,6 +6,8 @@ node_js:\n- \"7\"\n- \"8\"\n- \"stable\"\n+env:\n+ - TEST_SKIP_IP_V6=true\nnotifications:\nwebhooks:\nurls:\n",
"new_path": ".travis.yml",
"old_path": ".travis.yml"
},
{
"change_type": "MODIFY",
"diff": "@@ -28,11 +28,16 @@ var after = helper.after;\nvar before = helper.before;\nvar test = helper.test;\n+var SKIP_IP_V6 = !!process.env.TEST_SKIP_IP_V6;\nvar PORT = process.env.UNIT_TEST_PORT || 0;\nvar CLIENT;\nvar FAST_CLIENT;\nvar SERVER;\n+if (SKIP_IP_V6) {\n+ console.warning('IPv6 tests are skipped: No IPv6 network is available');\n+}\n+\n///--- Tests\nbefore(function(cb) {\n@@ -108,6 +113,8 @@ test('listen and close (socketPath)', function(t) {\n});\n});\n+// Run IPv6 tests only if IPv6 network is available\n+if (!SKIP_IP_V6) {\ntest('gh-751 IPv4/IPv6 server URL', function(t) {\nt.equal(SERVER.url, 'http://127.0.0.1:' + PORT, 'ipv4 url');\n@@ -120,6 +127,7 @@ test('gh-751 IPv4/IPv6 server URL', function(t) {\n});\n});\n});\n+}\ntest('get (path only)', function(t) {\nvar r = SERVER.get('/foo/:id', function echoId(req, res, next) {\n",
"new_path": "test/server.test.js",
"old_path": "test/server.test.js"
}
] |
JavaScript
|
MIT License
|
restify/node-restify
|
test(server): do not run IPv6 related tests with TEST_SKIP_IP_V6 env. variable (#1547)
| 1
|
test
|
server
|
573,227
|
02.11.2017 17:55:44
| -3,600
|
6598949611b5dd610482167b6958600c3b31127d
|
chore(makefile): improve feedback
|
[
{
"change_type": "MODIFY",
"diff": "@@ -128,11 +128,11 @@ check-eslint::\n.PHONY: check-lint\ncheck-lint::\n- NO_STYLE=true $(ESLINT) $(JS_FILES)\n+ @(echo 'Running \"make check-lint\"'; NO_STYLE=true $(ESLINT) $(JS_FILES))\n.PHONY: check-style\ncheck-style::\n- NO_LINT=true $(ESLINT) $(JS_FILES)\n+ @(echo 'Running \"make check-style\"'; NO_LINT=true $(ESLINT) $(JS_FILES) || (echo 'Run \"make fix-style\" to auto-fix styling issues'; exit 1))\n.PHONY: fix-style\nfix-style::\n",
"new_path": "tools/mk/Makefile.targ",
"old_path": "tools/mk/Makefile.targ"
}
] |
JavaScript
|
MIT License
|
restify/node-restify
|
chore(makefile): improve feedback (#1548)
| 1
|
chore
|
makefile
|
573,227
|
02.11.2017 19:00:16
| -3,600
|
6b202853d62394f0448486c9b5bbc18589fd44e2
|
feat(http2): add native HTTP/2 support
|
[
{
"change_type": "MODIFY",
"diff": "@@ -40,7 +40,7 @@ permalink: /docs/request-api/\n**Extends http.IncomingMessage**\nWraps all of the node\n-[http.IncomingMessage](https://nodejs.org/api/http.html#http_http_incomingmessage)\n+[http.IncomingMessage](https://nodejs.org/api/http.html)\nAPIs, events and properties, plus the following.\n### accepts\n@@ -55,8 +55,8 @@ Otherwise the given type is matched by an exact match, and then subtypes.\n**Examples**\n-_You may pass the subtype such as html which is then converted internally to\n-text/html using the mime lookup table:_\n+_You may pass the subtype such as html which is then converted internally\n+to text/html using the mime lookup table:_\n```javascript\n// Accept: text/html\n@@ -95,8 +95,8 @@ Returns **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refer\n### getContentType\n-Returns the value of the content-type header. If a content-type is not set,\n-this will return a default value of `application/octet-stream`\n+Returns the value of the content-type header. If a content-type is not\n+set, this will return a default value of `application/octet-stream`\nReturns **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)**\n@@ -300,8 +300,8 @@ Returns **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refer\nStart the timer for a request handler.\nBy default, restify uses calls this automatically for all handlers\nregistered in your handler chain.\n-However, this can be called manually for nested functions inside the handler\n-chain to record timing information.\n+However, this can be called manually for nested functions inside the\n+handler chain to record timing information.\n**Parameters**\n@@ -310,8 +310,8 @@ chain to record timing information.\n**Examples**\n_You must explicitly invoke\n-endHandlerTimer() after invoking this function. Otherwise timing information\n-will be inaccurate._\n+endHandlerTimer() after invoking this function. Otherwise timing\n+information will be inaccurate._\n```javascript\nserver.get('/', function fooHandler(req, res, next) {\n",
"new_path": "docs/_api/request.md",
"old_path": "docs/_api/request.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -27,7 +27,7 @@ permalink: /docs/response-api/\n**Extends http.ServerResponse**\nWraps all of the node\n-[http.ServerResponse](https://nodejs.org/docs/latest/api/http.html#http.ServerResponse)\n+[http.ServerResponse](https://nodejs.org/docs/latest/api/http.html)\nAPIs, events and properties, plus the following.\n### cache\n@@ -154,10 +154,10 @@ formatter based on the `content-type` header.\n_You can use send() to wrap up all the usual writeHead(), write(), end()\ncalls on the HTTP API of node.\n-You can pass send either a `code` and `body`, or just a body. body can be an\n-`Object`, a `Buffer`, or an `Error`.\n-When you call `send()`, restify figures out how to format the response based\n-on the `content-type`._\n+You can pass send either a `code` and `body`, or just a body. body can be\n+an `Object`, a `Buffer`, or an `Error`.\n+When you call `send()`, restify figures out how to format the response\n+based on the `content-type`._\n```javascript\nres.send({hello: 'world'});\n@@ -169,8 +169,8 @@ Returns **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refer\n### sendRaw\n-Like `res.send()`, but skips formatting. This can be useful when the payload\n-has already been preformatted.\n+Like `res.send()`, but skips formatting. This can be useful when the\n+payload has already been preformatted.\nSends the response object. pass through to internal `__send` that skips\nformatters entirely and sends the content as is.\n@@ -189,7 +189,8 @@ Uses `header()` underneath the hood, enabling multi-value headers.\n**Parameters**\n-- `name` **([String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \\| [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object))** name of the header or `Object` of headers\n+- `name` **([String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) \\| [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object))** name of the header or\n+ `Object` of headers\n- `val` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** value of the header\n**Examples**\n@@ -236,13 +237,15 @@ Redirect is sugar method for redirecting.\n- `options.hostname` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** redirect location's hostname\n- `options.pathname` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** redirect location's pathname\n- `options.port` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** redirect location's port number\n- - `options.query` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** redirect location's query string parameters\n- - `options.overrideQuery` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** if true, `options.query` stomps over\n- any existing query parameters on current URL.\n+ - `options.query` **[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)?** redirect location's query string\n+ parameters\n+ - `options.overrideQuery` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** if true, `options.query`\n+ stomps over any existing query\n+ parameters on current URL.\nby default, will merge the two.\n- `options.permanent` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** if true, sets 301. defaults to 302.\n-- `next` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** mandatory, to complete the response and trigger audit\n- logger.\n+- `next` **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** mandatory, to complete the response and trigger\n+ audit logger.\n**Examples**\n",
"new_path": "docs/_api/response.md",
"old_path": "docs/_api/response.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -116,6 +116,8 @@ Creates a new Server.\nresponse header, default is `restify`. Pass empty string to unset the header. (optional, default `false`)\n- `options.spdy` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Any options accepted by\n[node-spdy](https://github.com/indutny/node-spdy).\n+ - `options.http2` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Any options accepted by\n+ [http2.createSecureServer](https://nodejs.org/api/http2.html).\n- `options.handleUpgrades` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Hook the `upgrade` event\nfrom the node HTTP server, pushing `Connection: Upgrade` requests through the\nregular request handling chain. (optional, default `false`)\n",
"new_path": "docs/_api/server.md",
"old_path": "docs/_api/server.md"
},
{
"change_type": "ADD",
"diff": "+var path = require('path');\n+var fs = require('fs');\n+var bunyan = require('bunyan');\n+var restify = require('../../lib');\n+\n+var srv = restify.createServer({\n+ http2: {\n+ cert: fs.readFileSync(path.join(__dirname, './keys/http2-cert.pem')),\n+ key: fs.readFileSync(path.join(__dirname, './keys/http2-key.pem')),\n+ ca: fs.readFileSync(path.join(__dirname, 'keys/http2-csr.pem'))\n+ }\n+});\n+\n+srv.get('/', function(req, res, next) {\n+ res.send({ hello: 'world' });\n+ next();\n+});\n+\n+srv.on(\n+ 'after',\n+ restify.plugins.auditLogger({\n+ event: 'after',\n+ body: true,\n+ log: bunyan.createLogger({\n+ name: 'audit',\n+ stream: process.stdout\n+ })\n+ })\n+);\n+\n+srv.listen(8080, function() {\n+ console.log('ready on %s', srv.url);\n+});\n",
"new_path": "examples/http2/http2.js",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+-----BEGIN CERTIFICATE-----\n+MIICHzCCAYgCCQCPPSUAa8QZojANBgkqhkiG9w0BAQUFADBUMQswCQYDVQQGEwJS\n+VTETMBEGA1UECBMKU29tZS1TdGF0ZTENMAsGA1UEBxMET21zazEhMB8GA1UEChMY\n+SW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMB4XDTExMDQwOTEwMDY0NVoXDTExMDUw\n+OTEwMDY0NVowVDELMAkGA1UEBhMCUlUxEzARBgNVBAgTClNvbWUtU3RhdGUxDTAL\n+BgNVBAcTBE9tc2sxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDCB\n+nzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1bn25sPkv46wl70BffxradlkRd/x\n+p5Xf8HDhPSfzNNctERYslXT2fX7Dmfd5w1XTVqqGqJ4izp5VewoVOHA8uavo3ovp\n+gNWasil5zADWaM1T0nnV0RsFbZWzOTmm1U3D48K8rW3F5kOZ6f4yRq9QT1gF/gN7\n+5Pt494YyYyJu/a8CAwEAATANBgkqhkiG9w0BAQUFAAOBgQBuRZisIViI2G/R+w79\n+vk21TzC/cJ+O7tKsseDqotXYTH8SuimEH5IWcXNgnWhNzczwN8s2362NixyvCipV\n+yd4wzMpPbjIhnWGM0hluWZiK2RxfcqimIBjDParTv6CMUIuwGQ257THKY8hXGg7j\n+Uws6Lif3P9UbsuRiYPxMgg98wg==\n+-----END CERTIFICATE-----\n+\n",
"new_path": "examples/http2/keys/http2-cert.pem",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+-----BEGIN CERTIFICATE REQUEST-----\n+MIIBkzCB/QIBADBUMQswCQYDVQQGEwJSVTETMBEGA1UECBMKU29tZS1TdGF0ZTEN\n+MAsGA1UEBxMET21zazEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRk\n+MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDVufbmw+S/jrCXvQF9/Gtp2WRF\n+3/Gnld/wcOE9J/M01y0RFiyVdPZ9fsOZ93nDVdNWqoaoniLOnlV7ChU4cDy5q+je\n+i+mA1ZqyKXnMANZozVPSedXRGwVtlbM5OabVTcPjwrytbcXmQ5np/jJGr1BPWAX+\n+A3vk+3j3hjJjIm79rwIDAQABoAAwDQYJKoZIhvcNAQEFBQADgYEAiNWhz6EppIVa\n+FfUaB3sLeqfamb9tg9kBHtvqj/FJni0snqms0kPWaTySEPHZF0irIb7VVdq/sVCb\n+3gseMVSyoDvPJ4lHC3PXqGQ7kM1mIPhDnR/4HDA3BhlGhTXSDIHgZnvI+HMBdsyC\n+hC3dz5odyKqe4nmoofomALkBL9t4H8s=\n+-----END CERTIFICATE REQUEST-----\n+\n",
"new_path": "examples/http2/keys/http2-csr.pem",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+-----BEGIN RSA PRIVATE KEY-----\n+MIICXAIBAAKBgQDVufbmw+S/jrCXvQF9/Gtp2WRF3/Gnld/wcOE9J/M01y0RFiyV\n+dPZ9fsOZ93nDVdNWqoaoniLOnlV7ChU4cDy5q+jei+mA1ZqyKXnMANZozVPSedXR\n+GwVtlbM5OabVTcPjwrytbcXmQ5np/jJGr1BPWAX+A3vk+3j3hjJjIm79rwIDAQAB\n+AoGAAv2QI9h32epQND9TxwSCKD//dC7W/cZOFNovfKCTeZjNK6EIzKqPTGA6smvR\n+C1enFl5adf+IcyWqAoe4lkqTvurIj+2EhtXdQ8DBlVuXKr3xvEFdYxXPautdTCF6\n+KbXEyS/s1TZCRFjYftvCrXxc3pK45AQX/wg7z1K+YB5pyIECQQD0OJvLoxLYoXAc\n+FZraIOZiDsEbGuSHqoCReFXH75EC3+XGYkH2bQ/nSIZ0h1buuwQ/ylKXOlTPT3Qt\n+Xm1OQEBvAkEA4AjWsIO/rRpOm/Q2aCrynWMpoUXTZSbL2yGf8pxp/+8r2br5ier0\n+M1LeBb/OPY1+k39NWLXxQoo64xoSFYk2wQJAd2wDCwX4HkR7HNCXw1hZL9QFK6rv\n+20NN0VSlpboJD/3KT0MW/FiCcVduoCbaJK0Au+zEjDyy4hj5N4I4Mw6KMwJAXVAx\n+I+psTsxzS4/njXG+BgIEl/C+gRYsuMQDnAi8OebDq/et8l0Tg8ETSu++FnM18neG\n+ntmBeMacinUUbTXuwQJBAJp/onZdsMzeVulsGrqR1uS+Lpjc5Q1gt5ttt2cxj91D\n+rio48C/ZvWuKNE8EYj2ALtghcVKRvgaWfOxt2GPguGg=\n+-----END RSA PRIVATE KEY-----\n+\n",
"new_path": "examples/http2/keys/http2-key.pem",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "'use strict';\n-var http = require('http');\nvar url = require('url');\nvar sprintf = require('util').format;\n@@ -13,10 +12,6 @@ var uuid = require('uuid');\nvar dtrace = require('./dtrace');\n-///--- Globals\n-\n-var Request = http.IncomingMessage;\n-\n///-- Helpers\n/**\n* Creates and sets negotiator on request if one doesn't already exist,\n@@ -44,10 +39,19 @@ function negotiator(req) {\n///--- API\n+/**\n+* Patch Request object and extends with extra functionalities\n+*\n+* @private\n+* @function patch\n+* @param {http.IncomingMessage|http2.Http2ServerRequest} Request -\n+* Server Request\n+* @returns {undefined} No return value\n+*/\n+function patch(Request) {\n/**\n* Wraps all of the node\n- * [http.IncomingMessage]\n- * (https://nodejs.org/api/http.html#http_http_incomingmessage)\n+ * [http.IncomingMessage](https://nodejs.org/api/http.html)\n* APIs, events and properties, plus the following.\n* @class Request\n* @extends http.IncomingMessage\n@@ -86,8 +90,8 @@ Request.prototype.absoluteUri = function absoluteUri(path) {\n* @returns {Boolean} is accepteed\n* @example\n* <caption>\n- * You may pass the subtype such as html which is then converted internally to\n- * text/html using the mime lookup table:\n+ * You may pass the subtype such as html which is then converted internally\n+ * to text/html using the mime lookup table:\n* </caption>\n* // Accept: text/html\n* req.accepts('html');\n@@ -186,8 +190,8 @@ Request.prototype.getContentLength = function getContentLength() {\nRequest.prototype.contentLength = Request.prototype.getContentLength;\n/**\n- * Returns the value of the content-type header. If a content-type is not set,\n- * this will return a default value of `application/octet-stream`.\n+ * Returns the value of the content-type header. If a content-type is not\n+ * set, this will return a default value of `application/octet-stream`.\n*\n* @private\n* @memberof Request\n@@ -219,13 +223,13 @@ Request.prototype.getContentType = function getContentType() {\n};\n/**\n- * Returns the value of the content-type header. If a content-type is not set,\n- * this will return a default value of `application/octet-stream`\n+ * Returns the value of the content-type header. If a content-type is not\n+ * set, this will return a default value of `application/octet-stream`\n* @public\n* @memberof Request\n* @instance\n* @function getContentType\n- * @returns {String}\n+ * @returns {String} content type\n*/\nRequest.prototype.contentType = Request.prototype.getContentType;\n@@ -314,7 +318,9 @@ Request.prototype.id = function id(reqId) {\nif (reqId) {\nif (self._id) {\n- throw new Error('request id is immutable, cannot be set again!');\n+ throw new Error(\n+ 'request id is immutable, cannot be set again!'\n+ );\n} else {\nassert.string(reqId, 'reqId');\nself._id = reqId;\n@@ -442,7 +448,9 @@ Request.prototype.getVersion = function getVersion() {\n}\nthis._version =\n- this.headers['accept-version'] || this.headers['x-api-version'] || '*';\n+ this.headers['accept-version'] ||\n+ this.headers['x-api-version'] ||\n+ '*';\nreturn this._version;\n};\n@@ -709,8 +717,8 @@ Request.prototype.userAgent = function userAgent() {\n* Start the timer for a request handler.\n* By default, restify uses calls this automatically for all handlers\n* registered in your handler chain.\n- * However, this can be called manually for nested functions inside the handler\n- * chain to record timing information.\n+ * However, this can be called manually for nested functions inside the\n+ * handler chain to record timing information.\n*\n* @public\n* @memberof Request\n@@ -721,8 +729,8 @@ Request.prototype.userAgent = function userAgent() {\n* @example\n* <caption>\n* You must explicitly invoke\n- * endHandlerTimer() after invoking this function. Otherwise timing information\n- * will be inaccurate.\n+ * endHandlerTimer() after invoking this function. Otherwise timing\n+ * information will be inaccurate.\n* </caption>\n* server.get('/', function fooHandler(req, res, next) {\n* vasync.pipeline({\n@@ -744,7 +752,9 @@ Request.prototype.userAgent = function userAgent() {\n* }, next);\n* });\n*/\n-Request.prototype.startHandlerTimer = function startHandlerTimer(handlerName) {\n+ Request.prototype.startHandlerTimer = function startHandlerTimer(\n+ handlerName\n+ ) {\nvar self = this;\n// For nested handlers, we prepend the top level handler func name\n@@ -847,3 +857,6 @@ Request.prototype.getRoute = function getRoute() {\nvar self = this;\nreturn self.route;\n};\n+}\n+\n+module.exports = patch;\n",
"new_path": "lib/request.js",
"old_path": "lib/request.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -17,8 +17,6 @@ var utils = require('./utils');\nvar InternalServerError = errors.InternalServerError;\n-var Response = http.ServerResponse;\n-\n/**\n* @private\n* Headers that cannot be multi-values.\n@@ -33,10 +31,19 @@ var HEADER_ARRAY_BLACKLIST = {\n///--- API\n+/**\n+* Patch Response object and extends with extra functionalities\n+*\n+* @private\n+* @function patch\n+* @param {http.ServerResponse|http2.Http2ServerResponse} Response -\n+* Server Response\n+* @returns {undefined} No return value\n+*/\n+function patch(Response) {\n/**\n* Wraps all of the node\n- * [http.ServerResponse]\n- * (https://nodejs.org/docs/latest/api/http.html#http.ServerResponse)\n+ * [http.ServerResponse](https://nodejs.org/docs/latest/api/http.html)\n* APIs, events and properties, plus the following.\n* @class Response\n* @extends http.ServerResponse\n@@ -282,10 +289,10 @@ Response.prototype.link = function link(key, value) {\n* <caption>\n* You can use send() to wrap up all the usual writeHead(), write(), end()\n* calls on the HTTP API of node.\n- * You can pass send either a `code` and `body`, or just a body. body can be an\n- * `Object`, a `Buffer`, or an `Error`.\n- * When you call `send()`, restify figures out how to format the response based\n- * on the `content-type`.\n+ * You can pass send either a `code` and `body`, or just a body. body can be\n+ * an `Object`, a `Buffer`, or an `Error`.\n+ * When you call `send()`, restify figures out how to format the response\n+ * based on the `content-type`.\n* </caption>\n* res.send({hello: 'world'});\n* res.send(201, {hello: 'world'});\n@@ -299,8 +306,8 @@ Response.prototype.send = function send(code, body, headers) {\n};\n/**\n- * Like `res.send()`, but skips formatting. This can be useful when the payload\n- * has already been preformatted.\n+ * Like `res.send()`, but skips formatting. This can be useful when the\n+ * payload has already been preformatted.\n* Sends the response object. pass through to internal `__send` that skips\n* formatters entirely and sends the content as is.\n*\n@@ -367,9 +374,9 @@ Response.prototype.__send = function __send() {\n}\n// Ensure the function was provided with arguments of the proper types,\n- // if we reach this line and there are still arguments, either one of the\n- // optional arguments was of an invalid type or we were provided with\n- // too many arguments\n+ // if we reach this line and there are still arguments, either one of\n+ // the optional arguments was of an invalid type or we were provided\n+ // with too many arguments\nassert(\narguments[index] === undefined,\n'Unknown argument: ' + arguments[index] + '\\nProvided: ' + arguments\n@@ -378,14 +385,14 @@ Response.prototype.__send = function __send() {\n// Now lets try to derive values for optional arguments that we were not\n// provided, otherwise we choose sane defaults.\n- // If the body is an error object and we were not given a status code, try\n- // to derive it from the error object, otherwise default to 500\n+ // If the body is an error object and we were not given a status code,\n+ // try to derive it from the error object, otherwise default to 500\nif (!code && body instanceof Error) {\ncode = body.statusCode || 500;\n}\n- // Set sane defaults for optional arguments if they were not provided and\n- // we failed to derive their values\n+ // Set sane defaults for optional arguments if they were not provided\n+ // and we failed to derive their values\ncode = code || self.statusCode || 200;\nheaders = headers || {};\n@@ -411,7 +418,8 @@ Response.prototype.__send = function __send() {\nlog.trace(_props, 'response::send entered');\n}\n- // Flush takes our constructed response object and sends it to the client\n+ // Flush takes our constructed response object and sends it\n+ // to the client\nfunction _flush(formattedBody) {\nself._data = formattedBody;\n@@ -457,15 +465,15 @@ Response.prototype.__send = function __send() {\nreturn _flush();\n}\n- // At this point we know we have a body that needs to be formatted, so lets\n- // derive the formatter based on the response object's properties\n+ // At this point we know we have a body that needs to be formatted, so\n+ // lets derive the formatter based on the response object's properties\n// _formatterError is used to handle any case where we were unable to\n// properly format the provided body\nfunction _formatterError(err) {\n- // If the user provided a non-success error code, we don't want to mess\n- // with it since their error is probably more important than our\n- // inability to format their message.\n+ // If the user provided a non-success error code, we don't want to\n+ // mess with it since their error is probably more important than\n+ // our inability to format their message.\nif (self.statusCode >= 200 && self.statusCode < 300) {\nself.statusCode = err.statusCode;\n}\n@@ -512,12 +520,13 @@ Response.prototype.__send = function __send() {\nformatter = self.formatters[type] || self.formatters['*/*'];\n- // If after the above attempts we were still unable to derive a formatter,\n- // provide a meaningful error message\n+ // If after the above attempts we were still unable to derive a\n+ // formatter, provide a meaningful error message\nif (!formatter) {\nreturn _formatterError(\nnew errors.InternalServerError({\n- message: 'could not find formatter for application/octet-stream'\n+ message:\n+ 'could not find formatter for application/octet-stream'\n})\n);\n}\n@@ -541,7 +550,8 @@ Response.prototype.__send = function __send() {\n* @memberof Response\n* @instance\n* @function set\n- * @param {String|Object} name - name of the header or `Object` of headers\n+ * @param {String|Object} name - name of the header or\n+ * `Object` of headers\n* @param {String} val - value of the header\n* @returns {Object} self, the response object\n* @example\n@@ -560,7 +570,10 @@ Response.prototype.set = function set(name, val) {\nvar self = this;\nif (arguments.length === 2) {\n- assert.string(name, 'res.set(name, val) requires name to be a string');\n+ assert.string(\n+ name,\n+ 'res.set(name, val) requires name to be a string'\n+ );\nthis.header(name, val);\n} else {\nassert.object(\n@@ -658,13 +671,15 @@ Response.prototype.writeHead = function restifyWriteHead() {\n* @param {String} [options.hostname] redirect location's hostname\n* @param {String} [options.pathname] redirect location's pathname\n* @param {String} [options.port] redirect location's port number\n- * @param {String} [options.query] redirect location's query string parameters\n- * @param {Boolean} [options.overrideQuery] if true, `options.query` stomps over\n- * any existing query parameters on current URL.\n+ * @param {String} [options.query] redirect location's query string\n+ * parameters\n+ * @param {Boolean} [options.overrideQuery] if true, `options.query`\n+ * stomps over any existing query\n+ * parameters on current URL.\n* by default, will merge the two.\n* @param {Boolean} [options.permanent] if true, sets 301. defaults to 302.\n- * @param {Function} next mandatory, to complete the response and trigger audit\n- * logger.\n+ * @param {Function} next mandatory, to complete the response and trigger\n+ * audit logger.\n* @fires redirect\n* @function redirect\n* @returns {undefined}\n@@ -757,7 +772,9 @@ function redirect(arg1, arg2, arg3) {\nvar req = self.req;\nvar opt = arg1 || {};\nvar currentFullPath = req.href();\n- var secure = opt.hasOwnProperty('secure') ? opt.secure : req.isSecure();\n+ var secure = opt.hasOwnProperty('secure')\n+ ? opt.secure\n+ : req.isSecure();\n// if hostname is passed in, use that as the base,\n// otherwise fall back on current url.\n@@ -835,3 +852,6 @@ function redirect(arg1, arg2, arg3) {\n// tell server to stop processing the handler stack.\nreturn next(false);\n}\n+}\n+\n+module.exports = patch;\n",
"new_path": "lib/response.js",
"old_path": "lib/response.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -25,8 +25,21 @@ var upgrade = require('./upgrade');\nvar deprecationWarnings = require('./deprecationWarnings');\n// Ensure these are loaded\n-require('./request');\n-require('./response');\n+var patchRequest = require('./request');\n+var patchResponse = require('./response');\n+\n+var http2;\n+\n+// http2 module is not available < v8.4.0 (only with flag <= 8.8.0)\n+try {\n+ http2 = require('http2');\n+ patchResponse(http2.Http2ServerResponse);\n+ patchRequest(http2.Http2ServerRequest);\n+ // eslint-disable-next-line no-empty\n+} catch (err) {}\n+\n+patchResponse(http.ServerResponse);\n+patchRequest(http.IncomingMessage);\n///--- Globals\n@@ -73,6 +86,8 @@ var PROXY_EVENTS = [\n* response header, default is `restify`. Pass empty string to unset the header.\n* @param {Object} [options.spdy] - Any options accepted by\n* [node-spdy](https://github.com/indutny/node-spdy).\n+ * @param {Object} [options.http2] - Any options accepted by\n+ * [http2.createSecureServer](https://nodejs.org/api/http2.html).\n* @param {Boolean} [options.handleUpgrades=false] - Hook the `upgrade` event\n* from the node HTTP server, pushing `Connection: Upgrade` requests through the\n* regular request handling chain.\n@@ -121,6 +136,15 @@ function Server(options) {\nif (options.spdy) {\nthis.spdy = true;\nthis.server = spdy.createServer(options.spdy);\n+ } else if (options.http2) {\n+ assert(\n+ http2,\n+ 'http2 module is not available, ' +\n+ 'upgrade your Node.js version to >= 8.8.0'\n+ );\n+\n+ this.http2 = true;\n+ this.server = http2.createSecureServer(options.http2);\n} else if ((options.cert || options.certificate) && options.key) {\nthis.ca = options.ca;\nthis.certificate = options.certificate || options.cert;\n",
"new_path": "lib/server.js",
"old_path": "lib/server.js"
},
{
"change_type": "ADD",
"diff": "+-----BEGIN CERTIFICATE-----\n+MIICHzCCAYgCCQCPPSUAa8QZojANBgkqhkiG9w0BAQUFADBUMQswCQYDVQQGEwJS\n+VTETMBEGA1UECBMKU29tZS1TdGF0ZTENMAsGA1UEBxMET21zazEhMB8GA1UEChMY\n+SW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMB4XDTExMDQwOTEwMDY0NVoXDTExMDUw\n+OTEwMDY0NVowVDELMAkGA1UEBhMCUlUxEzARBgNVBAgTClNvbWUtU3RhdGUxDTAL\n+BgNVBAcTBE9tc2sxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDCB\n+nzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA1bn25sPkv46wl70BffxradlkRd/x\n+p5Xf8HDhPSfzNNctERYslXT2fX7Dmfd5w1XTVqqGqJ4izp5VewoVOHA8uavo3ovp\n+gNWasil5zADWaM1T0nnV0RsFbZWzOTmm1U3D48K8rW3F5kOZ6f4yRq9QT1gF/gN7\n+5Pt494YyYyJu/a8CAwEAATANBgkqhkiG9w0BAQUFAAOBgQBuRZisIViI2G/R+w79\n+vk21TzC/cJ+O7tKsseDqotXYTH8SuimEH5IWcXNgnWhNzczwN8s2362NixyvCipV\n+yd4wzMpPbjIhnWGM0hluWZiK2RxfcqimIBjDParTv6CMUIuwGQ257THKY8hXGg7j\n+Uws6Lif3P9UbsuRiYPxMgg98wg==\n+-----END CERTIFICATE-----\n+\n",
"new_path": "test/keys/http2-cert.pem",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+-----BEGIN CERTIFICATE REQUEST-----\n+MIIBkzCB/QIBADBUMQswCQYDVQQGEwJSVTETMBEGA1UECBMKU29tZS1TdGF0ZTEN\n+MAsGA1UEBxMET21zazEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRk\n+MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDVufbmw+S/jrCXvQF9/Gtp2WRF\n+3/Gnld/wcOE9J/M01y0RFiyVdPZ9fsOZ93nDVdNWqoaoniLOnlV7ChU4cDy5q+je\n+i+mA1ZqyKXnMANZozVPSedXRGwVtlbM5OabVTcPjwrytbcXmQ5np/jJGr1BPWAX+\n+A3vk+3j3hjJjIm79rwIDAQABoAAwDQYJKoZIhvcNAQEFBQADgYEAiNWhz6EppIVa\n+FfUaB3sLeqfamb9tg9kBHtvqj/FJni0snqms0kPWaTySEPHZF0irIb7VVdq/sVCb\n+3gseMVSyoDvPJ4lHC3PXqGQ7kM1mIPhDnR/4HDA3BhlGhTXSDIHgZnvI+HMBdsyC\n+hC3dz5odyKqe4nmoofomALkBL9t4H8s=\n+-----END CERTIFICATE REQUEST-----\n+\n",
"new_path": "test/keys/http2-csr.pem",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+-----BEGIN RSA PRIVATE KEY-----\n+MIICXAIBAAKBgQDVufbmw+S/jrCXvQF9/Gtp2WRF3/Gnld/wcOE9J/M01y0RFiyV\n+dPZ9fsOZ93nDVdNWqoaoniLOnlV7ChU4cDy5q+jei+mA1ZqyKXnMANZozVPSedXR\n+GwVtlbM5OabVTcPjwrytbcXmQ5np/jJGr1BPWAX+A3vk+3j3hjJjIm79rwIDAQAB\n+AoGAAv2QI9h32epQND9TxwSCKD//dC7W/cZOFNovfKCTeZjNK6EIzKqPTGA6smvR\n+C1enFl5adf+IcyWqAoe4lkqTvurIj+2EhtXdQ8DBlVuXKr3xvEFdYxXPautdTCF6\n+KbXEyS/s1TZCRFjYftvCrXxc3pK45AQX/wg7z1K+YB5pyIECQQD0OJvLoxLYoXAc\n+FZraIOZiDsEbGuSHqoCReFXH75EC3+XGYkH2bQ/nSIZ0h1buuwQ/ylKXOlTPT3Qt\n+Xm1OQEBvAkEA4AjWsIO/rRpOm/Q2aCrynWMpoUXTZSbL2yGf8pxp/+8r2br5ier0\n+M1LeBb/OPY1+k39NWLXxQoo64xoSFYk2wQJAd2wDCwX4HkR7HNCXw1hZL9QFK6rv\n+20NN0VSlpboJD/3KT0MW/FiCcVduoCbaJK0Au+zEjDyy4hj5N4I4Mw6KMwJAXVAx\n+I+psTsxzS4/njXG+BgIEl/C+gRYsuMQDnAi8OebDq/et8l0Tg8ETSu++FnM18neG\n+ntmBeMacinUUbTXuwQJBAJp/onZdsMzeVulsGrqR1uS+Lpjc5Q1gt5ttt2cxj91D\n+rio48C/ZvWuKNE8EYj2ALtghcVKRvgaWfOxt2GPguGg=\n+-----END RSA PRIVATE KEY-----\n+\n",
"new_path": "test/keys/http2-key.pem",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+'use strict';\n+/* eslint-disable func-names */\n+\n+var path = require('path');\n+var fs = require('fs');\n+var http2;\n+\n+// http2 module is not available < v8.4.0 (only with flag <= 8.8.0)\n+try {\n+ http2 = require('http2');\n+} catch (err) {\n+ console.log('HTTP2 module is not available');\n+ console.log(\n+ 'Node.js version >= v8.8.8 required, current: ' + process.versions.node\n+ );\n+ return;\n+}\n+\n+var restify = require('../lib');\n+\n+if (require.cache[__dirname + '/lib/helper.js']) {\n+ delete require.cache[__dirname + '/lib/helper.js'];\n+}\n+var helper = require('./lib/helper.js');\n+\n+///--- Globals\n+\n+var after = helper.after;\n+var before = helper.before;\n+var test = helper.test;\n+\n+var CERT = fs.readFileSync(path.join(__dirname, './keys/http2-cert.pem'));\n+var KEY = fs.readFileSync(path.join(__dirname, './keys/http2-key.pem'));\n+var CA = fs.readFileSync(path.join(__dirname, 'keys/http2-csr.pem'));\n+\n+var PORT = process.env.UNIT_TEST_PORT || 0;\n+var CLIENT;\n+var SERVER;\n+\n+///--- Tests\n+\n+before(function(cb) {\n+ try {\n+ SERVER = restify.createServer({\n+ dtrace: helper.dtrace,\n+ handleUncaughtExceptions: true,\n+ http2: {\n+ cert: CERT,\n+ key: KEY,\n+ ca: CA\n+ },\n+ log: helper.getLog('server')\n+ });\n+ SERVER.listen(PORT, '127.0.0.1', function() {\n+ PORT = SERVER.address().port;\n+ CLIENT = http2.connect('https://127.0.0.1:' + PORT, {\n+ rejectUnauthorized: false\n+ });\n+\n+ cb();\n+ });\n+ } catch (e) {\n+ console.error(e.stack);\n+ process.exit(1);\n+ }\n+});\n+\n+after(function(cb) {\n+ try {\n+ CLIENT.destroy();\n+ SERVER.close(function() {\n+ CLIENT = null;\n+ SERVER = null;\n+ cb();\n+ });\n+ } catch (e) {\n+ console.error(e.stack);\n+ process.exit(1);\n+ }\n+});\n+\n+test('get (path only)', function(t) {\n+ SERVER.get('/foo/:id', function echoId(req, res, next) {\n+ t.ok(req.params);\n+ t.equal(req.params.id, 'bar');\n+ t.equal(req.isUpload(), false);\n+ res.json({ hello: 'world' });\n+ next();\n+ });\n+\n+ var req = CLIENT.request({\n+ ':path': '/foo/bar',\n+ ':method': 'GET'\n+ });\n+\n+ req.on('response', function(headers, flags) {\n+ var data = '';\n+ t.equal(headers[':status'], 200);\n+\n+ req.on('data', function(chunk) {\n+ data += chunk;\n+ });\n+ req.on('end', function() {\n+ t.deepEqual(JSON.parse(data), { hello: 'world' });\n+ t.end();\n+ });\n+ });\n+ req.on('error', function(err) {\n+ t.ifError(err);\n+ });\n+});\n",
"new_path": "test/serverHttp2.test.js",
"old_path": null
}
] |
JavaScript
|
MIT License
|
restify/node-restify
|
feat(http2): add native HTTP/2 support (#1489)
| 1
|
feat
|
http2
|
815,745
|
02.11.2017 19:06:45
| -7,200
|
8b164c1ddd4887702aca4a88d5f2291c6e108157
|
feat(sarchable): allow to toggle searchable
closes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -96,6 +96,7 @@ map: {\n| bindLabel | string | `label` | no | Object property to use for label. Default `label` |\n| bindValue | string | `-` | no | Object property to use for selected model. By default binds to whole object. |\n| [clearable] | boolean | `true` | no | Allow to clear selected value. Default `true`|\n+| [searchable] | boolean | `true` | no | Allow to search for value. Default `true`|\n| multiple | boolean | `false` | no | Allows to select multiple items. |\n| [addTag] | Function or boolean | `false` | no | Using boolean simply adds tag with value as bindLabel. If you want custom properties add function which returns object. |\n| placeholder | string | `-` | no | Placeholder text. |\n",
"new_path": "README.md",
"old_path": "README.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -12,7 +12,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n<div class=\"form-row\">\n<div class=\"form-group col-md-6\">\n<label for=\"heroId\">Basic select</label>\n- <ng-select formControlName=\"heroId\">\n+ <ng-select [searchable]=\"false\" formControlName=\"heroId\">\n<ng-option value=\"hero1\">\n<img src=\"{{basePath}}/assets/batman.png\" width=\"20px\" height=\"20px\" /> Batman\n</ng-option>\n@@ -26,7 +26,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n</div>\n<div class=\"form-group col-md-6\">\n<label for=\"yesno\">Yes/No</label>\n- <ng-select formControlName=\"agree\">\n+ <ng-select [searchable]=\"false\" formControlName=\"agree\">\n<ng-option [value]=\"true\">Yes</ng-option>\n<ng-option [value]=\"false\">No</ng-option>\n</ng-select>\n",
"new_path": "demo/app/examples/reactive-forms.component.ts",
"old_path": "demo/app/examples/reactive-forms.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -15,28 +15,23 @@ ng-select {\nposition: relative;\ndisplay: block;\n@include box-sizing;\n-\ndiv,\ninput,\nspan {\n@include box-sizing;\n}\n-\nng-option {\ndisplay: block;\n@include box-sizing;\n}\n-\nvirtual-scroll {\ndisplay: block;\nheight: auto;\n@include box-sizing;\n}\n-\n[hidden] {\ndisplay: none;\n}\n-\n&.opened {\n>.ng-control {\nborder-bottom-right-radius: 0;\n@@ -68,6 +63,11 @@ ng-select {\nbackground-color: #f9f9f9;\n}\n}\n+ &.searchable {\n+ .ng-control .ng-value-container .ng-input {\n+ opacity: 1;\n+ }\n+ }\n.ng-control {\nbackground-color: #fff;\nborder-radius: 4px;\n@@ -95,6 +95,7 @@ ng-select {\ncolor: #aaa;\n}\n.ng-input {\n+ opacity: 0;\n>input {\nmin-width: 5px;\nbox-sizing: content-box;\n@@ -242,7 +243,6 @@ ng-select {\n&.selected {\nbackground-color: $color-selected;\ncolor: #333;\n-\n.ng-option-label {\nfont-weight: 600;\n}\n@@ -255,7 +255,6 @@ ng-select {\ncolor: #cccccc;\ncursor: default;\n}\n-\n.ng-tag-label {\npadding-right: 5px;\nfont-size: 80%;\n",
"new_path": "src/ng-select/ng-select.component.scss",
"old_path": "src/ng-select/ng-select.component.scss"
},
{
"change_type": "MODIFY",
"diff": "@@ -682,6 +682,20 @@ describe('NgSelectComponent', function () {\nexpect(fixture.componentInstance.select.itemsList.filteredItems).toEqual(result);\n}));\n+ it('should not filter when searchable false', fakeAsync(() => {\n+ fixture = createTestingModule(\n+ NgSelectFilterTestCmp,\n+ `<ng-select [items]=\"cities\"\n+ bindLabel=\"name\"\n+ [searchable]=\"false\"\n+ [(ngModel)]=\"selectedCity\">\n+ </ng-select>`);\n+\n+ fixture.componentInstance.select.onFilter({ target: { value: 'vilnius' } });\n+ tickAndDetectChanges(fixture);\n+ expect(fixture.componentInstance.select.filterValue).toBe(null);\n+ }));\n+\nit('should mark first item on filter', fakeAsync(() => {\nfixture = createTestingModule(\nNgSelectFilterTestCmp,\n",
"new_path": "src/ng-select/ng-select.component.spec.ts",
"old_path": "src/ng-select/ng-select.component.spec.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -64,8 +64,9 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\n@Input() notFoundText = 'No items found';\n@Input() typeToSearchText = 'Type to search';\n@Input() addTagText = 'Add item';\n- @HostBinding('class.typeahead')\n- @Input() typeahead: Subject<string>;\n+\n+ @Input()\n+ @HostBinding('class.typeahead') typeahead: Subject<string>;\n@Input()\n@HostBinding('class.ng-multiple') multiple = false;\n@@ -73,6 +74,9 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\n@Input()\n@HostBinding('class.taggable') addTag: boolean | ((term) => NgOption) = false;\n+ @Input()\n+ @HostBinding('class.searchable') searchable = true;\n+\n// output events\n@Output('blur') blurEvent = new EventEmitter();\n@Output('focus') focusEvent = new EventEmitter();\n@@ -305,6 +309,10 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\n}\nonFilter($event) {\n+ if (!this.searchable) {\n+ return;\n+ }\n+\nif (!this.isOpen) {\nthis.open();\n}\n",
"new_path": "src/ng-select/ng-select.component.ts",
"old_path": "src/ng-select/ng-select.component.ts"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
feat(sarchable): allow to toggle searchable (#119)
closes #107
| 1
|
feat
|
sarchable
|
573,227
|
03.11.2017 17:14:57
| -3,600
|
12da7fdfc68dd9467da97ae0b2f45b89cb540b9b
|
fix(server): avoid http2 experimental warning without http2 option
|
[
{
"change_type": "MODIFY",
"diff": "@@ -30,14 +30,6 @@ var patchResponse = require('./response');\nvar http2;\n-// http2 module is not available < v8.4.0 (only with flag <= 8.8.0)\n-try {\n- http2 = require('http2');\n- patchResponse(http2.Http2ServerResponse);\n- patchRequest(http2.Http2ServerRequest);\n- // eslint-disable-next-line no-empty\n-} catch (err) {}\n-\npatchResponse(http.ServerResponse);\npatchRequest(http.IncomingMessage);\n@@ -137,6 +129,17 @@ function Server(options) {\nthis.spdy = true;\nthis.server = spdy.createServer(options.spdy);\n} else if (options.http2) {\n+ // http2 module is not available < v8.4.0 (only with flag <= 8.8.0)\n+ // load http2 module here to avoid experimental warning in other cases\n+ if (!http2) {\n+ try {\n+ http2 = require('http2');\n+ patchResponse(http2.Http2ServerResponse);\n+ patchRequest(http2.Http2ServerRequest);\n+ // eslint-disable-next-line no-empty\n+ } catch (err) {}\n+ }\n+\nassert(\nhttp2,\n'http2 module is not available, ' +\n",
"new_path": "lib/server.js",
"old_path": "lib/server.js"
}
] |
JavaScript
|
MIT License
|
restify/node-restify
|
fix(server): avoid http2 experimental warning without http2 option (#1555)
| 1
|
fix
|
server
|
573,227
|
04.11.2017 09:41:52
| -3,600
|
d249c10e694a9c6769f3c74a97371ca59cc33821
|
docs(index): add createServer missing http2 option
|
[
{
"change_type": "MODIFY",
"diff": "@@ -43,6 +43,8 @@ require('./errorTypes');\n* response header, default is `restify`. Pass empty string to unset the header.\n* @param {Object} [options.spdy] - Any options accepted by\n* [node-spdy](https://github.com/indutny/node-spdy).\n+ * @param {Object} [options.http2] - Any options accepted by\n+ * [http2.createSecureServer](https://nodejs.org/api/http2.html).\n* @param {Boolean} [options.handleUpgrades=false] - Hook the `upgrade` event\n* from the node HTTP server, pushing `Connection: Upgrade` requests through the\n* regular request handling chain.\n",
"new_path": "lib/index.js",
"old_path": "lib/index.js"
}
] |
JavaScript
|
MIT License
|
restify/node-restify
|
docs(index): add createServer missing http2 option (#1552)
| 1
|
docs
|
index
|
815,746
|
07.11.2017 10:48:51
| -7,200
|
7a611df950eec9391eaf19c76c800da555311e58
|
fix: bump angular peer version
|
[
{
"change_type": "MODIFY",
"diff": "\"angular4\"\n],\n\"peerDependencies\": {\n- \"@angular/common\": \">=4.0.0 <5.0.0\",\n- \"@angular/core\": \">=.0.0 <5.0.0\",\n- \"@angular/forms\": \">=.0.0 <5.0.0\"\n+ \"@angular/common\": \">=4.0.0 <6.0.0\",\n+ \"@angular/core\": \">=4.0.0 <6.0.0\",\n+ \"@angular/forms\": \">=4.0.0 <6.0.0\"\n}\n}\n",
"new_path": "src/package.json",
"old_path": "src/package.json"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
fix: bump angular peer version
| 1
|
fix
| null |
573,227
|
08.11.2017 12:14:03
| -3,600
|
50acd7da23a28a6d833ff5d298828f7b976c93ee
|
chore(prettier): update to 1.8.1
|
[
{
"change_type": "MODIFY",
"diff": "@@ -62,6 +62,8 @@ routes and handlers for incoming requests.\nresponse header, default is `restify`. Pass empty string to unset the header. (optional, default `false`)\n- `options.spdy` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Any options accepted by\n[node-spdy](https://github.com/indutny/node-spdy).\n+ - `options.http2` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Any options accepted by\n+ [http2.createSecureServer](https://nodejs.org/api/http2.html).\n- `options.handleUpgrades` **[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Hook the `upgrade` event\nfrom the node HTTP server, pushing `Connection: Upgrade` requests through the\nregular request handling chain. (optional, default `false`)\n",
"new_path": "docs/_api/server.md",
"old_path": "docs/_api/server.md"
},
{
"change_type": "MODIFY",
"diff": "\"nodeunit\": \"^0.11.2\",\n\"nsp\": \"^2.8.1\",\n\"pre-commit\": \"^1.2.2\",\n- \"prettier\": \"^1.7.4\",\n+ \"prettier\": \"^1.8.1\",\n\"proxyquire\": \"^1.8.0\",\n\"restify-clients\": \"^1.5.2\",\n\"rimraf\": \"^2.6.2\",\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
JavaScript
|
MIT License
|
restify/node-restify
|
chore(prettier): update to 1.8.1 (#1559)
| 1
|
chore
|
prettier
|
448,060
|
10.11.2017 03:29:12
| 28,800
|
406866497acba4eec1dd2890bd99c381cbc6b3f2
|
feat: add tsx/jsx support
Adding the ability to specify a jsx compiler option in the ng-package.json schema. This allows for libraries to bundle tsx/jsx files, and take depedencies on vendors like React components
|
[
{
"change_type": "MODIFY",
"diff": "@@ -154,6 +154,29 @@ For example, the following would use `index.ts` as the secondary entry point:\n}\n```\n+##### What if I want to use React Components?\n+\n+If you have React Components that you're using in your library, and want to use proper JSX/TSX syntax in order to\n+construct them, you can set the `jsx` flag for your library through `ng-package` like so:\n+\n+```json\n+{\n+ \"$schema\": \"../../../src/ng-package.schema.json\",\n+ \"lib\": {\n+ \"entryFile\": \"public_api.ts\",\n+ \"externals\": {\n+ \"react\": \"React\",\n+ \"react-dom\": \"ReactDOM\"\n+ },\n+ \"jsx\": \"react\"\n+ }\n+}\n+```\n+\n+The `jsx` flag will accept anything that `tsconfig` accepts, more information [here](https://www.typescriptlang.org/docs/handbook/jsx.html).\n+\n+Note: Don't forget to include `react` and `react-dom` in your `externals` so that you're not bundling those dependencies.\n+\n## Further documentation\n",
"new_path": "README.md",
"old_path": "README.md"
},
{
"change_type": "ADD",
"diff": "+{\n+ \"$schema\": \"../../../src/ng-package.schema.json\",\n+ \"lib\": {\n+ \"entryFile\": \"public_api.ts\",\n+ \"externals\": {\n+ \"react\": \"React\",\n+ \"react-dom\": \"ReactDOM\"\n+ },\n+ \"jsx\": \"react\"\n+ }\n+}\n",
"new_path": "integration/samples/jsx/ng-package.json",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{\n+ \"name\": \"@sample/jsx\",\n+ \"description\": \"A sample library with jsx/tsx dependencies.\",\n+ \"version\": \"1.0.0-pre.0\",\n+ \"private\": true,\n+ \"repository\": \"https://github.com/dherges/ng-packagr.git\",\n+ \"peerDependencies\": {\n+ \"@angular/common\": \"^4.1.3\",\n+ \"@angular/core\": \"^4.1.3\",\n+ \"@angular/router\": \"^4.1.3\",\n+ \"rxjs\": \"^5.0.1\",\n+ \"zone.js\": \"^0.8.4\",\n+ \"react\": \"^16.0.0\",\n+ \"react-dom\": \"^16.0.0\"\n+ }\n+}\n",
"new_path": "integration/samples/jsx/package.json",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+export * from './src/react-integration.component';\n+export * from './src/react-integration.module';\n",
"new_path": "integration/samples/jsx/public_api.ts",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import { Component, OnInit, AfterViewInit, ElementRef } from '@angular/core';\n+import * as React from 'react';\n+import * as ReactDOM from 'react-dom';\n+\n+// Simulating the use of an external library that contains React Components\n+class ReactLabel extends React.Component {\n+ render() {\n+ return (\n+ <label>Look JSX!</label>\n+ );\n+ }\n+}\n+\n+@Component({\n+ selector: 'react-integration-test',\n+ template: `\n+ <div></div>\n+ `,\n+ styles: [``]\n+})\n+export class AngularReactLabel implements AfterViewInit {\n+\n+ constructor(private hostRef: ElementRef) {}\n+\n+ ngAfterViewInit(): void {\n+ const hostElement = this.hostRef.nativeElement;\n+ const LabelToShow = () => (\n+ // Actual use here, might include data-binding in a real world scenario\n+ <ReactLabel></ReactLabel>\n+ );\n+ ReactDOM.render(<LabelToShow />, hostElement);\n+ }\n+\n+}\n",
"new_path": "integration/samples/jsx/src/react-integration.component.tsx",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+import { NgModule } from '@angular/core';\n+import { CommonModule } from '@angular/common';\n+import { AngularReactLabel } from './react-integration.component';\n+\n+@NgModule({\n+ declarations: [ AngularReactLabel ],\n+ imports: [ CommonModule ],\n+ exports: [ AngularReactLabel ],\n+ providers: [],\n+})\n+export class ReactIntegrationModule {}\n",
"new_path": "integration/samples/jsx/src/react-integration.module.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "\"@types/lodash\": \"^4.14.77\",\n\"@types/mocha\": \"^2.2.41\",\n\"@types/node\": \"^8.0.0\",\n+ \"@types/react\": \"^16.0.19\",\n+ \"@types/react-dom\": \"^16.0.2\",\n\"@types/sinon\": \"^2.3.0\",\n\"chai\": \"^4.0.1\",\n\"copyfiles\": \"^1.2.0\",\n\"jasmine\": \"^2.6.0\",\n\"json-schema-to-typescript\": \"^4.4.0\",\n\"mocha\": \"^4.0.0\",\n+ \"react\": \"^16.0.0\",\n+ \"react-dom\": \"^16.0.0\",\n\"rxjs\": \"^5.4.0\",\n\"sinon\": \"^4.0.0\",\n\"standard-version\": \"^4.0.0\",\n",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -15,6 +15,7 @@ export class NgPackageData {\npublic readonly destinationPath: string;\npublic readonly buildDirectory: string;\npublic readonly libExternals: any;\n+ public readonly jsxConfig?: string;\nconstructor(\n/**\n@@ -53,6 +54,7 @@ export class NgPackageData {\nthis.libExternals = ngPackageConfig.lib.externals;\nthis.flatModuleFileName = ngPackageConfig.lib.flatModuleFile;\nthis.entryFile = ngPackageConfig.lib.entryFile;\n+ this.jsxConfig = ngPackageConfig.lib.jsx;\n}\nif (!this.libExternals) {\n",
"new_path": "src/lib/model/ng-package-data.ts",
"old_path": "src/lib/model/ng-package-data.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -29,7 +29,7 @@ export const processAssets = (src: string, dest: string): Promise<any> => {\nreturn new Promise((resolve, reject) => {\ndebug(`processAssets ${src} to ${dest}`);\n- vfs.src([`${src}/**/*.ts`, '!node_modules/**/*', '!${dest}/**/*'])\n+ vfs.src([`${src}/**/*.ts`, `${src}/**/*.tsx`, `${src}/**/*.jsx`, '!node_modules/**/*', '!${dest}/**/*'])\n.pipe(inlineNg2Template({\nbase: `${src}`,\nuseRelativePaths: true,\n",
"new_path": "src/lib/steps/assets.ts",
"old_path": "src/lib/steps/assets.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -17,6 +17,11 @@ async function prepareTsConfig(ngPkg: NgPackageData, outFile: string): Promise<v\ntsConfig['files'] = [ ngPkg.entryFile ];\n+ if (ngPkg.jsxConfig) {\n+ debug('prepareTsConfig: Applying jsx flag to tsconfig ' + ngPkg.jsxConfig);\n+ tsConfig['compilerOptions']['jsx'] = ngPkg.jsxConfig;\n+ }\n+\nawait writeJson(outFile, tsConfig);\n}\n",
"new_path": "src/lib/steps/ngc.ts",
"old_path": "src/lib/steps/ngc.ts"
},
{
"change_type": "MODIFY",
"diff": "\"description\": \"A symbol map of external dependencies. The purpose of this map is to correctly bundle a flat module file (with `rollup`). By default, `rxjs` and `@angular/*` dependency symbols are supported.\",\n\"type\": \"object\",\n\"additionalProperties\": true\n+ },\n+ \"jsx\": {\n+ \"description\": \"A property to indicate whether your library is going to be bundling jsx/tsx files. This passes through to tsconfig - see https://www.typescriptlang.org/docs/handbook/jsx.html\",\n+ \"type\": \"string\",\n+ \"enum\": [\"preserve\", \"react\", \"react-native\"],\n+ \"default\": \"\"\n}\n}\n}\n",
"new_path": "src/ng-package.schema.json",
"old_path": "src/ng-package.schema.json"
},
{
"change_type": "MODIFY",
"diff": "\"mocha\",\n\"node\",\n\"sinon\"\n- ]\n+ ],\n+ \"jsx\": \"react\"\n},\n\"exclude\": [\n\"dist\",\n",
"new_path": "tsconfig.json",
"old_path": "tsconfig.json"
},
{
"change_type": "MODIFY",
"diff": "version \"8.0.46\"\nresolved \"https://registry.yarnpkg.com/@types/node/-/node-8.0.46.tgz#6e1766b2d0ed06631d5b5f87bb8e72c8dbb6888e\"\n+\"@types/react-dom@^16.0.2\":\n+ version \"16.0.2\"\n+ resolved \"https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.0.2.tgz#2da9de21fd83f0140b64794ad9c47930230aedae\"\n+ dependencies:\n+ \"@types/node\" \"*\"\n+ \"@types/react\" \"*\"\n+\n+\"@types/react@*\", \"@types/react@^16.0.19\":\n+ version \"16.0.19\"\n+ resolved \"https://registry.yarnpkg.com/@types/react/-/react-16.0.19.tgz#f804a0fcd6d94c17df92cf2fd46671bbbc862329\"\n+\n\"@types/sinon@^2.3.0\":\nversion \"2.3.6\"\nresolved \"https://registry.yarnpkg.com/@types/sinon/-/sinon-2.3.6.tgz#ff600951c756286e38ce14d0b0e2924e38a91006\"\n@@ -799,6 +810,10 @@ copyfiles@^1.2.0:\nnoms \"0.0.0\"\nthrough2 \"^2.0.1\"\n+core-js@^1.0.0:\n+ version \"1.2.7\"\n+ resolved \"https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636\"\n+\ncore-js@^2.4.0, core-js@^2.5.0:\nversion \"2.5.1\"\nresolved \"https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b\"\n@@ -982,6 +997,12 @@ electron-to-chromium@^1.3.24:\nversion \"1.3.27\"\nresolved \"https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.27.tgz#78ecb8a399066187bb374eede35d9c70565a803d\"\n+encoding@^0.1.11:\n+ version \"0.1.12\"\n+ resolved \"https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb\"\n+ dependencies:\n+ iconv-lite \"~0.4.13\"\n+\nend-of-stream@^1.0.0:\nversion \"1.4.0\"\nresolved \"https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.0.tgz#7a90d833efda6cfa6eac0f4949dbb0fad3a63206\"\n@@ -1132,6 +1153,18 @@ fast-deep-equal@^1.0.0:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff\"\n+fbjs@^0.8.16:\n+ version \"0.8.16\"\n+ resolved \"https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db\"\n+ dependencies:\n+ core-js \"^1.0.0\"\n+ isomorphic-fetch \"^2.1.1\"\n+ loose-envify \"^1.0.0\"\n+ object-assign \"^4.1.0\"\n+ promise \"^7.1.1\"\n+ setimmediate \"^1.0.5\"\n+ ua-parser-js \"^0.7.9\"\n+\nfigures@^1.5.0:\nversion \"1.7.0\"\nresolved \"https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e\"\n@@ -1641,6 +1674,10 @@ husky@^0.14.3:\nnormalize-path \"^1.0.0\"\nstrip-indent \"^2.0.0\"\n+iconv-lite@~0.4.13:\n+ version \"0.4.19\"\n+ resolved \"https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b\"\n+\nimage-size@~0.5.0:\nversion \"0.5.5\"\nresolved \"https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c\"\n@@ -1834,6 +1871,13 @@ isobject@^2.0.0:\ndependencies:\nisarray \"1.0.0\"\n+isomorphic-fetch@^2.1.1:\n+ version \"2.2.1\"\n+ resolved \"https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9\"\n+ dependencies:\n+ node-fetch \"^1.0.1\"\n+ whatwg-fetch \">=0.10.0\"\n+\nisstream@~0.1.2:\nversion \"0.1.2\"\nresolved \"https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a\"\n@@ -1854,6 +1898,10 @@ js-base64@^2.1.8:\nversion \"2.3.2\"\nresolved \"https://registry.yarnpkg.com/js-base64/-/js-base64-2.3.2.tgz#a79a923666372b580f8e27f51845c6f7e8fbfbaf\"\n+js-tokens@^3.0.0:\n+ version \"3.0.2\"\n+ resolved \"https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b\"\n+\njs-yaml@^3.9.0, js-yaml@^3.9.1:\nversion \"3.10.0\"\nresolved \"https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc\"\n@@ -2138,6 +2186,12 @@ longest@^1.0.1:\nversion \"1.0.1\"\nresolved \"https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097\"\n+loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1:\n+ version \"1.3.1\"\n+ resolved \"https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848\"\n+ dependencies:\n+ js-tokens \"^3.0.0\"\n+\nloud-rejection@^1.0.0:\nversion \"1.6.0\"\nresolved \"https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f\"\n@@ -2339,6 +2393,13 @@ nise@^1.1.1:\npath-to-regexp \"^1.7.0\"\ntext-encoding \"^0.6.4\"\n+node-fetch@^1.0.1:\n+ version \"1.7.3\"\n+ resolved \"https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef\"\n+ dependencies:\n+ encoding \"^0.1.11\"\n+ is-stream \"^1.0.1\"\n+\nnode-gyp@^3.3.1:\nversion \"3.6.2\"\nresolved \"https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.6.2.tgz#9bfbe54562286284838e750eac05295853fa1c60\"\n@@ -2473,7 +2534,7 @@ object-assign@^3.0.0:\nversion \"3.0.0\"\nresolved \"https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2\"\n-object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0:\n+object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1:\nversion \"4.1.1\"\nresolved \"https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863\"\n@@ -2688,6 +2749,14 @@ promise@^7.1.1:\ndependencies:\nasap \"~2.0.3\"\n+prop-types@^15.6.0:\n+ version \"15.6.0\"\n+ resolved \"https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856\"\n+ dependencies:\n+ fbjs \"^0.8.16\"\n+ loose-envify \"^1.3.1\"\n+ object-assign \"^4.1.1\"\n+\nprr@~0.0.0:\nversion \"0.0.0\"\nresolved \"https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a\"\n@@ -2728,6 +2797,24 @@ rc@^1.1.7:\nminimist \"^1.2.0\"\nstrip-json-comments \"~2.0.1\"\n+react-dom@^16.0.0:\n+ version \"16.0.0\"\n+ resolved \"https://registry.yarnpkg.com/react-dom/-/react-dom-16.0.0.tgz#9cc3079c3dcd70d4c6e01b84aab2a7e34c303f58\"\n+ dependencies:\n+ fbjs \"^0.8.16\"\n+ loose-envify \"^1.1.0\"\n+ object-assign \"^4.1.1\"\n+ prop-types \"^15.6.0\"\n+\n+react@^16.0.0:\n+ version \"16.0.0\"\n+ resolved \"https://registry.yarnpkg.com/react/-/react-16.0.0.tgz#ce7df8f1941b036f02b2cca9dbd0cb1f0e855e2d\"\n+ dependencies:\n+ fbjs \"^0.8.16\"\n+ loose-envify \"^1.1.0\"\n+ object-assign \"^4.1.1\"\n+ prop-types \"^15.6.0\"\n+\nread-file@^0.2.0:\nversion \"0.2.0\"\nresolved \"https://registry.yarnpkg.com/read-file/-/read-file-0.2.0.tgz#70c6baf8842ec7d1540f981fd0e6aed4c81bd545\"\n@@ -3034,6 +3121,10 @@ set-immediate-shim@^1.0.1:\nversion \"1.0.1\"\nresolved \"https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61\"\n+setimmediate@^1.0.5:\n+ version \"1.0.5\"\n+ resolved \"https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285\"\n+\nshebang-command@^1.2.0:\nversion \"1.2.0\"\nresolved \"https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea\"\n@@ -3472,6 +3563,10 @@ typescript@~2.3.4:\nversion \"2.3.4\"\nresolved \"https://registry.yarnpkg.com/typescript/-/typescript-2.3.4.tgz#3d38321828231e434f287514959c37a82b629f42\"\n+ua-parser-js@^0.7.9:\n+ version \"0.7.17\"\n+ resolved \"https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac\"\n+\nuglify-js@^2.6:\nversion \"2.8.29\"\nresolved \"https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd\"\n@@ -3586,6 +3681,10 @@ vlq@^0.2.1:\nversion \"0.2.3\"\nresolved \"https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26\"\n+whatwg-fetch@>=0.10.0:\n+ version \"2.0.3\"\n+ resolved \"https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84\"\n+\nwhich-module@^1.0.0:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f\"\n",
"new_path": "yarn.lock",
"old_path": "yarn.lock"
}
] |
TypeScript
|
MIT License
|
ng-packagr/ng-packagr
|
feat: add tsx/jsx support (#228)
Adding the ability to specify a jsx compiler option in the ng-package.json schema. This allows for libraries to bundle tsx/jsx files, and take depedencies on vendors like React components
| 1
|
feat
| null |
448,039
|
10.11.2017 09:52:02
| -3,600
|
918766dec328a4223550a9e383ce33e76a4da328
|
release: cut v1.5.1
|
[
{
"change_type": "MODIFY",
"diff": "All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.\n+<a name=\"1.5.1\"></a>\n+## [1.5.1](https://github.com/dherges/ng-packagr/compare/v1.5.0...v1.5.1) (2017-11-10)\n+\n+\n+### Bug Fixes\n+\n+* depend on user's typescript and tsc-wrapped ([#268](https://github.com/dherges/ng-packagr/issues/268)) ([42b2f08](https://github.com/dherges/ng-packagr/commit/42b2f08))\n+\n+\n+\n<a name=\"1.5.0\"></a>\n# [1.5.0](https://github.com/dherges/ng-packagr/compare/v1.4.0...v1.5.0) (2017-11-05)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"ng-packagr\",\n- \"version\": \"1.5.0\",\n+ \"version\": \"1.5.1\",\n\"description\": \"Compile and package a TypeScript library to Angular Package Format\",\n\"keywords\": [\n\"angular\",\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
TypeScript
|
MIT License
|
ng-packagr/ng-packagr
|
release: cut v1.5.1
| 1
|
release
| null |
815,746
|
10.11.2017 10:08:02
| -7,200
|
ea88cfc6faa4ede96149fc44641b11a38d869ccc
|
fix: do not wrap text in ng-option
fixes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -236,6 +236,7 @@ ng-select {\ncursor: pointer;\ndisplay: block;\npadding: 8px 10px;\n+ @include wrapt-text;\n&:last-child {\nborder-bottom-right-radius: 4px;\nborder-bottom-left-radius: 4px;\n",
"new_path": "src/ng-select/ng-select.component.scss",
"old_path": "src/ng-select/ng-select.component.scss"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
fix: do not wrap text in ng-option (#123)
fixes https://github.com/ng-select/ng-select/issues/118
| 1
|
fix
| null |
791,690
|
10.11.2017 12:18:35
| 28,800
|
fffc8f327a49f13bf20904c9204b2b0132f5e942
|
cli: do not double quote chromeFlags
|
[
{
"change_type": "MODIFY",
"diff": "@@ -40,7 +40,10 @@ export function parseChromeFlags(flags: string = '') {\n// Avoid '=true', then reintroduce quotes\n.map(key => {\nif (parsed[key] === true) return `--${key}`;\n- return `--${key}=\"${parsed[key]}\"`;\n+ // ChromeLauncher passes flags to Chrome as atomic arguments, so do not double quote\n+ // i.e. `lighthouse --chrome-flags=\"--user-agent='My Agent'\"` becomes `chrome \"--user-agent=My Agent\"`\n+ // see https://github.com/GoogleChrome/lighthouse/issues/3744\n+ return `--${key}=${parsed[key]}`;\n});\n}\n",
"new_path": "lighthouse-cli/run.ts",
"old_path": "lighthouse-cli/run.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -51,10 +51,10 @@ describe('Parsing --chrome-flags', () => {\n});\nit('returns boolean flags that are false with value', () => {\n- assert.deepStrictEqual(parseChromeFlags('--debug=false'), ['--debug=\"false\"']);\n+ assert.deepStrictEqual(parseChromeFlags('--debug=false'), ['--debug=false']);\n});\n- it('returns boolean flags that empty when passed undefined', () => {\n+ it('returns empty when passed undefined', () => {\nassert.deepStrictEqual(parseChromeFlags(), []);\n});\n@@ -63,25 +63,25 @@ describe('Parsing --chrome-flags', () => {\n});\nit('handles numeric values', () => {\n- assert.deepStrictEqual(parseChromeFlags('--log-level=0'), ['--log-level=\"0\"']);\n+ assert.deepStrictEqual(parseChromeFlags('--log-level=0'), ['--log-level=0']);\n});\n- it('quotes flag values with spaces in them (#2817)', () => {\n+ it('handles flag values with spaces in them (#2817)', () => {\nassert.deepStrictEqual(\nparseChromeFlags('--user-agent=\"iPhone UA Test\"'),\n- ['--user-agent=\"iPhone UA Test\"']\n+ ['--user-agent=iPhone UA Test']\n);\nassert.deepStrictEqual(\nparseChromeFlags('--host-resolver-rules=\"MAP www.example.org:443 127.0.0.1:8443\"'),\n- ['--host-resolver-rules=\"MAP www.example.org:443 127.0.0.1:8443\"']\n+ ['--host-resolver-rules=MAP www.example.org:443 127.0.0.1:8443']\n);\n});\nit('returns all flags as provided', () => {\nassert.deepStrictEqual(\nparseChromeFlags('--spaces=\"1 2 3 4\" --debug=false --verbose --more-spaces=\"9 9 9\"'),\n- ['--spaces=\"1 2 3 4\"', '--debug=\"false\"', '--verbose', '--more-spaces=\"9 9 9\"']\n+ ['--spaces=1 2 3 4', '--debug=false', '--verbose', '--more-spaces=9 9 9']\n);\n});\n});\n",
"new_path": "lighthouse-cli/test/cli/run-test.js",
"old_path": "lighthouse-cli/test/cli/run-test.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
cli: do not double quote chromeFlags (#3775)
| 1
|
cli
| null |
791,690
|
10.11.2017 13:44:41
| 28,800
|
76b88070d29c3fc05bb87e092e32a45f9804fe3d
|
core: remove optimalValue
|
[
{
"change_type": "MODIFY",
"diff": "@@ -61,7 +61,6 @@ An object containing the results of the audits, keyed by their name.\n| extendedInfo | `Object` | Extra information found by the audit. The structure of this object varies from audit to audit and is generally for programmatic consumption and debugging, though there is typically overlap with `details`. *WARNING: The structure of this object is not stable and cannot be trusted to follow semver* |\n| manual | `boolean` | Indicator used for display that the audit does not have results and is a placeholder for the user to conduct manual testing. |\n| informative | `boolean` | Indicator used for display that the audit is intended to be informative only. It cannot be passed or failed. |\n-| category | `string` | No longer used. *WARNING: Deprecated, will be removed in Lighthouse 3.0* |\n### Example\n```json\n",
"new_path": "docs/understanding-results.md",
"old_path": "docs/understanding-results.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -151,7 +151,6 @@ class Audit {\nrawValue: result.rawValue,\nerror: result.error,\ndebugString: result.debugString,\n- optimalValue: result.optimalValue,\nextendedInfo: result.extendedInfo,\nscoringMode: audit.meta.scoringMode || Audit.SCORING_MODES.BINARY,\ninformative: audit.meta.informative,\n",
"new_path": "lighthouse-core/audits/audit.js",
"old_path": "lighthouse-core/audits/audit.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -9,7 +9,6 @@ const ByteEfficiencyAudit = require('./byte-efficiency-audit');\n// Parameters for log-normal CDF scoring. See https://www.desmos.com/calculator/gpmjeykbwr\n// ~75th and ~90th percentiles http://httparchive.org/interesting.php?a=All&l=Feb%201%202017&s=All#bytesTotal\n-const OPTIMAL_VALUE = 1600 * 1024;\nconst SCORING_POINT_OF_DIMINISHING_RETURNS = 2500 * 1024;\nconst SCORING_MEDIAN = 4000 * 1024;\n@@ -20,7 +19,6 @@ class TotalByteWeight extends ByteEfficiencyAudit {\nstatic get meta() {\nreturn {\nname: 'total-byte-weight',\n- optimalValue: `< ${this.bytesToKbString(OPTIMAL_VALUE)}`,\ndescription: 'Avoids enormous network payloads',\nfailureDescription: 'Has enormous network payloads',\nhelpText:\n@@ -84,7 +82,6 @@ class TotalByteWeight extends ByteEfficiencyAudit {\nreturn {\nscore,\nrawValue: totalBytes,\n- optimalValue: this.meta.optimalValue,\ndisplayValue: `Total size was ${ByteEfficiencyAudit.bytesToKbString(totalBytes)}`,\nextendedInfo: {\nvalue: {\n",
"new_path": "lighthouse-core/audits/byte-efficiency/total-byte-weight.js",
"old_path": "lighthouse-core/audits/byte-efficiency/total-byte-weight.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -236,7 +236,6 @@ class ConsistentlyInteractiveMetric extends Audit {\n),\nrawValue: timeInMs,\ndisplayValue: Util.formatMilliseconds(timeInMs),\n- optimalValue: this.meta.optimalValue,\nextendedInfo: {\nvalue: extendedInfo,\n},\n",
"new_path": "lighthouse-core/audits/consistently-interactive.js",
"old_path": "lighthouse-core/audits/consistently-interactive.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -17,7 +17,6 @@ class CriticalRequestChains extends Audit {\nname: 'critical-request-chains',\ndescription: 'Critical Request Chains',\ninformative: true,\n- optimalValue: 0,\nhelpText: 'The Critical Request Chains below show you what resources are ' +\n'required for first render of this page. Improve page load by reducing ' +\n'the length of chains, reducing the download size of resources, or ' +\n@@ -113,9 +112,8 @@ class CriticalRequestChains extends Audit {\nconst longestChain = CriticalRequestChains._getLongestChain(chains);\nreturn {\n- rawValue: chainCount <= this.meta.optimalValue,\n+ rawValue: chainCount === 0,\ndisplayValue: Util.formatNumber(chainCount),\n- optimalValue: this.meta.optimalValue,\nextendedInfo: {\nvalue: {\nchains,\n",
"new_path": "lighthouse-core/audits/critical-request-chains.js",
"old_path": "lighthouse-core/audits/critical-request-chains.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -36,7 +36,6 @@ class DOMSize extends Audit {\nname: 'dom-size',\ndescription: 'Avoids an excessive DOM size',\nfailureDescription: 'Uses an excessive DOM size',\n- optimalValue: `< ${DOMSize.MAX_DOM_NODES.toLocaleString()} nodes`,\nhelpText: 'Browser engineers recommend pages contain fewer than ' +\n`~${Util.formatNumber(DOMSize.MAX_DOM_NODES)} DOM nodes. The sweet spot is a tree ` +\n`depth < ${MAX_DOM_TREE_DEPTH} elements and fewer than ${MAX_DOM_TREE_WIDTH} ` +\n@@ -96,7 +95,6 @@ class DOMSize extends Audit {\nreturn {\nscore,\nrawValue: stats.totalDOMNodes,\n- optimalValue: this.meta.optimalValue,\ndisplayValue: `${Util.formatNumber(stats.totalDOMNodes)} nodes`,\nextendedInfo: {\nvalue: cards,\n",
"new_path": "lighthouse-core/audits/dobetterweb/dom-size.js",
"old_path": "lighthouse-core/audits/dobetterweb/dom-size.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -22,7 +22,6 @@ class EstimatedInputLatency extends Audit {\nreturn {\nname: 'estimated-input-latency',\ndescription: 'Estimated Input Latency',\n- optimalValue: `< ${Util.formatMilliseconds(SCORING_POINT_OF_DIMINISHING_RETURNS, 1)}`,\nhelpText: 'The score above is an estimate of how long your app takes to respond to user ' +\n'input, in milliseconds. There is a 90% probability that a user encounters this amount ' +\n'of latency, or less. 10% of the time a user can expect additional latency. If your ' +\n@@ -57,7 +56,6 @@ class EstimatedInputLatency extends Audit {\nreturn {\nscore,\n- optimalValue: EstimatedInputLatency.meta.optimalValue,\nrawValue,\ndisplayValue: Util.formatMilliseconds(rawValue, 1),\nextendedInfo: {\n",
"new_path": "lighthouse-core/audits/estimated-input-latency.js",
"old_path": "lighthouse-core/audits/estimated-input-latency.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -22,7 +22,6 @@ class FirstMeaningfulPaint extends Audit {\nreturn {\nname: 'first-meaningful-paint',\ndescription: 'First meaningful paint',\n- optimalValue: `< ${Util.formatMilliseconds(SCORING_POINT_OF_DIMINISHING_RETURNS, 1)}`,\nhelpText: 'First meaningful paint measures when the primary content of a page is visible. ' +\n'[Learn more](https://developers.google.com/web/tools/lighthouse/audits/first-meaningful-paint).',\nscoringMode: Audit.SCORING_MODES.NUMERIC,\n@@ -57,7 +56,6 @@ class FirstMeaningfulPaint extends Audit {\nrawValue: parseFloat(result.duration),\ndisplayValue: Util.formatMilliseconds(result.duration),\ndebugString: result.debugString,\n- optimalValue: this.meta.optimalValue,\nextendedInfo: {\nvalue: result.extendedInfo,\n},\n",
"new_path": "lighthouse-core/audits/first-meaningful-paint.js",
"old_path": "lighthouse-core/audits/first-meaningful-paint.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -23,7 +23,6 @@ class SpeedIndexMetric extends Audit {\ndescription: 'Perceptual Speed Index',\nhelpText: 'Speed Index shows how quickly the contents of a page are visibly populated. ' +\n'[Learn more](https://developers.google.com/web/tools/lighthouse/audits/speed-index).',\n- optimalValue: `< ${Util.formatNumber(SCORING_POINT_OF_DIMINISHING_RETURNS)}`,\nscoringMode: Audit.SCORING_MODES.NUMERIC,\nrequiredArtifacts: ['traces'],\n};\n@@ -96,7 +95,6 @@ class SpeedIndexMetric extends Audit {\nscore,\nrawValue,\ndisplayValue: Util.formatNumber(rawValue),\n- optimalValue: this.meta.optimalValue,\nextendedInfo: {\nvalue: extendedInfo,\n},\n",
"new_path": "lighthouse-core/audits/speed-index-metric.js",
"old_path": "lighthouse-core/audits/speed-index-metric.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -21,8 +21,5 @@ AuditMeta.prototype.name;\n/** @type {string} */\nAuditMeta.prototype.description;\n-/** @type {?(boolean|number|string|undefined)} */\n-AuditMeta.prototype.optimalValue;\n-\n/** @type {!Array<string>} */\nAuditMeta.prototype.requiredArtifacts;\n",
"new_path": "lighthouse-core/closure/typedefs/Audit.js",
"old_path": "lighthouse-core/closure/typedefs/Audit.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -34,9 +34,6 @@ AuditResult.prototype.displayValue;\n*/\nAuditResult.prototype.debugString;\n-/** @type {(boolean|number|string|undefined|null)} */\n-AuditResult.prototype.optimalValue;\n-\n/** @type {(AuditExtendedInfo|undefined|null)} */\nAuditResult.prototype.extendedInfo;\n@@ -74,9 +71,6 @@ AuditFullResult.prototype.error;\n/** @type {(string|undefined)} */\nAuditFullResult.prototype.debugString;\n-/** @type {(boolean|number|string|undefined|null)} */\n-AuditFullResult.prototype.optimalValue;\n-\n/** @type {(AuditExtendedInfo|undefined|null)} */\nAuditFullResult.prototype.extendedInfo;\n",
"new_path": "lighthouse-core/closure/typedefs/AuditResult.js",
"old_path": "lighthouse-core/closure/typedefs/AuditResult.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -37,9 +37,6 @@ class CategoryRenderer {\nif (audit.result.displayValue) {\ntitle += `: ${audit.result.displayValue}`;\n}\n- if (audit.result.optimalValue) {\n- title += ` (target: ${audit.result.optimalValue})`;\n- }\nif (audit.result.debugString) {\nconst debugStrEl = tmpl.appendChild(this._dom.createElement('div', 'lh-debug'));\n",
"new_path": "lighthouse-core/report/v2/renderer/category-renderer.js",
"old_path": "lighthouse-core/report/v2/renderer/category-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -188,7 +188,6 @@ if (typeof module !== 'undefined' && module.exports) {\n* helpText: string,\n* score: (number|boolean),\n* scoringMode: string,\n- * optimalValue: number,\n* extendedInfo: Object,\n* details: (!DetailsRenderer.DetailsJSON|undefined)\n* }\n",
"new_path": "lighthouse-core/report/v2/renderer/report-renderer.js",
"old_path": "lighthouse-core/report/v2/renderer/report-renderer.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -29,7 +29,6 @@ describe('Num DOM nodes audit', () => {\nconst auditResult = DOMSize.audit(artifact);\nassert.equal(auditResult.score, 100);\nassert.equal(auditResult.rawValue, numNodes);\n- assert.equal(auditResult.optimalValue, `< ${DOMSize.MAX_DOM_NODES.toLocaleString()} nodes`);\nassert.equal(auditResult.displayValue, `${numNodes.toLocaleString()} nodes`);\nassert.equal(auditResult.details.items[0].title, 'Total DOM Nodes');\nassert.equal(auditResult.details.items[0].value, numNodes.toLocaleString());\n",
"new_path": "lighthouse-core/test/audits/dobetterweb/dom-size-test.js",
"old_path": "lighthouse-core/test/audits/dobetterweb/dom-size-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -124,7 +124,6 @@ describe('Config', () => {\nconfigJSON.auditResults = [{\nvalue: 1,\nrawValue: 1.0,\n- optimalValue: 1.0,\nname: 'Test Audit',\ndetails: {\nitems: {\n",
"new_path": "lighthouse-core/test/config/config-test.js",
"old_path": "lighthouse-core/test/config/config-test.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core: remove optimalValue (#3774)
| 1
|
core
| null |
448,039
|
10.11.2017 14:36:00
| -3,600
|
c5c32c55fcefddea49a5091fed647d5c0b6136f4
|
feat: invoke ngc thru `@angular/compiler-cli` version 5.0.x
Fixes
|
[
{
"change_type": "MODIFY",
"diff": "\"vinyl-fs\": \"^2.4.4\"\n},\n\"peerDependencies\": {\n- \"@angular/tsc-wrapped\": \"~4.4.5\",\n+ \"@angular/compiler\": \"~5.0.0\",\n+ \"@angular/compiler-cli\": \"~5.0.0\",\n\"typescript\": \"~2.4.2\"\n},\n\"devDependencies\": {\n\"@angular/cdk\": \"~5.0.0-rc0\",\n\"@angular/common\": \"~5.0.0\",\n+ \"@angular/compiler\": \"~5.0.0\",\n+ \"@angular/compiler-cli\": \"~5.0.0\",\n\"@angular/core\": \"~5.0.0\",\n\"@angular/http\": \"~5.0.0\",\n\"@angular/platform-browser\": \"~5.0.0\",\n- \"@angular/tsc-wrapped\": \"~4.4.5\",\n\"@commitlint/cli\": \"^4.0.0\",\n\"@commitlint/config-angular\": \"^4.2.0\",\n\"@types/chai\": \"^4.0.0\",\n",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "MODIFY",
"diff": "import * as path from 'path';\n-import { main as tsc, AngularCompilerOptions } from '@angular/tsc-wrapped';\n+import { performCompilation, readConfiguration, AngularCompilerOptions } from '@angular/compiler-cli';\nimport { NgPackageData } from '../model/ng-package-data';\nimport { readJson, writeJson } from 'fs-extra';\nimport { debug } from '../util/log';\n@@ -37,7 +37,10 @@ export async function ngc(ngPkg: NgPackageData, basePath: string): Promise<strin\ndebug(`ngc ${tsConfigPath}, { basePath: ${basePath} })`);\nawait prepareTsConfig(ngPkg, tsConfigPath);\n- await tsc(tsConfigPath, { basePath });\n+\n+ // invoke ngc programmatic API\n+ const compilerConfig = readConfiguration(tsConfigPath);\n+ performCompilation(compilerConfig);\ndebug('Reading tsconfig from ' + tsConfigPath);\nconst tsConfig = await readJson(tsConfigPath);\n",
"new_path": "src/lib/steps/ngc.ts",
"old_path": "src/lib/steps/ngc.ts"
},
{
"change_type": "MODIFY",
"diff": "dependencies:\ntslib \"^1.7.1\"\n+\"@angular/compiler-cli@~5.0.0\":\n+ version \"5.0.1\"\n+ resolved \"https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-5.0.1.tgz#526dc1bb394fb16ad916601eea9aa00eb44b4fff\"\n+ dependencies:\n+ chokidar \"^1.4.2\"\n+ minimist \"^1.2.0\"\n+ reflect-metadata \"^0.1.2\"\n+ tsickle \"^0.24.0\"\n+\n+\"@angular/compiler@~5.0.0\":\n+ version \"5.0.1\"\n+ resolved \"https://registry.yarnpkg.com/@angular/compiler/-/compiler-5.0.1.tgz#7fd4c7fa4bbbef4c146962fa946b827330a6c8ed\"\n+ dependencies:\n+ tslib \"^1.7.1\"\n+\n\"@angular/core@~5.0.0\":\nversion \"5.0.1\"\nresolved \"https://registry.yarnpkg.com/@angular/core/-/core-5.0.1.tgz#a4a74afc7e2058d30b8263eb6d66daace9f427ba\"\ndependencies:\ntslib \"^1.7.1\"\n-\"@angular/tsc-wrapped@~4.4.5\":\n- version \"4.4.6\"\n- resolved \"https://registry.yarnpkg.com/@angular/tsc-wrapped/-/tsc-wrapped-4.4.6.tgz#16787cbbf50bdc7e738123b19c32527f244e178d\"\n- dependencies:\n- tsickle \"^0.21.0\"\n-\n\"@commitlint/cli@^4.0.0\":\nversion \"4.2.1\"\nresolved \"https://registry.yarnpkg.com/@commitlint/cli/-/cli-4.2.1.tgz#5b1a99db20f54e3548d9f8ffbb722f8c7134a066\"\n@@ -537,7 +546,7 @@ check-error@^1.0.1:\nversion \"1.0.2\"\nresolved \"https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82\"\n-chokidar@^1.6.0:\n+chokidar@^1.4.2, chokidar@^1.6.0:\nversion \"1.7.0\"\nresolved \"https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468\"\ndependencies:\n@@ -2903,6 +2912,10 @@ redent@^1.0.0:\nindent-string \"^2.1.0\"\nstrip-indent \"^1.0.1\"\n+reflect-metadata@^0.1.2:\n+ version \"0.1.10\"\n+ resolved \"https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.10.tgz#b4f83704416acad89988c9b15635d47e03b9344a\"\n+\nregenerator-runtime@^0.10.5:\nversion \"0.10.5\"\nresolved \"https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658\"\n@@ -3527,9 +3540,9 @@ tsconfig@^6.0.0:\nstrip-bom \"^3.0.0\"\nstrip-json-comments \"^2.0.0\"\n-tsickle@^0.21.0:\n- version \"0.21.6\"\n- resolved \"https://registry.yarnpkg.com/tsickle/-/tsickle-0.21.6.tgz#53b01b979c5c13fdb13afb3fb958177e5991588d\"\n+tsickle@^0.24.0:\n+ version \"0.24.1\"\n+ resolved \"https://registry.yarnpkg.com/tsickle/-/tsickle-0.24.1.tgz#039343b205bf517a333b0703978892f80a7d848e\"\ndependencies:\nminimist \"^1.2.0\"\nmkdirp \"^0.5.1\"\n@@ -3558,9 +3571,9 @@ typedarray@^0.0.6:\nversion \"0.0.6\"\nresolved \"https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777\"\n-typescript@~2.3.4:\n- version \"2.3.4\"\n- resolved \"https://registry.yarnpkg.com/typescript/-/typescript-2.3.4.tgz#3d38321828231e434f287514959c37a82b629f42\"\n+typescript@~2.4.2:\n+ version \"2.4.2\"\n+ resolved \"https://registry.yarnpkg.com/typescript/-/typescript-2.4.2.tgz#f8395f85d459276067c988aa41837a8f82870844\"\nua-parser-js@^0.7.9:\nversion \"0.7.17\"\n",
"new_path": "yarn.lock",
"old_path": "yarn.lock"
}
] |
TypeScript
|
MIT License
|
ng-packagr/ng-packagr
|
feat: invoke ngc thru `@angular/compiler-cli` version 5.0.x
Fixes #219
| 1
|
feat
| null |
448,039
|
10.11.2017 15:06:35
| -3,600
|
c222daeabd84061fb54ecbc337a8a724b8e802bc
|
test: refactor BazComponent styles to verify AoT metadata
|
[
{
"change_type": "MODIFY",
"diff": "import { expect } from 'chai';\nimport * as path from 'path';\n-describe(`@sample/material`, () => {\n+xdescribe(`@sample/material`, () => {\n- describe(`material.umd.js`, () => {\n+ xdescribe(`material.umd.js`, () => {\nlet GENERATED;\nbefore(done => {\nGENERATED = require(path.resolve(__dirname, '..', 'dist', 'bundles', 'material.umd.js'));\ndone();\n});\n- it(`should exist`, () => {\n+ xit(`should exist`, () => {\nexpect(GENERATED.BazComponent).to.be.ok;\n});\n- it(`should have \"BazComponent\"`, () => {\n+ xit(`should have \"BazComponent\"`, () => {\nexpect(GENERATED).to.be.ok;\n});\n- it(`should have \"BazComponent.decorators\"`, () => {\n- expect(GENERATED.BazComponent.decorators).to.be.ok;\n- });\n-\n- it(`should have styles for \"BazComponent\"`, () => {\n- expect(GENERATED.BazComponent.decorators[0].args[0].styles).to.be.ok;\n- });\n-\n- it(`should have style with: \"color: red\"`, () => {\n- expect(GENERATED.BazComponent.decorators[0].args[0].styles[0]).to.have.string('color: \"red\"');\n- });\n-\n});\n});\n",
"new_path": "integration/samples/material/specs/assets.ts",
"old_path": "integration/samples/material/specs/assets.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -23,5 +23,19 @@ describe(`@sample/material`, () => {\nexpect(METADATA['importAs']).to.equal('@sample/material');\n});\n+ describe(`BazComponent`, () => {\n+ it(`should have \"BazComponent.decorators\"`, () => {\n+ expect(METADATA['metadata'].BazComponent.decorators).to.be.ok;\n+ });\n+\n+ it(`should have styles for \"BazComponent\"`, () => {\n+ expect(METADATA['metadata'].BazComponent.decorators[0].arguments[0].styles).to.be.ok;\n+ });\n+\n+ it(`should have style with: \"color: red\"`, () => {\n+ expect(METADATA['metadata'].BazComponent.decorators[0].arguments[0].styles[0]).to.have.string('color: \"red\"');\n+ });\n+ });\n+\n});\n});\n",
"new_path": "integration/samples/material/specs/metadata.ts",
"old_path": "integration/samples/material/specs/metadata.ts"
}
] |
TypeScript
|
MIT License
|
ng-packagr/ng-packagr
|
test: refactor BazComponent styles to verify AoT metadata
| 1
|
test
| null |
573,227
|
10.11.2017 15:26:10
| -3,600
|
32ce81a19a0114e0d2cdd6dcf6d8cfdc6cba689a
|
chore(benchmark): improve grammer
|
[
{
"change_type": "MODIFY",
"diff": "var inquirer = require('inquirer');\nvar bench = require('./lib/bench');\n+var stableVersion = require('restify/package.json').version;\nvar BENCHMARKS = ['response-json', 'response-text'];\n@@ -47,7 +48,10 @@ inquirer\n{\ntype: 'confirm',\nname: 'compare',\n- message: 'Do you want to compare HEAD with latest release?',\n+ message:\n+ 'Do you want to compare HEAD with the stable release (' +\n+ stableVersion +\n+ ')?',\ndefault: true\n},\n{\n@@ -59,7 +63,7 @@ inquirer\n{\ntype: 'input',\nname: 'connection',\n- message: 'How many connection you need?',\n+ message: 'How many connections do you need?',\ndefault: 100,\nvalidate: function validate(value) {\nreturn (\n@@ -71,7 +75,7 @@ inquirer\n{\ntype: 'input',\nname: 'pipelining',\n- message: 'How many pipelining you need?',\n+ message: 'How many pipelining do you need?',\ndefault: 10,\nvalidate: function validate(value) {\nreturn (\n@@ -83,7 +87,7 @@ inquirer\n{\ntype: 'input',\nname: 'duration',\n- message: 'How long does it takes?',\n+ message: 'How long does it take?',\ndefault: 30,\nvalidate: function validate(value) {\nreturn (\n",
"new_path": "benchmark/index.js",
"old_path": "benchmark/index.js"
}
] |
JavaScript
|
MIT License
|
restify/node-restify
|
chore(benchmark): improve grammer (#1562)
| 1
|
chore
|
benchmark
|
448,039
|
10.11.2017 16:01:44
| -3,600
|
2bd8256226305297b0e6638d8cec9c515234b809
|
release: cut v1.6.0-rc.0
|
[
{
"change_type": "MODIFY",
"diff": "All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.\n+<a name=\"1.6.0-rc.0\"></a>\n+# [1.6.0-rc.0](https://github.com/dherges/ng-packagr/compare/v1.5.1...v1.6.0-rc.0) (2017-11-10)\n+\n+\n+### Bug Fixes\n+\n+* update rollup to version ^0.51.0 ([#260](https://github.com/dherges/ng-packagr/issues/260)) ([c652f4e](https://github.com/dherges/ng-packagr/commit/c652f4e))\n+\n+\n+### Features\n+\n+* add tsx/jsx support ([#228](https://github.com/dherges/ng-packagr/issues/228)) ([4068664](https://github.com/dherges/ng-packagr/commit/4068664))\n+* invoke ngc thru `[@angular](https://github.com/angular)/compiler-cli` version 5.0.x ([c5c32c5](https://github.com/dherges/ng-packagr/commit/c5c32c5)), closes [#219](https://github.com/dherges/ng-packagr/issues/219)\n+* update typescript to ~2.4.2 for Angular v5 support ([#270](https://github.com/dherges/ng-packagr/issues/270)) ([2c6db4f](https://github.com/dherges/ng-packagr/commit/2c6db4f))\n+\n+\n+\n<a name=\"1.5.1\"></a>\n## [1.5.1](https://github.com/dherges/ng-packagr/compare/v1.5.0...v1.5.1) (2017-11-10)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"ng-packagr\",\n- \"version\": \"1.5.1\",\n+ \"version\": \"1.6.0-rc.0\",\n\"description\": \"Compile and package a TypeScript library to Angular Package Format\",\n\"keywords\": [\n\"angular\",\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
TypeScript
|
MIT License
|
ng-packagr/ng-packagr
|
release: cut v1.6.0-rc.0
| 1
|
release
| null |
791,697
|
11.11.2017 01:59:57
| -19,080
|
bcb45b4fc8eda0b2c202e6864c6f53f9f5f4bb18
|
report: Add print summary and print expanded options
|
[
{
"change_type": "MODIFY",
"diff": "@@ -177,7 +177,12 @@ class ReportUIFeatures {\ncase 'copy':\nthis.onCopyButtonClick();\nbreak;\n- case 'print':\n+ case 'print-summary':\n+ this.collapseAllDetails();\n+ this.closeExportDropdown();\n+ self.print();\n+ break;\n+ case 'print-expanded':\nthis.expandAllDetails();\nthis.closeExportDropdown();\nself.print();\n@@ -257,7 +262,6 @@ class ReportUIFeatures {\n*/\nprintShortCutDetect(e) {\nif ((e.ctrlKey || e.metaKey) && e.keyCode === 80) { // Ctrl+P\n- this.expandAllDetails();\nthis.closeExportDropdown();\n}\n}\n",
"new_path": "lighthouse-core/report/v2/renderer/report-ui-features.js",
"old_path": "lighthouse-core/report/v2/renderer/report-ui-features.js"
},
{
"change_type": "MODIFY",
"diff": "<div class=\"lh-export\">\n<button class=\"report-icon report-icon--share lh-export__button\" title=\"Export report\"></button>\n<div class=\"lh-export__dropdown\">\n- <a href=\"#\" class=\"report-icon report-icon--print\" data-action=\"print\">Print...</a>\n+ <a href=\"#\" class=\"report-icon report-icon--print\" data-action=\"print-summary\">Print Summary</a>\n+ <a href=\"#\" class=\"report-icon report-icon--print\" data-action=\"print-expanded\">Print Expanded</a>\n<a href=\"#\" class=\"report-icon report-icon--copy\" data-action=\"copy\">Copy JSON</a>\n<a href=\"#\" class=\"report-icon report-icon--download\" data-action=\"save-html\">Save as HTML</a>\n<a href=\"#\" class=\"report-icon report-icon--download\" data-action=\"save-json\">Save as JSON</a>\n",
"new_path": "lighthouse-core/report/v2/templates.html",
"old_path": "lighthouse-core/report/v2/templates.html"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
report: Add print summary and print expanded options (#3578)
| 1
|
report
| null |
791,676
|
11.11.2017 14:33:12
| -3,600
|
5b96072da76f11b6d7d5baad203225f616015066
|
misc(changelog-generator): Generate changelogs
|
[
{
"change_type": "MODIFY",
"diff": "@@ -146,6 +146,7 @@ echo \"Test the lighthouse-viewer build\"\necho \"Branch and commit the version bump.\"\ngit co -b bumpv240\ngit c \"2.4.0\"\n+yarn changelog\ngit tag -a v2.4.0 -m \"v2.4.0\"\necho \"Generate a PR and get it merged.\"\n@@ -162,7 +163,7 @@ npm publish\nyarn deploy-viewer\necho \"Use the GitHub web interface to tag the release\"\n-echo \"Generate the release notes, and update the release page\"\n+echo \"Copy changelog to release notes and update the release page\"\n# * Tell the world!!! *\necho \"Inform various peoples\"\n",
"new_path": "CONTRIBUTING.md",
"old_path": "CONTRIBUTING.md"
},
{
"change_type": "ADD",
"diff": "+/**\n+ * @license Copyright 2017 Google Inc. All Rights Reserved.\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n+ */\n+'use strict';\n+const readFileSync = require('fs').readFileSync;\n+const resolve = require('path').resolve;\n+const mainTemplate = readFileSync(resolve(__dirname, 'templates/template.hbs')).toString();\n+const headerPartial = readFileSync(resolve(__dirname, 'templates/header.hbs')).toString();\n+const commitPartial = readFileSync(resolve(__dirname, 'templates/commit.hbs')).toString();\n+\n+const pullRequestRegex = /\\(#(\\d+)\\)$/;\n+const parserOpts = {\n+ headerPattern: /^(\\w*)(?:\\((.*)\\))?: (.*)$/,\n+ headerCorrespondence: [\n+ 'type',\n+ 'scope',\n+ 'message',\n+ ],\n+};\n+\n+const writerOpts = {\n+ mainTemplate,\n+ headerPartial,\n+ commitPartial,\n+ transform: commit => {\n+ if (typeof commit.hash === 'string') {\n+ commit.hash = commit.hash.substring(0, 7);\n+ }\n+\n+ if (commit.type === 'test') {\n+ commit.type = 'tests';\n+ }\n+\n+ if (commit.type) {\n+ commit.type = commit.type.replace(/_/g, ' ');\n+ commit.type = commit.type.substring(0, 1).toUpperCase() + commit.type.substring(1);\n+ } else {\n+ commit.type = 'Misc';\n+ }\n+\n+ let pullRequestMatch = commit.header.match(pullRequestRegex);\n+ // if header does not provide a PR we try the message\n+ if (!pullRequestMatch && commit.message) {\n+ pullRequestMatch = commit.message.match(pullRequestRegex);\n+ }\n+\n+ if (pullRequestMatch) {\n+ commit.header = commit.header.replace(pullRequestMatch[0], '').trim();\n+ if (commit.message) {\n+ commit.message = commit.message.replace(pullRequestMatch[0], '').trim();\n+ }\n+\n+ commit.PR = pullRequestMatch[1];\n+ }\n+\n+ return commit;\n+ },\n+ groupBy: 'type',\n+ commitGroupsSort: (a, b) => {\n+ // put new audit on the top\n+ if (a.title === 'New audit') {\n+ return -1;\n+ }\n+ if (b.title === 'New audit') {\n+ return 1;\n+ }\n+\n+ // put misc on the bottom\n+ if (a.title === 'Misc') {\n+ return 1;\n+ }\n+ if (b.title === 'Misc') {\n+ return -1;\n+ }\n+\n+ return a.title.localeCompare(b.title);\n+ },\n+ commitsSort: ['type', 'scope'],\n+};\n+\n+module.exports = {\n+ writerOpts,\n+ parserOpts,\n+};\n",
"new_path": "build/changelog-generator/index.js",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{{!--\n+/**\n+ * @license Copyright 2017 Google Inc. All Rights Reserved.\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n+ */\n+--}}\n+* {{#if scope}}{{scope}}: {{/if~}}\n+ {{#if message ~}}\n+ {{~message~}}\n+ {{~else~}}\n+ {{~header~}}\n+ {{~/if ~}}\n+{{~!-- PR number/commit hash --}}\n+{{~#if @root.linkReferences~}}\n+ {{~#if PR}} ([#{{PR}}](\n+ {{~#if @root.host}}{{~@root.host}}/{{/if~}}\n+ {{~#if @root.owner ~}}{{@root.owner}}/{{/if~}}\n+ {{~@root.repository}}/pull/{{PR}}))\n+ {{~else}} ([{{hash}}](\n+ {{~#if @root.host}}{{~@root.host}}/{{/if~}}\n+ {{~#if @root.owner ~}}{{@root.owner}}/{{/if~}}\n+ {{~@root.repository}}/{{@root.commit}}/{{hash}}))\n+ {{~/if~}}\n+{{~else~}}\n+ {{~hash~}}\n+{{~/if~}}\n",
"new_path": "build/changelog-generator/templates/commit.hbs",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{{!--\n+/**\n+ * @license Copyright 2017 Google Inc. All Rights Reserved.\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n+ */\n+--}}\n+ <a name=\"{{version}}\"></a>\n+# {{version}} ({{date}})\n+{{#if @root.linkCompare~}}\n+ [Full Changelog]({{~@root.repoUrl}}/compare/{{previousTag}}...{{currentTag}})\n+{{~/if}}\n",
"new_path": "build/changelog-generator/templates/header.hbs",
"old_path": null
},
{
"change_type": "ADD",
"diff": "+{{!--\n+/**\n+ * @license Copyright 2017 Google Inc. All Rights Reserved.\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n+ */\n+--}}\n+{{> header}}\n+\n+{{#each commitGroups}}\n+\n+ {{#if title~}}\n+ ### {{title}}\n+\n+ {{/if}}\n+ {{#each commits}}\n+ {{~> commit root=@root}}\n+\n+ {{/each}}\n+{{/each}}\n",
"new_path": "build/changelog-generator/templates/template.hbs",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "\"smokehouse\": \"node lighthouse-cli/test/smokehouse/smokehouse.js\",\n\"deploy-viewer\": \"cd lighthouse-viewer && gulp deploy\",\n\"bundlesize\": \"bundlesize\",\n- \"plots-smoke\": \"bash plots/test/smoke.sh\"\n+ \"plots-smoke\": \"bash plots/test/smoke.sh\",\n+ \"changelog\": \"conventional-changelog -n ./build/changelog-generator/index.js -i changelog.md -s\"\n},\n\"devDependencies\": {\n\"@types/node\": \"^6.0.45\",\n\"bundlesize\": \"^0.14.4\",\n\"codecov\": \"^2.2.0\",\n\"commitizen\": \"^2.9.6\",\n+ \"conventional-changelog-cli\": \"^1.3.4\",\n\"coveralls\": \"^2.11.9\",\n\"cz-customizable\": \"^5.2.0\",\n\"eslint\": \"^4.8.0\",\n",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "MODIFY",
"diff": "version \"0.0.28\"\nresolved \"https://registry.yarnpkg.com/@types/rimraf/-/rimraf-0.0.28.tgz#5562519bc7963caca8abf7f128cae3b594d41d06\"\n+JSONStream@^1.0.4:\n+ version \"1.3.1\"\n+ resolved \"https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.1.tgz#707f761e01dae9e16f1bcf93703b78c70966579a\"\n+ dependencies:\n+ jsonparse \"^1.2.0\"\n+ through \">=2.2.7 <3\"\n+\nabab@^1.0.3:\nversion \"1.0.3\"\nresolved \"https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d\"\n@@ -54,6 +61,10 @@ acorn@^5.1.1:\nversion \"5.1.2\"\nresolved \"https://registry.yarnpkg.com/acorn/-/acorn-5.1.2.tgz#911cb53e036807cf0fa778dc5d370fbd864246d7\"\n+add-stream@^1.0.0:\n+ version \"1.0.0\"\n+ resolved \"https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa\"\n+\najv-keywords@^2.1.0:\nversion \"2.1.0\"\nresolved \"https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.0.tgz#a296e17f7bfae7c1ce4f7e0de53d29cb32162df0\"\n@@ -147,6 +158,10 @@ array-find-index@^1.0.1:\nversion \"1.0.2\"\nresolved \"https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1\"\n+array-ify@^1.0.0:\n+ version \"1.0.0\"\n+ resolved \"https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece\"\n+\narray-union@^1.0.1:\nversion \"1.0.2\"\nresolved \"https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39\"\n@@ -679,6 +694,13 @@ commitizen@^2.9.6:\nshelljs \"0.7.6\"\nstrip-json-comments \"2.0.1\"\n+compare-func@^1.3.1:\n+ version \"1.3.2\"\n+ resolved \"https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.2.tgz#99dd0ba457e1f9bc722b12c08ec33eeab31fa648\"\n+ dependencies:\n+ array-ify \"^1.0.0\"\n+ dot-prop \"^3.0.0\"\n+\nconcat-map@0.0.1:\nversion \"0.0.1\"\nresolved \"https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b\"\n@@ -717,10 +739,143 @@ content-type-parser@^1.0.1:\nversion \"1.0.1\"\nresolved \"https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94\"\n+conventional-changelog-angular@^1.5.1:\n+ version \"1.5.1\"\n+ resolved \"https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.5.1.tgz#974e73aa1c39c392e4364f2952bd9a62904e9ea3\"\n+ dependencies:\n+ compare-func \"^1.3.1\"\n+ q \"^1.4.1\"\n+\n+conventional-changelog-atom@^0.1.1:\n+ version \"0.1.1\"\n+ resolved \"https://registry.yarnpkg.com/conventional-changelog-atom/-/conventional-changelog-atom-0.1.1.tgz#d40a9b297961b53c745e5d1718fd1a3379f6a92f\"\n+ dependencies:\n+ q \"^1.4.1\"\n+\n+conventional-changelog-cli@^1.3.4:\n+ version \"1.3.4\"\n+ resolved \"https://registry.yarnpkg.com/conventional-changelog-cli/-/conventional-changelog-cli-1.3.4.tgz#38f7ff7ac7bca92ea110897ea08b473f2055a27c\"\n+ dependencies:\n+ add-stream \"^1.0.0\"\n+ conventional-changelog \"^1.1.6\"\n+ lodash \"^4.1.0\"\n+ meow \"^3.7.0\"\n+ tempfile \"^1.1.1\"\n+\n+conventional-changelog-codemirror@^0.2.0:\n+ version \"0.2.0\"\n+ resolved \"https://registry.yarnpkg.com/conventional-changelog-codemirror/-/conventional-changelog-codemirror-0.2.0.tgz#3cc925955f3b14402827b15168049821972d9459\"\n+ dependencies:\n+ q \"^1.4.1\"\n+\n+conventional-changelog-core@^1.9.2:\n+ version \"1.9.2\"\n+ resolved \"https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-1.9.2.tgz#a09b6b959161671ff45b93cc9efb0444e7c845c0\"\n+ dependencies:\n+ conventional-changelog-writer \"^2.0.1\"\n+ conventional-commits-parser \"^2.0.0\"\n+ dateformat \"^1.0.12\"\n+ get-pkg-repo \"^1.0.0\"\n+ git-raw-commits \"^1.2.0\"\n+ git-remote-origin-url \"^2.0.0\"\n+ git-semver-tags \"^1.2.2\"\n+ lodash \"^4.0.0\"\n+ normalize-package-data \"^2.3.5\"\n+ q \"^1.4.1\"\n+ read-pkg \"^1.1.0\"\n+ read-pkg-up \"^1.0.1\"\n+ through2 \"^2.0.0\"\n+\n+conventional-changelog-ember@^0.2.8:\n+ version \"0.2.8\"\n+ resolved \"https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.2.8.tgz#65e686da83d23b67133d1f853908c87f948035c0\"\n+ dependencies:\n+ q \"^1.4.1\"\n+\n+conventional-changelog-eslint@^0.2.0:\n+ version \"0.2.0\"\n+ resolved \"https://registry.yarnpkg.com/conventional-changelog-eslint/-/conventional-changelog-eslint-0.2.0.tgz#b4b9b5dc09417844d87c7bcfb16bdcc686c4b1c1\"\n+ dependencies:\n+ q \"^1.4.1\"\n+\n+conventional-changelog-express@^0.2.0:\n+ version \"0.2.0\"\n+ resolved \"https://registry.yarnpkg.com/conventional-changelog-express/-/conventional-changelog-express-0.2.0.tgz#8d666ad41b10ebf964a4602062ddd2e00deb518d\"\n+ dependencies:\n+ q \"^1.4.1\"\n+\n+conventional-changelog-jquery@^0.1.0:\n+ version \"0.1.0\"\n+ resolved \"https://registry.yarnpkg.com/conventional-changelog-jquery/-/conventional-changelog-jquery-0.1.0.tgz#0208397162e3846986e71273b6c79c5b5f80f510\"\n+ dependencies:\n+ q \"^1.4.1\"\n+\n+conventional-changelog-jscs@^0.1.0:\n+ version \"0.1.0\"\n+ resolved \"https://registry.yarnpkg.com/conventional-changelog-jscs/-/conventional-changelog-jscs-0.1.0.tgz#0479eb443cc7d72c58bf0bcf0ef1d444a92f0e5c\"\n+ dependencies:\n+ q \"^1.4.1\"\n+\n+conventional-changelog-jshint@^0.2.0:\n+ version \"0.2.0\"\n+ resolved \"https://registry.yarnpkg.com/conventional-changelog-jshint/-/conventional-changelog-jshint-0.2.0.tgz#63ad7aec66cd1ae559bafe80348c4657a6eb1872\"\n+ dependencies:\n+ compare-func \"^1.3.1\"\n+ q \"^1.4.1\"\n+\n+conventional-changelog-writer@^2.0.1:\n+ version \"2.0.1\"\n+ resolved \"https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-2.0.1.tgz#47c10d0faba526b78d194389d1e931d09ee62372\"\n+ dependencies:\n+ compare-func \"^1.3.1\"\n+ conventional-commits-filter \"^1.0.0\"\n+ dateformat \"^1.0.11\"\n+ handlebars \"^4.0.2\"\n+ json-stringify-safe \"^5.0.1\"\n+ lodash \"^4.0.0\"\n+ meow \"^3.3.0\"\n+ semver \"^5.0.1\"\n+ split \"^1.0.0\"\n+ through2 \"^2.0.0\"\n+\n+conventional-changelog@^1.1.6:\n+ version \"1.1.6\"\n+ resolved \"https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-1.1.6.tgz#ebd9b1ab63766c715f903f654626b6b1c0da7762\"\n+ dependencies:\n+ conventional-changelog-angular \"^1.5.1\"\n+ conventional-changelog-atom \"^0.1.1\"\n+ conventional-changelog-codemirror \"^0.2.0\"\n+ conventional-changelog-core \"^1.9.2\"\n+ conventional-changelog-ember \"^0.2.8\"\n+ conventional-changelog-eslint \"^0.2.0\"\n+ conventional-changelog-express \"^0.2.0\"\n+ conventional-changelog-jquery \"^0.1.0\"\n+ conventional-changelog-jscs \"^0.1.0\"\n+ conventional-changelog-jshint \"^0.2.0\"\n+\nconventional-commit-types@^2.0.0:\nversion \"2.2.0\"\nresolved \"https://registry.yarnpkg.com/conventional-commit-types/-/conventional-commit-types-2.2.0.tgz#5db95739d6c212acbe7b6f656a11b940baa68946\"\n+conventional-commits-filter@^1.0.0:\n+ version \"1.0.0\"\n+ resolved \"https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-1.0.0.tgz#6fc2a659372bc3f2339cf9ffff7e1b0344b93039\"\n+ dependencies:\n+ is-subset \"^0.1.1\"\n+ modify-values \"^1.0.0\"\n+\n+conventional-commits-parser@^2.0.0:\n+ version \"2.0.0\"\n+ resolved \"https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.0.0.tgz#71d01910cb0a99aeb20c144e50f81f4df3178447\"\n+ dependencies:\n+ JSONStream \"^1.0.4\"\n+ is-text-path \"^1.0.0\"\n+ lodash \"^4.2.1\"\n+ meow \"^3.3.0\"\n+ split2 \"^2.0.0\"\n+ through2 \"^2.0.0\"\n+ trim-off-newlines \"^1.0.0\"\n+\nconvert-source-map@^1.1.0, convert-source-map@^1.1.1:\nversion \"1.3.0\"\nresolved \"https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.3.0.tgz#e9f3e9c6e2728efc2676696a70eb382f73106a67\"\n@@ -820,13 +975,19 @@ cz-customizable@^5.2.0:\nwinston \"2.1.0\"\nword-wrap \"1.1.0\"\n+dargs@^4.0.1:\n+ version \"4.1.0\"\n+ resolved \"https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17\"\n+ dependencies:\n+ number-is-nan \"^1.0.0\"\n+\ndashdash@^1.12.0:\nversion \"1.14.0\"\nresolved \"https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.0.tgz#29e486c5418bf0f356034a993d51686a33e84141\"\ndependencies:\nassert-plus \"^1.0.0\"\n-dateformat@^1.0.11:\n+dateformat@^1.0.11, dateformat@^1.0.12:\nversion \"1.0.12\"\nresolved \"https://registry.yarnpkg.com/dateformat/-/dateformat-1.0.12.tgz#9f124b67594c937ff706932e4a642cca8dbbfee9\"\ndependencies:\n@@ -931,6 +1092,12 @@ doctrine@^2.0.0:\nesutils \"^2.0.2\"\nisarray \"^1.0.0\"\n+dot-prop@^3.0.0:\n+ version \"3.0.0\"\n+ resolved \"https://registry.yarnpkg.com/dot-prop/-/dot-prop-3.0.0.tgz#1b708af094a49c9a0e7dbcad790aba539dac1177\"\n+ dependencies:\n+ is-obj \"^1.0.0\"\n+\ndot-prop@^4.1.0:\nversion \"4.1.1\"\nresolved \"https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.1.1.tgz#a8493f0b7b5eeec82525b5c7587fa7de7ca859c1\"\n@@ -1372,6 +1539,16 @@ generate-object-property@^1.1.0:\ndependencies:\nis-property \"^1.0.0\"\n+get-pkg-repo@^1.0.0:\n+ version \"1.4.0\"\n+ resolved \"https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-1.4.0.tgz#c73b489c06d80cc5536c2c853f9e05232056972d\"\n+ dependencies:\n+ hosted-git-info \"^2.1.4\"\n+ meow \"^3.3.0\"\n+ normalize-package-data \"^2.3.0\"\n+ parse-github-repo-url \"^1.3.0\"\n+ through2 \"^2.0.0\"\n+\nget-stdin@^4.0.1:\nversion \"4.0.1\"\nresolved \"https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe\"\n@@ -1386,6 +1563,36 @@ getpass@^0.1.1:\ndependencies:\nassert-plus \"^1.0.0\"\n+git-raw-commits@^1.2.0:\n+ version \"1.2.0\"\n+ resolved \"https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-1.2.0.tgz#0f3a8bfd99ae0f2d8b9224d58892975e9a52d03c\"\n+ dependencies:\n+ dargs \"^4.0.1\"\n+ lodash.template \"^4.0.2\"\n+ meow \"^3.3.0\"\n+ split2 \"^2.0.0\"\n+ through2 \"^2.0.0\"\n+\n+git-remote-origin-url@^2.0.0:\n+ version \"2.0.0\"\n+ resolved \"https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f\"\n+ dependencies:\n+ gitconfiglocal \"^1.0.0\"\n+ pify \"^2.3.0\"\n+\n+git-semver-tags@^1.2.2:\n+ version \"1.2.2\"\n+ resolved \"https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-1.2.2.tgz#a2139be1bf6e337e125f3eb8bb8fc6f5d4d6445f\"\n+ dependencies:\n+ meow \"^3.3.0\"\n+ semver \"^5.0.1\"\n+\n+gitconfiglocal@^1.0.0:\n+ version \"1.0.0\"\n+ resolved \"https://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b\"\n+ dependencies:\n+ ini \"^1.3.2\"\n+\ngithub-build@^1.2.0:\nversion \"1.2.0\"\nresolved \"https://registry.yarnpkg.com/github-build/-/github-build-1.2.0.tgz#b0bdb705ae4088218577e863c1a301030211051f\"\n@@ -1688,6 +1895,16 @@ handlebars@^4.0.1:\noptionalDependencies:\nuglify-js \"^2.6\"\n+handlebars@^4.0.2:\n+ version \"4.0.11\"\n+ resolved \"https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc\"\n+ dependencies:\n+ async \"^1.4.0\"\n+ optimist \"^0.6.1\"\n+ source-map \"^0.4.4\"\n+ optionalDependencies:\n+ uglify-js \"^2.6\"\n+\nhar-validator@~2.0.6:\nversion \"2.0.6\"\nresolved \"https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d\"\n@@ -1796,7 +2013,7 @@ inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3:\nversion \"2.0.3\"\nresolved \"https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de\"\n-ini@^1.3.4, ini@~1.3.0:\n+ini@^1.3.2, ini@^1.3.4, ini@~1.3.0:\nversion \"1.3.4\"\nresolved \"https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e\"\n@@ -2002,6 +2219,16 @@ is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0:\nversion \"1.1.0\"\nresolved \"https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44\"\n+is-subset@^0.1.1:\n+ version \"0.1.1\"\n+ resolved \"https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6\"\n+\n+is-text-path@^1.0.0:\n+ version \"1.0.1\"\n+ resolved \"https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e\"\n+ dependencies:\n+ text-extensions \"^1.0.0\"\n+\nis-typedarray@~1.0.0:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a\"\n@@ -2170,7 +2397,7 @@ json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1:\ndependencies:\njsonify \"~0.0.0\"\n-json-stringify-safe@5.0.1, json-stringify-safe@~5.0.1:\n+json-stringify-safe@5.0.1, json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1:\nversion \"5.0.1\"\nresolved \"https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb\"\n@@ -2192,6 +2419,10 @@ jsonify@~0.0.0:\nversion \"0.0.0\"\nresolved \"https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73\"\n+jsonparse@^1.2.0:\n+ version \"1.3.1\"\n+ resolved \"https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280\"\n+\njsonpointer@^4.0.0:\nversion \"4.0.0\"\nresolved \"https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.0.tgz#6661e161d2fc445f19f98430231343722e1fcbd5\"\n@@ -2346,7 +2577,7 @@ lodash._reevaluate@^3.0.0:\nversion \"3.0.0\"\nresolved \"https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed\"\n-lodash._reinterpolate@^3.0.0:\n+lodash._reinterpolate@^3.0.0, lodash._reinterpolate@~3.0.0:\nversion \"3.0.0\"\nresolved \"https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d\"\n@@ -2434,6 +2665,13 @@ lodash.template@^3.0.0:\nlodash.restparam \"^3.0.0\"\nlodash.templatesettings \"^3.0.0\"\n+lodash.template@^4.0.2:\n+ version \"4.4.0\"\n+ resolved \"https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0\"\n+ dependencies:\n+ lodash._reinterpolate \"~3.0.0\"\n+ lodash.templatesettings \"^4.0.0\"\n+\nlodash.templatesettings@^3.0.0:\nversion \"3.1.1\"\nresolved \"https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5\"\n@@ -2441,11 +2679,17 @@ lodash.templatesettings@^3.0.0:\nlodash._reinterpolate \"^3.0.0\"\nlodash.escape \"^3.0.0\"\n+lodash.templatesettings@^4.0.0:\n+ version \"4.1.0\"\n+ resolved \"https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316\"\n+ dependencies:\n+ lodash._reinterpolate \"~3.0.0\"\n+\nlodash@4.17.2:\nversion \"4.17.2\"\nresolved \"https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42\"\n-lodash@^4.17.4, lodash@^4.3.0:\n+lodash@^4.0.0, lodash@^4.1.0, lodash@^4.17.4, lodash@^4.2.1, lodash@^4.3.0:\nversion \"4.17.4\"\nresolved \"https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae\"\n@@ -2627,6 +2871,10 @@ mocha@^3.2.0:\nmkdirp \"0.5.1\"\nsupports-color \"3.1.2\"\n+modify-values@^1.0.0:\n+ version \"1.0.0\"\n+ resolved \"https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.0.tgz#e2b6cdeb9ce19f99317a53722f3dbf5df5eaaab2\"\n+\nms@0.7.1:\nversion \"0.7.1\"\nresolved \"https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098\"\n@@ -2667,6 +2915,15 @@ nopt@3.x:\ndependencies:\nabbrev \"1\"\n+normalize-package-data@^2.3.0, normalize-package-data@^2.3.5:\n+ version \"2.4.0\"\n+ resolved \"https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f\"\n+ dependencies:\n+ hosted-git-info \"^2.1.4\"\n+ is-builtin-module \"^1.0.0\"\n+ semver \"2 || 3 || 4 || 5\"\n+ validate-npm-package-license \"^3.0.1\"\n+\nnormalize-package-data@^2.3.2, normalize-package-data@^2.3.4:\nversion \"2.3.5\"\nresolved \"https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.5.tgz#8d924f142960e1777e7ffe170543631cc7cb02df\"\n@@ -2845,6 +3102,10 @@ parse-filepath@^1.0.1:\nmap-cache \"^0.2.0\"\npath-root \"^0.1.1\"\n+parse-github-repo-url@^1.3.0:\n+ version \"1.4.1\"\n+ resolved \"https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz#9e7d8bb252a6cb6ba42595060b7bf6df3dbc1f50\"\n+\nparse-glob@^3.0.4:\nversion \"3.0.4\"\nresolved \"https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c\"\n@@ -2982,6 +3243,10 @@ punycode@^1.4.1:\nversion \"1.4.1\"\nresolved \"https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e\"\n+q@^1.4.1:\n+ version \"1.5.1\"\n+ resolved \"https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7\"\n+\nqs@~6.2.0:\nversion \"6.2.1\"\nresolved \"https://registry.yarnpkg.com/qs/-/qs-6.2.1.tgz#ce03c5ff0935bc1d9d69a9f14cbd18e568d67625\"\n@@ -3030,7 +3295,7 @@ read-pkg-up@^2.0.0:\nfind-up \"^2.0.0\"\nread-pkg \"^2.0.0\"\n-read-pkg@^1.0.0:\n+read-pkg@^1.0.0, read-pkg@^1.1.0:\nversion \"1.1.0\"\nresolved \"https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28\"\ndependencies:\n@@ -3055,7 +3320,7 @@ read-pkg@^2.0.0:\nisarray \"0.0.1\"\nstring_decoder \"~0.10.x\"\n-readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.2.2:\n+readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.1.5, readable-stream@^2.2.2:\nversion \"2.3.3\"\nresolved \"https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c\"\ndependencies:\n@@ -3324,6 +3589,10 @@ semver@^4.1.0:\nversion \"4.3.6\"\nresolved \"https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da\"\n+semver@^5.0.1:\n+ version \"5.4.1\"\n+ resolved \"https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e\"\n+\nsequencify@~0.0.7:\nversion \"0.0.7\"\nresolved \"https://registry.yarnpkg.com/sequencify/-/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c\"\n@@ -3435,6 +3704,18 @@ speedline@1.2.0:\nloud-rejection \"^1.3.0\"\nmeow \"^3.7.0\"\n+split2@^2.0.0:\n+ version \"2.2.0\"\n+ resolved \"https://registry.yarnpkg.com/split2/-/split2-2.2.0.tgz#186b2575bcf83e85b7d18465756238ee4ee42493\"\n+ dependencies:\n+ through2 \"^2.0.2\"\n+\n+split@^1.0.0:\n+ version \"1.0.1\"\n+ resolved \"https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9\"\n+ dependencies:\n+ through \"2\"\n+\nsprintf-js@~1.0.2:\nversion \"1.0.3\"\nresolved \"https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c\"\n@@ -3600,12 +3881,23 @@ temp@0.8.3:\nos-tmpdir \"^1.0.0\"\nrimraf \"~2.2.6\"\n+tempfile@^1.1.1:\n+ version \"1.1.1\"\n+ resolved \"https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2\"\n+ dependencies:\n+ os-tmpdir \"^1.0.0\"\n+ uuid \"^2.0.1\"\n+\nterm-size@^0.1.0:\nversion \"0.1.1\"\nresolved \"https://registry.yarnpkg.com/term-size/-/term-size-0.1.1.tgz#87360b96396cab5760963714cda0d0cbeecad9ca\"\ndependencies:\nexeca \"^0.4.0\"\n+text-extensions@^1.0.0:\n+ version \"1.7.0\"\n+ resolved \"https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.7.0.tgz#faaaba2625ed746d568a23e4d0aacd9bf08a8b39\"\n+\ntext-table@~0.2.0:\nversion \"0.2.0\"\nresolved \"https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4\"\n@@ -3635,7 +3927,14 @@ through2@^2.0.0, through2@^2.0.1, through2@~2.0.0:\nreadable-stream \"~2.0.0\"\nxtend \"~4.0.0\"\n-through@^2.3.6:\n+through2@^2.0.2:\n+ version \"2.0.3\"\n+ resolved \"https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be\"\n+ dependencies:\n+ readable-stream \"^2.1.5\"\n+ xtend \"~4.0.1\"\n+\n+through@2, \"through@>=2.2.7 <3\", through@^2.3.6:\nversion \"2.3.8\"\nresolved \"https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5\"\n@@ -3689,6 +3988,10 @@ trim-newlines@^1.0.0:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613\"\n+trim-off-newlines@^1.0.0:\n+ version \"1.0.1\"\n+ resolved \"https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3\"\n+\ntryit@^1.0.1:\nversion \"1.0.2\"\nresolved \"https://registry.yarnpkg.com/tryit/-/tryit-1.0.2.tgz#c196b0073e6b1c595d93c9c830855b7acc32a453\"\n@@ -3788,6 +4091,10 @@ uuid@3.0.0:\nversion \"3.0.0\"\nresolved \"https://registry.yarnpkg.com/uuid/-/uuid-3.0.0.tgz#6728fc0459c450d796a99c31837569bdf672d728\"\n+uuid@^2.0.1:\n+ version \"2.0.3\"\n+ resolved \"https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a\"\n+\nuuid@^3.0.0:\nversion \"3.0.1\"\nresolved \"https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1\"\n@@ -4014,7 +4321,7 @@ xml-name-validator@^2.0.1:\nversion \"2.0.1\"\nresolved \"https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635\"\n-\"xtend@>=4.0.0 <4.1.0-0\", xtend@^4.0.0, xtend@~4.0.0:\n+\"xtend@>=4.0.0 <4.1.0-0\", xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1:\nversion \"4.0.1\"\nresolved \"https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af\"\n",
"new_path": "yarn.lock",
"old_path": "yarn.lock"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
misc(changelog-generator): Generate changelogs (#3632)
| 1
|
misc
|
changelog-generator
|
791,834
|
13.11.2017 08:46:52
| 28,800
|
6cd1b41e0d2be337f0d56a83edffabbbe44be28b
|
tests(smokehouse): add long task to byte-efficiency tester to deflake appveyor
|
[
{
"change_type": "MODIFY",
"diff": "@@ -31,11 +31,17 @@ function generateInlineScriptWithSize(sizeInBytes, firstContent = '', used = fal\ndocument.head.appendChild(style);\n}\n+// Add a long task to delay FI\n+setTimeout(() => {\n+ const start = Date.now();\n+ while (Date.now() < start + 100) ;\n+}, 2000);\n+\n// Lazily load the image\nsetTimeout(() => {\nconst template = document.getElementById('lazily-loaded-image');\ndocument.body.appendChild(template.content.cloneNode(true));\n-}, 6000);\n+}, 7000);\n</script>\n<style>\n.onscreen {\n",
"new_path": "lighthouse-cli/test/fixtures/byte-efficiency/tester.html",
"old_path": "lighthouse-cli/test/fixtures/byte-efficiency/tester.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -40,9 +40,15 @@ module.exports = [\nscore: '<100',\nextendedInfo: {\nvalue: {\n- results: {\n- length: 3,\n+ results: [\n+ {\n+ url: /lighthouse-unoptimized.jpg$/,\n+ }, {\n+ url: /lighthouse-480x320.webp$/,\n+ }, {\n+ url: /large.svg$/,\n},\n+ ],\n},\n},\n},\n",
"new_path": "lighthouse-cli/test/smokehouse/byte-efficiency/expectations.js",
"old_path": "lighthouse-cli/test/smokehouse/byte-efficiency/expectations.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
tests(smokehouse): add long task to byte-efficiency tester to deflake appveyor (#3804)
| 1
|
tests
|
smokehouse
|
815,746
|
15.11.2017 19:27:37
| -7,200
|
88b619858eb85dfa0802568d03fe903c3793ef17
|
feat: allow to disable virtual scroll
|
[
{
"change_type": "MODIFY",
"diff": "@@ -18,6 +18,7 @@ import { SelectTagsComponent } from './examples/tags.component';\nimport { LayoutHeaderComponent } from './layout/header.component';\nimport { LayoutSidenavComponent } from './layout/sidenav-component';\n+import { VirtualScrollComponent } from './examples/virtual-scroll.component';\nconst appRoutes: Routes = [\n{\n@@ -32,6 +33,7 @@ const appRoutes: Routes = [\n{ path: 'templates', component: SelectWithTemplatesComponent, data: { title: 'Templates'} },\n{ path: 'multiselect', component: SelectMultiComponent, data: { title: 'Multiselect'} },\n{ path: 'events', component: SelectEventsComponent, data: { title: 'Output events'} },\n+ { path: 'virtual-scroll', component: VirtualScrollComponent, data: { title: 'Virtual scroll'} },\n];\n@NgModule({\n@@ -60,7 +62,8 @@ const appRoutes: Routes = [\nSelectMultiComponent,\nSelectTagsComponent,\nLayoutHeaderComponent,\n- LayoutSidenavComponent\n+ LayoutSidenavComponent,\n+ VirtualScrollComponent\n],\nbootstrap: [AppComponent]\n})\n",
"new_path": "demo/app/app.module.ts",
"old_path": "demo/app/app.module.ts"
},
{
"change_type": "ADD",
"diff": "+import { Component } from '@angular/core';\n+import { HttpClient } from '@angular/common/http';\n+\n+@Component({\n+ selector: 'select-tags',\n+ template: `\n+ <p>\n+ By default ng-select enables virtual scroll for more 20 items. You can turn it off by setting disableVirtualScroll to true.\n+ In this example we are loading 5000 items but only ~30 of them are rendered in the dom.\n+ This allows to load as big data as you want.\n+ </p>\n+ ---html,true\n+ <ng-select [items]=\"photos\"\n+ [disableVirtualScroll]=\"disableVirtualScroll\"\n+ bindLabel=\"title\"\n+ bindValue=\"thumbnailUrl\"\n+ placeholder=\"Select photo\"\n+ [(ngModel)]=\"photo\">\n+ </ng-select>\n+ ---\n+ <small class=\"form-text text-muted\">5000 items with virtual scroll</small>\n+ <br>\n+ <button class=\"btn btn-secondary btn-sm\" (click)=\"toggleVirtualScroll()\">Toggle virtual scroll</button>\n+ `\n+})\n+export class VirtualScrollComponent {\n+\n+ photos = [];\n+ disableVirtualScroll = false;\n+\n+ constructor(private http: HttpClient) {}\n+\n+ ngOnInit() {\n+ this.http.get<any[]>('https://jsonplaceholder.typicode.com/photos').subscribe(photos => {\n+ this.photos = photos;\n+ });\n+ }\n+\n+ toggleVirtualScroll() {\n+ this.disableVirtualScroll = !this.disableVirtualScroll;\n+ }\n+}\n",
"new_path": "demo/app/examples/virtual-scroll.component.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -7,6 +7,9 @@ import { Component } from '@angular/core';\n<li class=\"nav-item\" routerLinkActive=\"active\">\n<a class=\"nav-link\" routerLink=\"/forms\">Reactive forms</a>\n</li>\n+ <li class=\"nav-item\" routerLinkActive=\"active\">\n+ <a class=\"nav-link\" routerLink=\"/virtual-scroll\">Virtual scroll</a>\n+ </li>\n<li class=\"nav-item\" routerLinkActive=\"active\">\n<a class=\"nav-link\" routerLink=\"/filter\">Filter and autocomplete</a>\n</li>\n",
"new_path": "demo/app/layout/sidenav-component.ts",
"old_path": "demo/app/layout/sidenav-component.ts"
},
{
"change_type": "MODIFY",
"diff": "</div>\n<div class=\"ng-menu-outer\">\n- <virtual-scroll role=\"listbox\" class=\"ng-menu\" [bufferAmount]=\"4\" [items]=\"itemsList.filteredItems\" (update)=\"viewPortItems = $event\">\n+ <virtual-scroll role=\"listbox\" class=\"ng-menu\" [disabled]=\"disableVirtualScroll\" [bufferAmount]=\"4\" [items]=\"itemsList.filteredItems\" (update)=\"viewPortItems = $event\">\n<div class=\"ng-option\" role=\"option\" (click)=\"toggle(item)\" (mousedown)=\"$event.preventDefault()\" (mouseover)=\"onItemHover(item)\"\n*ngFor=\"let item of viewPortItems\"\n[class.disabled]=\"item.disabled\"\n",
"new_path": "src/ng-select/ng-select.component.html",
"old_path": "src/ng-select/ng-select.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -236,7 +236,6 @@ ng-select {\ncursor: pointer;\ndisplay: block;\npadding: 8px 10px;\n- @include wrapt-text;\n&:last-child {\nborder-bottom-right-radius: 4px;\nborder-bottom-left-radius: 4px;\n",
"new_path": "src/ng-select/ng-select.component.scss",
"old_path": "src/ng-select/ng-select.component.scss"
},
{
"change_type": "MODIFY",
"diff": "@@ -60,6 +60,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\n@Input() bindLabel = 'label';\n@Input() bindValue: string;\n@Input() clearable = true;\n+ @Input() disableVirtualScroll = false;\n@Input() placeholder: string;\n@Input() notFoundText = 'No items found';\n@Input() typeToSearchText = 'Type to search';\n@@ -117,7 +118,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nprivate elementRef: ElementRef,\nprivate renderer: Renderer2\n) {\n- this.mergeConfig(config);\n+ this.mergeGlobalConfig(config);\n}\nngOnInit() {\n@@ -575,12 +576,13 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nreturn this.selectedItems.length > 0;\n}\n- private mergeConfig(config: NgSelectConfig) {\n+ private mergeGlobalConfig(config: NgSelectConfig) {\nif (!config) {\nreturn;\n}\nthis.notFoundText = config.notFoundText || this.notFoundText;\nthis.typeToSearchText = config.typeToSearchText || this.typeToSearchText;\nthis.addTagText = config.addTagText || this.addTagText;\n+ this.disableVirtualScroll = config.disableVirtualScroll || this.disableVirtualScroll;\n}\n}\n",
"new_path": "src/ng-select/ng-select.component.ts",
"old_path": "src/ng-select/ng-select.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -28,11 +28,11 @@ import { NgOptionComponent } from './ng-option.component';\n]\n})\nexport class NgSelectModule {\n- static forRoot(config: NgSelectConfig): ModuleWithProviders {\n+ static forRoot(config?: NgSelectConfig): ModuleWithProviders {\nreturn provideModule(config);\n}\n- static forChild(config: NgSelectConfig): ModuleWithProviders {\n+ static forChild(config?: NgSelectConfig): ModuleWithProviders {\nreturn provideModule(config);\n}\n}\n",
"new_path": "src/ng-select/ng-select.module.ts",
"old_path": "src/ng-select/ng-select.module.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -19,7 +19,8 @@ export enum KeyCode {\n}\nexport class NgSelectConfig {\n- notFoundText = '';\n- typeToSearchText = '';\n- addTagText = '';\n+ notFoundText? = '';\n+ typeToSearchText? = '';\n+ addTagText? = '';\n+ disableVirtualScroll? = false;\n}\n",
"new_path": "src/ng-select/ng-select.types.ts",
"old_path": "src/ng-select/ng-select.types.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -21,11 +21,6 @@ import {\nimport { CommonModule } from '@angular/common';\n-export interface ChangeEvent {\n- start?: number;\n- end?: number;\n-}\n-\n@Component({\nselector: 'virtual-scroll,[virtualScroll]',\nexportAs: 'virtualScroll',\n@@ -83,6 +78,9 @@ export class VirtualScrollComponent implements OnInit, OnChanges, OnDestroy {\n@Input()\nbufferAmount = 0;\n+ @Input()\n+ disabled = false;\n+\n@Output()\nupdate: EventEmitter<any[]> = new EventEmitter<any[]>();\n@@ -95,16 +93,16 @@ export class VirtualScrollComponent implements OnInit, OnChanges, OnDestroy {\ntopPadding: number;\nscrollHeight: number;\n- private previousStart: number;\n- private previousEnd: number;\n- private startupLoop = true;\n- private disposeScrollListener = () => {};\n+ private _previousStart: number;\n+ private _previousEnd: number;\n+ private _startupLoop = true;\n+ private _disposeScrollListener = () => {};\nconstructor(private element: ElementRef, private zone: NgZone, private renderer: Renderer2) {\n}\nget enabled() {\n- return this.items && this.items.length > 20;\n+ return !this.disabled && this.items && this.items.length > 20;\n}\nhandleScroll() {\n@@ -115,7 +113,7 @@ export class VirtualScrollComponent implements OnInit, OnChanges, OnDestroy {\n}\nthis.refresh();\n};\n- this.disposeScrollListener = this.renderer.listen(this.element.nativeElement, 'scroll', handler);\n+ this._disposeScrollListener = this.renderer.listen(this.element.nativeElement, 'scroll', handler);\n}\nngOnInit() {\n@@ -125,16 +123,16 @@ export class VirtualScrollComponent implements OnInit, OnChanges, OnDestroy {\n}\nngOnDestroy() {\n- this.disposeScrollListener();\n+ this._disposeScrollListener();\n}\nngOnChanges(changes: SimpleChanges) {\n- this.previousStart = undefined;\n- this.previousEnd = undefined;\n+ this._previousStart = undefined;\n+ this._previousEnd = undefined;\nconst items = (changes as any).items || {};\nif ((changes as any).items !== undefined && items.previousValue === undefined ||\n(items.previousValue !== undefined && items.previousValue.length === 0)) {\n- this.startupLoop = true;\n+ this._startupLoop = true;\n}\nthis.items = items.currentValue;\nthis.refresh();\n@@ -258,22 +256,22 @@ export class VirtualScrollComponent implements OnInit, OnChanges, OnDestroy {\nstart = Math.max(0, start);\nend += this.bufferAmount;\nend = Math.min(items.length, end);\n- if (start !== this.previousStart || end !== this.previousEnd) {\n+ if (start !== this._previousStart || end !== this._previousEnd) {\n// update the scroll list\nthis.zone.run(() => {\nthis.update.emit(items.slice(start, end));\n});\n- this.previousStart = start;\n- this.previousEnd = end;\n+ this._previousStart = start;\n+ this._previousEnd = end;\n- if (this.startupLoop === true) {\n+ if (this._startupLoop === true) {\nthis.refresh();\n}\n- } else if (this.startupLoop === true) {\n- this.startupLoop = false;\n+ } else if (this._startupLoop === true) {\n+ this._startupLoop = false;\nthis.refresh();\n}\n}\n",
"new_path": "src/ng-select/virtual-scroll.component.ts",
"old_path": "src/ng-select/virtual-scroll.component.ts"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
feat: allow to disable virtual scroll (#125)
https://github.com/ng-select/ng-select/issues/118
| 1
|
feat
| null |
743,960
|
16.11.2017 06:50:26
| -3,600
|
f8efa0168c7cd6ad5a9f2d44a787bf80c0f300fa
|
docs: document multiple array arguments
|
[
{
"change_type": "MODIFY",
"diff": "@@ -58,6 +58,8 @@ instead of `.argv` and the first parameter won't be ignored.\nTell the parser to interpret `key` as an array. If `.array('foo')` is set,\n`--foo foo bar` will be parsed as `['foo', 'bar']` rather than as `'foo'`.\n+Also, if you use the option multiple times all the values will be flattened in one array\n+so `--foo foo --foo bar` will be parsed as `['foo', 'bar']`\n<a name=\"boolean\"></a>.boolean(key)\n-------------\n",
"new_path": "docs/api.md",
"old_path": "docs/api.md"
}
] |
JavaScript
|
MIT License
|
yargs/yargs
|
docs: document multiple array arguments (#1009)
| 1
|
docs
| null |
815,746
|
16.11.2017 10:15:10
| -7,200
|
d10cc018655321be83755bcd082aac8721dd668c
|
fix: undo uneeded changes
|
[
{
"change_type": "MODIFY",
"diff": "import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n-\nimport { NgSelectComponent } from './ng-select.component';\nimport { NgOptionTemplateDirective, NgLabelTemplateDirective } from './ng-templates.directive';\nimport { VirtualScrollModule } from './virtual-scroll.component';\n",
"new_path": "src/ng-select/ng-select.module.ts",
"old_path": "src/ng-select/ng-select.module.ts"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
fix: undo uneeded changes
| 1
|
fix
| null |
791,690
|
17.11.2017 11:04:55
| 28,800
|
12f7f03241d0354ade5741f8ba5db7daea1c2d71
|
report(image-aspect-ratio): fix audit description
|
[
{
"change_type": "MODIFY",
"diff": "@@ -23,9 +23,9 @@ class ImageAspectRatio extends Audit {\nstatic get meta() {\nreturn {\nname: 'image-aspect-ratio',\n- description: 'Uses Images with appropriate aspect ratio',\n- failureDescription: 'Does not use Images with appropriate aspect ratio',\n- helpText: 'Image displayed sizes should match their natural aspect ratio.',\n+ description: 'Displays images with correct aspect ratio',\n+ failureDescription: 'Displays images with incorrect aspect ratio',\n+ helpText: 'Image display dimensions should match natural aspect ratio.',\nrequiredArtifacts: ['ImageUsage'],\n};\n}\n",
"new_path": "lighthouse-core/audits/image-aspect-ratio.js",
"old_path": "lighthouse-core/audits/image-aspect-ratio.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
report(image-aspect-ratio): fix audit description (#3843)
| 1
|
report
|
image-aspect-ratio
|
448,092
|
17.11.2017 13:04:36
| 28,800
|
815509bebe3b2e3020698ad82305c3481bcbae32
|
fix: report ngc compiler diagnostics and throw an error
|
[
{
"change_type": "MODIFY",
"diff": "+import * as fs from 'fs';\nimport * as path from 'path';\n-import { performCompilation, readConfiguration, AngularCompilerOptions } from '@angular/compiler-cli';\n+import { performCompilation, readConfiguration, AngularCompilerOptions, exitCodeFromResult, formatDiagnostics } from '@angular/compiler-cli';\nimport { NgPackageData } from '../model/ng-package-data';\nimport { readJson, writeJson } from 'fs-extra';\nimport { debug } from '../util/log';\n@@ -25,7 +26,6 @@ async function prepareTsConfig(ngPkg: NgPackageData, outFile: string): Promise<v\nawait writeJson(outFile, tsConfig);\n}\n-\n/**\n* Compiles typescript sources with 'ngc'.\n*\n@@ -40,7 +40,12 @@ export async function ngc(ngPkg: NgPackageData, basePath: string): Promise<strin\n// invoke ngc programmatic API\nconst compilerConfig = readConfiguration(tsConfigPath);\n- performCompilation(compilerConfig);\n+ const compilerResult = performCompilation(compilerConfig);\n+\n+ const exitCode = exitCodeFromResult(compilerResult.diagnostics);\n+ if (exitCode !== 0) {\n+ throw new Error(formatDiagnostics(compilerResult.diagnostics));\n+ }\ndebug('Reading tsconfig from ' + tsConfigPath);\nconst tsConfig = await readJson(tsConfigPath);\n",
"new_path": "src/lib/steps/ngc.ts",
"old_path": "src/lib/steps/ngc.ts"
}
] |
TypeScript
|
MIT License
|
ng-packagr/ng-packagr
|
fix: report ngc compiler diagnostics and throw an error (#292)
| 1
|
fix
| null |
791,723
|
17.11.2017 13:27:27
| 28,800
|
33b1574da7a404e2ad701ea9651b08a6e40245c7
|
core(bootup-time): refactor task/group iteration
|
[
{
"change_type": "MODIFY",
"diff": "@@ -114,22 +114,25 @@ class BootupTime extends Audit {\n*/\nstatic getExecutionTimingsByURL(trace) {\nconst timelineModel = new DevtoolsTimelineModel(trace);\n- const bottomUpByName = timelineModel.bottomUpGroupBy('URL');\n+ const bottomUpByURL = timelineModel.bottomUpGroupBy('URL');\nconst result = new Map();\n- bottomUpByName.children.forEach((perUrlNode, url) => {\n+ bottomUpByURL.children.forEach((perUrlNode, url) => {\n// when url is \"\" or about:blank, we skip it\nif (!url || url === 'about:blank') {\nreturn;\n}\n- const tasks = {};\n+ const taskGroups = {};\nperUrlNode.children.forEach((perTaskPerUrlNode) => {\n- const taskGroup = WebInspector.TimelineUIUtils.eventStyle(perTaskPerUrlNode.event);\n- tasks[taskGroup.title] = tasks[taskGroup.title] || 0;\n- tasks[taskGroup.title] += Number((perTaskPerUrlNode.selfTime || 0).toFixed(1));\n+ // eventStyle() returns a string like 'Evaluate Script'\n+ const task = WebInspector.TimelineUIUtils.eventStyle(perTaskPerUrlNode.event);\n+ // Resolve which taskGroup we're using\n+ const groupName = taskToGroup[task.title] || group.other;\n+ const groupTotal = taskGroups[groupName] || 0;\n+ taskGroups[groupName] = groupTotal + (perTaskPerUrlNode.selfTime || 0);\n});\n- result.set(url, tasks);\n+ result.set(url, taskGroups);\n});\nreturn result;\n@@ -141,50 +144,34 @@ class BootupTime extends Audit {\n*/\nstatic audit(artifacts) {\nconst trace = artifacts.traces[BootupTime.DEFAULT_PASS];\n- const bootupTimings = BootupTime.getExecutionTimingsByURL(trace);\n+ const executionTimings = BootupTime.getExecutionTimingsByURL(trace);\nlet totalBootupTime = 0;\nconst extendedInfo = {};\n+\nconst headings = [\n{key: 'url', itemType: 'url', text: 'URL'},\n+ {key: 'scripting', itemType: 'text', text: group.scripting},\n+ {key: 'scriptParseCompile', itemType: 'text', text: group.scriptParseCompile},\n];\n- // Group tasks per url\n- const groupsPerUrl = Array.from(bootupTimings).map(([url, durations]) => {\n- extendedInfo[url] = durations;\n-\n- const groups = [];\n- Object.keys(durations).forEach(task => {\n- totalBootupTime += durations[task];\n- const group = taskToGroup[task];\n-\n- groups[group] = groups[group] || 0;\n- groups[group] += durations[task];\n-\n- if (!headings.find(heading => heading.key === group)) {\n- headings.push(\n- {key: group, itemType: 'text', text: group}\n- );\n- }\n- });\n+ // map data in correct format to create a table\n+ const results = Array.from(executionTimings).map(([url, groups]) => {\n+ // Add up the totalBootupTime for all the taskGroups\n+ totalBootupTime += Object.keys(groups).reduce((sum, name) => sum += groups[name], 0);\n+ extendedInfo[url] = groups;\n+ const scriptingTotal = groups[group.scripting] || 0;\n+ const parseCompileTotal = groups[group.scriptParseCompile] || 0;\nreturn {\nurl: url,\n- groups,\n+ sum: scriptingTotal + parseCompileTotal,\n+ // Only reveal the javascript task costs\n+ // Later we can account for forced layout costs, etc.\n+ scripting: Util.formatMilliseconds(scriptingTotal, 1),\n+ scriptParseCompile: Util.formatMilliseconds(parseCompileTotal, 1),\n};\n- });\n-\n- // map data in correct format to create a table\n- const results = groupsPerUrl.map(({url, groups}) => {\n- const res = {};\n- headings.forEach(heading => {\n- res[heading.key] = Util.formatMilliseconds(groups[heading.key] || 0, 1);\n- });\n-\n- res.url = url;\n-\n- return res;\n- });\n+ }).sort((a, b) => b.sum - a.sum);\nconst tableDetails = BootupTime.makeTableDetails(headings, results);\n",
"new_path": "lighthouse-core/audits/bootup-time.js",
"old_path": "lighthouse-core/audits/bootup-time.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -21,7 +21,7 @@ const errorTrace = JSON.parse(\n);\ndescribe('Performance: bootup-time audit', () => {\n- it('should compute the correct BootupTime values', (done) => {\n+ it('should compute the correct BootupTime values', () => {\nconst artifacts = {\ntraces: {\n[BootupTime.DEFAULT_PASS]: acceptableTrace,\n@@ -33,17 +33,21 @@ describe('Performance: bootup-time audit', () => {\nassert.equal(output.score, true);\nassert.equal(Math.round(output.rawValue), 176);\n- const valueOf = name => output.extendedInfo.value[name];\n- assert.deepEqual(valueOf('https://www.google-analytics.com/analytics.js'), {'Evaluate Script': 40.1, 'Compile Script': 9.6, 'Recalculate Style': 0.2});\n- assert.deepEqual(valueOf('https://pwa.rocks/script.js'), {'Evaluate Script': 31.8, 'Layout': 5.5, 'Compile Script': 1.3});\n- assert.deepEqual(valueOf('https://www.googletagmanager.com/gtm.js?id=GTM-Q5SW'), {'Evaluate Script': 25, 'Compile Script': 5.5, 'Recalculate Style': 1.2});\n- assert.deepEqual(valueOf('https://www.google-analytics.com/plugins/ua/linkid.js'), {'Evaluate Script': 25.2, 'Compile Script': 1.2});\n- assert.deepEqual(valueOf('https://www.google-analytics.com/cx/api.js?experiment=jdCfRmudTmy-0USnJ8xPbw'), {'Compile Script': 3, 'Evaluate Script': 1.2});\n- assert.deepEqual(valueOf('https://www.google-analytics.com/cx/api.js?experiment=qvpc5qIfRC2EMnbn6bbN5A'), {'Compile Script': 2.5, 'Evaluate Script': 1});\n- assert.deepEqual(valueOf('https://pwa.rocks/'), {'Parse HTML': 14.2, 'Evaluate Script': 6.1, 'Compile Script': 1.2});\n- assert.deepEqual(valueOf('https://pwa.rocks/0ff789bf.js'), {'Parse HTML': 0});\n-\n- done();\n+ const roundedValueOf = name => {\n+ const value = output.extendedInfo.value[name];\n+ const roundedValue = {};\n+ Object.keys(value).forEach(key => roundedValue[key] = Math.round(value[key] * 10) / 10);\n+ return roundedValue;\n+ };\n+\n+ assert.deepEqual(roundedValueOf('https://www.google-analytics.com/analytics.js'), {'Script Evaluation': 40.1, 'Script Parsing & Compile': 9.6, 'Style & Layout': 0.2});\n+ assert.deepEqual(roundedValueOf('https://pwa.rocks/script.js'), {'Script Evaluation': 31.8, 'Style & Layout': 5.5, 'Script Parsing & Compile': 1.3});\n+ assert.deepEqual(roundedValueOf('https://www.googletagmanager.com/gtm.js?id=GTM-Q5SW'), {'Script Evaluation': 25, 'Script Parsing & Compile': 5.5, 'Style & Layout': 1.2});\n+ assert.deepEqual(roundedValueOf('https://www.google-analytics.com/plugins/ua/linkid.js'), {'Script Evaluation': 25.2, 'Script Parsing & Compile': 1.2});\n+ assert.deepEqual(roundedValueOf('https://www.google-analytics.com/cx/api.js?experiment=jdCfRmudTmy-0USnJ8xPbw'), {'Script Parsing & Compile': 3, 'Script Evaluation': 1.2});\n+ assert.deepEqual(roundedValueOf('https://www.google-analytics.com/cx/api.js?experiment=qvpc5qIfRC2EMnbn6bbN5A'), {'Script Parsing & Compile': 2.5, 'Script Evaluation': 1});\n+ assert.deepEqual(roundedValueOf('https://pwa.rocks/'), {'Parsing DOM': 14.2, 'Script Evaluation': 6.1, 'Script Parsing & Compile': 1.2});\n+ assert.deepEqual(roundedValueOf('https://pwa.rocks/0ff789bf.js'), {'Parsing DOM': 0});\n});\nit('should get no data when no events are present', () => {\n",
"new_path": "lighthouse-core/test/audits/bootup-time-test.js",
"old_path": "lighthouse-core/test/audits/bootup-time-test.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(bootup-time): refactor task/group iteration
| 1
|
core
|
bootup-time
|
791,690
|
17.11.2017 13:36:57
| 28,800
|
a9780d66909c18ed7ee60337f853732360cfc861
|
core(speed-index): only compute perceptual speed index
|
[
{
"change_type": "MODIFY",
"diff": "@@ -43,7 +43,7 @@ class SpeedIndexMetric extends Audit {\nthrow new Error('Trace unable to find visual progress frames.');\n}\n- if (speedline.speedIndex === 0) {\n+ if (speedline.perceptualSpeedIndex === 0) {\nthrow new Error('Error in Speedline calculating Speed Index (speedIndex of 0).');\n}\n@@ -71,14 +71,12 @@ class SpeedIndexMetric extends Audit {\nfirstVisualChange: speedline.first,\nvisuallyReady: visuallyReadyInMs,\nvisuallyComplete: speedline.complete,\n- speedIndex: speedline.speedIndex,\nperceptualSpeedIndex: speedline.perceptualSpeedIndex,\n},\ntimestamps: {\nfirstVisualChange: (speedline.first + speedline.beginning) * 1000,\nvisuallyReady: (visuallyReadyInMs + speedline.beginning) * 1000,\nvisuallyComplete: (speedline.complete + speedline.beginning) * 1000,\n- speedIndex: (speedline.speedIndex + speedline.beginning) * 1000,\nperceptualSpeedIndex: (speedline.perceptualSpeedIndex + speedline.beginning) * 1000,\n},\nframes: speedline.frames.map(frame => {\n",
"new_path": "lighthouse-core/audits/speed-index-metric.js",
"old_path": "lighthouse-core/audits/speed-index-metric.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -29,6 +29,7 @@ class Speedline extends ComputedArtifact {\nreturn speedline(traceEvents, {\ntimeOrigin: navStart,\nfastMode: true,\n+ include: 'perceptualSpeedIndex',\n});\n});\n}\n",
"new_path": "lighthouse-core/gather/computed/speedline.js",
"old_path": "lighthouse-core/gather/computed/speedline.js"
},
{
"change_type": "MODIFY",
"diff": "const Audit = require('../../audits/speed-index-metric.js');\nconst assert = require('assert');\n+const pwaTrace = require('../fixtures/traces/progressive-app.json');\n+const Runner = require('../../runner.js');\nconst emptyTraceStub = {\ntraces: {\n@@ -34,6 +36,21 @@ describe('Performance: speed-index-metric audit', () => {\n};\n}\n+ it('works on a real trace', () => {\n+ const artifacts = Object.assign(Runner.instantiateComputedArtifacts(), {\n+ traces: {defaultPass: {traceEvents: pwaTrace}},\n+ });\n+\n+ return Audit.audit(artifacts).then(result => {\n+ assert.equal(result.score, 100);\n+ assert.equal(result.rawValue, 609);\n+ assert.equal(Math.round(result.extendedInfo.value.timings.firstVisualChange), 475);\n+ assert.equal(Math.round(result.extendedInfo.value.timings.visuallyReady), 700);\n+ assert.equal(Math.round(result.extendedInfo.value.timings.visuallyComplete), 1105);\n+ assert.equal(Math.round(result.extendedInfo.value.timings.perceptualSpeedIndex), 609);\n+ });\n+ });\n+\nit('throws an error if no frames', () => {\nconst artifacts = mockArtifactsWithSpeedlineResult({frames: []});\nreturn Audit.audit(artifacts).then(\n@@ -44,7 +61,7 @@ describe('Performance: speed-index-metric audit', () => {\nit('throws an error if speed index of 0', () => {\nconst SpeedlineResult = {\nframes: [frame(), frame(), frame()],\n- speedIndex: 0,\n+ perceptualSpeedIndex: 0,\n};\nconst artifacts = mockArtifactsWithSpeedlineResult(SpeedlineResult);\n@@ -53,12 +70,11 @@ describe('Performance: speed-index-metric audit', () => {\n_ => assert.ok(true));\n});\n- it('scores speed index of 831 as 100', () => {\n+ it('scores speed index of 845 as 100', () => {\nconst SpeedlineResult = {\nframes: [frame(), frame(), frame()],\nfirst: 630,\ncomplete: 930,\n- speedIndex: 831,\nperceptualSpeedIndex: 845,\n};\nconst artifacts = mockArtifactsWithSpeedlineResult(SpeedlineResult);\n@@ -67,7 +83,6 @@ describe('Performance: speed-index-metric audit', () => {\nassert.equal(response.rawValue, 845);\nassert.equal(response.extendedInfo.value.timings.firstVisualChange, 630);\nassert.equal(response.extendedInfo.value.timings.visuallyComplete, 930);\n- assert.equal(response.extendedInfo.value.timings.speedIndex, 831);\nassert.equal(response.extendedInfo.value.timings.perceptualSpeedIndex, 845);\n});\n});\n",
"new_path": "lighthouse-core/test/audits/speed-index-metric-test.js",
"old_path": "lighthouse-core/test/audits/speed-index-metric-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -29,16 +29,17 @@ describe('Speedline gatherer', () => {\n});\n});\n- it('measures the pwa.rocks example with speed index of 577', () => {\n+ it('measures the pwa.rocks example', () => {\nreturn computedArtifacts.requestSpeedline({traceEvents: pwaTrace}).then(speedline => {\n- return assert.equal(Math.floor(speedline.speedIndex), 561);\n+ assert.equal(speedline.speedIndex, undefined);\n+ assert.equal(Math.floor(speedline.perceptualSpeedIndex), 609);\n});\n});\nit('measures SI of 3 frame trace (blank @1s, content @2s, more content @3s)', () => {\nreturn computedArtifacts.requestSpeedline(threeFrameTrace).then(speedline => {\n- assert.equal(Math.floor(speedline.speedIndex), 2040);\n- return assert.equal(Math.floor(speedline.perceptualSpeedIndex), 2030);\n+ assert.equal(speedline.speedIndex, undefined);\n+ assert.equal(Math.floor(speedline.perceptualSpeedIndex), 2030);\n});\n});\n@@ -59,7 +60,7 @@ describe('Speedline gatherer', () => {\nassert.ok(Date.now() - start < 50, 'Quick results come from the cache');\nassert.equal(firstResult, speedline, 'Cache match matches');\n- return assert.equal(Math.floor(speedline.speedIndex), 561);\n+ return assert.equal(Math.floor(speedline.perceptualSpeedIndex), 609);\n});\n});\n",
"new_path": "lighthouse-core/test/gather/computed/speedline-test.js",
"old_path": "lighthouse-core/test/gather/computed/speedline-test.js"
},
{
"change_type": "MODIFY",
"diff": "\"raven\": \"^2.2.1\",\n\"rimraf\": \"^2.6.1\",\n\"semver\": \"^5.3.0\",\n- \"speedline\": \"1.2.0\",\n+ \"speedline\": \"1.3.0\",\n\"update-notifier\": \"^2.1.0\",\n\"whatwg-url\": \"4.0.0\",\n\"ws\": \"1.1.2\",\n",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -2715,7 +2715,7 @@ loose-envify@^1.0.0:\ndependencies:\njs-tokens \"^1.0.1\"\n-loud-rejection@^1.0.0, loud-rejection@^1.3.0:\n+loud-rejection@^1.0.0, loud-rejection@^1.6.0:\nversion \"1.6.0\"\nresolved \"https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f\"\ndependencies:\n@@ -3694,14 +3694,14 @@ spdx-license-ids@^1.0.2:\nversion \"1.2.2\"\nresolved \"https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57\"\n-speedline@1.2.0:\n- version \"1.2.0\"\n- resolved \"https://registry.yarnpkg.com/speedline/-/speedline-1.2.0.tgz#f5828dcf8e9b96a9f6c1da8ab298538820c6668d\"\n+speedline@1.3.0:\n+ version \"1.3.0\"\n+ resolved \"https://registry.yarnpkg.com/speedline/-/speedline-1.3.0.tgz#201c458ca7aba2ac847fe5860c1a92966aaed3a9\"\ndependencies:\nbabar \"0.0.3\"\nimage-ssim \"^0.2.0\"\njpeg-js \"^0.1.2\"\n- loud-rejection \"^1.3.0\"\n+ loud-rejection \"^1.6.0\"\nmeow \"^3.7.0\"\nsplit2@^2.0.0:\n",
"new_path": "yarn.lock",
"old_path": "yarn.lock"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(speed-index): only compute perceptual speed index (#3845)
| 1
|
core
|
speed-index
|
135,479
|
17.11.2017 16:30:38
| -28,800
|
060c0f882041f19b44f098425cb2ad9102dea272
|
docs: fix incorrect package names to install
|
[
{
"change_type": "MODIFY",
"diff": "@@ -12,7 +12,7 @@ git init\nnpm init\n# Install and configure if needed\n-npm install --save-dev @commitlint-{cli,angular,prompt-cli}\n+npm install --save-dev @commitlint/{cli,angular,prompt-cli}\necho \"module.exports = {extends: ['@commitlint/config-angular']};\" > commitlint.config.js\n```\n",
"new_path": "docs/guides-use-prompt.md",
"old_path": "docs/guides-use-prompt.md"
}
] |
TypeScript
|
MIT License
|
conventional-changelog/commitlint
|
docs: fix incorrect package names to install
| 1
|
docs
| null |
791,834
|
17.11.2017 21:10:24
| 28,800
|
e1252ac22ce3b1a73a8fb2d8365f4ebc0b165ee4
|
misc(changelog): tweaks to changelog template and instructions
|
[
{
"change_type": "MODIFY",
"diff": "@@ -118,7 +118,7 @@ yarn build-all\n# * Test err'thing *\necho \"Test the CLI.\"\n-lighthouse --perf \"chrome://version\"\n+lighthouse --perf \"https://example.com\"\nyarn smoke\necho \"Test the extension\"\n@@ -142,11 +142,16 @@ echo \"Test the lighthouse-viewer build\"\n# Drop in a results.json or paste an existing gist url (e.g. https://gist.github.com/ebidel/b9fd478b5f40bf5fab174439dc18f83a).\n# Check for errors!\n+# * Update changelog *\n+git fetch --tags\n+yarn changelog\n+# add new contributors, e.g. from\n+# git shortlog -s -e -n v2.3.0..HEAD\n+\n# * Put up the PR *\necho \"Branch and commit the version bump.\"\n-git co -b bumpv240\n-git c \"2.4.0\"\n-yarn changelog\n+git checkout -b bumpv240\n+git commit -am \"2.4.0\"\ngit tag -a v2.4.0 -m \"v2.4.0\"\necho \"Generate a PR and get it merged.\"\n",
"new_path": "CONTRIBUTING.md",
"old_path": "CONTRIBUTING.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -37,6 +37,10 @@ const writerOpts = {\nif (commit.type === 'test') {\ncommit.type = 'tests';\n+ } else if (commit.type === 'cli') {\n+ commit.type = 'CLI';\n+ } else if (commit.type === 'new_audit') {\n+ commit.type = 'New Audits';\n}\nif (commit.type) {\n@@ -66,10 +70,10 @@ const writerOpts = {\ngroupBy: 'type',\ncommitGroupsSort: (a, b) => {\n// put new audit on the top\n- if (a.title === 'New audit') {\n+ if (a.title === 'New Audits') {\nreturn -1;\n}\n- if (b.title === 'New audit') {\n+ if (b.title === 'New Audits') {\nreturn 1;\n}\n",
"new_path": "build/changelog-generator/index.js",
"old_path": "build/changelog-generator/index.js"
},
{
"change_type": "MODIFY",
"diff": "{{#each commitGroups}}\n{{#if title~}}\n- ### {{title}}\n+ ## {{title}}\n{{/if}}\n{{#each commits}}\n{{/each}}\n{{/each}}\n+\n",
"new_path": "build/changelog-generator/templates/template.hbs",
"old_path": "build/changelog-generator/templates/template.hbs"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
misc(changelog): tweaks to changelog template and instructions (#3849)
| 1
|
misc
|
changelog
|
791,697
|
18.11.2017 02:57:59
| -19,080
|
b67601b1b3153292d1aed789a1083b7d3392448b
|
core(audit): Ignore href=javascript:.* for rel=noopener audit
|
[
{
"change_type": "MODIFY",
"diff": "@@ -46,6 +46,10 @@ class ExternalAnchorsUseRelNoopenerAudit extends Audit {\nreturn true;\n}\n})\n+ .filter(anchor => {\n+ // Ignore href's that are not real links\n+ return !anchor.href || !anchor.href.toLowerCase().startsWith('javascript:');\n+ })\n.map(anchor => {\nreturn {\nhref: anchor.href || 'Unknown',\n",
"new_path": "lighthouse-core/audits/dobetterweb/external-anchors-use-rel-noopener.js",
"old_path": "lighthouse-core/audits/dobetterweb/external-anchors-use-rel-noopener.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -54,4 +54,16 @@ describe('External anchors use rel=\"noopener\"', () => {\nassert.equal(auditResult.details.items.length, 3);\nassert.ok(auditResult.debugString, 'includes debugString');\n});\n+\n+ it('does not fail for links with javascript in href attribute', () => {\n+ const auditResult = ExternalAnchorsAudit.audit({\n+ AnchorsWithNoRelNoopener: [\n+ {href: 'javascript:void(0)'},\n+ {href: 'JAVASCRIPT:void(0)'},\n+ ],\n+ URL: {finalUrl: URL},\n+ });\n+ assert.equal(auditResult.rawValue, true);\n+ assert.equal(auditResult.details.items.length, 0);\n+ });\n});\n",
"new_path": "lighthouse-core/test/audits/dobetterweb/external-anchors-use-rel-noopener-test.js",
"old_path": "lighthouse-core/test/audits/dobetterweb/external-anchors-use-rel-noopener-test.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(audit): Ignore href=javascript:.* for rel=noopener audit (#3574)
| 1
|
core
|
audit
|
791,723
|
18.11.2017 03:08:52
| -3,600
|
1fe2a95266bb2ddc5adce4c6d87ac4f82c5be65b
|
misc(changelog): minor changelog generation usability bumps
|
[
{
"change_type": "MODIFY",
"diff": "@@ -20,6 +20,12 @@ const parserOpts = {\n],\n};\n+process.stderr.write(`\n+> Be sure to have the latest git tags locally:\n+ git fetch --tags\n+\n+`);\n+\nconst writerOpts = {\nmainTemplate,\nheaderPartial,\n",
"new_path": "build/changelog-generator/index.js",
"old_path": "build/changelog-generator/index.js"
},
{
"change_type": "MODIFY",
"diff": "\"deploy-viewer\": \"cd lighthouse-viewer && gulp deploy\",\n\"bundlesize\": \"bundlesize\",\n\"plots-smoke\": \"bash plots/test/smoke.sh\",\n- \"changelog\": \"conventional-changelog -n ./build/changelog-generator/index.js -i changelog.md -s\"\n+ \"changelog\": \"conventional-changelog --config ./build/changelog-generator/index.js --infile changelog.md --same-file\"\n},\n\"devDependencies\": {\n\"@types/node\": \"^6.0.45\",\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
misc(changelog): minor changelog generation usability bumps (#3847)
| 1
|
misc
|
changelog
|
448,038
|
19.11.2017 09:48:52
| -3,600
|
3016585f776e309694f778e5423150a726266aee
|
fix: support new cdk modules 'accordion' and 'layout' (@angular/cdk@5.0.0-rc0)
Adds rollup configuration for out-of-the-box support.
|
[
{
"change_type": "MODIFY",
"diff": "@@ -11,10 +11,12 @@ export const ROLLUP_GLOBALS = {\n'@angular/common/http': 'ng.common.http',\n'@angular/cdk': 'ng.cdk',\n'@angular/cdk/a11y': 'ng.cdk.a11y',\n+ '@angular/cdk/accordion': 'ng.cdk.accordion',\n'@angular/cdk/bidi': 'ng.cdk.bidi',\n'@angular/cdk/coercion': 'ng.cdk.coercion',\n'@angular/cdk/collections': 'ng.cdk.collections',\n'@angular/cdk/keycodes': 'ng.cdk.keycodes',\n+ '@angular/cdk/layout': 'ng.cdk.layout',\n'@angular/cdk/observers': 'ng.cdk.observers',\n'@angular/cdk/overlay': 'ng.cdk.overlay',\n'@angular/cdk/platform': 'ng.cdk.platform',\n",
"new_path": "src/lib/conf/rollup.globals.ts",
"old_path": "src/lib/conf/rollup.globals.ts"
}
] |
TypeScript
|
MIT License
|
ng-packagr/ng-packagr
|
fix: support new cdk modules 'accordion' and 'layout' (@angular/cdk@5.0.0-rc0) (#297)
Adds rollup configuration for out-of-the-box support.
| 1
|
fix
| null |
135,546
|
19.11.2017 13:48:12
| -3,600
|
5547ef524ed626a99b02ddba1ffb15a6fe91500d
|
docs: link to relevant change that removes "chore"
|
[
{
"change_type": "MODIFY",
"diff": "@@ -36,7 +36,7 @@ TL;DR\nAngular has removed the chore type from their\nconventions as of January 2017\n-See angular/angular@dff6ee3#diff-6a3371457528722a734f3c51d9238c13L204\n+See [angular/angular@dff6ee](https://github.com/angular/angular/commit/dff6ee32725197bdb81f3f63c5bd9805f2ed22bb#diff-6a3371457528722a734f3c51d9238c13L204)\nfor reference\nThis removes the previous chore type from the list\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
}
] |
TypeScript
|
MIT License
|
conventional-changelog/commitlint
|
docs: link to relevant change that removes "chore"
| 1
|
docs
| null |
807,849
|
20.11.2017 09:51:12
| 28,800
|
b48888e7e60495cf0427bd24c8211548e775373a
|
docs: Add lerna.json example for --message
Fixes
[skip ci]
|
[
{
"change_type": "MODIFY",
"diff": "@@ -468,6 +468,17 @@ to certain guidelines, such as projects which use [commitizen](https://github.co\nIf the message contains `%s`, it will be replaced with the new global version version number prefixed with a \"v\".\nNote that this only applies when using the default \"fixed\" versioning mode, as there is no \"global\" version when using `--independent`.\n+This can be configured in lerna.json, as well:\n+```json\n+{\n+ \"command\": {\n+ \"publish\": {\n+ \"message\": \"chore(release): publish %s\"\n+ }\n+ }\n+}\n+```\n+\n#### --allow-branch [glob]\nLerna allows you to specify a glob in your `lerna.json` that your current branch needs to match to be publishable.\n",
"new_path": "README.md",
"old_path": "README.md"
}
] |
JavaScript
|
MIT License
|
lerna/lerna
|
docs: Add lerna.json example for --message
Fixes #1127
[skip ci]
| 1
|
docs
| null |
791,723
|
20.11.2017 18:16:12
| 28,800
|
2182513f2c00ccb90bc762989c2344456352fa9b
|
core(driver): add driver.wsEndpoint()
|
[
{
"change_type": "MODIFY",
"diff": "@@ -31,6 +31,15 @@ class Connection {\nreturn Promise.reject(new Error('Not implemented'));\n}\n+\n+ /**\n+ * @return {!Promise<string>}\n+ */\n+ wsEndpoint() {\n+ return Promise.reject(new Error('Not implemented'));\n+ }\n+\n+\n/**\n* Call protocol methods\n* @param {!string} method\n",
"new_path": "lighthouse-core/gather/connections/connection.js",
"old_path": "lighthouse-core/gather/connections/connection.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -139,6 +139,15 @@ class CriConnection extends Connection {\n});\n}\n+ /**\n+ * @override\n+ * @return {!Promise<string>}\n+ */\n+ wsEndpoint() {\n+ return this._runJsonCommand('version').then(response => response.webSocketDebuggerUrl);\n+ }\n+\n+\n/**\n* @override\n* @param {string} message\n",
"new_path": "lighthouse-core/gather/connections/cri.js",
"old_path": "lighthouse-core/gather/connections/cri.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -105,6 +105,15 @@ class Driver {\nreturn this._connection.disconnect();\n}\n+ /**\n+ * Get the browser WebSocket endpoint for devtools protocol clients like Puppeteer.\n+ * Only works with WebSocket connection, not extension or devtools.\n+ * @return {!Promise<string>}\n+ */\n+ wsEndpoint() {\n+ return this._connection.wsEndpoint();\n+ }\n+\n/**\n* Bind listeners for protocol events\n* @param {!string} eventName\n",
"new_path": "lighthouse-core/gather/driver.js",
"old_path": "lighthouse-core/gather/driver.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(driver): add driver.wsEndpoint() (#3864)
| 1
|
core
|
driver
|
815,745
|
20.11.2017 18:28:37
| -7,200
|
8bc8b8ec9d1bb5683e7d1ed5f1657ae4ceebb1ae
|
fix(events): don't fire change event on search clear
* fix(events): don't fire change event on search clear
fixes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -31,7 +31,7 @@ describe('NgSelectComponent', function () {\nexpect(fixture.componentInstance.selectedCity).toEqual(jasmine.objectContaining(fixture.componentInstance.cities[1]));\n// clear select\n- fixture.componentInstance.select.clear();\n+ fixture.componentInstance.select.clearModel();\ntickAndDetectChanges(fixture);\nexpect(fixture.componentInstance.selectedCity).toEqual(null);\n@@ -143,7 +143,7 @@ describe('NgSelectComponent', function () {\nexpect(fixture.componentInstance.selectedCity).toEqual(fixture.componentInstance.cities[1]);\n- fixture.componentInstance.select.clear();\n+ fixture.componentInstance.select.clearModel();\nfixture.componentInstance.cities = [...fixture.componentInstance.cities];\ntickAndDetectChanges(fixture);\n@@ -453,7 +453,7 @@ describe('NgSelectComponent', function () {\n}));\nit('should do nothing when there is no selection', fakeAsync(() => {\n- const clear = spyOn(fixture.componentInstance.select, 'clear');\n+ const clear = spyOn(fixture.componentInstance.select, 'clearModel');\ntickAndDetectChanges(fixture);\ntriggerKeyDownEvent(getNgSelectElement(fixture), KeyCode.Backspace);\nexpect(clear).not.toHaveBeenCalled();\n@@ -843,33 +843,44 @@ describe('NgSelectComponent', function () {\n});\ndescribe('Clear icon click', () => {\n- let fixture: ComponentFixture<NgSelectBasicTestCmp>;\n+ let fixture: ComponentFixture<NgSelectEventsTestCmp>;\nlet clickIcon: DebugElement = null;\nbeforeEach(fakeAsync(() => {\nfixture = createTestingModule(\n- NgSelectBasicTestCmp,\n+ NgSelectEventsTestCmp,\n`<ng-select [items]=\"cities\"\n+ (change)=\"onChange($event)\"\nbindLabel=\"name\"\n[(ngModel)]=\"selectedCity\">\n</ng-select>`);\n+ spyOn(fixture.componentInstance, 'onChange');\nfixture.componentInstance.selectedCity = fixture.componentInstance.cities[0];\ntickAndDetectChanges(fixture);\nclickIcon = fixture.debugElement.query(By.css('.ng-clear-zone'));\n}));\n- it('should clear model on clear icon click', fakeAsync(() => {\n+ it('should clear model', fakeAsync(() => {\nclickIcon.triggerEventHandler('click', { stopPropagation: () => { } });\ntickAndDetectChanges(fixture);\n-\nexpect(fixture.componentInstance.selectedCity).toBe(null);\n+ expect(fixture.componentInstance.onChange).toHaveBeenCalledTimes(1);\n}));\n- it('should not open dropdown on clear click', fakeAsync(() => {\n+ it('should clear only search text', fakeAsync(() => {\n+ fixture.componentInstance.selectedCity = null;\n+ fixture.componentInstance.select.filterValue = 'Hey! Whats up!?';\n+ tickAndDetectChanges(fixture);\nclickIcon.triggerEventHandler('click', { stopPropagation: () => { } });\ntickAndDetectChanges(fixture);\n+ expect(fixture.componentInstance.onChange).toHaveBeenCalledTimes(0);\n+ expect(fixture.componentInstance.select.filterValue).toBe(null);\n+ }));\n+ it('should not open dropdown', fakeAsync(() => {\n+ clickIcon.triggerEventHandler('click', { stopPropagation: () => { } });\n+ tickAndDetectChanges(fixture);\nexpect(fixture.componentInstance.select.isOpen).toBe(false);\n}));\n});\n",
"new_path": "src/ng-select/ng-select.component.spec.ts",
"old_path": "src/ng-select/ng-select.component.spec.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -188,20 +188,22 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nhandleClearClick($event: Event) {\n$event.stopPropagation();\n- this.clear();\n+ if (this.isValueSet) {\n+ this.clearModel();\n+ }\n+ this.clearSearch();\nthis.focusSearchInput();\n+ if (this.isTypeahead()) {\n+ this.typeahead.next(null);\n+ }\n}\n- clear() {\n+ clearModel() {\nif (!this.clearable) {\nreturn;\n}\nthis.itemsList.clearSelected();\n- this.clearSearch();\nthis.notifyModelChanged();\n- if (this.isTypeahead()) {\n- this.typeahead.next(null);\n- }\n}\nwriteValue(value: any | any[]): void {\n@@ -528,7 +530,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nthis.itemsList.unselectLastItem();\nthis.updateModel();\n} else {\n- this.clear();\n+ this.clearModel();\n}\n}\n",
"new_path": "src/ng-select/ng-select.component.ts",
"old_path": "src/ng-select/ng-select.component.ts"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
fix(events): don't fire change event on search clear (#130)
* fix(events): don't fire change event on search clear
fixes #126
| 1
|
fix
|
events
|
815,745
|
20.11.2017 18:28:56
| -7,200
|
9504ad5685778a756b50a66cc1436c3974f36f72
|
feat: support for simple arrays
* feat: support for simple arrays
closes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -9,8 +9,7 @@ export class ItemsList {\nprivate _markedIndex = -1;\nprivate _selected: NgOption[] = [];\nprivate _multiple = false;\n- private _bindLabel: string;\n- private _bindValue: string;\n+ private _simple = false;\nget value(): NgOption[] {\nreturn this._selected;\n@@ -20,7 +19,8 @@ export class ItemsList {\nreturn this.filteredItems[this._markedIndex];\n}\n- setItems(items: NgOption[]) {\n+ setItems(items: NgOption[], simple: boolean = false) {\n+ this._simple = simple;\nthis.items = this.mapItems(items);\nthis.filteredItems = [...this.items];\n}\n@@ -30,12 +30,6 @@ export class ItemsList {\nthis.clearSelected();\n}\n- setBindOptions(bindLabel: string, bindValue: string) {\n- this._bindLabel = bindLabel;\n- this._bindValue = bindValue;\n- }\n-\n-\nselect(item: NgOption) {\nif (!this._multiple) {\nthis.clearSelected();\n@@ -44,16 +38,16 @@ export class ItemsList {\nitem.selected = true;\n}\n- findItem(value): NgOption {\n+ findItem(value, bindValue: string, bindLabel: string): NgOption {\nif (!value) {\nreturn null;\n}\n- if (this._bindValue) {\n- return this.items.find(x => x[this._bindValue] === value);\n+ if (bindValue) {\n+ return this.items.find(x => x[bindValue] === value);\n}\nconst index = this.items.indexOf(value);\nreturn index > -1 ? this.items[index] :\n- this.items.find(x => x[this._bindLabel] === value[this._bindLabel])\n+ this.items.find(x => x[bindLabel] === value[bindLabel])\n}\nunselect(item: NgOption) {\n@@ -148,9 +142,15 @@ export class ItemsList {\nprivate mapItems(items: NgOption[]) {\nreturn items.map((item, index) => {\n+ let option = item;\n+ if (this._simple) {\n+ option = {};\n+ option['label'] = item as any;\n+ }\n+\nreturn {\nindex: index,\n- ...item\n+ ...option\n};\n})\n}\n",
"new_path": "src/ng-select/items-list.ts",
"old_path": "src/ng-select/items-list.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -193,6 +193,21 @@ describe('NgSelectComponent', function () {\ndiscardPeriodicTasks();\n}));\n+ it('bind to simple array', fakeAsync(() => {\n+ const fixture = createTestingModule(\n+ NgSelectSimpleCmp,\n+ `<ng-select [items]=\"cities\"\n+ [(ngModel)]=\"selectedCity\">\n+ </ng-select>`);\n+\n+ selectOption(fixture, KeyCode.ArrowDown, 0);\n+ tickAndDetectChanges(fixture);\n+ expect(fixture.componentInstance.selectedCity).toBe('Vilnius');\n+ fixture.componentInstance.selectedCity = 'Kaunas';\n+ tickAndDetectChanges(fixture);\n+ expect(fixture.componentInstance.select.selectedItems).toEqual([jasmine.objectContaining({ label: 'Kaunas' })]);\n+ }));\n+\nit('bind to object', fakeAsync(() => {\nconst fixture = createTestingModule(\nNgSelectBasicTestCmp,\n@@ -994,6 +1009,15 @@ class NgSelectSelectedSimpleCmp {\n];\n}\n+@Component({\n+ template: ``\n+})\n+class NgSelectSimpleCmp {\n+ @ViewChild(NgSelectComponent) select: NgSelectComponent;\n+ cities = ['Vilnius', 'Kaunas', 'Pabrade'];\n+ selectedCity;\n+}\n+\n@Component({\ntemplate: ``\n})\n",
"new_path": "src/ng-select/ng-select.component.spec.ts",
"old_path": "src/ng-select/ng-select.component.spec.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -18,6 +18,7 @@ import {\nElementRef,\nChangeDetectionStrategy,\nOptional,\n+ SimpleChanges,\nRenderer2, ContentChildren, QueryList\n} from '@angular/core';\n@@ -57,7 +58,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\n// inputs\n@Input() items = [];\n- @Input() bindLabel = 'label';\n+ @Input() bindLabel: string;\n@Input() bindValue: string;\n@Input() clearable = true;\n@Input() disableVirtualScroll = false;\n@@ -102,6 +103,9 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nfilterValue: string = null;\nprivate _ngModel = null;\n+ private _simple = false;\n+ private _defaultLabel = 'label';\n+ private _defaultValue = 'value';\nprivate onChange = (_: NgOption) => { };\nprivate onTouched = () => { };\n@@ -121,8 +125,21 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nthis.mergeGlobalConfig(config);\n}\n+ ngOnChanges(changes: SimpleChanges) {\n+ if (changes.multiple) {\n+ this.itemsList.setMultiple(changes.multiple.currentValue);\n+ }\n+ if (changes.items) {\n+ this.setItems(changes.items.currentValue || []);\n+ }\n+ }\n+\nngOnInit() {\nthis.handleDocumentClick();\n+ this.bindLabel = this.bindLabel || this._defaultLabel;\n+ if (this._simple) {\n+ this.bindValue = this._defaultLabel;\n+ }\n}\nngAfterViewInit() {\n@@ -131,18 +148,6 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\n}\n}\n- ngOnChanges(changes) {\n- if (changes.bindLabel || changes.bindValue) {\n- this.itemsList.setBindOptions(this.bindLabel, this.bindValue);\n- }\n- if (changes.multiple) {\n- this.itemsList.setMultiple(changes.multiple.currentValue);\n- }\n- if (changes.items) {\n- this.setItems(changes.items.currentValue || []);\n- }\n- }\n-\nngOnDestroy() {\nthis.changeDetectorRef.detach();\nthis.disposeDocumentClickListener();\n@@ -277,7 +282,6 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nselectTag() {\nlet tag = {}\n-\nif (this.addTag instanceof Function) {\ntag = this.addTag(this.filterValue);\n} else {\n@@ -351,7 +355,9 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\n}\nprivate setItems(items: NgOption[]) {\n- this.itemsList.setItems(items);\n+ const firstItem = items[0];\n+ this._simple = firstItem && !(firstItem instanceof Object);\n+ this.itemsList.setItems(items, this._simple);\nif (this._ngModel) {\nthis.itemsList.clearSelected();\nthis.selectWriteValue(this._ngModel);\n@@ -365,7 +371,6 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nprivate setItemsFromNgOptions() {\nif (!this.bindValue) {\nthis.bindValue = 'value';\n- this.itemsList.setBindOptions(this.bindLabel, this.bindValue);\n}\nconst handleNgOptions = (options) => {\n@@ -439,7 +444,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\n}\nconst select = (val: any) => {\n- let item = this.itemsList.findItem(val);\n+ let item = this.itemsList.findItem(val, this.bindValue, this.bindLabel);\nif (item) {\nthis.itemsList.select(item);\n} else {\n",
"new_path": "src/ng-select/ng-select.component.ts",
"old_path": "src/ng-select/ng-select.component.ts"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
feat: support for simple arrays (#129)
* feat: support for simple arrays
closes #100
| 1
|
feat
| null |
573,231
|
21.11.2017 08:04:32
| -3,600
|
cf65c65cabd06bd5d17d84cd28999248dada94f7
|
fix(server): avoiding uncaughtException in _routeErrorResponse by only sending response when not sent
|
[
{
"change_type": "MODIFY",
"diff": "@@ -890,7 +890,9 @@ Server.prototype._routeErrorResponse = function _routeErrorResponse(\nnull,\nerr,\nfunction _emitErrorEvents() {\n+ if (!res.headersSent) {\nres.send(err);\n+ }\nreturn self._finishReqResCycle(req, res, null, err);\n}\n);\n",
"new_path": "lib/server.js",
"old_path": "lib/server.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -224,6 +224,31 @@ test('rm route and clear cached route', function(t) {\n});\n});\n+test('_routeErrorResponse does not cause uncaughtException when called when header has already been sent', function(\n+ t\n+) {\n+ SERVER.on('MethodNotAllowed', function(req, res, error, next) {\n+ res.json(405, { status: 'MethodNotAllowed' });\n+ try {\n+ next();\n+ } catch (err) {\n+ t.fail(\n+ 'next() should not throw error when header has already been sent'\n+ );\n+ }\n+ t.end();\n+ });\n+\n+ SERVER.post('/routePostOnly', function tester(req, res, next) {\n+ next();\n+ });\n+\n+ CLIENT.get('/routePostOnly', function(err, _, res) {\n+ t.ok(err);\n+ t.equal(res.statusCode, 405);\n+ });\n+});\n+\ntest('GH-1171: rm one version of the routes, other versions should still work', function(\nt\n) {\n",
"new_path": "test/server.test.js",
"old_path": "test/server.test.js"
}
] |
JavaScript
|
MIT License
|
restify/node-restify
|
fix(server): avoiding uncaughtException in _routeErrorResponse by only sending response when not sent (#1568)
| 1
|
fix
|
server
|
791,723
|
21.11.2017 13:16:24
| 28,800
|
9d312c2abf4be3c0e18540727c23bfdf5700ab98
|
docs(error-reporting): improve clarity for opt-out folks
|
[
{
"change_type": "MODIFY",
"diff": "@@ -22,10 +22,21 @@ Runtime exceptions will not be reported to the team. Your ability to use Lightho\n* Your Chrome version\n* Your operating system\n+[This code search](https://github.com/GoogleChrome/lighthouse/search?l=JavaScript&q=Sentry.&type=&utf8=%E2%9C%93) reveals where Sentry methods are used.\n+\n## How do I opt-in?\n-The first time you run the CLI you will be prompted with a message asking you if Lighthouse can anonymously report runtime exceptions. You can give a direct response of `yes` or `no` (`y`, `n`, and pressing enter which defaults to `no` are also acceptable responses), and you will not be prompted again. If no response is given within 20 seconds, a `no` response will be assumed, and you will not be prompted again. Non-interactive terminal sessions and invocations with the `CI` environment variable set will automatically not be prompted and will not opt-in by default.\n+The first time you run the CLI you will be prompted with a message asking you if Lighthouse can anonymously report runtime exceptions. You can give a direct response of `yes` or `no` (`y`, `n`, and pressing enter which defaults to `no` are also acceptable responses), and you will not be prompted again. If no response is given within 20 seconds, a `no` response will be assumed and you will not be prompted again.\n+\n+Running Lighthouse with `--enable-error-reporting` will report errors regardless of the saved preference.\n+\n+## How do I keep error reporting disabled?\n+As mentioned, if you do not respond to the CLI prompt within 20 seconds, a `no` response will be assumed and you will not be prompted again.\n-The CLI also has two flags to control error reporting that will override the saved preference. Running Lighthouse with `--enable-error-reporting` will report errors regardless of the saved preference, and running Lighthouse with `--no-enable-error-reporting` will *not* report errors regardless of the saved preferences.\n+Non-interactive terminal sessions (`process.stdout.isTTY === false`) and invocations with the `CI` environment variable (`process.env.CI === true`), common on CI providers like Travis and AppVeyor, will not be prompted and error reporting will remain disabled.\n+\n+Running Lighthouse with `--no-enable-error-reporting` will keep error reporting disabled regardless of the saved preference.\n## How do I change my opt-in preference?\n-Your response to the prompt will be saved to your home directory `~/.config/configstore/lighthouse.json` and used on future runs. To trigger a re-prompt, simply delete this file and Lighthouse will ask again on the next run. You can also edit this json file directly or run Lighthouse with the `--[no-]enable-error-reporting` flags.\n+Your response to the prompt will be saved to your home directory `~/.config/configstore/lighthouse.json` and used on future runs. To trigger a re-prompt, simply delete this file and Lighthouse will ask again on the next run. You can also edit this json file directly.\n+\n+As mentioned above, any explicit `--[no-]enable-error-reporting` flags will override the saved preference.\n",
"new_path": "docs/error-reporting.md",
"old_path": "docs/error-reporting.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -59,7 +59,7 @@ function getFlags(manualArgv) {\n'Configuration:')\n.describe({\n'enable-error-reporting':\n- 'Enables error reporting (prompts once by default, setting this flag will force error reporting to that state).',\n+ 'Enables error reporting, overriding any saved preference. --no-enable-error-reporting will do the opposite. More: https://git.io/vFFTO',\n'blocked-url-patterns': 'Block any network requests to the specified URL patterns',\n'disable-storage-reset':\n'Disable clearing the browser cache and other storage APIs before a run',\n",
"new_path": "lighthouse-cli/cli-flags.js",
"old_path": "lighthouse-cli/cli-flags.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -14,8 +14,8 @@ const MAXIMUM_WAIT_TIME = 20 * 1000;\n// eslint-disable-next-line max-len\nconst MESSAGE = `${log.reset}We're constantly trying to improve Lighthouse and its reliability.\\n ` +\n- `May we anonymously report runtime exceptions to improve the tool over time?\\n ` +\n- `${log.reset}Learn more: https://github.com/GoogleChrome/lighthouse/blob/master/docs/error-reporting.md`;\n+ `${log.reset}Learn more: https://github.com/GoogleChrome/lighthouse/blob/master/docs/error-reporting.md \\n ` +\n+ ` May we anonymously report runtime exceptions to improve the tool over time? `;\n/**\n* @return {!Promise<boolean>}\n",
"new_path": "lighthouse-cli/sentry-prompt.js",
"old_path": "lighthouse-cli/sentry-prompt.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
docs(error-reporting): improve clarity for opt-out folks (#3876)
| 1
|
docs
|
error-reporting
|
791,834
|
21.11.2017 13:41:02
| 28,800
|
207000a23cbe6ea2290eb0dc4dee324a7dacb8aa
|
cli(sentry): handle configstore errors; don't enabling error reporting
|
[
{
"change_type": "MODIFY",
"diff": "@@ -61,6 +61,7 @@ function prompt() {\n* @return {!Promise<boolean>}\n*/\nfunction askPermission() {\n+ return Promise.resolve().then(_ => {\nconst configstore = new Configstore('lighthouse');\nlet isErrorReportingEnabled = configstore.get('isErrorReportingEnabled');\nif (typeof isErrorReportingEnabled === 'boolean') {\n@@ -73,6 +74,8 @@ function askPermission() {\nconfigstore.set('isErrorReportingEnabled', isErrorReportingEnabled);\nreturn isErrorReportingEnabled;\n});\n+ // Error accessing configstore; default to false.\n+ }).catch(_ => false);\n}\nmodule.exports = {\n",
"new_path": "lighthouse-cli/sentry-prompt.js",
"old_path": "lighthouse-cli/sentry-prompt.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
cli(sentry): handle configstore errors; don't enabling error reporting (#3878)
| 1
|
cli
|
sentry
|
791,723
|
22.11.2017 11:47:15
| 28,800
|
f19ffd181d3c9f89d9d1429c6b6f1a98bbe8e953
|
docs: fox mobile device testing example
|
[
{
"change_type": "MODIFY",
"diff": "@@ -82,7 +82,7 @@ $ adb devices -l\n$ adb forward tcp:9222 localabstract:chrome_devtools_remote\n-$ lighthouse --disable-device-emulation --disable-cpu-throttling https://mysite.com\n+$ lighthouse --port=9222 --disable-device-emulation --disable-cpu-throttling https://example.com\n```\n## Lighthouse as trace processor\n",
"new_path": "docs/readme.md",
"old_path": "docs/readme.md"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
docs: fox mobile device testing example (#3887)
| 1
|
docs
| null |
791,723
|
22.11.2017 16:29:41
| 28,800
|
9186735ca2495f54ca9411f00c88590a7a352b6a
|
misc(error-reporting): report unhandled promise rejections
|
[
{
"change_type": "MODIFY",
"diff": "@@ -50,6 +50,9 @@ sentryDelegate.init = function init(opts) {\nSentry.captureException(...args, () => resolve());\n});\n};\n+\n+ // Report any rejections that are never caught\n+ process.on('unhandledRejection', reason => sentryDelegate.captureException(reason));\n} catch (e) {\nlog.warn(\n'sentry',\n",
"new_path": "lighthouse-core/lib/sentry.js",
"old_path": "lighthouse-core/lib/sentry.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
misc(error-reporting): report unhandled promise rejections (#3886)
| 1
|
misc
|
error-reporting
|
743,863
|
23.11.2017 10:16:53
| 28,800
|
e1117c5849f0343341e5a9d88ab38535d9860897
|
docs: gratipay is no more
|
[
{
"change_type": "MODIFY",
"diff": "_Yargs is developed on evenings and weekends by\nvolunteers. Why not grab them dinner or a drink?_\n-[](https://gratipay.com/yargs/)\n-\n[![Build Status][travis-image]][travis-url]\n[![Coverage Status][coveralls-image]][coveralls-url]\n[![NPM version][npm-image]][npm-url]\n",
"new_path": "README.md",
"old_path": "README.md"
}
] |
JavaScript
|
MIT License
|
yargs/yargs
|
docs: gratipay is no more
| 1
|
docs
| null |
743,960
|
23.11.2017 21:18:21
| -3,600
|
77b8dbc495b926ef2dbc9d839882c828b8dad29b
|
feat: middleware
|
[
{
"change_type": "MODIFY",
"diff": "@@ -425,3 +425,47 @@ some of yargs' parsing features:\nSee the [yargs-parser](https://github.com/yargs/yargs-parser#configuration) module\nfor detailed documentation of this feature.\n+\n+## Midleware\n+Sometimes you might want to transform arguments before they reach the command handler.\n+For example, you perhaps you want to validate that credentials have been provided and otherwise load credentials from a file.\n+Middleware is simply a stack of functions, each of which is passed the the current parsed arguments, which it can in turn update by adding values, removing values, or overwriting values.\n+\n+Diagram:\n+\n+```\n+ -------------- -------------- ---------\n+stdin ----> argv ----> | Middleware 1 | ----> | Middleware 2 | ---> | Command |\n+ -------------- -------------- ---------\n+```\n+\n+### Example Credentials Middleware\n+\n+In this example, our middleware will check if the `username` and `password` is provided. If not, it will load them from `~/.credentials`, and fill in the `argv.username` and `argv.password` values.\n+\n+#### Middleware function\n+\n+```\n+const normalizeCredentials = (argv) => {\n+ if (!argv.username || !argv.password) {\n+ const credentials = JSON.parse(fs.readSync('~/.credentials'))\n+ return credentials\n+ }\n+ return {}\n+}\n+```\n+\n+#### yargs parsing configuration\n+\n+```\n+var argv = require('yargs')\n+ .usage('Usage: $0 <command> [options]')\n+ .command('login', 'Authenticate user', (yargs) =>{\n+ return yargs.option('username')\n+ .option('password')\n+ } ,(argv) => {\n+ authenticateUser(argv.username, argv.password)\n+ })\n+ .middlewares([normalizeCredentials])\n+ .argv;\n+```\n",
"new_path": "docs/advanced.md",
"old_path": "docs/advanced.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -11,27 +11,26 @@ const DEFAULT_MARKER = /(^\\*)|(^\\$0)/\n// arguments.\nmodule.exports = function command (yargs, usage, validation) {\nconst self = {}\n-\nlet handlers = {}\nlet aliasMap = {}\nlet defaultCommand\n- self.addHandler = function addHandler (cmd, description, builder, handler) {\n+ self.addHandler = function addHandler (cmd, description, builder, handler, middlewares) {\nlet aliases = []\nhandler = handler || (() => {})\n-\n+ middlewares = middlewares || []\nif (Array.isArray(cmd)) {\naliases = cmd.slice(1)\ncmd = cmd[0]\n} else if (typeof cmd === 'object') {\nlet command = (Array.isArray(cmd.command) || typeof cmd.command === 'string') ? cmd.command : moduleName(cmd)\nif (cmd.aliases) command = [].concat(command).concat(cmd.aliases)\n- self.addHandler(command, extractDesc(cmd), cmd.builder, cmd.handler)\n+ self.addHandler(command, extractDesc(cmd), cmd.builder, cmd.handler, cmd.middlewares)\nreturn\n}\n// allow a module to be provided instead of separate builder and handler\nif (typeof builder === 'object' && builder.builder && typeof builder.handler === 'function') {\n- self.addHandler([cmd].concat(aliases), description, builder.builder, builder.handler)\n+ self.addHandler([cmd].concat(aliases), description, builder.builder, builder.handler, builder.middlewares)\nreturn\n}\n@@ -50,6 +49,7 @@ module.exports = function command (yargs, usage, validation) {\n}\nreturn true\n})\n+\n// standardize on $0 for default command.\nif (parsedAliases.length === 0 && isDefault) parsedAliases.push('$0')\n@@ -74,6 +74,7 @@ module.exports = function command (yargs, usage, validation) {\ndescription: description,\nhandler,\nbuilder: builder || {},\n+ middlewares: middlewares || [],\ndemanded: parsedCommand.demanded,\noptional: parsedCommand.optional\n}\n@@ -225,6 +226,12 @@ module.exports = function command (yargs, usage, validation) {\nif (commandHandler.handler && !yargs._hasOutput()) {\nyargs._setHasOutput()\n+ if (commandHandler.middlewares.length > 0) {\n+ const middlewareArgs = commandHandler.middlewares.reduce(function (initialObj, middleware) {\n+ return Object.assign(initialObj, middleware(innerArgv))\n+ }, {})\n+ Object.assign(innerArgv, middlewareArgs)\n+ }\ncommandHandler.handler(innerArgv)\n}\n",
"new_path": "lib/command.js",
"old_path": "lib/command.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -289,7 +289,25 @@ describe('yargs dsl tests', () => {\n.exitProcess(false) // defaults to true.\n.argv\n})\n-\n+ it('runs all middleware before reaching the handler', function (done) {\n+ yargs(['foo'])\n+ .command(\n+ 'foo',\n+ 'handle foo things',\n+ function () {},\n+ function (argv) {\n+ // we should get the argv filled with data from the middleware\n+ argv._[0].should.equal('foo')\n+ argv.hello.should.equal('world')\n+ return done()\n+ },\n+ [function (argv) {\n+ return {hello: 'world'}\n+ }]\n+ )\n+ .exitProcess(false) // defaults to true.\n+ .argv\n+ })\nit('recommends a similar command if no command handler is found', () => {\nconst r = checkOutput(() => {\nyargs(['boat'])\n",
"new_path": "test/yargs.js",
"old_path": "test/yargs.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -338,9 +338,9 @@ function Yargs (processArgs, cwd, parentRequire) {\nreturn self\n}\n- self.command = function (cmd, description, builder, handler) {\n- argsert('<string|array|object> [string|boolean] [function|object] [function]', [cmd, description, builder, handler], arguments.length)\n- command.addHandler(cmd, description, builder, handler)\n+ self.command = function (cmd, description, builder, handler, middlewares) {\n+ argsert('<string|array|object> [string|boolean] [function|object] [function] [array]', [cmd, description, builder, handler, middlewares], arguments.length)\n+ command.addHandler(cmd, description, builder, handler, middlewares)\nreturn self\n}\n",
"new_path": "yargs.js",
"old_path": "yargs.js"
}
] |
JavaScript
|
MIT License
|
yargs/yargs
|
feat: middleware (#881)
| 1
|
feat
| null |
135,470
|
24.11.2017 16:22:29
| -3,600
|
e399e4509c9afba99d59ffa1ad17bcef2e73752a
|
docs: add contribution guide link to readme
|
[
{
"change_type": "MODIFY",
"diff": "@@ -90,6 +90,8 @@ npx yarn run build # run build tasks\nnpx yarn start # run tests, again on change\n```\n+For more information on how to contribute please take a look at our [contribution guide](./.github/CONTRIBUTING.md).\n+\n### Publishing a release\n```sh\n",
"new_path": "README.md",
"old_path": "README.md"
}
] |
TypeScript
|
MIT License
|
conventional-changelog/commitlint
|
docs: add contribution guide link to readme
| 1
|
docs
| null |
448,039
|
24.11.2017 17:20:12
| -3,600
|
b52e77bdf22052f74a50dc08325db358b40dcfb5
|
release: cut v2.0.0-rc.3
|
[
{
"change_type": "MODIFY",
"diff": "All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.\n+<a name=\"2.0.0-rc.3\"></a>\n+# [2.0.0-rc.3](https://github.com/dherges/ng-packagr/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2017-11-24)\n+\n+\n+### Bug Fixes\n+\n+* support new cdk modules 'accordion' and 'layout' ([@angular](https://github.com/angular)/cdk@5.0.0-rc0) ([#297](https://github.com/dherges/ng-packagr/issues/297)) ([3016585](https://github.com/dherges/ng-packagr/commit/3016585))\n+* **deps:** update [@angular-devkit](https://github.com/angular-devkit)/schematics to version ^0.0.37 ([#306](https://github.com/dherges/ng-packagr/issues/306)) ([8cb4d07](https://github.com/dherges/ng-packagr/commit/8cb4d07))\n+* support rxjs lettable operators ([#307](https://github.com/dherges/ng-packagr/issues/307)) ([5de8045](https://github.com/dherges/ng-packagr/commit/5de8045)), closes [#247](https://github.com/dherges/ng-packagr/issues/247)\n+\n+\n+\n<a name=\"2.0.0-rc.2\"></a>\n# [2.0.0-rc.2](https://github.com/dherges/ng-packagr/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2017-11-17)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"ng-packagr\",\n- \"version\": \"2.0.0-rc.2\",\n+ \"version\": \"2.0.0-rc.3\",\n\"description\": \"Compile and package a TypeScript library to Angular Package Format\",\n\"keywords\": [\n\"angular\",\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
TypeScript
|
MIT License
|
ng-packagr/ng-packagr
|
release: cut v2.0.0-rc.3
| 1
|
release
| null |
815,802
|
26.11.2017 10:09:52
| 0
|
24777177b54a1ac1449f494680fe01c525cb7386
|
feat: toggle dropdown when searchable is false.
|
[
{
"change_type": "MODIFY",
"diff": "-<div (click)=\"open()\" class=\"ng-control\">\n+<div (click)=\"searchable ? open() : toggle()\" class=\"ng-control\">\n<div class=\"ng-value-container\">\n<div class=\"ng-placeholder\" [hidden]=\"!showPlaceholder()\">{{placeholder}}</div>\n<ng-template #defaultLabelTemplate let-item=\"item\">\n<div class=\"ng-menu-outer\">\n<virtual-scroll role=\"listbox\" class=\"ng-menu\" [disabled]=\"disableVirtualScroll\" [bufferAmount]=\"4\" [items]=\"itemsList.filteredItems\" (update)=\"viewPortItems = $event\">\n- <div class=\"ng-option\" role=\"option\" (click)=\"toggle(item)\" (mousedown)=\"$event.preventDefault()\" (mouseover)=\"onItemHover(item)\"\n+ <div class=\"ng-option\" role=\"option\" (click)=\"toggleItem(item)\" (mousedown)=\"$event.preventDefault()\" (mouseover)=\"onItemHover(item)\"\n*ngFor=\"let item of viewPortItems\"\n[class.disabled]=\"item.disabled\"\n[class.selected]=\"item.selected\"\n",
"new_path": "src/ng-select/ng-select.component.html",
"old_path": "src/ng-select/ng-select.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -697,6 +697,27 @@ describe('NgSelectComponent', function () {\nexpect(fixture.componentInstance.select.itemsList.filteredItems).toEqual(result);\n}));\n+ it('should toggle dropdown when searchable false', fakeAsync(() => {\n+ fixture = createTestingModule(\n+ NgSelectFilterTestCmp,\n+ `<ng-select [items]=\"cities\"\n+ bindLabel=\"name\"\n+ [searchable]=\"false\"\n+ [(ngModel)]=\"selectedCity\">\n+ </ng-select>`);\n+\n+ const selectInput = fixture.debugElement.query(By.css('.ng-control'));\n+ // open\n+ selectInput.triggerEventHandler('click', { stopPropagation: () => { } });\n+ tickAndDetectChanges(fixture);\n+ expect(fixture.componentInstance.select.isOpen).toBe(true);\n+\n+ // close\n+ selectInput.triggerEventHandler('click', { stopPropagation: () => { } });\n+ tickAndDetectChanges(fixture);\n+ expect(fixture.componentInstance.select.isOpen).toBe(false);\n+ }));\n+\nit('should not filter when searchable false', fakeAsync(() => {\nfixture = createTestingModule(\nNgSelectFilterTestCmp,\n",
"new_path": "src/ng-select/ng-select.component.spec.ts",
"old_path": "src/ng-select/ng-select.component.spec.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -231,6 +231,14 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nthis.isDisabled = isDisabled;\n}\n+ toggle() {\n+ if (!this.isOpen) {\n+ this.open();\n+ } else {\n+ this.close();\n+ }\n+ }\n+\nopen() {\nif (this.isDisabled || this.isOpen) {\nreturn;\n@@ -251,7 +259,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nthis.closeEvent.emit();\n}\n- toggle(item: NgOption) {\n+ toggleItem(item: NgOption) {\nif (!item || item.disabled || this.isDisabled) {\nreturn;\n}\n@@ -494,7 +502,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nprivate handleEnter($event: KeyboardEvent) {\nif (this.isOpen) {\nif (this.itemsList.markedItem) {\n- this.toggle(this.itemsList.markedItem);\n+ this.toggleItem(this.itemsList.markedItem);\n} else if (this.addTag) {\nthis.selectTag();\n}\n",
"new_path": "src/ng-select/ng-select.component.ts",
"old_path": "src/ng-select/ng-select.component.ts"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
feat: toggle dropdown when searchable is false. (#137)
| 1
|
feat
| null |
815,746
|
26.11.2017 12:46:48
| -7,200
|
e386150aaa77c35a5d2886ad7c3bc21e81d93d5a
|
fix: add .ng-select host css class
closes
|
[
{
"change_type": "MODIFY",
"diff": "}\n$color-selected: #f5faff;\n-ng-select {\n+\n+.ng-select {\nposition: relative;\ndisplay: block;\n@include box-sizing;\n@@ -20,18 +21,11 @@ ng-select {\nspan {\n@include box-sizing;\n}\n- ng-option {\n- display: block;\n- @include box-sizing;\n- }\n- virtual-scroll {\n- display: block;\n- height: auto;\n- @include box-sizing;\n- }\n+\n[hidden] {\ndisplay: none;\n}\n+\n&.opened {\n>.ng-control {\nborder-bottom-right-radius: 0;\n@@ -226,6 +220,9 @@ ng-select {\n-webkit-overflow-scrolling: touch;\n}\n.ng-menu {\n+ display: block;\n+ height: auto;\n+ @include box-sizing;\nmax-height: 240px;\noverflow-y: auto;\n}\n",
"new_path": "src/ng-select/ng-select.component.scss",
"old_path": "src/ng-select/ng-select.component.scss"
},
{
"change_type": "MODIFY",
"diff": "@@ -44,7 +44,8 @@ const NG_SELECT_VALUE_ACCESSOR = {\nencapsulation: ViewEncapsulation.None,\nchangeDetection: ChangeDetectionStrategy.OnPush,\nhost: {\n- 'role': 'dropdown'\n+ 'role': 'dropdown',\n+ 'class': 'ng-select'\n}\n})\nexport class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterViewInit, ControlValueAccessor {\n",
"new_path": "src/ng-select/ng-select.component.ts",
"old_path": "src/ng-select/ng-select.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -28,17 +28,14 @@ import { CommonModule } from '@angular/common';\n<div *ngIf=\"enabled\" class=\"total-padding\" [style.height]=\"scrollHeight + 'px'\"></div>\n<div #content\n[class.scrollable-content]=\"enabled\"\n- [style.transform]=\"enabled ? 'translateY(' + topPadding + 'px)' : 'none'\"\n- [style.webkitTransform]=\"enabled ? 'translateY(' + topPadding + 'px)' : 'none'\">\n+ [style.transform]=\"transformStyle\">\n<ng-content></ng-content>\n</div>\n`,\n- host: {\n- '[style.overflow-y]': 'parentScroll ? \\'hidden\\' : \\'auto\\''\n- },\nstyles: [`\n:host {\noverflow: hidden;\n+ overflow-y: auto;\nposition: relative;\ndisplay: block;\n-webkit-overflow-scrolling: touch;\n@@ -105,6 +102,10 @@ export class VirtualScrollComponent implements OnInit, OnChanges, OnDestroy {\nreturn !this.disabled && this.items && this.items.length > 20;\n}\n+ get transformStyle() {\n+ return this.enabled ? 'translateY(' + this.topPadding + 'px)' : 'none'\n+ }\n+\nhandleScroll() {\nconst handler = () => {\nif (!this.enabled) {\n",
"new_path": "src/ng-select/virtual-scroll.component.ts",
"old_path": "src/ng-select/virtual-scroll.component.ts"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
fix: add .ng-select host css class (#139)
closes https://github.com/ng-select/ng-select/issues/134
| 1
|
fix
| null |
815,746
|
26.11.2017 12:52:06
| -7,200
|
63d9f709f7f70c7f0b81720a1228165942d8fd35
|
fix: custom tags insertion on multiselect
fixes
|
[
{
"change_type": "MODIFY",
"diff": "@@ -19,6 +19,7 @@ import { SelectTagsComponent } from './examples/tags.component';\nimport { LayoutHeaderComponent } from './layout/header.component';\nimport { LayoutSidenavComponent } from './layout/sidenav-component';\nimport { VirtualScrollComponent } from './examples/virtual-scroll.component';\n+import { DataService } from './shared/data.service';\nconst appRoutes: Routes = [\n{\n@@ -39,7 +40,7 @@ const appRoutes: Routes = [\n@NgModule({\nimports: [\nBrowserModule,\n- NgSelectModule.forRoot({ notFoundText: 'No items found', typeToSearchText: 'Type to search', addTagText: 'Add item' }),\n+ NgSelectModule.forRoot(),\nCommonModule,\nFormsModule,\nReactiveFormsModule,\n@@ -52,6 +53,9 @@ const appRoutes: Routes = [\n}\n)\n],\n+ providers: [\n+ DataService\n+ ],\ndeclarations: [\nAppComponent,\nSelectWithTemplatesComponent,\n",
"new_path": "demo/app/app.module.ts",
"old_path": "demo/app/app.module.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -3,6 +3,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';\nimport { NgOption } from '@ng-select/ng-select';\nimport { HttpClient } from '@angular/common/http';\nimport { NgbModal } from '@ng-bootstrap/ng-bootstrap';\n+import { DataService } from '../shared/data.service';\n@Component({\nselector: 'reactive-forms',\n@@ -173,7 +174,7 @@ export class ReactiveFormsComponent {\nallAlbums = [];\nphotos = [];\n- constructor(private fb: FormBuilder, private http: HttpClient, private modalService: NgbModal) {\n+ constructor(private fb: FormBuilder, private http: HttpClient, private modalService: NgbModal, private dataService: DataService) {\n}\nngOnInit() {\n@@ -238,7 +239,7 @@ export class ReactiveFormsComponent {\n}\nprivate loadAlbums() {\n- this.http.get<any[]>('https://jsonplaceholder.typicode.com/albums').subscribe(albums => {\n+ this.dataService.getAlbums().subscribe(albums => {\nthis.allAlbums = albums;\nthis.albums = [...this.allAlbums];\nthis.selectFirstAlbum();\n@@ -246,7 +247,7 @@ export class ReactiveFormsComponent {\n}\nprivate loadPhotos() {\n- this.http.get<any[]>('https://jsonplaceholder.typicode.com/photos').subscribe(photos => {\n+ this.dataService.getPhotos().subscribe(photos => {\nthis.photos = photos;\nthis.selectFirstPhoto();\n});\n",
"new_path": "demo/app/examples/reactive-forms.component.ts",
"old_path": "demo/app/examples/reactive-forms.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -20,22 +20,6 @@ import { Component, Input} from '@angular/core';\n<div class=\"collapse navbar-collapse\" id=\"navbarsExampleDefault\">\n<ul class=\"navbar-nav mr-auto\">\n- <!--<li class=\"nav-item active\">\n- <a class=\"nav-link\" href=\"#\">Home <span class=\"sr-only\">(current)</span></a>\n- </li>\n- <li class=\"nav-item\">\n- <a class=\"nav-link\" href=\"#\">Link</a>\n- </li>\n- <li class=\"nav-item\">\n- <a class=\"nav-link disabled\" href=\"#\">Disabled</a>\n- </li>\n- <li class=\"nav-item dropdown\">\n- <div class=\"dropdown-menu\" aria-labelledby=\"dropdown01\">\n- <a class=\"dropdown-item\" href=\"#\">Action</a>\n- <a class=\"dropdown-item\" href=\"#\">Another action</a>\n- <a class=\"dropdown-item\" href=\"#\">Something else here</a>\n- </div>\n- </li>-->\n</ul>\n<form class=\"form-inline my-2 my-lg-0\">\n<!-- Place this tag where you want the button to render. -->\n",
"new_path": "demo/app/layout/header.component.ts",
"old_path": "demo/app/layout/header.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -25,7 +25,7 @@ import { Component } from '@angular/core';\n<li class=\"nav-item\" routerLinkActive=\"active\">\n<a class=\"nav-link\" routerLink=\"/templates\">Templates</a>\n</li>\n- <li class=\"nav-item\">\n+ <li class=\"nav-item\" routerLinkActive=\"active\">\n<a class=\"nav-link\" routerLink=\"/events\">Output events</a>\n</li>\n</ul>\n",
"new_path": "demo/app/layout/sidenav-component.ts",
"old_path": "demo/app/layout/sidenav-component.ts"
},
{
"change_type": "MODIFY",
"diff": "-.bd-toc {\n- @supports (position: sticky) {\n- position: sticky;\n- top: 4rem;\n- height: calc(100vh - 4rem);\n- overflow-y: auto;\n- }\n- order: 2;\n- padding-top: 1.5rem;\n- padding-bottom: 1.5rem;\n- font-size: .875rem;\n-}\n.section-nav {\npadding-left: 0;\n@include media-breakpoint-up(xl) {\nmax-width: 320px;\n}\n+\n+ .nav {\n+ margin-top: 10px;\n+ }\n+ // All levels of nav\n+ .nav > li > a {\n+ display: block;\n+ color: rgba(0, 0, 0, .65);\n+ font-weight: 500;\n+ padding: .5rem 0.5rem;\n+ }\n+\n+ .nav > li > a:hover {\n+ color: rgba(0, 0, 0, .85);\n+ text-decoration: none;\n+ background-color: transparent;\n+ }\n+\n+ .nav > .active > a,\n+ .nav > .active:hover > a {\n+ font-weight: 500;\n+ color: rgba(0, 0, 0, .85);\n+ background-color: transparent;\n+ }\n+\n}\n.bd-links {\n}\n}\n}\n\\ No newline at end of file\n-\n-// All levels of nav\n-.bd-sidebar .nav > li > a {\n- display: block;\n- color: rgba(0, 0, 0, .65);\n- font-weight: 500;\n- padding: .5rem 0.5rem;\n-}\n-\n-.bd-sidebar .nav > li > a:hover {\n- color: rgba(0, 0, 0, .85);\n- text-decoration: none;\n- background-color: transparent;\n-}\n-\n-.bd-sidebar .nav > .active > a,\n-.bd-sidebar .nav > .active:hover > a {\n- font-weight: 500;\n- color: rgba(0, 0, 0, .85);\n- background-color: transparent;\n-}\n",
"new_path": "demo/style/_sidebar.scss",
"old_path": "demo/style/_sidebar.scss"
},
{
"change_type": "MODIFY",
"diff": "@@ -31,6 +31,9 @@ export class ItemsList {\n}\nselect(item: NgOption) {\n+ if (item.selected) {\n+ return;\n+ }\nif (!this._multiple) {\nthis.clearSelected();\n}\n",
"new_path": "src/ng-select/items-list.ts",
"old_path": "src/ng-select/items-list.ts"
},
{
"change_type": "MODIFY",
"diff": "</ng-template>\n</div>\n- <div class=\"ng-option marked\" role=\"option\" (click)=\"selectTag()\" *ngIf=\"addTag && itemsList.filteredItems.length === 0\">\n- <span><span class=\"ng-tag-label\">{{addTagText}}</span>{{filterValue}}</span>\n+ <div class=\"ng-option marked\" role=\"option\" (click)=\"selectTag()\" *ngIf=\"showAddTag()\">\n+ <span><span class=\"ng-tag-label\">{{addTagText}}</span>\"{{filterValue}}\"</span>\n</div>\n</virtual-scroll>\n{{typeToSearchText}}\n</div>\n</div>\n+\n+ <div class=\"ng-menu\" *ngIf=\"isLoading && itemsList.filteredItems.length === 0\">\n+ <div class=\"ng-option disabled\">\n+ {{loadingText}}\n+ </div>\n+ </div>\n</div>\n",
"new_path": "src/ng-select/ng-select.component.html",
"old_path": "src/ng-select/ng-select.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -64,9 +64,10 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\n@Input() clearable = true;\n@Input() disableVirtualScroll = false;\n@Input() placeholder: string;\n- @Input() notFoundText = 'No items found';\n- @Input() typeToSearchText = 'Type to search';\n- @Input() addTagText = 'Add item';\n+ @Input() notFoundText;\n+ @Input() typeToSearchText;\n+ @Input() addTagText;\n+ @Input() loadingText;\n@Input()\n@HostBinding('class.typeahead') typeahead: Subject<string>;\n@@ -199,7 +200,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\n}\nthis.clearSearch();\nthis.focusSearchInput();\n- if (this.isTypeahead()) {\n+ if (this.isTypeahead) {\nthis.typeahead.next(null);\n}\n}\n@@ -309,19 +310,26 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nreturn this.clearable && (this.isValueSet || this.filterValue) && !this.isDisabled;\n}\n+ showAddTag() {\n+ return this.addTag &&\n+ this.filterValue &&\n+ this.itemsList.filteredItems.length === 0 &&\n+ !this.isLoading;\n+ }\n+\nshowFilter() {\nreturn !this.isDisabled;\n}\nshowNoItemsFound() {\nconst empty = this.itemsList.filteredItems.length === 0;\n- return (empty && !this.isTypeahead()) ||\n- (empty && this.isTypeahead() && this.filterValue && !this.isLoading);\n+ return (empty && !this.isTypeahead) ||\n+ (empty && this.isTypeahead && this.filterValue && !this.isLoading);\n}\nshowTypeToSearch() {\nconst empty = this.itemsList.filteredItems.length === 0;\n- return empty && this.isTypeahead() && !this.filterValue && !this.isLoading;\n+ return empty && this.isTypeahead && !this.filterValue && !this.isLoading;\n}\nonFilter($event) {\n@@ -335,7 +343,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nthis.filterValue = $event.target.value;\n- if (this.isTypeahead()) {\n+ if (this.isTypeahead) {\nthis.isLoading = true;\nthis.typeahead.next(this.filterValue);\n} else {\n@@ -367,13 +375,14 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nconst firstItem = items[0];\nthis._simple = firstItem && !(firstItem instanceof Object);\nthis.itemsList.setItems(items, this._simple);\n- if (this._ngModel) {\n+ if (this._ngModel && items.length > 0) {\nthis.itemsList.clearSelected();\nthis.selectWriteValue(this._ngModel);\n}\n- if (this.isTypeahead()) {\n+\n+ if (this.isTypeahead) {\nthis.isLoading = false;\n- this.itemsList.markItem();\n+ this.itemsList.markItem(this.itemsList.filteredItems[0]);\n}\n}\n@@ -453,15 +462,13 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\n}\nconst select = (val: any) => {\n- let item = this.itemsList.findItem(val, this.bindValue, this.bindLabel);\n+ const item = this.itemsList.findItem(val, this.bindValue, this.bindLabel);\nif (item) {\nthis.itemsList.select(item);\n- } else {\n- if (val instanceof Object) {\n+ } else if (val instanceof Object) {\nthis.itemsList.addItem(val);\nthis.itemsList.select(val);\n}\n- }\n};\nif (this.multiple) {\n@@ -571,7 +578,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nreturn <HTMLElement>this.elementRef.nativeElement.querySelector('.ng-menu-outer');\n}\n- private isTypeahead() {\n+ private get isTypeahead() {\nreturn this.typeahead && this.typeahead.observers.length > 0;\n}\n@@ -594,11 +601,12 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nprivate mergeGlobalConfig(config: NgSelectConfig) {\nif (!config) {\n- return;\n+ config = new NgSelectConfig();\n}\n- this.notFoundText = config.notFoundText || this.notFoundText;\n- this.typeToSearchText = config.typeToSearchText || this.typeToSearchText;\n- this.addTagText = config.addTagText || this.addTagText;\n- this.disableVirtualScroll = config.disableVirtualScroll || this.disableVirtualScroll;\n+ this.notFoundText = this.notFoundText || config.notFoundText;\n+ this.typeToSearchText = this.typeToSearchText || config.typeToSearchText;\n+ this.addTagText = this.addTagText || config.addTagText;\n+ this.loadingText = this.loadingText || config.loadingText;\n+ this.disableVirtualScroll = this.disableVirtualScroll || config.disableVirtualScroll;\n}\n}\n",
"new_path": "src/ng-select/ng-select.component.ts",
"old_path": "src/ng-select/ng-select.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -19,8 +19,9 @@ export enum KeyCode {\n}\nexport class NgSelectConfig {\n- notFoundText? = '';\n- typeToSearchText? = '';\n- addTagText? = '';\n+ notFoundText? = 'No items found';\n+ typeToSearchText? = 'Type to search';\n+ addTagText? = 'Add item';\n+ loadingText? = 'Loading...';\ndisableVirtualScroll? = false;\n}\n",
"new_path": "src/ng-select/ng-select.types.ts",
"old_path": "src/ng-select/ng-select.types.ts"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
fix: custom tags insertion on multiselect (#135)
fixes https://github.com/ng-select/ng-select/issues/124
| 1
|
fix
| null |
815,746
|
26.11.2017 12:52:47
| -7,200
|
78ff66194b768972955e1dc81cad318700aae620
|
fix: mark for check when closing dropdown
fixes
|
[
{
"change_type": "MODIFY",
"diff": "import '../style/styles.scss';\n-import { Component } from '@angular/core';\n+import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { ActivatedRoute, NavigationEnd, Router } from '@angular/router';\nimport 'rxjs/add/operator/filter';\nimport 'rxjs/add/operator/map';\n@@ -9,7 +9,8 @@ import { Title } from '@angular/platform-browser';\n@Component({\nselector: 'demo-app',\n- templateUrl: './app.component.html'\n+ templateUrl: './app.component.html',\n+ changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AppComponent {\n",
"new_path": "demo/app/app.component.ts",
"old_path": "demo/app/app.component.ts"
},
{
"change_type": "MODIFY",
"diff": "-import {Component} from '@angular/core';\n+import { Component, ChangeDetectionStrategy } from '@angular/core';\n@Component({\nselector: 'select-bindings',\n+ changeDetection: ChangeDetectionStrategy.OnPush,\ntemplate: `\n<label>Bind to default <b>label</b>, <b>object</b> bindings</label>\n---html,true\n",
"new_path": "demo/app/examples/bindings.component.ts",
"old_path": "demo/app/examples/bindings.component.ts"
},
{
"change_type": "MODIFY",
"diff": "-import { Component } from '@angular/core';\n+import { Component, ChangeDetectionStrategy } from '@angular/core';\n@Component({\nselector: 'select-with-templates',\n+ changeDetection: ChangeDetectionStrategy.OnPush,\ntemplate: `\n<label>Custom label</label>\n---html,true\n",
"new_path": "demo/app/examples/custom-templates.component.ts",
"old_path": "demo/app/examples/custom-templates.component.ts"
},
{
"change_type": "MODIFY",
"diff": "-import { Component } from '@angular/core';\n+import { Component, ChangeDetectionStrategy } from '@angular/core';\ninterface AngSelectEvent {\n@@ -8,6 +8,7 @@ interface AngSelectEvent {\n@Component({\nselector: 'select-events',\n+ changeDetection: ChangeDetectionStrategy.OnPush,\ntemplate: `\n<div id=\"s1\"></div>\n<label>Open, close, focus, blur, change events</label>\n",
"new_path": "demo/app/examples/events.component.ts",
"old_path": "demo/app/examples/events.component.ts"
},
{
"change_type": "MODIFY",
"diff": "-import { Component } from '@angular/core';\n+import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { NgOption } from '@ng-select/ng-select';\nimport { HttpClient } from '@angular/common/http';\nimport { Observable } from 'rxjs/Observable';\n@Component({\n+ changeDetection: ChangeDetectionStrategy.OnPush,\ntemplate: `\n<label>Select multiple elements</label>\n---html,true\n",
"new_path": "demo/app/examples/multi.component.ts",
"old_path": "demo/app/examples/multi.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -7,6 +7,7 @@ import { DataService } from '../shared/data.service';\n@Component({\nselector: 'reactive-forms',\n+ changeDetection: ChangeDetectionStrategy.OnPush,\ntemplate: `\n<form [formGroup]=\"heroForm\" novalidate>\n---html\n",
"new_path": "demo/app/examples/reactive-forms.component.ts",
"old_path": "demo/app/examples/reactive-forms.component.ts"
},
{
"change_type": "MODIFY",
"diff": "-import { Component, EventEmitter } from '@angular/core';\n+import { Component, EventEmitter, ChangeDetectionStrategy } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { Observable } from 'rxjs/Observable';\nimport 'rxjs/add/operator/distinctUntilChanged';\n@@ -9,6 +9,7 @@ import { DataService } from '../shared/data.service';\n@Component({\nselector: 'select-search',\n+ changeDetection: ChangeDetectionStrategy.OnPush,\ntemplate: `\n<h5>Default search</h5>\n<hr>\n",
"new_path": "demo/app/examples/search.component.ts",
"old_path": "demo/app/examples/search.component.ts"
},
{
"change_type": "MODIFY",
"diff": "-import { Component, EventEmitter } from '@angular/core';\n+import { Component, EventEmitter, ChangeDetectionStrategy } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { Observable } from 'rxjs/Observable';\n@Component({\nselector: 'select-tags',\n+ changeDetection: ChangeDetectionStrategy.OnPush,\ntemplate: `\n<label>Default tags</label>\n---html,true\n",
"new_path": "demo/app/examples/tags.component.ts",
"old_path": "demo/app/examples/tags.component.ts"
},
{
"change_type": "MODIFY",
"diff": "-import { Component } from '@angular/core';\n+import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n@Component({\nselector: 'select-tags',\n+ changeDetection: ChangeDetectionStrategy.OnPush,\ntemplate: `\n<p>\nBy default ng-select enables virtual scroll for more 20 items. You can turn it off by setting disableVirtualScroll to true.\n",
"new_path": "demo/app/examples/virtual-scroll.component.ts",
"old_path": "demo/app/examples/virtual-scroll.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -425,10 +425,12 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nif (this.isFocused) {\nthis.onInputBlur();\n+ this.changeDetectorRef.markForCheck();\n}\nif (this.isOpen) {\nthis.close();\n+ this.changeDetectorRef.markForCheck();\n}\n};\n",
"new_path": "src/ng-select/ng-select.component.ts",
"old_path": "src/ng-select/ng-select.component.ts"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
fix: mark for check when closing dropdown (#140)
fixes https://github.com/ng-select/ng-select/issues/138
| 1
|
fix
| null |
311,017
|
26.11.2017 13:25:03
| 14,400
|
fec663bde388b67bce46829436237d385e06bbed
|
feat: warn about cordova plugins not in devapp
|
[
{
"change_type": "MODIFY",
"diff": "@@ -5,7 +5,8 @@ import { str2num } from '@ionic/cli-framework/utils/string';\nimport { CommandLineInputs, CommandLineOptions, IonicEnvironment, ServeDetails } from '../definitions';\nimport { FatalException } from '../lib/errors';\n-import { BIND_ALL_ADDRESS, DEFAULT_DEV_LOGGER_PORT, DEFAULT_LIVERELOAD_PORT, DEFAULT_SERVER_PORT, IONIC_LAB_URL, gatherDevAppDetails, publishDevApp } from '../lib/serve';\n+import { BIND_ALL_ADDRESS, DEFAULT_DEV_LOGGER_PORT, DEFAULT_LIVERELOAD_PORT, DEFAULT_SERVER_PORT, devAppPlugins, gatherDevAppDetails, IONIC_LAB_URL, publishDevApp } from '../lib/serve';\n+import { isCordovaPackageJson } from '../guards';\nconst WATCH_BEFORE_HOOK = 'watch:before';\nconst WATCH_BEFORE_SCRIPT = `ionic:${WATCH_BEFORE_HOOK}`;\n@@ -50,6 +51,18 @@ export async function serve(env: IonicEnvironment, inputs: CommandLineInputs, op\nconst devAppDetails = await gatherDevAppDetails(env, serveOptions);\n+ // Check if cordova plugins are present in the devapp\n+ if (devAppPlugins && isCordovaPackageJson(packageJson)) {\n+ const packageCordovaPlugins = Object.keys(packageJson.cordova.plugins);\n+ const devAppPluginNames = new Set([...Object.keys(devAppPlugins)]);\n+ const packageCordovaPluginsDiff = packageCordovaPlugins.filter(p => !devAppPluginNames.has(p));\n+ if (packageCordovaPluginsDiff.length > 0) {\n+ env.log.warn('Cordova plugins incompatible with dev app detected\\n' +\n+ `${chalk.bold(packageCordovaPluginsDiff.join('\\n'))}`);\n+ env.log.warn('App may not function as expected in DevApp.\\n');\n+ }\n+ }\n+\nif (project.type === 'ionic1') {\nconst { serve } = await import('../lib/ionic1/serve');\ndetails = await serve({ env, options: serveOptions });\n",
"new_path": "packages/@ionic/cli-utils/src/commands/serve.ts",
"old_path": "packages/@ionic/cli-utils/src/commands/serve.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -151,3 +151,5 @@ export async function publishDevApp(env: IonicEnvironment, options: ServeOptions\nreturn publisher.name;\n}\n}\n+\n+export const devAppPlugins = {'card.io.cordova.mobilesdk': '2.1.0', 'com-intel-security-cordova-plugin': '2.0.3', 'com.darktalker.cordova.screenshot': '0.1.5', 'com.paypal.cordova.mobilesdk': '3.5.0', 'cordova-admob-sdk': '0.8.0', 'cordova-base64-to-gallery': '4.1.2', 'cordova-instagram-plugin': '0.5.5', 'cordova-launch-review': '2.0.0', 'cordova-plugin-3dtouch': '1.3.5', 'cordova-plugin-actionsheet': '2.3.3', 'cordova-plugin-add-swift-support': '1.6.2', 'cordova-plugin-admob-free': '0.10.0', 'cordova-plugin-app-event': '1.2.0', 'cordova-plugin-apprate': '1.3.0', 'cordova-plugin-battery-status': '1.2.4', 'cordova-plugin-ble-central': '1.1.4', 'cordova-plugin-bluetooth-serial': '0.4.7', 'cordova-plugin-brightness': '0.1.5', 'cordova-plugin-calendar': '4.6.0', 'cordova-plugin-camera': '2.4.1', 'cordova-plugin-compat': '1.1.0', 'cordova-plugin-console': '1.0.7', 'cordova-plugin-contacts': '2.3.1', 'cordova-plugin-datepicker': '0.9.3', 'cordova-plugin-device': '1.1.6', 'cordova-plugin-device-motion': '1.2.5', 'cordova-plugin-device-orientation': '1.0.7', 'cordova-plugin-dialogs': '1.3.3', 'cordova-plugin-email-composer': '0.8.7', 'cordova-plugin-geolocation': '2.4.3', 'cordova-plugin-globalization': '1.0.7', 'cordova-plugin-google-analytics': '1.8.3', 'cordova-plugin-health': '1.0.0', 'cordova-plugin-image-picker': '1.1.1', 'cordova-plugin-inappbrowser': '1.6.1', 'cordova-plugin-insomnia': '4.3.0', 'cordova-plugin-intercom': '3.2.2', 'cordova-plugin-ionic': '1.1.6', 'cordova-plugin-ios-keychain': '3.0.1', 'cordova-plugin-media': '3.0.1', 'cordova-plugin-mixpanel': '3.1.0', 'cordova-plugin-music-controls': '2.0.0', 'cordova-plugin-nativeaudio': '3.0.9', 'cordova-plugin-nativestorage': '2.2.2', 'cordova-plugin-network-information': '1.3.3', 'cordova-plugin-request-location-accuracy': '2.2.1', 'cordova-plugin-safariviewcontroller': '1.4.7', 'cordova-plugin-screen-orientation': '2.0.1', 'cordova-plugin-secure-storage': '2.6.8', 'cordova-plugin-shake': '0.6.0', 'cordova-plugin-sim': '1.3.3', 'cordova-plugin-splashscreen': '4.0.3', 'cordova-plugin-statusbar': '2.2.3', 'cordova-plugin-stripe': '1.5.3', 'cordova-plugin-taptic-engine': '2.1.0', 'cordova-plugin-themeablebrowser': '0.2.17', 'cordova-plugin-touch-id': '3.2.0', 'cordova-plugin-tts': '0.2.3', 'cordova-plugin-vibration': '2.1.5', 'cordova-plugin-whitelist': '1.3.2', 'cordova-plugin-x-socialsharing': '5.1.8', 'cordova-plugin-x-toast': '2.6.0', 'cordova-plugin-zip': '3.1.0', 'cordova-promise-polyfill': '0.0.2', 'cordova-sms-plugin': '0.1.11', 'cordova-sqlite-storage': '2.0.4', 'cordova-universal-clipboard': '0.1.0', 'de.appplant.cordova.plugin.local-notification': '0.8.5', 'de.appplant.cordova.plugin.printer': '0.7.1', 'ionic-plugin-keyboard': '2.2.1', 'phonegap-nfc': '0.6.6', 'phonegap-plugin-barcodescanner': '6.0.7', 'phonegap-plugin-mobile-accessibility': '1.0.5', 'uk.co.workingedge.phonegap.plugin.launchnavigator': '4.0.4'};\n",
"new_path": "packages/@ionic/cli-utils/src/lib/serve.ts",
"old_path": "packages/@ionic/cli-utils/src/lib/serve.ts"
}
] |
TypeScript
|
MIT License
|
ionic-team/ionic-cli
|
feat: warn about cordova plugins not in devapp
| 1
|
feat
| null |
815,745
|
27.11.2017 07:34:07
| -7,200
|
9cce98a77a855c607e619a9966ed61db07f03035
|
feat: allow to configure marking first item
* feat: allow to configure marking first item
closes
* fix: don't crash if default bindlabel doesn't exist on item
|
[
{
"change_type": "MODIFY",
"diff": "@@ -97,9 +97,10 @@ map: {\n| bindLabel | string | `label` | no | Object property to use for label. Default `label` |\n| bindValue | string | `-` | no | Object property to use for selected model. By default binds to whole object. |\n| [clearable] | boolean | `true` | no | Allow to clear selected value. Default `true`|\n+| [markFirst] | boolean | `true` | no | Marks first item as focused when opening/filtering. Default `true`|\n| [searchable] | boolean | `true` | no | Allow to search for value. Default `true`|\n| multiple | boolean | `false` | no | Allows to select multiple items. |\n-| [addTag] | Function or boolean | `false` | no | Using boolean simply adds tag with value as bindLabel. If you want custom properties add function which returns object. |\n+| [addTag] | Function or boolean | `false` | no | Allows to create custom options. Using boolean simply adds tag with value as bindLabel. If you want custom properties add function which returns object. |\n| placeholder | string | `-` | no | Placeholder text. |\n| notFoundText | string | `No items found` | no | Set custom text when filter returns empty result |\n| typeToSearchText | string | `Type to search` | no | Set custom text when using Typeahead |\n",
"new_path": "README.md",
"old_path": "README.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -58,7 +58,7 @@ export class ItemsList {\nitem.selected = false;\n}\n- unselectLastItem() {\n+ unselectLast() {\nif (this._selected.length === 0) {\nreturn;\n}\n@@ -84,7 +84,6 @@ export class ItemsList {\nfilter(term: string, bindLabel: string) {\nconst filterFuncVal = this.getDefaultFilterFunc(term, bindLabel);\nthis.filteredItems = term ? this.items.filter(val => filterFuncVal(val)) : this.items;\n- this._markedIndex = 0;\n}\nclearFilter() {\n@@ -99,25 +98,27 @@ export class ItemsList {\nthis.stepToItem(-1);\n}\n- markItem(item: NgOption = null) {\n+ markItem(item: NgOption) {\n+ this._markedIndex = this.filteredItems.indexOf(item);\n+ }\n+\n+ markSelectedOrDefault(markDefault) {\nif (this.filteredItems.length === 0) {\nreturn;\n}\n- item = item || this.lastSelectedItem;\n- if (item) {\n- this._markedIndex = this.filteredItems.indexOf(item);\n+ if (this.lastSelectedItem) {\n+ this._markedIndex = this.filteredItems.indexOf(this.lastSelectedItem);\n} else {\n- this._markedIndex = 0;\n+ this._markedIndex = markDefault ? 0 : -1;\n}\n}\nprivate getNextItemIndex(steps: number) {\nif (steps > 0) {\nreturn (this._markedIndex === this.filteredItems.length - 1) ? 0 : (this._markedIndex + 1);\n- } else {\n- return (this._markedIndex === 0) ? (this.filteredItems.length - 1) : (this._markedIndex - 1);\n}\n+ return (this._markedIndex === 0) ? (this.filteredItems.length - 1) : (this._markedIndex - 1);\n}\nprivate stepToItem(steps: number) {\n@@ -133,7 +134,7 @@ export class ItemsList {\nprivate getDefaultFilterFunc(term, bindLabel: string) {\nreturn (val: NgOption) => {\n- return searchHelper.stripSpecialChars(val[bindLabel])\n+ return searchHelper.stripSpecialChars(val[bindLabel] || '')\n.toUpperCase()\n.indexOf(searchHelper.stripSpecialChars(term).toUpperCase()) > -1;\n};\n@@ -147,8 +148,9 @@ export class ItemsList {\nreturn items.map((item, index) => {\nlet option = item;\nif (this._simple) {\n- option = {};\n- option['label'] = item as any;\n+ option = {\n+ label: item as any\n+ };\n}\nreturn {\n",
"new_path": "src/ng-select/items-list.ts",
"old_path": "src/ng-select/items-list.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -362,6 +362,12 @@ describe('NgSelectComponent', function () {\ntriggerKeyDownEvent(getNgSelectElement(fixture), KeyCode.Space);\nexpect(fixture.componentInstance.select.itemsList.markedItem).toEqual(jasmine.objectContaining(result));\n});\n+\n+ it('should open dropdown without marking first item', () => {\n+ fixture.componentInstance.select.markFirst = false;\n+ triggerKeyDownEvent(getNgSelectElement(fixture), KeyCode.Space);\n+ expect(fixture.componentInstance.select.itemsList.markedItem).toEqual(undefined);\n+ });\n});\ndescribe('arrows', () => {\n@@ -488,7 +494,7 @@ describe('NgSelectComponent', function () {\n});\n});\n- describe('document:click', () => {\n+ describe('Document:click', () => {\nlet fixture: ComponentFixture<NgSelectBasicTestCmp>;\nbeforeEach(() => {\n@@ -610,7 +616,7 @@ describe('NgSelectComponent', function () {\n});\n});\n- describe('tagging', () => {\n+ describe('Tagging', () => {\nit('should select default tag', fakeAsync(() => {\nlet fixture = createTestingModule(\nNgSelectBasicTestCmp,\n@@ -750,6 +756,21 @@ describe('NgSelectComponent', function () {\nexpect(fixture.componentInstance.select.selectedItems).toEqual([result]);\n}));\n+ it('should not mark first item on filter when markFirst disabled', fakeAsync(() => {\n+ fixture = createTestingModule(\n+ NgSelectFilterTestCmp,\n+ `<ng-select [items]=\"cities\"\n+ bindLabel=\"name\"\n+ [markFirst]=\"false\"\n+ [(ngModel)]=\"selectedCity\">\n+ </ng-select>`);\n+\n+ tick(200);\n+ fixture.componentInstance.select.onFilter({ target: { value: 'pab' } });\n+ tick(200);\n+ expect(fixture.componentInstance.select.itemsList.markedItem).toEqual(undefined)\n+ }));\n+\nit('should clear filterValue on selected item', fakeAsync(() => {\nfixture = createTestingModule(\nNgSelectFilterTestCmp,\n@@ -794,6 +815,16 @@ describe('NgSelectComponent', function () {\nexpect(fixture.componentInstance.select.selectedItems).toEqual([jasmine.objectContaining({ id: 4, name: 'Bukiskes' })])\n}));\n+ it('should not mark first item when typeahead results are loaded', fakeAsync(() => {\n+ fixture.componentInstance.select.markFirst = false;\n+ fixture.componentInstance.customFilter.subscribe();\n+ fixture.componentInstance.select.onFilter({ target: { value: 'buk' } });\n+ fixture.componentInstance.cities = [{ id: 4, name: 'Bukiskes' }];\n+ tickAndDetectChanges(fixture);\n+ triggerKeyDownEvent(getNgSelectElement(fixture), KeyCode.Enter);\n+ expect(fixture.componentInstance.select.selectedItems).toEqual([])\n+ }));\n+\nit('should start and stop loading indicator', fakeAsync(() => {\nfixture.componentInstance.customFilter.subscribe();\nfixture.componentInstance.select.onFilter({ target: { value: 'buk' } });\n",
"new_path": "src/ng-select/ng-select.component.spec.ts",
"old_path": "src/ng-select/ng-select.component.spec.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -62,6 +62,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\n@Input() bindLabel: string;\n@Input() bindValue: string;\n@Input() clearable = true;\n+ @Input() markFirst = true;\n@Input() disableVirtualScroll = false;\n@Input() placeholder: string;\n@Input() notFoundText;\n@@ -205,6 +206,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\n}\n}\n+ // TODO: make private\nclearModel() {\nif (!this.clearable) {\nreturn;\n@@ -246,7 +248,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nreturn;\n}\nthis.isOpen = true;\n- this.itemsList.markItem();\n+ this.itemsList.markSelectedOrDefault(this.markFirst);\nthis.scrollToMarked();\nthis.focusSearchInput();\nthis.openEvent.emit();\n@@ -348,6 +350,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nthis.typeahead.next(this.filterValue);\n} else {\nthis.itemsList.filter(this.filterValue, this.bindLabel);\n+ this.itemsList.markSelectedOrDefault(this.markFirst);\n}\n}\n@@ -382,13 +385,13 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nif (this.isTypeahead) {\nthis.isLoading = false;\n- this.itemsList.markItem(this.itemsList.filteredItems[0]);\n+ this.itemsList.markSelectedOrDefault(this.markFirst);\n}\n}\nprivate setItemsFromNgOptions() {\nif (!this.bindValue) {\n- this.bindValue = 'value';\n+ this.bindValue = this._defaultValue;\n}\nconst handleNgOptions = (options) => {\n@@ -550,7 +553,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\n}\nif (this.multiple) {\n- this.itemsList.unselectLastItem();\n+ this.itemsList.unselectLast();\nthis.updateModel();\n} else {\nthis.clearModel();\n",
"new_path": "src/ng-select/ng-select.component.ts",
"old_path": "src/ng-select/ng-select.component.ts"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
feat: allow to configure marking first item (#145)
* feat: allow to configure marking first item
closes #103
* fix: don't crash if default bindlabel doesn't exist on item
| 1
|
feat
| null |
791,690
|
27.11.2017 11:36:51
| 28,800
|
039c98d71ac4d6391790921e725c4553286ab456
|
misc(error-reporting): tweak sentry levels and ignore list
|
[
{
"change_type": "MODIFY",
"diff": "@@ -93,13 +93,20 @@ NOTE: If the message you're capturing is dynamic/based on user data or you need\nconst Sentry = require('./lighthouse-core/lib/sentry');\nif (networkRecords.length === 1) {\n- Sentry.captureMessage('Site only had 1 network request');\n+ Sentry.captureMessage('Site only had 1 network request', {level: 'info'});\nreturn null;\n} else {\n// do your thang\n}\n```\n+#### Level Guide\n+\n+- `info` for events that don't indicate a bug but should be tracked\n+- `warning` for events that might indicate unexpected behavior but is recoverable\n+- `error` for events that caused an audit/gatherer failure but were not fatal\n+- `fatal` for events that caused Lighthouse to exit early and not produce a report\n+\n# For Maintainers\n## Release guide\n",
"new_path": "CONTRIBUTING.md",
"old_path": "CONTRIBUTING.md"
},
{
"change_type": "MODIFY",
"diff": "'use strict';\nconst Audit = require('../audit');\n-const Sentry = require('../../lib/sentry');\nconst Util = require('../../report/v2/renderer/util');\nconst KB_IN_BYTES = 1024;\n@@ -135,15 +134,6 @@ class UnusedBytes extends Audit {\nconst tableDetails = Audit.makeTableDetails(result.headings, results);\n- if (debugString) {\n- // Track these with Sentry since we don't want to fail the entire audit for a single image failure.\n- // Use captureException to preserve the stack and take advantage of Sentry grouping.\n- Sentry.captureException(new Error(debugString), {\n- tags: {audit: this.meta.name},\n- level: 'warning',\n- });\n- }\n-\nreturn {\ndebugString,\ndisplayValue,\n",
"new_path": "lighthouse-core/audits/byte-efficiency/byte-efficiency-audit.js",
"old_path": "lighthouse-core/audits/byte-efficiency/byte-efficiency-audit.js"
},
{
"change_type": "MODIFY",
"diff": "'use strict';\nconst ByteEfficiencyAudit = require('./byte-efficiency-audit');\n+const Sentry = require('../../lib/sentry');\nconst URL = require('../../lib/url-shim');\nconst ALLOWABLE_OFFSCREEN_X = 100;\n@@ -101,6 +102,7 @@ class OffscreenImages extends ByteEfficiencyAudit {\nconst processed = OffscreenImages.computeWaste(image, viewportDimensions);\nif (processed instanceof Error) {\ndebugString = processed.message;\n+ Sentry.captureException(processed, {tags: {audit: this.meta.name}, level: 'warning'});\nreturn results;\n}\n",
"new_path": "lighthouse-core/audits/byte-efficiency/offscreen-images.js",
"old_path": "lighthouse-core/audits/byte-efficiency/offscreen-images.js"
},
{
"change_type": "MODIFY",
"diff": "'use strict';\nconst ByteEfficiencyAudit = require('./byte-efficiency-audit');\n+const Sentry = require('../../lib/sentry');\nconst URL = require('../../lib/url-shim');\nconst IGNORE_THRESHOLD_IN_BYTES = 2048;\n@@ -86,6 +87,7 @@ class UsesResponsiveImages extends ByteEfficiencyAudit {\nconst processed = UsesResponsiveImages.computeWaste(image, DPR);\nif (processed instanceof Error) {\ndebugString = processed.message;\n+ Sentry.captureException(processed, {tags: {audit: this.meta.name}, level: 'warning'});\nreturn;\n}\n",
"new_path": "lighthouse-core/audits/byte-efficiency/uses-responsive-images.js",
"old_path": "lighthouse-core/audits/byte-efficiency/uses-responsive-images.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -78,7 +78,7 @@ class TraceOfTab extends ComputedArtifact {\n// However, if no candidates were found (a bogus trace, likely), we fail.\nif (!firstMeaningfulPaint) {\n// Track this with Sentry since it's likely a bug we should investigate.\n- Sentry.captureMessage('No firstMeaningfulPaint found, using fallback');\n+ Sentry.captureMessage('No firstMeaningfulPaint found, using fallback', {level: 'warning'});\nconst fmpCand = 'firstMeaningfulPaintCandidate';\nfmpFellBack = true;\n",
"new_path": "lighthouse-core/gather/computed/trace-of-tab.js",
"old_path": "lighthouse-core/gather/computed/trace-of-tab.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -101,7 +101,10 @@ class Connection {\nlog.formatProtocol('method <= browser ERR', {method: callback.method}, logLevel);\nlet errMsg = `(${callback.method}): ${object.error.message}`;\nif (object.error.data) errMsg += ` (${object.error.data})`;\n- throw new Error(`Protocol error ${errMsg}`);\n+ const error = new Error(`Protocol error ${errMsg}`);\n+ error.protocolMethod = callback.method;\n+ error.protocolError = object.error.message;\n+ throw error;\n}\nlog.formatProtocol('method <= browser OK',\n",
"new_path": "lighthouse-core/gather/connections/connection.js",
"old_path": "lighthouse-core/gather/connections/connection.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -20,6 +20,13 @@ const sentryApi = {\ngetContext: noop,\n};\n+const SAMPLED_ERRORS = [\n+ {pattern: /Unable to load/, rate: 0.1},\n+ {pattern: /Failed to decode/, rate: 0.1},\n+ {pattern: /No resource with given id/, rate: 0.01},\n+ {pattern: /No node with given id/, rate: 0.01},\n+];\n+\n/**\n* We'll create a delegate for sentry so that environments without error reporting enabled will use\n* noop functions and environments with error reporting will call the actual Sentry methods.\n@@ -43,11 +50,24 @@ sentryDelegate.init = function init(opts) {\n});\n// Special case captureException to return a Promise so we don't process.exit too early\n- sentryDelegate.captureException = (...args) => {\n- if (args[0] && args[0].expected) return Promise.resolve();\n+ sentryDelegate.captureException = (err, opts) => {\n+ opts = opts || {};\n+\n+ const empty = Promise.resolve();\n+ // Ignore if there wasn't an error\n+ if (!err) return empty;\n+ // Ignore expected errors\n+ if (err.expected) return empty;\n+ // Sample known errors that occur at a high frequency\n+ const sampledErrorMatch = SAMPLED_ERRORS.find(sample => sample.pattern.test(err.message));\n+ if (sampledErrorMatch && sampledErrorMatch.rate <= Math.random()) return empty;\n+ // Protocol errors all share same stack trace, so add more to fingerprint\n+ if (err.protocolMethod) {\n+ opts.fingerprint = ['{{ default }}', err.protocolMethod, err.protocolError];\n+ }\nreturn new Promise(resolve => {\n- Sentry.captureException(...args, () => resolve());\n+ Sentry.captureException(err, opts, () => resolve());\n});\n};\n",
"new_path": "lighthouse-core/lib/sentry.js",
"old_path": "lighthouse-core/lib/sentry.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -168,7 +168,7 @@ class Runner {\n};\n})\n.catch(err => {\n- return Sentry.captureException(err).then(() => {\n+ return Sentry.captureException(err, {level: 'fatal'}).then(() => {\nthrow err;\n});\n});\n@@ -210,7 +210,7 @@ class Runner {\nconst artifactError = artifacts[artifactName];\nSentry.captureException(artifactError, {\ntags: {gatherer: artifactName},\n- level: 'warning',\n+ level: 'error',\n});\nlog.warn('Runner', `${artifactName} gatherer, required by audit ${audit.meta.name},` +\n@@ -233,7 +233,7 @@ class Runner {\nthrow err;\n}\n- Sentry.captureException(err, {tags: {audit: audit.meta.name}, level: 'warning'});\n+ Sentry.captureException(err, {tags: {audit: audit.meta.name}, level: 'error'});\n// Non-fatal error become error audit result.\nreturn Audit.generateErrorAuditResult(audit, 'Audit error: ' + err.message);\n}).then(result => {\n",
"new_path": "lighthouse-core/runner.js",
"old_path": "lighthouse-core/runner.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
misc(error-reporting): tweak sentry levels and ignore list (#3890)
| 1
|
misc
|
error-reporting
|
791,723
|
27.11.2017 13:04:14
| 28,800
|
e4248c26c2ce10c802e931d3bc6615b39c74ef8a
|
misc(error-reporting): report unhandled promise rejections, take 2
|
[
{
"change_type": "MODIFY",
"diff": "@@ -39,7 +39,7 @@ sentryDelegate.init = function init(opts) {\n}\nconst environmentData = opts.environmentData || {};\n- const sentryConfig = Object.assign({}, environmentData, {allowSecretKey: true});\n+ const sentryConfig = Object.assign({}, environmentData, {captureUnhandledRejections: true});\ntry {\nconst Sentry = require('raven');\n@@ -70,9 +70,6 @@ sentryDelegate.init = function init(opts) {\nSentry.captureException(err, opts, () => resolve());\n});\n};\n-\n- // Report any rejections that are never caught\n- process.on('unhandledRejection', reason => sentryDelegate.captureException(reason));\n} catch (e) {\nlog.warn(\n'sentry',\n",
"new_path": "lighthouse-core/lib/sentry.js",
"old_path": "lighthouse-core/lib/sentry.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
misc(error-reporting): report unhandled promise rejections, take 2 (#3930)
| 1
|
misc
|
error-reporting
|
448,039
|
28.11.2017 11:25:22
| -3,600
|
122c9729a36c7c1dd54c8511d2c1148be39413a0
|
release: cut v2.0.0-rc.4
|
[
{
"change_type": "MODIFY",
"diff": "All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.\n+<a name=\"2.0.0-rc.4\"></a>\n+# [2.0.0-rc.4](https://github.com/dherges/ng-packagr/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2017-11-28)\n+\n+\n+### Bug Fixes\n+\n+* bump `commander` to `^2.12.0`, optimize typings for `cpx` and `commander` ([#323](https://github.com/dherges/ng-packagr/issues/323)) ([68d0c34](https://github.com/dherges/ng-packagr/commit/68d0c34))\n+\n+\n+### Features\n+\n+* align distributed files with `Angular Package Format v5.0` ([#322](https://github.com/dherges/ng-packagr/issues/322)) ([fff712a](https://github.com/dherges/ng-packagr/commit/fff712a)), closes [#257](https://github.com/dherges/ng-packagr/issues/257) [#319](https://github.com/dherges/ng-packagr/issues/319) [#321](https://github.com/dherges/ng-packagr/issues/321)\n+\n+\n+\n<a name=\"2.0.0-rc.3\"></a>\n# [2.0.0-rc.3](https://github.com/dherges/ng-packagr/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2017-11-24)\n",
"new_path": "CHANGELOG.md",
"old_path": "CHANGELOG.md"
},
{
"change_type": "MODIFY",
"diff": "{\n\"name\": \"ng-packagr\",\n- \"version\": \"2.0.0-rc.3\",\n+ \"version\": \"2.0.0-rc.4\",\n\"description\": \"Compile and package a TypeScript library to Angular Package Format\",\n\"keywords\": [\n\"angular\",\n",
"new_path": "package.json",
"old_path": "package.json"
}
] |
TypeScript
|
MIT License
|
ng-packagr/ng-packagr
|
release: cut v2.0.0-rc.4
| 1
|
release
| null |
791,690
|
28.11.2017 18:40:30
| 28,800
|
e842834d5a9452001c23b0581d2467593b9de7ad
|
core(vulnerable-libs): add fix for recovering from bad versions
|
[
{
"change_type": "MODIFY",
"diff": "'use strict';\nconst Audit = require('../audit');\n+const Sentry = require('../../lib/sentry');\nconst semver = require('semver');\nconst snykDatabase = require('../../../third-party/snyk/snapshot.json');\n+const SEMVER_REGEX = /^(\\d+\\.\\d+\\.\\d+)[^-0-9]+/;\n+\nclass NoVulnerableLibrariesAudit extends Audit {\n/**\n* @return {!AuditMeta}\n@@ -51,6 +54,23 @@ class NoVulnerableLibrariesAudit extends Audit {\n};\n}\n+ /**\n+ * Attempts to normalize the version.\n+ * @param {?string} version\n+ * @return {?string}\n+ */\n+ static normalizeVersion(version) {\n+ if (!version) return version;\n+ if (semver.valid(version)) return version;\n+\n+ // converts 1.5 -> 1.5.0\n+ if (/^\\d+\\.\\d+$/.test(version)) return `${version}.0`;\n+ // converts 1.0.0a-bunch-of-crap -> 1.0.0\n+ if (SEMVER_REGEX.test(version)) return version.match(SEMVER_REGEX)[1];\n+ // leave everything else untouched\n+ return version;\n+ }\n+\n/**\n* @param {{name: string, version: string, npmPkgName: string|undefined}} lib\n* @param {{npm: !Object<string, !Array<{id: string, severity: string, semver: {vulnerable: !Array<string>}}>>}} snykDB\n@@ -62,8 +82,16 @@ class NoVulnerableLibrariesAudit extends Audit {\nreturn vulns;\n}\n- lib.pkgLink = 'https://snyk.io/vuln/npm:' + lib.npmPkgName\n- + '#lh@' + lib.version;\n+ try {\n+ semver.satisfies(lib.version, '*');\n+ } catch (err) {\n+ err.pkgName = lib.npmPkgName;\n+ // Report the failure and skip this library if the version was ill-specified\n+ Sentry.captureException(err, {level: 'warning'});\n+ return vulns;\n+ }\n+\n+ lib.pkgLink = `https://snyk.io/vuln/npm:${lib.npmPkgName}#lh@${lib.version}`;\nconst snykInfo = snykDB.npm[lib.npmPkgName];\nsnykInfo.forEach(vuln => {\nif (semver.satisfies(lib.version, vuln.semver.vulnerable[0])) {\n@@ -103,6 +131,7 @@ class NoVulnerableLibrariesAudit extends Audit {\nlet totalVulns = 0;\nconst finalVulns = libraries.map(lib => {\n+ lib.version = this.normalizeVersion(lib.version);\nlib.vulns = this.getVulns(lib, this.snykDB);\nif (lib.vulns.length > 0) {\nlib.vulnCount = lib.vulns.length;\n",
"new_path": "lighthouse-core/audits/dobetterweb/no-vulnerable-libraries.js",
"old_path": "lighthouse-core/audits/dobetterweb/no-vulnerable-libraries.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -11,6 +11,21 @@ const assert = require('assert');\n/* eslint-env mocha */\ndescribe('Avoids front-end JavaScript libraries with known vulnerabilities', () => {\n+ describe('#normalizeVersion', () => {\n+ it('should leave valid and unsavable versions untouched', () => {\n+ assert.equal(NoVulnerableLibrariesAudit.normalizeVersion(null), null);\n+ assert.equal(NoVulnerableLibrariesAudit.normalizeVersion('52.1.13'), '52.1.13');\n+ assert.equal(NoVulnerableLibrariesAudit.normalizeVersion('52.1.13-rc.1'), '52.1.13-rc.1');\n+ assert.equal(NoVulnerableLibrariesAudit.normalizeVersion('c0ab71056b936'), 'c0ab71056b936');\n+ });\n+\n+ it('should fix bad version numbers', () => {\n+ assert.equal(NoVulnerableLibrariesAudit.normalizeVersion('11.51'), '11.51.0');\n+ assert.equal(NoVulnerableLibrariesAudit.normalizeVersion('12.27.14 -junk'), '12.27.14');\n+ assert.equal(NoVulnerableLibrariesAudit.normalizeVersion('12.27.14_other-junk'), '12.27.14');\n+ });\n+ });\n+\nit('fails when JS libraries with known vulnerabilities are detected', () => {\nconst auditResult = NoVulnerableLibrariesAudit.audit({\nJSLibraries: [\n@@ -27,6 +42,20 @@ describe('Avoids front-end JavaScript libraries with known vulnerabilities', ()\nassert.equal(auditResult.details.items[0][0].url, 'https://snyk.io/vuln/npm:angular#lh@1.1.4');\n});\n+ it('handles ill-specified versions', () => {\n+ const auditResult = NoVulnerableLibrariesAudit.audit({\n+ JSLibraries: [\n+ {name: 'angular', version: 'c0ab71056b936', npmPkgName: 'angular'},\n+ {name: 'react', version: '1.5.0 -something,weird', npmPkgName: 'react'},\n+ {name: 'jquery', version: '1.8', npmPkgName: 'jquery'},\n+ ],\n+ });\n+\n+ assert.equal(auditResult.rawValue, false);\n+ assert.equal(auditResult.details.items.length, 1);\n+ assert.equal(auditResult.details.items[0][0].text, 'jquery@1.8.0');\n+ });\n+\nit('passes when no JS libraries with known vulnerabilities are detected', () => {\nconst auditResult = NoVulnerableLibrariesAudit.audit({\nJSLibraries: [\n",
"new_path": "lighthouse-core/test/audits/dobetterweb/no-vulnerable-libraries-test.js",
"old_path": "lighthouse-core/test/audits/dobetterweb/no-vulnerable-libraries-test.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(vulnerable-libs): add fix for recovering from bad versions (#3932)
| 1
|
core
|
vulnerable-libs
|
135,445
|
28.11.2017 23:19:59
| 25,200
|
51902417c29bc2cd9848c1841bc36faf45465100
|
feat(babel-preset-commitlint): add jsx tranform
JSX transform is needed to enable ink as CLI tool.
Plugin and plugin options are recommended by ink as part of the package
setup process.
<https://github.com/vadimdemedes/ink#getting-started>
first step toward
|
[
{
"change_type": "MODIFY",
"diff": "const addModuleExports = require('babel-plugin-add-module-exports');\nconst fastAsync = require('fast-async');\n+const jsx = require('babel-plugin-transform-react-jsx');\nconst istanbul = require('babel-plugin-istanbul').default;\nconst transformRuntime = require('babel-plugin-transform-runtime').default;\nconst env = require('babel-preset-env').default;\n@@ -9,6 +10,7 @@ module.exports = preset;\nfunction preset() {\nconst plugins = [\naddModuleExports,\n+ [jsx, {pragma: 'h'}],\n[fastAsync, {spec: true}],\n[transformRuntime, {polyfill: false, regenerator: false}]\n];\n@@ -21,11 +23,14 @@ function preset() {\n},\nplugins,\npresets: [\n- [env, {\n+ [\n+ env,\n+ {\ndebug: process.env.DEBUG === 'true',\nexclude: ['transform-regenerator', 'transform-async-to-generator'],\ntargets: {node: '4.8'}\n- }]\n- ],\n+ }\n+ ]\n+ ]\n};\n}\n",
"new_path": "@packages/babel-preset-commitlint/index.js",
"old_path": "@packages/babel-preset-commitlint/index.js"
},
{
"change_type": "MODIFY",
"diff": "\"dependencies\": {\n\"babel-plugin-add-module-exports\": \"^0.2.1\",\n\"babel-plugin-istanbul\": \"^4.1.4\",\n+ \"babel-plugin-transform-react-jsx\": \"^6.24.1\",\n\"babel-plugin-transform-runtime\": \"^6.23.0\",\n\"babel-preset-env\": \"^1.6.0\",\n\"fast-async\": \"^6.3.0\"\n",
"new_path": "@packages/babel-preset-commitlint/package.json",
"old_path": "@packages/babel-preset-commitlint/package.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -701,6 +701,14 @@ babel-helper-builder-binary-assignment-operator-visitor@^6.24.1:\nbabel-runtime \"^6.22.0\"\nbabel-types \"^6.24.1\"\n+babel-helper-builder-react-jsx@^6.24.1:\n+ version \"6.26.0\"\n+ resolved \"https://registry.npmjs.org/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz#39ff8313b75c8b65dceff1f31d383e0ff2a408a0\"\n+ dependencies:\n+ babel-runtime \"^6.26.0\"\n+ babel-types \"^6.26.0\"\n+ esutils \"^2.0.2\"\n+\nbabel-helper-call-delegate@^6.24.1:\nversion \"6.24.1\"\nresolved \"https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d\"\n@@ -845,6 +853,10 @@ babel-plugin-syntax-exponentiation-operator@^6.8.0:\nversion \"6.13.0\"\nresolved \"https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de\"\n+babel-plugin-syntax-jsx@^6.8.0:\n+ version \"6.18.0\"\n+ resolved \"https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946\"\n+\nbabel-plugin-syntax-trailing-function-commas@^6.20.0, babel-plugin-syntax-trailing-function-commas@^6.22.0:\nversion \"6.22.0\"\nresolved \"https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3\"\n@@ -1033,6 +1045,14 @@ babel-plugin-transform-exponentiation-operator@^6.22.0, babel-plugin-transform-e\nbabel-plugin-syntax-exponentiation-operator \"^6.8.0\"\nbabel-runtime \"^6.22.0\"\n+babel-plugin-transform-react-jsx@^6.24.1:\n+ version \"6.24.1\"\n+ resolved \"https://registry.npmjs.org/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3\"\n+ dependencies:\n+ babel-helper-builder-react-jsx \"^6.24.1\"\n+ babel-plugin-syntax-jsx \"^6.8.0\"\n+ babel-runtime \"^6.22.0\"\n+\nbabel-plugin-transform-regenerator@^6.22.0:\nversion \"6.26.0\"\nresolved \"https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f\"\n",
"new_path": "yarn.lock",
"old_path": "yarn.lock"
}
] |
TypeScript
|
MIT License
|
conventional-changelog/commitlint
|
feat(babel-preset-commitlint): add jsx tranform (#163)
JSX transform is needed to enable ink as CLI tool.
Plugin and plugin options are recommended by ink as part of the package
setup process.
<https://github.com/vadimdemedes/ink#getting-started>
first step toward #86
| 1
|
feat
|
babel-preset-commitlint
|
448,039
|
29.11.2017 10:59:01
| -3,600
|
56f3d0c8f512404615385fac8ddb9e46e04518d3
|
test: restore consumer build from ng cli
Consistent selectors in `sample-custom` and `@sample/material`.
|
[
{
"change_type": "MODIFY",
"diff": "@@ -7,13 +7,13 @@ echo \"Running consumer builds in $parent_path\"\n# Prepare 'sample-custom'\npushd samples/custom/dist\n-yarn unlink\n+yarn unlink || true\nyarn link\npopd\n# Prepare '@sample/material'\npushd samples/material/dist\n-yarn unlink\n+yarn unlink || true\nyarn link\npopd\n",
"new_path": "integration/consumer.sh",
"old_path": "integration/consumer.sh"
},
{
"change_type": "MODIFY",
"diff": "</h1>\n-<sample-foo></sample-foo>\n+<h4>Components from <code>sample-custom</code> library</h4>\n+<custom-baz></custom-baz>\n+<custom-foo></custom-foo>\n+<custom-foo-bar></custom-foo-bar>\n+<custom-less-baz></custom-less-baz>\n+\n+\n+<h4>Components from <code>@sample/material</code> library</h4>\n<foo-component></foo-component>\n<bar-component></bar-component>\n",
"new_path": "integration/consumers/ng-cli/src/app/app.component.html",
"old_path": "integration/consumers/ng-cli/src/app/app.component.html"
},
{
"change_type": "MODIFY",
"diff": "@@ -30,7 +30,7 @@ describe(`sample-custom`, () => {\nconst foo = METADATA['metadata']['FooComponent']['decorators'][0]['arguments'][0];\nexpect(foo).to.be.ok;\n- expect(foo.selector).to.equal('sample-foo');\n+ expect(foo.selector).to.equal('custom-foo');\nexpect(foo.template).to.contain('<h1>Foo!</h1>');\nexpect(foo.styles[0]).to.contain('h1 {');\nexpect(foo.styles[0]).to.contain('color: #ff0000; }');\n",
"new_path": "integration/samples/custom/specs/metadata.ts",
"old_path": "integration/samples/custom/specs/metadata.ts"
},
{
"change_type": "MODIFY",
"diff": "import { Component } from '@angular/core';\n@Component({\n- selector: 'sample-bar',\n+ selector: 'custom-bar',\ntemplate: `<h1>Bar!</h1>`\n})\nexport class BarComponent {}\n",
"new_path": "integration/samples/custom/src/bar/bar.component.ts",
"old_path": "integration/samples/custom/src/bar/bar.component.ts"
},
{
"change_type": "MODIFY",
"diff": "import { Component } from '@angular/core';\n@Component({\n- selector: 'baz',\n+ selector: 'custom-baz',\ntemplateUrl: './baz.component.html',\nstyleUrls: ['./baz.component.less']\n})\n",
"new_path": "integration/samples/custom/src/baz/baz.component.ts",
"old_path": "integration/samples/custom/src/baz/baz.component.ts"
},
{
"change_type": "MODIFY",
"diff": "import { Component } from '@angular/core';\n@Component({\n- selector: 'sample-foo-bar',\n+ selector: 'custom-foo-bar',\ntemplateUrl: './foo-bar.component.html',\nstyleUrls: ['./foo-bar.component.styl']\n})\n",
"new_path": "integration/samples/custom/src/foo-bar/foo-bar.component.ts",
"old_path": "integration/samples/custom/src/foo-bar/foo-bar.component.ts"
},
{
"change_type": "MODIFY",
"diff": "import { Component } from '@angular/core';\n@Component({\n- selector: 'sample-foo',\n+ selector: 'custom-foo',\ntemplateUrl: './foo.component.html',\nstyleUrls: ['./foo.component.scss']\n})\n",
"new_path": "integration/samples/custom/src/foo/foo.component.ts",
"old_path": "integration/samples/custom/src/foo/foo.component.ts"
},
{
"change_type": "MODIFY",
"diff": "import { Component } from '@angular/core';\n@Component({\n- selector: 'baz',\n+ selector: 'custom-less-baz',\ntemplate: '<h2>LessBaz works!</h2>',\nstyleUrls: ['./less-baz.component.less']\n})\n",
"new_path": "integration/samples/custom/src/less-baz/less-baz.component.ts",
"old_path": "integration/samples/custom/src/less-baz/less-baz.component.ts"
}
] |
TypeScript
|
MIT License
|
ng-packagr/ng-packagr
|
test: restore consumer build from ng cli
Consistent selectors in `sample-custom` and `@sample/material`.
| 1
|
test
| null |
815,746
|
29.11.2017 17:22:43
| -7,200
|
c67c17de60bac1dca1c56be1138269dfcad7f8e2
|
feat: add add, remove, clear events
|
[
{
"change_type": "MODIFY",
"diff": "@@ -115,6 +115,9 @@ map: {\n| (change) | Fired on selected value change |\n| (open) | Fired on select dropdown open |\n| (close) | Fired on select dropdown close |\n+| (clear) | Fired on clear icon click |\n+| (add) | Fired when item is selected |\n+| (remove) | Fired when item is removed |\n## Change Detection\nNg-select component implements `OnPush` change detection which means the dirty checking checks for immutable\n",
"new_path": "README.md",
"old_path": "README.md"
},
{
"change_type": "MODIFY",
"diff": "import { Component, ChangeDetectionStrategy } from '@angular/core';\n+import { DataService } from '../shared/data.service';\ninterface AngSelectEvent {\n@@ -10,18 +11,20 @@ interface AngSelectEvent {\nselector: 'select-events',\nchangeDetection: ChangeDetectionStrategy.OnPush,\ntemplate: `\n- <div id=\"s1\"></div>\n- <label>Open, close, focus, blur, change events</label>\n---html,true\n- <ng-select snippet=\"s1\"\n- [items]=\"cities\"\n- [(ngModel)]=\"selectedCity\"\n+ <ng-select placeholder=\"Select some items\"\n+ [items]=\"items\"\n+ [(ngModel)]=\"selectedItems\"\nbindLabel=\"name\"\nbindValue=\"id\"\n+ [multiple]=\"true\"\n(open)=\"onOpen()\"\n(close)=\"onClose()\"\n(focus)=\"onFocus($event)\"\n(blur)=\"onBlur($event)\"\n+ (clear)=\"onClear()\"\n+ (add)=\"onAdd($event)\"\n+ (remove)=\"onRemove($event)\"\n(change)=\"onChange($event)\">\n</ng-select>\n---\n@@ -41,15 +44,17 @@ interface AngSelectEvent {\n})\nexport class SelectEventsComponent {\n- selectedCity: any;\n- cities = [\n- {id: 1, name: 'Vilnius'},\n- {id: 2, name: 'Kaunas'},\n- {id: 3, name: 'Pavilnys', disabled: true}\n- ];\n+ selectedItems: any;\n+ items = [];\nevents: AngSelectEvent[] = [];\n+ constructor(private dataService: DataService) {\n+ this.dataService.getPeople().subscribe(items => {\n+ this.items = items;\n+ });\n+ }\n+\nonChange($event) {\nthis.events.push({name: '(change)', value: $event});\n}\n@@ -69,6 +74,18 @@ export class SelectEventsComponent {\nonClose() {\nthis.events.push({name: '(close)', value: null});\n}\n+\n+ onAdd($event) {\n+ this.events.push({name: '(add)', value: $event});\n+ }\n+\n+ onRemove($event) {\n+ this.events.push({name: '(remove)', value: $event});\n+ }\n+\n+ onClear() {\n+ this.events.push({name: '(clear)', value: null});\n+ }\n}\n",
"new_path": "demo/app/examples/events.component.ts",
"old_path": "demo/app/examples/events.component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -907,6 +907,61 @@ describe('NgSelectComponent', function () {\nexpect(fixture.componentInstance.onChange).toHaveBeenCalledTimes(1);\n}));\n+\n+ it('fire add when item is added', fakeAsync(() => {\n+ const fixture = createTestingModule(\n+ NgSelectEventsTestCmp,\n+ `<ng-select [items]=\"cities\"\n+ (add)=\"onAdd($event)\"\n+ [multiple]=\"true\"\n+ [(ngModel)]=\"selectedCity\">\n+ </ng-select>`);\n+\n+ spyOn(fixture.componentInstance, 'onAdd');\n+\n+ tickAndDetectChanges(fixture);\n+ fixture.componentInstance.select.select(fixture.componentInstance.cities[0]);\n+\n+ expect(fixture.componentInstance.onAdd).toHaveBeenCalledWith(fixture.componentInstance.cities[0]);\n+ }));\n+\n+ it('fire remove when item is removed', fakeAsync(() => {\n+ const fixture = createTestingModule(\n+ NgSelectEventsTestCmp,\n+ `<ng-select [items]=\"cities\"\n+ (remove)=\"onRemove($event)\"\n+ [multiple]=\"true\"\n+ [(ngModel)]=\"selectedCity\">\n+ </ng-select>`);\n+\n+ spyOn(fixture.componentInstance, 'onRemove');\n+\n+ fixture.componentInstance.selectedCities = [fixture.componentInstance.cities[0]];\n+ tickAndDetectChanges(fixture);\n+\n+ fixture.componentInstance.select.unselect(fixture.componentInstance.cities[0]);\n+\n+ expect(fixture.componentInstance.onRemove).toHaveBeenCalledWith(fixture.componentInstance.cities[0]);\n+ }));\n+\n+ it('fire clear when model is cleared using clear icon', fakeAsync(() => {\n+ const fixture = createTestingModule(\n+ NgSelectEventsTestCmp,\n+ `<ng-select [items]=\"cities\"\n+ (clear)=\"onClear($event)\"\n+ [multiple]=\"true\"\n+ [(ngModel)]=\"selectedCity\">\n+ </ng-select>`);\n+\n+ spyOn(fixture.componentInstance, 'onClear');\n+\n+ fixture.componentInstance.selectedCities = [fixture.componentInstance.cities[0]];\n+ tickAndDetectChanges(fixture);\n+ fixture.componentInstance.select.handleClearClick(<any>{ stopPropagation: () => { } });\n+ tickAndDetectChanges(fixture);\n+\n+ expect(fixture.componentInstance.onClear).toHaveBeenCalled();\n+ }));\n});\ndescribe('Clear icon click', () => {\n@@ -1187,6 +1242,7 @@ class NgSelectFilterTestCmp {\nclass NgSelectEventsTestCmp {\n@ViewChild(NgSelectComponent) select: NgSelectComponent;\nselectedCity: { id: number; name: string };\n+ selectedCities: Array<{ id: number; name: string }>;\ncities = [\n{ id: 1, name: 'Vilnius' },\n{ id: 2, name: 'Kaunas' },\n@@ -1207,4 +1263,12 @@ class NgSelectEventsTestCmp {\nonClose() {\n}\n+\n+ onAdd() {\n+ }\n+\n+ onRemove() {\n+ }\n+\n+ onClear() {}\n}\n",
"new_path": "src/ng-select/ng-select.component.spec.ts",
"old_path": "src/ng-select/ng-select.component.spec.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -89,6 +89,9 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\n@Output('open') openEvent = new EventEmitter();\n@Output('close') closeEvent = new EventEmitter();\n@Output('search') searchEvent = new EventEmitter();\n+ @Output('clear') clearEvent = new EventEmitter();\n+ @Output('add') addEvent = new EventEmitter();\n+ @Output('remove') removeEvent = new EventEmitter();\n@HostBinding('class.ng-single')\nget single() {\n@@ -204,6 +207,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nif (this.isTypeahead) {\nthis.typeahead.next(null);\n}\n+ this.clearEvent.emit();\n}\n// TODO: make private\n@@ -280,6 +284,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nthis.itemsList.select(item);\nthis.clearSearch();\nthis.updateModel();\n+ this.addEvent.emit(item);\n}\nif (this.single) {\n@@ -290,6 +295,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\nunselect(item: NgOption) {\nthis.itemsList.unselect(item);\nthis.updateModel();\n+ this.removeEvent.emit(item);\n}\nselectTag() {\n",
"new_path": "src/ng-select/ng-select.component.ts",
"old_path": "src/ng-select/ng-select.component.ts"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
feat: add add, remove, clear events (#150)
| 1
|
feat
| null |
791,700
|
29.11.2017 19:57:53
| 18,000
|
3bdb56e80a17c2a02f73e678b906232f9a7eef02
|
deps: Bump ws to 3.3.2
|
[
{
"change_type": "MODIFY",
"diff": "\"speedline\": \"1.3.0\",\n\"update-notifier\": \"^2.1.0\",\n\"whatwg-url\": \"4.0.0\",\n- \"ws\": \"1.1.2\",\n+ \"ws\": \"3.3.2\",\n\"yargs\": \"3.32.0\",\n\"yargs-parser\": \"7.0.0\"\n},\n",
"new_path": "package.json",
"old_path": "package.json"
},
{
"change_type": "MODIFY",
"diff": "@@ -307,6 +307,10 @@ assert-plus@^1.0.0:\nversion \"1.0.0\"\nresolved \"https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525\"\n+async-limiter@~1.0.0:\n+ version \"1.0.0\"\n+ resolved \"https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8\"\n+\nasync@1.x, async@^1.4.0:\nversion \"1.5.2\"\nresolved \"https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a\"\n@@ -3051,10 +3055,6 @@ optionator@^0.8.1, optionator@^0.8.2:\ntype-check \"~0.3.2\"\nwordwrap \"~1.0.0\"\n-options@>=0.0.5:\n- version \"0.0.6\"\n- resolved \"https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f\"\n-\norchestrator@^0.3.0:\nversion \"0.3.7\"\nresolved \"https://registry.yarnpkg.com/orchestrator/-/orchestrator-0.3.7.tgz#c45064e22c5a2a7b99734f409a95ffedc7d3c3df\"\n@@ -4030,9 +4030,9 @@ uglify-to-browserify@~1.0.0:\nversion \"1.0.2\"\nresolved \"https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7\"\n-ultron@1.0.x:\n- version \"1.0.2\"\n- resolved \"https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa\"\n+ultron@~1.1.0:\n+ version \"1.1.1\"\n+ resolved \"https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c\"\nunc-path-regex@^0.1.0:\nversion \"0.1.2\"\n@@ -4268,12 +4268,13 @@ write@^0.2.1:\ndependencies:\nmkdirp \"^0.5.1\"\n-ws@1.1.2:\n- version \"1.1.2\"\n- resolved \"https://registry.yarnpkg.com/ws/-/ws-1.1.2.tgz#8a244fa052401e08c9886cf44a85189e1fd4067f\"\n+ws@3.3.2:\n+ version \"3.3.2\"\n+ resolved \"https://registry.yarnpkg.com/ws/-/ws-3.3.2.tgz#96c1d08b3fefda1d5c1e33700d3bfaa9be2d5608\"\ndependencies:\n- options \">=0.0.5\"\n- ultron \"1.0.x\"\n+ async-limiter \"~1.0.0\"\n+ safe-buffer \"~5.1.0\"\n+ ultron \"~1.1.0\"\nxdg-basedir@^3.0.0:\nversion \"3.0.0\"\n",
"new_path": "yarn.lock",
"old_path": "yarn.lock"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
deps: Bump ws to 3.3.2 (#3949)
| 1
|
deps
| null |
791,676
|
02.12.2017 00:48:54
| -3,600
|
46f6d2a8726c54f82ec500f994071b85c605e506
|
core(devtools-timeline-model): extract model generation to a computed artifact...
Assert it doesn't mutate the trace, with a few exceptions. Extract timeline task-groups into lib.
|
[
{
"change_type": "MODIFY",
"diff": "'use strict';\nconst Audit = require('./audit');\n-const DevtoolsTimelineModel = require('../lib/traces/devtools-timeline-model');\nconst WebInspector = require('../lib/web-inspector');\n-const Util = require('../report/v2/renderer/util.js');\n-\n-const group = {\n- loading: 'Network request loading',\n- parseHTML: 'Parsing DOM',\n- styleLayout: 'Style & Layout',\n- compositing: 'Compositing',\n- painting: 'Paint',\n- gpu: 'GPU',\n- scripting: 'Script Evaluation',\n- scriptParseCompile: 'Script Parsing & Compile',\n- scriptGC: 'Garbage collection',\n- other: 'Other',\n- images: 'Images',\n-};\n-const taskToGroup = {\n- 'Animation': group.painting,\n- 'Async Task': group.other,\n- 'Frame Start': group.painting,\n- 'Frame Start (main thread)': group.painting,\n- 'Cancel Animation Frame': group.scripting,\n- 'Cancel Idle Callback': group.scripting,\n- 'Compile Script': group.scriptParseCompile,\n- 'Composite Layers': group.compositing,\n- 'Console Time': group.scripting,\n- 'Image Decode': group.images,\n- 'Draw Frame': group.painting,\n- 'Embedder Callback': group.scripting,\n- 'Evaluate Script': group.scripting,\n- 'Event': group.scripting,\n- 'Animation Frame Fired': group.scripting,\n- 'Fire Idle Callback': group.scripting,\n- 'Function Call': group.scripting,\n- 'DOM GC': group.scriptGC,\n- 'GC Event': group.scriptGC,\n- 'GPU': group.gpu,\n- 'Hit Test': group.compositing,\n- 'Invalidate Layout': group.styleLayout,\n- 'JS Frame': group.scripting,\n- 'Input Latency': group.scripting,\n- 'Layout': group.styleLayout,\n- 'Major GC': group.scriptGC,\n- 'DOMContentLoaded event': group.scripting,\n- 'First paint': group.painting,\n- 'FMP': group.painting,\n- 'FMP candidate': group.painting,\n- 'Load event': group.scripting,\n- 'Minor GC': group.scriptGC,\n- 'Paint': group.painting,\n- 'Paint Image': group.images,\n- 'Paint Setup': group.painting,\n- 'Parse Stylesheet': group.parseHTML,\n- 'Parse HTML': group.parseHTML,\n- 'Parse Script': group.scriptParseCompile,\n- 'Other': group.other,\n- 'Rasterize Paint': group.painting,\n- 'Recalculate Style': group.styleLayout,\n- 'Request Animation Frame': group.scripting,\n- 'Request Idle Callback': group.scripting,\n- 'Request Main Thread Frame': group.painting,\n- 'Image Resize': group.images,\n- 'Finish Loading': group.loading,\n- 'Receive Data': group.loading,\n- 'Receive Response': group.loading,\n- 'Send Request': group.loading,\n- 'Run Microtasks': group.scripting,\n- 'Schedule Style Recalculation': group.styleLayout,\n- 'Scroll': group.compositing,\n- 'Task': group.other,\n- 'Timer Fired': group.scripting,\n- 'Install Timer': group.scripting,\n- 'Remove Timer': group.scripting,\n- 'Timestamp': group.scripting,\n- 'Update Layer': group.compositing,\n- 'Update Layer Tree': group.compositing,\n- 'User Timing': group.scripting,\n- 'Create WebSocket': group.scripting,\n- 'Destroy WebSocket': group.scripting,\n- 'Receive WebSocket Handshake': group.scripting,\n- 'Send WebSocket Handshake': group.scripting,\n- 'XHR Load': group.scripting,\n- 'XHR Ready State Change': group.scripting,\n-};\n+const Util = require('../report/v2/renderer/util');\n+const {groupIdToName, taskToGroup} = require('../lib/task-groups');\nclass BootupTime extends Audit {\n/**\n@@ -109,11 +27,10 @@ class BootupTime extends Audit {\n}\n/**\n- * @param {!Array<TraceEvent>=} trace\n+ * @param {DevtoolsTimelineModel} timelineModel\n* @return {!Map<string, Number>}\n*/\n- static getExecutionTimingsByURL(trace) {\n- const timelineModel = new DevtoolsTimelineModel(trace);\n+ static getExecutionTimingsByURL(timelineModel) {\nconst bottomUpByURL = timelineModel.bottomUpGroupBy('URL');\nconst result = new Map();\n@@ -128,7 +45,7 @@ class BootupTime extends Audit {\n// eventStyle() returns a string like 'Evaluate Script'\nconst task = WebInspector.TimelineUIUtils.eventStyle(perTaskPerUrlNode.event);\n// Resolve which taskGroup we're using\n- const groupName = taskToGroup[task.title] || group.other;\n+ const groupName = taskToGroup[task.title] || groupIdToName.other;\nconst groupTotal = taskGroups[groupName] || 0;\ntaskGroups[groupName] = groupTotal + (perTaskPerUrlNode.selfTime || 0);\n});\n@@ -144,15 +61,15 @@ class BootupTime extends Audit {\n*/\nstatic audit(artifacts) {\nconst trace = artifacts.traces[BootupTime.DEFAULT_PASS];\n- const executionTimings = BootupTime.getExecutionTimingsByURL(trace);\n-\n+ return artifacts.requestDevtoolsTimelineModel(trace).then(devtoolsTimelineModel => {\n+ const executionTimings = BootupTime.getExecutionTimingsByURL(devtoolsTimelineModel);\nlet totalBootupTime = 0;\nconst extendedInfo = {};\nconst headings = [\n{key: 'url', itemType: 'url', text: 'URL'},\n- {key: 'scripting', itemType: 'text', text: group.scripting},\n- {key: 'scriptParseCompile', itemType: 'text', text: group.scriptParseCompile},\n+ {key: 'scripting', itemType: 'text', text: groupIdToName.scripting},\n+ {key: 'scriptParseCompile', itemType: 'text', text: groupIdToName.scriptParseCompile},\n];\n// map data in correct format to create a table\n@@ -161,8 +78,8 @@ class BootupTime extends Audit {\ntotalBootupTime += Object.keys(groups).reduce((sum, name) => sum += groups[name], 0);\nextendedInfo[url] = groups;\n- const scriptingTotal = groups[group.scripting] || 0;\n- const parseCompileTotal = groups[group.scriptParseCompile] || 0;\n+ const scriptingTotal = groups[groupIdToName.scripting] || 0;\n+ const parseCompileTotal = groups[groupIdToName.scriptParseCompile] || 0;\nreturn {\nurl: url,\nsum: scriptingTotal + parseCompileTotal,\n@@ -184,6 +101,7 @@ class BootupTime extends Audit {\nvalue: extendedInfo,\n},\n};\n+ });\n}\n}\n",
"new_path": "lighthouse-core/audits/bootup-time.js",
"old_path": "lighthouse-core/audits/bootup-time.js"
},
{
"change_type": "MODIFY",
"diff": "const Audit = require('./audit');\nconst Util = require('../report/v2/renderer/util');\n-const DevtoolsTimelineModel = require('../lib/traces/devtools-timeline-model');\n-\n// We group all trace events into groups to show a highlevel breakdown of the page\n-const group = {\n- loading: 'Network request loading',\n- parseHTML: 'Parsing DOM',\n- styleLayout: 'Style & Layout',\n- compositing: 'Compositing',\n- painting: 'Paint',\n- gpu: 'GPU',\n- scripting: 'Script Evaluation',\n- scriptParseCompile: 'Script Parsing & Compile',\n- scriptGC: 'Garbage collection',\n- other: 'Other',\n- images: 'Images',\n-};\n-\n-const taskToGroup = {\n- 'Animation': group.painting,\n- 'Async Task': group.other,\n- 'Frame Start': group.painting,\n- 'Frame Start (main thread)': group.painting,\n- 'Cancel Animation Frame': group.scripting,\n- 'Cancel Idle Callback': group.scripting,\n- 'Compile Script': group.scriptParseCompile,\n- 'Composite Layers': group.compositing,\n- 'Console Time': group.scripting,\n- 'Image Decode': group.images,\n- 'Draw Frame': group.painting,\n- 'Embedder Callback': group.scripting,\n- 'Evaluate Script': group.scripting,\n- 'Event': group.scripting,\n- 'Animation Frame Fired': group.scripting,\n- 'Fire Idle Callback': group.scripting,\n- 'Function Call': group.scripting,\n- 'DOM GC': group.scriptGC,\n- 'GC Event': group.scriptGC,\n- 'GPU': group.gpu,\n- 'Hit Test': group.compositing,\n- 'Invalidate Layout': group.styleLayout,\n- 'JS Frame': group.scripting,\n- 'Input Latency': group.scripting,\n- 'Layout': group.styleLayout,\n- 'Major GC': group.scriptGC,\n- 'DOMContentLoaded event': group.scripting,\n- 'First paint': group.painting,\n- 'FMP': group.painting,\n- 'FMP candidate': group.painting,\n- 'Load event': group.scripting,\n- 'Minor GC': group.scriptGC,\n- 'Paint': group.painting,\n- 'Paint Image': group.images,\n- 'Paint Setup': group.painting,\n- 'Parse Stylesheet': group.parseHTML,\n- 'Parse HTML': group.parseHTML,\n- 'Parse Script': group.scriptParseCompile,\n- 'Other': group.other,\n- 'Rasterize Paint': group.painting,\n- 'Recalculate Style': group.styleLayout,\n- 'Request Animation Frame': group.scripting,\n- 'Request Idle Callback': group.scripting,\n- 'Request Main Thread Frame': group.painting,\n- 'Image Resize': group.images,\n- 'Finish Loading': group.loading,\n- 'Receive Data': group.loading,\n- 'Receive Response': group.loading,\n- 'Send Request': group.loading,\n- 'Run Microtasks': group.scripting,\n- 'Schedule Style Recalculation': group.styleLayout,\n- 'Scroll': group.compositing,\n- 'Task': group.other,\n- 'Timer Fired': group.scripting,\n- 'Install Timer': group.scripting,\n- 'Remove Timer': group.scripting,\n- 'Timestamp': group.scripting,\n- 'Update Layer': group.compositing,\n- 'Update Layer Tree': group.compositing,\n- 'User Timing': group.scripting,\n- 'Create WebSocket': group.scripting,\n- 'Destroy WebSocket': group.scripting,\n- 'Receive WebSocket Handshake': group.scripting,\n- 'Send WebSocket Handshake': group.scripting,\n- 'XHR Load': group.scripting,\n- 'XHR Ready State Change': group.scripting,\n-};\n+const {taskToGroup} = require('../lib/task-groups');\nclass PageExecutionTimings extends Audit {\n/**\n@@ -115,11 +32,10 @@ class PageExecutionTimings extends Audit {\n}\n/**\n- * @param {!Array<TraceEvent>} trace\n+ * @param {!DevtoolsTimelineModel} timelineModel\n* @return {!Map<string, number>}\n*/\n- static getExecutionTimingsByCategory(trace) {\n- const timelineModel = new DevtoolsTimelineModel(trace);\n+ static getExecutionTimingsByCategory(timelineModel) {\nconst bottomUpByName = timelineModel.bottomUpGroupBy('EventName');\nconst result = new Map();\n@@ -135,7 +51,12 @@ class PageExecutionTimings extends Audit {\n*/\nstatic audit(artifacts) {\nconst trace = artifacts.traces[PageExecutionTimings.DEFAULT_PASS];\n- const executionTimings = PageExecutionTimings.getExecutionTimingsByCategory(trace);\n+\n+ return artifacts.requestDevtoolsTimelineModel(trace)\n+ .then(devtoolsTimelineModel => {\n+ const executionTimings = PageExecutionTimings.getExecutionTimingsByCategory(\n+ devtoolsTimelineModel\n+ );\nlet totalExecutionTime = 0;\nconst extendedInfo = {};\n@@ -172,6 +93,7 @@ class PageExecutionTimings extends Audit {\nvalue: extendedInfo,\n},\n};\n+ });\n}\n}\n",
"new_path": "lighthouse-core/audits/mainthread-work-breakdown.js",
"old_path": "lighthouse-core/audits/mainthread-work-breakdown.js"
},
{
"change_type": "ADD",
"diff": "+/**\n+ * @license Copyright 2017 Google Inc. All Rights Reserved.\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n+ */\n+'use strict';\n+\n+const ComputedArtifact = require('./computed-artifact');\n+const DTM = require('../../lib/traces/devtools-timeline-model');\n+\n+class DevtoolsTimelineModel extends ComputedArtifact {\n+ get name() {\n+ return 'DevtoolsTimelineModel';\n+ }\n+\n+ /**\n+ * @param {Object} trace\n+ * @return {Object}\n+ */\n+ compute_(trace) {\n+ return Promise.resolve(new DTM(trace));\n+ }\n+}\n+\n+module.exports = DevtoolsTimelineModel;\n",
"new_path": "lighthouse-core/gather/computed/dtm-model.js",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "'use strict';\nconst ComputedArtifact = require('./computed-artifact');\n-const DevtoolsTimelineModel = require('../../lib/traces/devtools-timeline-model');\nclass ScreenshotFilmstrip extends ComputedArtifact {\nget name() {\n@@ -21,13 +20,14 @@ class ScreenshotFilmstrip extends ComputedArtifact {\n/**\n* @param {{traceEvents: !Array}} trace\n+ * @param {!Artifacts} trace\n* @return {!Promise}\n*/\n- compute_(trace) {\n- const model = new DevtoolsTimelineModel(trace.traceEvents);\n+ compute_(trace, artifacts) {\n+ return artifacts.requestDevtoolsTimelineModel(trace).then(model => {\nconst filmStripFrames = model.filmStripModel().frames();\n-\nconst frameFetches = filmStripFrames.map(frame => this.fetchScreenshot(frame));\n+\nreturn Promise.all(frameFetches).then(images => {\nconst result = filmStripFrames.map((frame, i) => ({\ntimestamp: frame.timestamp,\n@@ -35,6 +35,7 @@ class ScreenshotFilmstrip extends ComputedArtifact {\n}));\nreturn result;\n});\n+ });\n}\n}\n",
"new_path": "lighthouse-core/gather/computed/screenshots.js",
"old_path": "lighthouse-core/gather/computed/screenshots.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -91,8 +91,9 @@ function prepareAssets(artifacts, audits) {\nif (audits) {\nconst evts = new Metrics(traceData.traceEvents, audits).generateFakeEvents();\n- traceData.traceEvents.push(...evts);\n+ traceData.traceEvents = traceData.traceEvents.concat(evts);\n}\n+\nassets.push({\ntraceData,\ndevtoolsLog,\n",
"new_path": "lighthouse-core/lib/asset-saver.js",
"old_path": "lighthouse-core/lib/asset-saver.js"
},
{
"change_type": "ADD",
"diff": "+/**\n+ * @license Copyright 2017 Google Inc. All Rights Reserved.\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n+ */\n+'use strict';\n+\n+const groupIdToName = {\n+ loading: 'Network request loading',\n+ parseHTML: 'Parsing HTML & CSS',\n+ styleLayout: 'Style & Layout',\n+ compositing: 'Compositing',\n+ painting: 'Paint',\n+ gpu: 'GPU',\n+ scripting: 'Script Evaluation',\n+ scriptParseCompile: 'Script Parsing & Compile',\n+ scriptGC: 'Garbage collection',\n+ other: 'Other',\n+ images: 'Images',\n+};\n+\n+const taskToGroup = {\n+ 'Animation': groupIdToName.painting,\n+ 'Async Task': groupIdToName.other,\n+ 'Frame Start': groupIdToName.painting,\n+ 'Frame Start (main thread)': groupIdToName.painting,\n+ 'Cancel Animation Frame': groupIdToName.scripting,\n+ 'Cancel Idle Callback': groupIdToName.scripting,\n+ 'Compile Script': groupIdToName.scriptParseCompile,\n+ 'Composite Layers': groupIdToName.compositing,\n+ 'Console Time': groupIdToName.scripting,\n+ 'Image Decode': groupIdToName.images,\n+ 'Draw Frame': groupIdToName.painting,\n+ 'Embedder Callback': groupIdToName.scripting,\n+ 'Evaluate Script': groupIdToName.scripting,\n+ 'Event': groupIdToName.scripting,\n+ 'Animation Frame Fired': groupIdToName.scripting,\n+ 'Fire Idle Callback': groupIdToName.scripting,\n+ 'Function Call': groupIdToName.scripting,\n+ 'DOM GC': groupIdToName.scriptGC,\n+ 'GC Event': groupIdToName.scriptGC,\n+ 'GPU': groupIdToName.gpu,\n+ 'Hit Test': groupIdToName.compositing,\n+ 'Invalidate Layout': groupIdToName.styleLayout,\n+ 'JS Frame': groupIdToName.scripting,\n+ 'Input Latency': groupIdToName.scripting,\n+ 'Layout': groupIdToName.styleLayout,\n+ 'Major GC': groupIdToName.scriptGC,\n+ 'DOMContentLoaded event': groupIdToName.scripting,\n+ 'First paint': groupIdToName.painting,\n+ 'FMP': groupIdToName.painting,\n+ 'FMP candidate': groupIdToName.painting,\n+ 'Load event': groupIdToName.scripting,\n+ 'Minor GC': groupIdToName.scriptGC,\n+ 'Paint': groupIdToName.painting,\n+ 'Paint Image': groupIdToName.images,\n+ 'Paint Setup': groupIdToName.painting,\n+ 'Parse Stylesheet': groupIdToName.parseHTML,\n+ 'Parse HTML': groupIdToName.parseHTML,\n+ 'Parse Script': groupIdToName.scriptParseCompile,\n+ 'Other': groupIdToName.other,\n+ 'Rasterize Paint': groupIdToName.painting,\n+ 'Recalculate Style': groupIdToName.styleLayout,\n+ 'Request Animation Frame': groupIdToName.scripting,\n+ 'Request Idle Callback': groupIdToName.scripting,\n+ 'Request Main Thread Frame': groupIdToName.painting,\n+ 'Image Resize': groupIdToName.images,\n+ 'Finish Loading': groupIdToName.loading,\n+ 'Receive Data': groupIdToName.loading,\n+ 'Receive Response': groupIdToName.loading,\n+ 'Send Request': groupIdToName.loading,\n+ 'Run Microtasks': groupIdToName.scripting,\n+ 'Schedule Style Recalculation': groupIdToName.styleLayout,\n+ 'Scroll': groupIdToName.compositing,\n+ 'Task': groupIdToName.other,\n+ 'Timer Fired': groupIdToName.scripting,\n+ 'Install Timer': groupIdToName.scripting,\n+ 'Remove Timer': groupIdToName.scripting,\n+ 'Timestamp': groupIdToName.scripting,\n+ 'Update Layer': groupIdToName.compositing,\n+ 'Update Layer Tree': groupIdToName.compositing,\n+ 'User Timing': groupIdToName.scripting,\n+ 'Create WebSocket': groupIdToName.scripting,\n+ 'Destroy WebSocket': groupIdToName.scripting,\n+ 'Receive WebSocket Handshake': groupIdToName.scripting,\n+ 'Send WebSocket Handshake': groupIdToName.scripting,\n+ 'XHR Load': groupIdToName.scripting,\n+ 'XHR Ready State Change': groupIdToName.scripting,\n+};\n+\n+module.exports = {\n+ groupIdToName,\n+ taskToGroup,\n+};\n",
"new_path": "lighthouse-core/lib/task-groups.js",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "/* eslint-env mocha */\nconst BootupTime = require('../../audits/bootup-time.js');\n-const fs = require('fs');\n+const Runner = require('../../runner.js');\nconst assert = require('assert');\n+const {groupIdToName} = require('../../lib/task-groups');\n-// sadly require(file) is not working correctly.\n-// traceParser parser returns preact trace data the same as JSON.parse\n-// fails when require is used\n-const acceptableTrace = JSON.parse(\n- fs.readFileSync(__dirname + '/../fixtures/traces/progressive-app-m60.json')\n-);\n-const errorTrace = JSON.parse(\n- fs.readFileSync(__dirname + '/../fixtures/traces/airhorner_no_fcp.json')\n-);\n+const acceptableTrace = require('../fixtures/traces/progressive-app-m60.json');\n+const errorTrace = require('../fixtures/traces/airhorner_no_fcp.json');\ndescribe('Performance: bootup-time audit', () => {\nit('should compute the correct BootupTime values', () => {\n- const artifacts = {\n+ const artifacts = Object.assign({\ntraces: {\n[BootupTime.DEFAULT_PASS]: acceptableTrace,\n},\n- };\n+ }, Runner.instantiateComputedArtifacts());\n- const output = BootupTime.audit(artifacts);\n+ return BootupTime.audit(artifacts).then(output => {\nassert.equal(output.details.items.length, 8);\nassert.equal(output.score, true);\nassert.equal(Math.round(output.rawValue), 176);\n@@ -40,26 +34,29 @@ describe('Performance: bootup-time audit', () => {\nreturn roundedValue;\n};\n- assert.deepEqual(roundedValueOf('https://www.google-analytics.com/analytics.js'), {'Script Evaluation': 40.1, 'Script Parsing & Compile': 9.6, 'Style & Layout': 0.2});\n- assert.deepEqual(roundedValueOf('https://pwa.rocks/script.js'), {'Script Evaluation': 31.8, 'Style & Layout': 5.5, 'Script Parsing & Compile': 1.3});\n- assert.deepEqual(roundedValueOf('https://www.googletagmanager.com/gtm.js?id=GTM-Q5SW'), {'Script Evaluation': 25, 'Script Parsing & Compile': 5.5, 'Style & Layout': 1.2});\n- assert.deepEqual(roundedValueOf('https://www.google-analytics.com/plugins/ua/linkid.js'), {'Script Evaluation': 25.2, 'Script Parsing & Compile': 1.2});\n- assert.deepEqual(roundedValueOf('https://www.google-analytics.com/cx/api.js?experiment=jdCfRmudTmy-0USnJ8xPbw'), {'Script Parsing & Compile': 3, 'Script Evaluation': 1.2});\n- assert.deepEqual(roundedValueOf('https://www.google-analytics.com/cx/api.js?experiment=qvpc5qIfRC2EMnbn6bbN5A'), {'Script Parsing & Compile': 2.5, 'Script Evaluation': 1});\n- assert.deepEqual(roundedValueOf('https://pwa.rocks/'), {'Parsing DOM': 14.2, 'Script Evaluation': 6.1, 'Script Parsing & Compile': 1.2});\n- assert.deepEqual(roundedValueOf('https://pwa.rocks/0ff789bf.js'), {'Parsing DOM': 0});\n+ assert.deepEqual(roundedValueOf('https://www.google-analytics.com/analytics.js'), {[groupIdToName.scripting]: 40.1, [groupIdToName.scriptParseCompile]: 9.6, [groupIdToName.styleLayout]: 0.2});\n+ assert.deepEqual(roundedValueOf('https://pwa.rocks/script.js'), {[groupIdToName.scripting]: 31.8, [groupIdToName.styleLayout]: 5.5, [groupIdToName.scriptParseCompile]: 1.3});\n+ assert.deepEqual(roundedValueOf('https://www.googletagmanager.com/gtm.js?id=GTM-Q5SW'), {[groupIdToName.scripting]: 25, [groupIdToName.scriptParseCompile]: 5.5, [groupIdToName.styleLayout]: 1.2});\n+ assert.deepEqual(roundedValueOf('https://www.google-analytics.com/plugins/ua/linkid.js'), {[groupIdToName.scripting]: 25.2, [groupIdToName.scriptParseCompile]: 1.2});\n+ assert.deepEqual(roundedValueOf('https://www.google-analytics.com/cx/api.js?experiment=jdCfRmudTmy-0USnJ8xPbw'), {[groupIdToName.scriptParseCompile]: 3, [groupIdToName.scripting]: 1.2});\n+ assert.deepEqual(roundedValueOf('https://www.google-analytics.com/cx/api.js?experiment=qvpc5qIfRC2EMnbn6bbN5A'), {[groupIdToName.scriptParseCompile]: 2.5, [groupIdToName.scripting]: 1});\n+ assert.deepEqual(roundedValueOf('https://pwa.rocks/'), {[groupIdToName.parseHTML]: 14.2, [groupIdToName.scripting]: 6.1, [groupIdToName.scriptParseCompile]: 1.2});\n+ assert.deepEqual(roundedValueOf('https://pwa.rocks/0ff789bf.js'), {[groupIdToName.parseHTML]: 0});\n+ });\n});\nit('should get no data when no events are present', () => {\n- const artifacts = {\n+ const artifacts = Object.assign({\ntraces: {\n[BootupTime.DEFAULT_PASS]: errorTrace,\n},\n- };\n+ }, Runner.instantiateComputedArtifacts());\n- const output = BootupTime.audit(artifacts);\n+ return BootupTime.audit(artifacts)\n+ .then(output => {\nassert.equal(output.details.items.length, 0);\nassert.equal(output.score, true);\nassert.equal(Math.round(output.rawValue), 0);\n});\n});\n+});\n",
"new_path": "lighthouse-core/test/audits/bootup-time-test.js",
"old_path": "lighthouse-core/test/audits/bootup-time-test.js"
},
{
"change_type": "MODIFY",
"diff": "/* eslint-env mocha */\nconst PageExecutionTimings = require('../../audits/mainthread-work-breakdown.js');\n-const fs = require('fs');\n+const Runner = require('../../runner.js');\nconst assert = require('assert');\n-// sadly require(file) is not working correctly.\n-// traceParser parser returns preact trace data the same as JSON.parse\n-// fails when require is used\n-const acceptableTrace = JSON.parse(\n- fs.readFileSync(__dirname + '/../fixtures/traces/progressive-app-m60.json')\n-);\n-const siteWithRedirectTrace = JSON.parse(\n- fs.readFileSync(__dirname + '/../fixtures/traces/site-with-redirect.json')\n-);\n-const loadTrace = JSON.parse(\n- fs.readFileSync(__dirname + '/../fixtures/traces/load.json')\n-);\n-const errorTrace = JSON.parse(\n- fs.readFileSync(__dirname + '/../fixtures/traces/airhorner_no_fcp.json')\n-);\n+const acceptableTrace = require('../fixtures/traces/progressive-app-m60.json');\n+const siteWithRedirectTrace = require('../fixtures/traces/site-with-redirect.json');\n+const loadTrace = require('../fixtures/traces/load.json');\n+const errorTrace = require('../fixtures/traces/airhorner_no_fcp.json');\nconst acceptableTraceExpectations = {\n'Compile Script': 25,\n@@ -72,12 +61,13 @@ const loadTraceExpectations = {\ndescribe('Performance: page execution timings audit', () => {\nit('should compute the correct pageExecutionTiming values for the pwa trace', () => {\n- const artifacts = {\n+ const artifacts = Object.assign({\ntraces: {\n[PageExecutionTimings.DEFAULT_PASS]: acceptableTrace,\n},\n- };\n- const output = PageExecutionTimings.audit(artifacts);\n+ }, Runner.instantiateComputedArtifacts());\n+\n+ return PageExecutionTimings.audit(artifacts).then(output => {\nconst valueOf = name => Math.round(output.extendedInfo.value[name]);\nassert.equal(output.details.items.length, 12);\n@@ -90,14 +80,16 @@ describe('Performance: page execution timings audit', () => {\n}\n}\n});\n+ });\nit('should compute the correct pageExecutionTiming values for the redirect trace', () => {\n- const artifacts = {\n+ const artifacts = Object.assign({\ntraces: {\n[PageExecutionTimings.DEFAULT_PASS]: siteWithRedirectTrace,\n},\n- };\n- const output = PageExecutionTimings.audit(artifacts);\n+ }, Runner.instantiateComputedArtifacts());\n+\n+ return PageExecutionTimings.audit(artifacts).then(output => {\nconst valueOf = name => Math.round(output.extendedInfo.value[name]);\nassert.equal(output.details.items.length, 13);\nassert.equal(output.score, false);\n@@ -109,14 +101,16 @@ describe('Performance: page execution timings audit', () => {\n}\n}\n});\n+ });\nit('should compute the correct pageExecutionTiming values for the load trace', () => {\n- const artifacts = {\n+ const artifacts = Object.assign({\ntraces: {\n[PageExecutionTimings.DEFAULT_PASS]: loadTrace,\n},\n- };\n- const output = PageExecutionTimings.audit(artifacts);\n+ }, Runner.instantiateComputedArtifacts());\n+\n+ return PageExecutionTimings.audit(artifacts).then(output => {\nconst valueOf = name => Math.round(output.extendedInfo.value[name]);\nassert.equal(output.details.items.length, 12);\nassert.equal(output.score, false);\n@@ -128,17 +122,19 @@ describe('Performance: page execution timings audit', () => {\n}\n}\n});\n+ });\nit('should get no data when no events are present', () => {\n- const artifacts = {\n+ const artifacts = Object.assign({\ntraces: {\n[PageExecutionTimings.DEFAULT_PASS]: errorTrace,\n},\n- };\n+ }, Runner.instantiateComputedArtifacts());\n- const output = PageExecutionTimings.audit(artifacts);\n+ return PageExecutionTimings.audit(artifacts).then(output => {\nassert.equal(output.details.items.length, 0);\nassert.equal(output.score, false);\nassert.equal(Math.round(output.rawValue), 0);\n});\n});\n+});\n",
"new_path": "lighthouse-core/test/audits/mainthread-work-breakdown-test.js",
"old_path": "lighthouse-core/test/audits/mainthread-work-breakdown-test.js"
},
{
"change_type": "ADD",
"diff": "+/**\n+ * @license Copyright 2017 Google Inc. All Rights Reserved.\n+ * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0\n+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n+ */\n+'use strict';\n+\n+/* eslint-env mocha */\n+\n+const assert = require('assert');\n+const fs = require('fs');\n+const pwaTrace = require('../../fixtures/traces/progressive-app.json');\n+const Runner = require('../../../runner.js');\n+\n+/**\n+ * Remove all objects that DTM mutates so we can use deepStrictEqual\n+ *\n+ * @param {*} trace\n+ */\n+function removeMutatedDataFromDevtools(trace) {\n+ return trace.map(traceEvent => {\n+ // deepclone\n+ const newTraceEvent = JSON.parse(JSON.stringify(traceEvent));\n+\n+ if (newTraceEvent.args) {\n+ if (newTraceEvent.args.data) {\n+ const data = newTraceEvent.args.data;\n+ delete data.columnNumber;\n+ delete data.lineNumber;\n+ delete data.url;\n+\n+ if (data.stackTrace) {\n+ data.stackTrace.forEach(stack => {\n+ delete stack.columnNumber;\n+ delete stack.lineNumber;\n+ });\n+ }\n+ }\n+\n+ if (newTraceEvent.args.beginData && newTraceEvent.args.beginData.stackTrace) {\n+ newTraceEvent.args.beginData.stackTrace.forEach(stack => {\n+ delete stack.columnNumber;\n+ delete stack.lineNumber;\n+ });\n+ }\n+ }\n+\n+ return newTraceEvent;\n+ });\n+}\n+\n+describe('DTM Model gatherer', () => {\n+ let computedArtifacts;\n+\n+ beforeEach(() => {\n+ computedArtifacts = Runner.instantiateComputedArtifacts();\n+ });\n+\n+ it('measures the pwa.rocks example', () => {\n+ return computedArtifacts.requestDevtoolsTimelineModel({traceEvents: pwaTrace}).then(model => {\n+ assert.equal(model.timelineModel().mainThreadEvents().length, 3157);\n+ });\n+ });\n+\n+ it('does not change the orignal trace events', () => {\n+ // Use fresh trace in case it has been altered by other require()s.\n+ const pwaJson = fs.readFileSync(__dirname +\n+ '/../../fixtures/traces/progressive-app.json', 'utf8');\n+ let pwaTrace = JSON.parse(pwaJson);\n+ return computedArtifacts.requestDevtoolsTimelineModel({traceEvents: pwaTrace})\n+ .then(_ => {\n+ const freshTrace = removeMutatedDataFromDevtools(JSON.parse(pwaJson));\n+ assert.strictEqual(pwaTrace.length, freshTrace.length);\n+\n+ pwaTrace = removeMutatedDataFromDevtools(pwaTrace);\n+ for (let i = 0; i < pwaTrace.length; i++) {\n+ assert.deepStrictEqual(pwaTrace[i], freshTrace[i]);\n+ }\n+ });\n+ });\n+});\n",
"new_path": "lighthouse-core/test/gather/computed/dtm-model-test.js",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "'use strict';\n/* eslint-env mocha */\n-\nconst ScreenshotsGather = require('../../../gather/computed/screenshots');\n+const Runner = require('../../../runner.js');\nconst assert = require('assert');\nconst pwaTrace = require('../../fixtures/traces/progressive-app.json');\n-const screenshotsGather = new ScreenshotsGather();\n+const screenshotsGather = new ScreenshotsGather({});\ndescribe('Screenshot gatherer', () => {\nit('returns an artifact for a real trace', () => {\n- return screenshotsGather.request({traceEvents: pwaTrace}).then(screenshots => {\n+ const artifacts = Object.assign({\n+ traces: {\n+ [screenshotsGather.DEFAULT_PASS]: pwaTrace,\n+ },\n+ }, Runner.instantiateComputedArtifacts());\n+\n+ return artifacts.requestScreenshots({traceEvents: pwaTrace}).then(screenshots => {\nassert.ok(Array.isArray(screenshots));\nassert.equal(screenshots.length, 7);\n",
"new_path": "lighthouse-core/test/gather/computed/screenshots-test.js",
"old_path": "lighthouse-core/test/gather/computed/screenshots-test.js"
},
{
"change_type": "MODIFY",
"diff": "@@ -13,8 +13,8 @@ const assert = require('assert');\n/* eslint-env mocha */\ndescribe('traceParser parser', () => {\nit('returns preact trace data the same as JSON.parse', (done) => {\n- const filename = '../../fixtures/traces/progressive-app-m60.json';\n- const readStream = fs.createReadStream(__dirname + '/' + filename, {\n+ const filename = `${__dirname}/../../fixtures/traces/progressive-app-m60.json`;\n+ const readStream = fs.createReadStream(filename, {\nencoding: 'utf-8',\n// devtools sends traces in 10mb chunks, but this trace is 12MB so we'll do a few chunks\nhighWaterMark: 4 * 1024 * 1024,\n@@ -26,7 +26,7 @@ describe('traceParser parser', () => {\n});\nreadStream.on('end', () => {\nconst streamedTrace = parser.getTrace();\n- const readTrace = require(filename);\n+ const readTrace = JSON.parse(fs.readFileSync(filename));\nassert.equal(streamedTrace.traceEvents.length, readTrace.traceEvents.length);\nassert.deepStrictEqual(streamedTrace.traceEvents, readTrace.traceEvents);\n",
"new_path": "lighthouse-core/test/lib/traces/trace-parser-test.js",
"old_path": "lighthouse-core/test/lib/traces/trace-parser-test.js"
}
] |
JavaScript
|
Apache License 2.0
|
googlechrome/lighthouse
|
core(devtools-timeline-model): extract model generation to a computed artifact...
Assert it doesn't mutate the trace, with a few exceptions. Extract timeline task-groups into lib.
| 1
|
core
|
devtools-timeline-model
|
815,802
|
05.12.2017 06:05:55
| 0
|
1e4d5216fd7b2f9a04e75bd0fe73a76bfe698425
|
feat: Allow to change dropdown positioning.
|
[
{
"change_type": "MODIFY",
"diff": "@@ -107,6 +107,7 @@ map: {\n| addTagText | string | `Add item` | no | Set custom text when using tagging |\n| [typeahead] | Subject | `-` | no | Custom autocomplete or filter. |\n| [disableVirtualScroll] | boolean | false | no | Disable virtual scroll |\n+| [dropdownPosition] | `'below' | 'above'` | `'below'` | no | Set the dropdown position on open |\n| Output | Description |\n| ------------- | ------------- |\n",
"new_path": "README.md",
"old_path": "README.md"
},
{
"change_type": "MODIFY",
"diff": "@@ -15,6 +15,7 @@ import { ReactiveFormsComponent } from './examples/reactive-forms.component';\nimport { SelectEventsComponent } from './examples/events.component';\nimport { SelectMultiComponent } from './examples/multi.component';\nimport { SelectTagsComponent } from './examples/tags.component';\n+import { DropdownPositionsComponent } from './examples/dropdown-positions.component';\nimport { LayoutHeaderComponent } from './layout/header.component';\nimport { LayoutSidenavComponent } from './layout/sidenav-component';\n@@ -35,6 +36,7 @@ const appRoutes: Routes = [\n{ path: 'multiselect', component: SelectMultiComponent, data: { title: 'Multiselect'} },\n{ path: 'events', component: SelectEventsComponent, data: { title: 'Output events'} },\n{ path: 'virtual-scroll', component: VirtualScrollComponent, data: { title: 'Virtual scroll'} },\n+ { path: 'dropdown-position', component: DropdownPositionsComponent, data: { title: 'Dropdown position'} },\n];\n@NgModule({\n@@ -67,6 +69,7 @@ const appRoutes: Routes = [\nSelectTagsComponent,\nLayoutHeaderComponent,\nLayoutSidenavComponent,\n+ DropdownPositionsComponent,\nVirtualScrollComponent\n],\nbootstrap: [AppComponent]\n",
"new_path": "demo/app/app.module.ts",
"old_path": "demo/app/app.module.ts"
},
{
"change_type": "ADD",
"diff": "+import { Component, ChangeDetectionStrategy } from '@angular/core';\n+\n+@Component({\n+ selector: 'select-bindings',\n+ changeDetection: ChangeDetectionStrategy.OnPush,\n+ template: `\n+ <p>\n+ By default the dropdown is displayed below the ng-select. You can change the default position by setting dropdownPosition to above or below.\n+ </p>\n+\n+ ---html,true\n+ <ng-select [dropdownPosition]=\"dropdownPosition\" [searchable]=\"false\" [items]=\"cities\" >\n+ </ng-select>\n+ ---\n+\n+ <hr>\n+\n+ <label>\n+ <input [(ngModel)]=\"dropdownPosition\" type=\"radio\" [value]=\"'above'\">\n+ above\n+ </label>\n+ <br>\n+\n+ <label>\n+ <input [(ngModel)]=\"dropdownPosition\" type=\"radio\" [value]=\"'below'\">\n+ below\n+ </label>\n+ `\n+})\n+export class DropdownPositionsComponent {\n+ dropdownPosition: 'above' | 'below' = 'below';\n+ cities = [\n+ { value: 1, label: 'Vilnius' },\n+ { value: 2, label: 'Kaunas' },\n+ { value: 3, label: 'Pavilnys' }\n+ ];\n+}\n+\n",
"new_path": "demo/app/examples/dropdown-positions.component.ts",
"old_path": null
},
{
"change_type": "MODIFY",
"diff": "@@ -28,6 +28,9 @@ import { Component } from '@angular/core';\n<li class=\"nav-item\" routerLinkActive=\"active\">\n<a class=\"nav-link\" routerLink=\"/events\">Output events</a>\n</li>\n+ <li class=\"nav-item\" routerLinkActive=\"active\">\n+ <a class=\"nav-link\" routerLink=\"/dropdown-position\">Dropdown position</a>\n+ </li>\n</ul>\n`\n})\n",
"new_path": "demo/app/layout/sidenav-component.ts",
"old_path": "demo/app/layout/sidenav-component.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -28,8 +28,6 @@ $color-selected: #f5faff;\n&.opened {\n>.ng-control {\n- border-bottom-right-radius: 0;\n- border-bottom-left-radius: 0;\nbackground: #fff;\nborder-color: #b3b3b3 #ccc #d9d9d9;\n}\n@@ -41,6 +39,32 @@ $color-selected: #f5faff;\nborder-color: transparent transparent #666;\n}\n}\n+ &.below {\n+ .ng-menu-outer {\n+ top: 100%;\n+ border-bottom-right-radius: 4px;\n+ border-bottom-left-radius: 4px;\n+ border-top-color: #e6e6e6;\n+ margin-top: -1px;\n+ }\n+ >.ng-control {\n+ border-bottom-right-radius: 0;\n+ border-bottom-left-radius: 0;\n+ }\n+ }\n+ &.above {\n+ .ng-menu-outer {\n+ bottom: 100%;\n+ border-top-right-radius: 4px;\n+ border-top-left-radius: 4px;\n+ border-bottom-color: #e6e6e6;\n+ margin-bottom: -1px;\n+ }\n+ >.ng-control {\n+ border-top-right-radius: 0;\n+ border-top-left-radius: 0;\n+ }\n+ }\n.ng-menu-outer {\nvisibility: visible;\n}\n@@ -204,17 +228,12 @@ $color-selected: #f5faff;\n}\n.ng-menu-outer {\nvisibility: hidden;\n- border-bottom-right-radius: 4px;\n- border-bottom-left-radius: 4px;\nbackground-color: #fff;\nborder: 1px solid #ccc;\n- border-top-color: #e6e6e6;\nbox-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);\nbox-sizing: border-box;\n- margin-top: -1px;\nmax-height: 242px;\nposition: absolute;\n- top: 100%;\nwidth: 100%;\nz-index: 3;\n-webkit-overflow-scrolling: touch;\n",
"new_path": "src/ng-select/ng-select.component.scss",
"old_path": "src/ng-select/ng-select.component.scss"
},
{
"change_type": "MODIFY",
"diff": "@@ -520,6 +520,31 @@ describe('NgSelectComponent', function () {\n});\n});\n+ describe('Dropdown position', () => {\n+ let fixture: ComponentFixture<NgSelectBasicTestCmp>\n+\n+ beforeEach(() => {\n+ fixture = createTestingModule(\n+ NgSelectBasicTestCmp,\n+ `<ng-select id=\"select\"></ng-select>`);\n+ });\n+\n+ it('should be set to `below` by default', () => {\n+ const classes = fixture.debugElement.query(By.css('ng-select')).classes;\n+ expect(classes.below).toBeTruthy();\n+ expect(classes.above).toBeFalsy();\n+ });\n+\n+ it('should allow changing dropdown position', () => {\n+ fixture.componentInstance.select.dropdownPosition = 'above';\n+ fixture.detectChanges();\n+\n+ const classes = fixture.debugElement.query(By.css('ng-select')).classes;\n+ expect(classes.below).toBeFalsy();\n+ expect(classes.above).toBeTruthy();\n+ });\n+ });\n+\ndescribe('Custom templates', () => {\nit('should display custom header template', async(() => {\nconst fixture = createTestingModule(\n",
"new_path": "src/ng-select/ng-select.component.spec.ts",
"old_path": "src/ng-select/ng-select.component.spec.ts"
},
{
"change_type": "MODIFY",
"diff": "@@ -45,7 +45,9 @@ const NG_SELECT_VALUE_ACCESSOR = {\nchangeDetection: ChangeDetectionStrategy.OnPush,\nhost: {\n'role': 'dropdown',\n- 'class': 'ng-select'\n+ 'class': 'ng-select',\n+ '[class.above]': 'dropdownPosition === \"above\"',\n+ '[class.below]': 'dropdownPosition === \"below\"',\n}\n})\nexport class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterViewInit, ControlValueAccessor {\n@@ -69,6 +71,7 @@ export class NgSelectComponent implements OnInit, OnDestroy, OnChanges, AfterVie\n@Input() typeToSearchText;\n@Input() addTagText;\n@Input() loadingText;\n+ @Input() dropdownPosition: 'below' | 'above' = 'below';\n@Input()\n@HostBinding('class.typeahead') typeahead: Subject<string>;\n",
"new_path": "src/ng-select/ng-select.component.ts",
"old_path": "src/ng-select/ng-select.component.ts"
}
] |
TypeScript
|
MIT License
|
ng-select/ng-select
|
feat: Allow to change dropdown positioning. (#154)
| 1
|
feat
| null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.