From 415fa7414b5fc9e13a68a3094f9bec02e5b4a85e Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Sun, 1 Jun 2025 11:55:11 -0700 Subject: [PATCH 1/4] fix: Avoid pass a null value to existsSync --- lib/find_config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/find_config.js b/lib/find_config.js index fe1ad95..ab80b2e 100644 --- a/lib/find_config.js +++ b/lib/find_config.js @@ -20,7 +20,8 @@ module.exports = function (opts) { configPath = fileSearch(configNameSearch, searchPaths); } // confirm the configPath exists and return an absolute path to it - if (fs.existsSync(configPath)) { + // Skip the call to fs.existsSync if configPath is null + if (configPath && fs.existsSync(configPath)) { return path.resolve(configPath); } return null; From 60533692303ebcc97ec85a6b98d2cc6ecced7dfe Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Sun, 1 Jun 2025 11:55:43 -0700 Subject: [PATCH 2/4] chore(ci): Add additional Node versions to matrix --- .github/workflows/dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 3b07263..44a132a 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -31,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - node: [10, 12, 14, 16] + node: [10, 12, 14, 16, 18, 20, 22, 24] os: [ubuntu-latest, windows-latest, macos-latest] steps: From e6b2a55a0a57f617a1b420a4386f8994ddde19e1 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Sun, 1 Jun 2025 11:56:01 -0700 Subject: [PATCH 3/4] chore(ci): Temporarily only build on x86_64 MacOS --- .github/workflows/dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 44a132a..4dfe192 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -32,7 +32,7 @@ jobs: fail-fast: false matrix: node: [10, 12, 14, 16, 18, 20, 22, 24] - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-latest, windows-latest, macos-13] steps: - name: Clone repository From b1f733bb1b8d5a8a4108a6fba9675b1f6315ca89 Mon Sep 17 00:00:00 2001 From: Blaine Bublitz Date: Sun, 1 Jun 2025 11:59:39 -0700 Subject: [PATCH 4/4] chore(ci): Skip sinon tests on Node 10/12 due to broken compatibility --- test/index.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/test/index.js b/test/index.js index a0799e6..b861838 100644 --- a/test/index.js +++ b/test/index.js @@ -3,7 +3,6 @@ var Module = require('module'); var exec = require('child_process').exec; var expect = require('expect'); -var sinon = require('sinon'); var resolve = require('resolve'); var Liftoff = require('../'); @@ -62,6 +61,13 @@ describe('Liftoff', function () { describe('buildEnvironment', function () { it('should locate local module using cwd if no config is found', function (done) { + if (process.versions.node.startsWith("10.") || process.versions.node.startsWith("12.")) { + this.skip(); + return; + } + + var sinon = require('sinon'); + var test = new Liftoff({ name: 'chai' }); var cwd = 'explicit/cwd'; var spy = sinon.spy(resolve, 'sync'); @@ -79,6 +85,13 @@ describe('Liftoff', function () { }); it('should locate global module using NODE_PATH if defined', function (done) { + if (process.versions.node.startsWith("10.") || process.versions.node.startsWith("12.")) { + this.skip(); + return; + } + + var sinon = require('sinon'); + var test = new Liftoff({ name: 'dummy' }); var cwd = 'explicit/cwd'; var spy = sinon.spy(resolve, 'sync');