Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Chedeau vjeux

View GitHub Profile
View doc-printer.js
"use strict";
const MODE_BREAK = 1;
const MODE_FLAT = 2;
function fits(next, restCommands, width) {
let restIdx = restCommands.length;
const cmds = [ next ];
while (width >= 0) {
if (cmds.length === 0) {
View nuclide.diff
diff --git a/pkg/nuclide-diff-view/lib/DiffViewComponent.js b/pkg/nuclide-diff-view/lib/DiffViewComponent.js
index 428540f..1370d1c 100644
--- a/pkg/nuclide-diff-view/lib/DiffViewComponent.js
+++ b/pkg/nuclide-diff-view/lib/DiffViewComponent.js
@@ -228,11 +228,12 @@ export function pixelRangeForNavigationSection(
const lineHeight = textEditorElement.getModel().getLineHeightInPixels();
return {
top: textEditorElement.pixelPositionForBufferPosition([lineNumber, 0]).top,
- bottom: textEditorElement.pixelPositionForBufferPosition([
- lineNumber + lineCount - 1,
View nuclide.diff
diff --git a/pkg/commons-atom/AutocompleteCacher.js b/pkg/commons-atom/AutocompleteCacher.js
index dfc28eb..f6dd99a 100644
--- a/pkg/commons-atom/AutocompleteCacher.js
+++ b/pkg/commons-atom/AutocompleteCacher.js
@@ -68,8 +68,9 @@ export default class AutocompleteCacher<T> {
: defaultShouldFilter;
return lastRequest.bufferPosition.row ===
currentRequest.bufferPosition.row &&
- lastRequest.bufferPosition.column + 1 ===
- currentRequest.bufferPosition.column &&
View test262-fix.diff
Index: ../test262/test//built-ins/Function/prototype/toString/getter-class-static.js
===================================================================
--- ../test262/test//built-ins/Function/prototype/toString/getter-class-static.js
+++ ../test262/test//built-ins/Function/prototype/toString/getter-class-static.js
@@ -9,5 +9,6 @@
let f = Object.getOwnPropertyDescriptor(
class {
- static get /* before */
+ static get;
+ /* before */
View test262.diff
../test262/test//annexB/language/comments/single-line-html-open.js
SyntaxError: Unexpected token (23:1)
../test262/test//annexB/language/expressions/object/__proto__-duplicate.js
SyntaxError: Redefinition of __proto__ property (20:2)
../test262/test//annexB/language/function-code/if-decl-else-decl-a-func-block-scoping.js
SyntaxError: Unexpected token (41:12)
../test262/test//annexB/language/function-code/if-decl-else-decl-a-func-exsting-block-fn-no-init.js
SyntaxError: Unexpected token (34:12)
../test262/test//annexB/language/function-code/if-decl-else-decl-a-func-exsting-block-fn-update.js
SyntaxError: Unexpected token (42:12)
View react-native.diff
../react-native/Libraries//BatchedBridge/NativeModules.js
163 | NativeModules[info.name] = info.module;
164 | }
165 | // If there's no module config, define a lazy getter else {
166 | defineLazyObjectProperty(NativeModules, info.name, {
167 | get: () => loadModule(info.name, moduleID)
168 | });
169 | }
170 | });
171 | }
View react.diff
Index: ../react/src/isomorphic/children/__tests__/ReactChildren-test.js
===================================================================
--- ../react/src/isomorphic/children/__tests__/ReactChildren-test.js
+++ ../react/src/isomorphic/children/__tests__/ReactChildren-test.js
@@ -206,12 +206,12 @@
<div>
{
- [
- ReactFragment.create({
- firstHalfKey: [ zero, one, two ],
View check.patch
Index: ../nuclide/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/Main.js
===================================================================
--- ../nuclide/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/Main.js
+++ ../nuclide/pkg/nuclide-debugger/VendorLib/devtools/front_end/main/Main.js
@@ -82,5 +82,6 @@
*/
function fetchItemFromProvider(provider) {
- return /** @type {!WebInspector.StatusBarItem.Provider} */
+ return;
+ /** @type {!WebInspector.StatusBarItem.Provider} */
View nucl.diff
This file has been truncated, but you can view the full file.
diff --git a/pkg/commons-atom/ActiveEditorRegistry.js b/pkg/commons-atom/ActiveEditorRegistry.js
index ed71a95..a957228 100644
--- a/pkg/commons-atom/ActiveEditorRegistry.js
+++ b/pkg/commons-atom/ActiveEditorRegistry.js
@@ -121,10 +121,8 @@ export default class ActiveEditorRegistry<T: Provider, V> {
if (editor == null) {
return Observable.of(editor);
}
- return Observable.concat(
View gist:305d15b61dca83fc1e4d8d7b7eac79a0
This file has been truncated, but you can view the full file.
diff --git a/pkg/commons-atom/ActiveEditorRegistry.js b/pkg/commons-atom/ActiveEditorRegistry.js
index ed71a95..a957228 100644
--- a/pkg/commons-atom/ActiveEditorRegistry.js
+++ b/pkg/commons-atom/ActiveEditorRegistry.js
@@ -121,10 +121,8 @@ export default class ActiveEditorRegistry<T: Provider, V> {
if (editor == null) {
return Observable.of(editor);
}
- return Observable.concat(