From d8932ed820bcf401ad82363a780f8600536efe85 Mon Sep 17 00:00:00 2001 From: Benjamin Gray Date: Tue, 14 Jul 2020 15:43:28 +1000 Subject: [PATCH 1/9] add windows core package detection --- lib/snippets.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/snippets.js b/lib/snippets.js index 8e67ec0b..92f281c1 100644 --- a/lib/snippets.js +++ b/lib/snippets.js @@ -11,6 +11,9 @@ const SnippetExpansion = require('./snippet-expansion') const EditorStore = require('./editor-store') const {getPackageRoot} = require('./helpers') +// Used to guess if the snippets file comes from a core package (bundled with Atom) or not +const IS_CORE_PACKAGE = process.platform === "win32" ? /\\node_modules\\/ : /\/node_modules\// + module.exports = { activate () { this.loaded = false @@ -218,7 +221,7 @@ module.exports = { loadPackageSnippets (callback) { const disabledPackageNames = atom.config.get('core.packagesWithSnippetsDisabled') || [] const packages = atom.packages.getLoadedPackages().sort((pack, _) => { - return /\/node_modules\//.test(pack.path) ? -1 : 1 + return IS_CORE_PACKAGE.test(pack.path) ? -1 : 1 }) const snippetsDirPaths = [] From f3392522b75e395b6deffc64ff8121a199aa2e39 Mon Sep 17 00:00:00 2001 From: Benjamin Gray Date: Tue, 14 Jul 2020 15:56:56 +1000 Subject: [PATCH 2/9] test reverting --- lib/snippets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/snippets.js b/lib/snippets.js index 92f281c1..6f78df40 100644 --- a/lib/snippets.js +++ b/lib/snippets.js @@ -12,7 +12,7 @@ const EditorStore = require('./editor-store') const {getPackageRoot} = require('./helpers') // Used to guess if the snippets file comes from a core package (bundled with Atom) or not -const IS_CORE_PACKAGE = process.platform === "win32" ? /\\node_modules\\/ : /\/node_modules\// +const IS_CORE_PACKAGE = /* process.platform === "win32" ? /\\node_modules\\/ : */ /\/node_modules\// module.exports = { activate () { From db86cdbc7ba8ec47c2b7db9b8e57df25bead6bb5 Mon Sep 17 00:00:00 2001 From: Benjamin Gray Date: Tue, 14 Jul 2020 16:21:10 +1000 Subject: [PATCH 3/9] and reapply --- lib/snippets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/snippets.js b/lib/snippets.js index 6f78df40..92f281c1 100644 --- a/lib/snippets.js +++ b/lib/snippets.js @@ -12,7 +12,7 @@ const EditorStore = require('./editor-store') const {getPackageRoot} = require('./helpers') // Used to guess if the snippets file comes from a core package (bundled with Atom) or not -const IS_CORE_PACKAGE = /* process.platform === "win32" ? /\\node_modules\\/ : */ /\/node_modules\// +const IS_CORE_PACKAGE = process.platform === "win32" ? /\\node_modules\\/ : /\/node_modules\// module.exports = { activate () { From c4f2042b66d913891e30f26c2c660bd35eded09b Mon Sep 17 00:00:00 2001 From: Benjamin Gray Date: Fri, 17 Jul 2020 14:18:30 +1000 Subject: [PATCH 4/9] more general solution --- lib/snippets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/snippets.js b/lib/snippets.js index 92f281c1..690566ae 100644 --- a/lib/snippets.js +++ b/lib/snippets.js @@ -12,7 +12,7 @@ const EditorStore = require('./editor-store') const {getPackageRoot} = require('./helpers') // Used to guess if the snippets file comes from a core package (bundled with Atom) or not -const IS_CORE_PACKAGE = process.platform === "win32" ? /\\node_modules\\/ : /\/node_modules\// +const IS_CORE_PACKAGE = new RegExp(`${path.sep}node_modules${path.sep}`); module.exports = { activate () { From 49531edd765cfd302d863182399507bb0a6e8a3c Mon Sep 17 00:00:00 2001 From: Benjamin Gray Date: Fri, 17 Jul 2020 14:27:44 +1000 Subject: [PATCH 5/9] escape regex --- lib/snippets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/snippets.js b/lib/snippets.js index 690566ae..a22d03d9 100644 --- a/lib/snippets.js +++ b/lib/snippets.js @@ -12,7 +12,7 @@ const EditorStore = require('./editor-store') const {getPackageRoot} = require('./helpers') // Used to guess if the snippets file comes from a core package (bundled with Atom) or not -const IS_CORE_PACKAGE = new RegExp(`${path.sep}node_modules${path.sep}`); +const IS_CORE_PACKAGE = new RegExp(`${_.escapeRegExp(path.sep)}node_modules${_.escapeRegExp(path.sep)}`); module.exports = { activate () { From 4d96920da4beab9ffeca64b8def653a9c5be4492 Mon Sep 17 00:00:00 2001 From: Benjamin Gray Date: Fri, 18 Sep 2020 18:44:05 +1000 Subject: [PATCH 6/9] Trigger CI From 11f511671ac7bf86f76e39d2c0bbde2f7efa0b54 Mon Sep 17 00:00:00 2001 From: Benjamin Gray Date: Fri, 18 Sep 2020 18:47:09 +1000 Subject: [PATCH 7/9] nightly channel --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 20cfe517..c30478f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,9 @@ notifications: on_success: never on_failure: change +env: + - ATOM_CHANNEL=nightly + script: 'curl -s https://raw.githubusercontent.com/atom/ci/master/build-package.sh | sh' git: From a5bf7ec141724cd906a585b2a47f52724805ae18 Mon Sep 17 00:00:00 2001 From: Benjamin Gray Date: Fri, 18 Sep 2020 18:52:35 +1000 Subject: [PATCH 8/9] Trigger CI (still nightly) From 2e65a149dcc4c3ab6fefa3146a42af130d7f5849 Mon Sep 17 00:00:00 2001 From: Benjamin Gray Date: Mon, 21 Sep 2020 19:48:29 +1000 Subject: [PATCH 9/9] Trigger CI