From 8cbf56229bb8c531a48200e5a8a94887854f3e6c Mon Sep 17 00:00:00 2001 From: Muhammad Ndako Date: Thu, 7 May 2020 10:23:30 +0100 Subject: [PATCH 1/7] removed conditional assertions --- test/editor-binding.test.js | 62 ++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/test/editor-binding.test.js b/test/editor-binding.test.js index cf4dfd64..7744dc27 100644 --- a/test/editor-binding.test.js +++ b/test/editor-binding.test.js @@ -24,7 +24,7 @@ changed. The stable and beta version of atom still uses electron 4 inorder to su versions, the assertions need to be made accordingly. In the future when stable and beta start compiling against electron 5, these assertions will be simplified. */ -const isDevBuild = atom.getAppName().toLowerCase().indexOf('atom dev') > -1 +// const isDevBuild = atom.getAppName().toLowerCase().indexOf('atom dev') > -1 suite('EditorBinding', function () { if (process.env.CI) this.timeout(process.env.TEST_TIMEOUT_IN_MS) @@ -107,17 +107,17 @@ suite('EditorBinding', function () { const cursorDecoratedRanges = getCursorDecoratedRanges(editor) - if (isDevBuild) { - return assert.deepEqual( - cursorDecoratedRanges, - [ - {tail: Point(10, 0), head: Point(11, 4)}, - {tail: Point(20, 5), head: Point(20, 0)}, - {tail: Point(3, 0), head: Point(4, 2)}, - {tail: Point(6, 0), head: Point(5, 0)} - ] - ) - } + // if (isDevBuild) { + // return assert.deepEqual( + // cursorDecoratedRanges, + // [ + // {tail: Point(10, 0), head: Point(11, 4)}, + // {tail: Point(20, 5), head: Point(20, 0)}, + // {tail: Point(3, 0), head: Point(4, 2)}, + // {tail: Point(6, 0), head: Point(5, 0)} + // ] + // ) + // } assert.deepEqual( cursorDecoratedRanges, @@ -163,16 +163,16 @@ suite('EditorBinding', function () { const cursorDecoratedRanges = getCursorDecoratedRanges(editor) - if (isDevBuild) { - return assert.deepEqual( - cursorDecoratedRanges, - [ - {tail: Point(10, 0), head: Point(11, 4)}, - {tail: Point(20, 0), head: Point(20, 5)}, - {tail: Point(3, 0), head: Point(4, 2)} - ] - ) - } + // if (isDevBuild) { + // return assert.deepEqual( + // cursorDecoratedRanges, + // [ + // {tail: Point(10, 0), head: Point(11, 4)}, + // {tail: Point(20, 0), head: Point(20, 5)}, + // {tail: Point(3, 0), head: Point(4, 2)} + // ] + // ) + // } assert.deepEqual( cursorDecoratedRanges, [ @@ -266,15 +266,15 @@ suite('EditorBinding', function () { const cursorDecoratedRanges = getCursorDecoratedRanges(editor) - if (isDevBuild) { - return assert.deepEqual( - cursorDecoratedRanges, - [ - {tail: Point(0, 3), head: Point(0, 3)}, - {tail: Point(0, 6), head: Point(0, 6)} - ] - ) - } + // if (isDevBuild) { + // return assert.deepEqual( + // cursorDecoratedRanges, + // [ + // {tail: Point(0, 3), head: Point(0, 3)}, + // {tail: Point(0, 6), head: Point(0, 6)} + // ] + // ) + // } assert.deepEqual( cursorDecoratedRanges, From 84244ce8f459d3fb286d89c5836b8067b26e358a Mon Sep 17 00:00:00 2001 From: Muhammad Ndako Date: Thu, 7 May 2020 10:26:12 +0100 Subject: [PATCH 2/7] commented unused var --- test/editor-binding.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/editor-binding.test.js b/test/editor-binding.test.js index 7744dc27..3d62201c 100644 --- a/test/editor-binding.test.js +++ b/test/editor-binding.test.js @@ -3,7 +3,7 @@ const fs = require('fs') const path = require('path') const SAMPLE_TEXT = fs.readFileSync(path.join(__dirname, 'fixtures', 'sample.js'), 'utf8') const {TextEditor, TextBuffer, Range} = require('atom') -const {Point} = TextBuffer +// const {Point} = TextBuffer const EditorBinding = require('../lib/editor-binding') const {buildAtomEnvironment, destroyAtomEnvironments} = require('./helpers/atom-environments') const {loadPackageStyleSheets} = require('./helpers/ui-helpers') From 560764be4575a30bec25fcd0d2496ade073fcb6f Mon Sep 17 00:00:00 2001 From: Muhammad Ndako Date: Thu, 7 May 2020 10:34:08 +0100 Subject: [PATCH 3/7] added conditional assertions --- test/editor-binding.test.js | 64 ++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/test/editor-binding.test.js b/test/editor-binding.test.js index 3d62201c..cf4dfd64 100644 --- a/test/editor-binding.test.js +++ b/test/editor-binding.test.js @@ -3,7 +3,7 @@ const fs = require('fs') const path = require('path') const SAMPLE_TEXT = fs.readFileSync(path.join(__dirname, 'fixtures', 'sample.js'), 'utf8') const {TextEditor, TextBuffer, Range} = require('atom') -// const {Point} = TextBuffer +const {Point} = TextBuffer const EditorBinding = require('../lib/editor-binding') const {buildAtomEnvironment, destroyAtomEnvironments} = require('./helpers/atom-environments') const {loadPackageStyleSheets} = require('./helpers/ui-helpers') @@ -24,7 +24,7 @@ changed. The stable and beta version of atom still uses electron 4 inorder to su versions, the assertions need to be made accordingly. In the future when stable and beta start compiling against electron 5, these assertions will be simplified. */ -// const isDevBuild = atom.getAppName().toLowerCase().indexOf('atom dev') > -1 +const isDevBuild = atom.getAppName().toLowerCase().indexOf('atom dev') > -1 suite('EditorBinding', function () { if (process.env.CI) this.timeout(process.env.TEST_TIMEOUT_IN_MS) @@ -107,17 +107,17 @@ suite('EditorBinding', function () { const cursorDecoratedRanges = getCursorDecoratedRanges(editor) - // if (isDevBuild) { - // return assert.deepEqual( - // cursorDecoratedRanges, - // [ - // {tail: Point(10, 0), head: Point(11, 4)}, - // {tail: Point(20, 5), head: Point(20, 0)}, - // {tail: Point(3, 0), head: Point(4, 2)}, - // {tail: Point(6, 0), head: Point(5, 0)} - // ] - // ) - // } + if (isDevBuild) { + return assert.deepEqual( + cursorDecoratedRanges, + [ + {tail: Point(10, 0), head: Point(11, 4)}, + {tail: Point(20, 5), head: Point(20, 0)}, + {tail: Point(3, 0), head: Point(4, 2)}, + {tail: Point(6, 0), head: Point(5, 0)} + ] + ) + } assert.deepEqual( cursorDecoratedRanges, @@ -163,16 +163,16 @@ suite('EditorBinding', function () { const cursorDecoratedRanges = getCursorDecoratedRanges(editor) - // if (isDevBuild) { - // return assert.deepEqual( - // cursorDecoratedRanges, - // [ - // {tail: Point(10, 0), head: Point(11, 4)}, - // {tail: Point(20, 0), head: Point(20, 5)}, - // {tail: Point(3, 0), head: Point(4, 2)} - // ] - // ) - // } + if (isDevBuild) { + return assert.deepEqual( + cursorDecoratedRanges, + [ + {tail: Point(10, 0), head: Point(11, 4)}, + {tail: Point(20, 0), head: Point(20, 5)}, + {tail: Point(3, 0), head: Point(4, 2)} + ] + ) + } assert.deepEqual( cursorDecoratedRanges, [ @@ -266,15 +266,15 @@ suite('EditorBinding', function () { const cursorDecoratedRanges = getCursorDecoratedRanges(editor) - // if (isDevBuild) { - // return assert.deepEqual( - // cursorDecoratedRanges, - // [ - // {tail: Point(0, 3), head: Point(0, 3)}, - // {tail: Point(0, 6), head: Point(0, 6)} - // ] - // ) - // } + if (isDevBuild) { + return assert.deepEqual( + cursorDecoratedRanges, + [ + {tail: Point(0, 3), head: Point(0, 3)}, + {tail: Point(0, 6), head: Point(0, 6)} + ] + ) + } assert.deepEqual( cursorDecoratedRanges, From 745a6c6a037440325aaf7a4721cb6d2cf252c621 Mon Sep 17 00:00:00 2001 From: Muhammad Ndako Date: Thu, 7 May 2020 10:59:41 +0100 Subject: [PATCH 4/7] added atom beta to conditional assertion --- test/editor-binding.test.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/editor-binding.test.js b/test/editor-binding.test.js index cf4dfd64..ccda89c0 100644 --- a/test/editor-binding.test.js +++ b/test/editor-binding.test.js @@ -24,7 +24,8 @@ changed. The stable and beta version of atom still uses electron 4 inorder to su versions, the assertions need to be made accordingly. In the future when stable and beta start compiling against electron 5, these assertions will be simplified. */ -const isDevBuild = atom.getAppName().toLowerCase().indexOf('atom dev') > -1 +const appName = atom.getAppName().toLowerCase(); +const isDevOrBetaBuild = appName.indexOf('atom dev') > -1 || appName.indexOf('atom beta') > -1; suite('EditorBinding', function () { if (process.env.CI) this.timeout(process.env.TEST_TIMEOUT_IN_MS) @@ -107,7 +108,7 @@ suite('EditorBinding', function () { const cursorDecoratedRanges = getCursorDecoratedRanges(editor) - if (isDevBuild) { + if (isDevOrBetaBuild) { return assert.deepEqual( cursorDecoratedRanges, [ @@ -163,7 +164,7 @@ suite('EditorBinding', function () { const cursorDecoratedRanges = getCursorDecoratedRanges(editor) - if (isDevBuild) { + if (isDevOrBetaBuild) { return assert.deepEqual( cursorDecoratedRanges, [ @@ -266,7 +267,7 @@ suite('EditorBinding', function () { const cursorDecoratedRanges = getCursorDecoratedRanges(editor) - if (isDevBuild) { + if (isDevOrBetaBuild) { return assert.deepEqual( cursorDecoratedRanges, [ From e807e860b32946fa908f4680595f08db1f2ef73f Mon Sep 17 00:00:00 2001 From: Muhammad Ndako Date: Thu, 7 May 2020 11:07:52 +0100 Subject: [PATCH 5/7] rm ; --- test/editor-binding.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/editor-binding.test.js b/test/editor-binding.test.js index ccda89c0..908c6f0c 100644 --- a/test/editor-binding.test.js +++ b/test/editor-binding.test.js @@ -24,8 +24,8 @@ changed. The stable and beta version of atom still uses electron 4 inorder to su versions, the assertions need to be made accordingly. In the future when stable and beta start compiling against electron 5, these assertions will be simplified. */ -const appName = atom.getAppName().toLowerCase(); -const isDevOrBetaBuild = appName.indexOf('atom dev') > -1 || appName.indexOf('atom beta') > -1; +const appName = atom.getAppName().toLowerCase() +const isDevOrBetaBuild = appName.indexOf('atom dev') > -1 || appName.indexOf('atom beta') > -1 suite('EditorBinding', function () { if (process.env.CI) this.timeout(process.env.TEST_TIMEOUT_IN_MS) From 9893c163f4a7f4e193f1d239ee761f26e145525c Mon Sep 17 00:00:00 2001 From: musa ibrahim Date: Wed, 27 May 2020 10:19:21 +0100 Subject: [PATCH 6/7] fixed assertions --- test/editor-binding.test.js | 61 ++++++------------------------------- 1 file changed, 10 insertions(+), 51 deletions(-) diff --git a/test/editor-binding.test.js b/test/editor-binding.test.js index 908c6f0c..fb1b9406 100644 --- a/test/editor-binding.test.js +++ b/test/editor-binding.test.js @@ -17,16 +17,6 @@ const {FollowState} = require('@atom/teletype-client') const FakeBufferProxy = require('./helpers/fake-buffer-proxy') const BufferBinding = require('../lib/buffer-binding') -/* -We are currently checking if teletype is trying to build against the dev version of atom which uses electron 5. -This is because there is a slight change in electron 5s API and some of the assertions in this tests need to be -changed. The stable and beta version of atom still uses electron 4 inorder to support both electron -versions, the assertions need to be made accordingly. In the future when stable and beta start compiling against -electron 5, these assertions will be simplified. -*/ -const appName = atom.getAppName().toLowerCase() -const isDevOrBetaBuild = appName.indexOf('atom dev') > -1 || appName.indexOf('atom beta') > -1 - suite('EditorBinding', function () { if (process.env.CI) this.timeout(process.env.TEST_TIMEOUT_IN_MS) @@ -108,31 +98,20 @@ suite('EditorBinding', function () { const cursorDecoratedRanges = getCursorDecoratedRanges(editor) - if (isDevOrBetaBuild) { - return assert.deepEqual( - cursorDecoratedRanges, - [ - {tail: Point(10, 0), head: Point(11, 4)}, - {tail: Point(20, 5), head: Point(20, 0)}, - {tail: Point(3, 0), head: Point(4, 2)}, - {tail: Point(6, 0), head: Point(5, 0)} - ] - ) - } - assert.deepEqual( cursorDecoratedRanges, [ - {tail: {row: 3, column: 0}, head: {row: 4, column: 2}}, - {tail: {row: 6, column: 0}, head: {row: 5, column: 0}}, - {tail: {row: 10, column: 0}, head: {row: 11, column: 4}}, - {tail: {row: 20, column: 5}, head: {row: 20, column: 0}} + {tail: Point(10, 0), head: Point(11, 4)}, + {tail: Point(20, 5), head: Point(20, 0)}, + {tail: Point(3, 0), head: Point(4, 2)}, + {tail: Point(6, 0), head: Point(5, 0)} ] ) editor.setSelectedBufferRanges([ [[0, 0], [0, 4]] ]) + assert.deepEqual( editorProxy.selections, { @@ -164,22 +143,12 @@ suite('EditorBinding', function () { const cursorDecoratedRanges = getCursorDecoratedRanges(editor) - if (isDevOrBetaBuild) { - return assert.deepEqual( - cursorDecoratedRanges, - [ - {tail: Point(10, 0), head: Point(11, 4)}, - {tail: Point(20, 0), head: Point(20, 5)}, - {tail: Point(3, 0), head: Point(4, 2)} - ] - ) - } assert.deepEqual( cursorDecoratedRanges, [ - {tail: {row: 3, column: 0}, head: {row: 4, column: 2}}, - {tail: {row: 10, column: 0}, head: {row: 11, column: 4}}, - {tail: {row: 20, column: 0}, head: {row: 20, column: 5}} + {tail: Point(10, 0), head: Point(11, 4)}, + {tail: Point(20, 0), head: Point(20, 5)}, + {tail: Point(3, 0), head: Point(4, 2)} ] ) @@ -267,21 +236,11 @@ suite('EditorBinding', function () { const cursorDecoratedRanges = getCursorDecoratedRanges(editor) - if (isDevOrBetaBuild) { - return assert.deepEqual( - cursorDecoratedRanges, - [ - {tail: Point(0, 3), head: Point(0, 3)}, - {tail: Point(0, 6), head: Point(0, 6)} - ] - ) - } - assert.deepEqual( cursorDecoratedRanges, [ - {tail: {row: 0, column: 6}, head: {row: 0, column: 6}}, - {tail: {row: 0, column: 3}, head: {row: 0, column: 3}} + {tail: Point(0, 3), head: Point(0, 3)}, + {tail: Point(0, 6), head: Point(0, 6)} ] ) }) From c55ea8b8d238b12e2af3b4240703dd678074ffa3 Mon Sep 17 00:00:00 2001 From: Dawidbaranowski1998 <49034330+Dawidbaranowski1998@users.noreply.github.com> Date: Sun, 12 Jul 2020 00:34:42 +0200 Subject: [PATCH 7/7] Revert "Bump https-proxy-agent from 2.2.1 to 2.2.4" This reverts commit 30a2449c8cb40670c44f7c5eb4f58f8c410768b9. --- package-lock.json | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index cd66b3d4..b1309a1e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -191,6 +191,15 @@ } } }, + "agent-base": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", + "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "dev": true, + "requires": { + "es6-promisify": "^5.0.0" + } + }, "ajv": { "version": "6.10.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", @@ -1767,24 +1776,15 @@ } }, "https-proxy-agent": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", - "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz", + "integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==", "dev": true, "requires": { - "agent-base": "^4.3.0", + "agent-base": "^4.1.0", "debug": "^3.1.0" }, "dependencies": { - "agent-base": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", - "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", - "dev": true, - "requires": { - "es6-promisify": "^5.0.0" - } - }, "debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", @@ -1795,9 +1795,9 @@ } }, "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true } }